GMRAFN4 ;HIRMFO/WAA-FDA MEDWATCH FORM ;11/30/95 15:22
;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
REL ;This code is to find all the revelant test
S GMRANOR=0,GMRANOC=0
I GMRAPG1'=1 G RELCON
I $D(^GMR(120.85,GMRAPA1,4,0)) S GMRAXX=1 D S GMRANOR=1
.S GMRAX=0 F S GMRAX=$O(^GMR(120.85,GMRAPA1,4,GMRAX)) Q:GMRAX<1 S ^TMP($J,"GMR","T",GMRAXX)=$G(^GMR(120.85,GMRAPA1,4,GMRAX,0)),GMRAXX=GMRAXX+1
.K GMRAX,GMRAXX
.Q
CON ;This code is to find all the concomitant drug info
I $D(^GMR(120.85,GMRAPA1,13,0)) S GMRAXX=1,GMRANOC=1 D
.S GMRAX=0 F S GMRAX=$O(^GMR(120.85,GMRAPA1,13,GMRAX)) Q:GMRAX<1 S ^TMP($J,"GMR","C",(GMRAXX))=^GMR(120.85,GMRAPA1,13,GMRAX,0),GMRAXX=GMRAXX+1
.K GMRAX,GMRAXX
.Q
RELCON W !,"6. Relevant test/laboratory data. including dates",?66,"|10. Concomitant medical products/therapy dates(exclude treatment)"
W ! I GMRANOR I $D(^TMP($J,"GMR","T",1)) W "PLEASE SEE ATTACHED"
W ?66,"|" I GMRANOC S GMRACCT=1 D CONCO^GMRAFN5
W !
W ?66,"|" I GMRANOC S GMRACCT=2 D CONCO^GMRAFN5
W !
W ?66,"|" I GMRANOC S GMRACCT=3 D CONCO^GMRAFN5
W !
W ?66,"|" I GMRANOC D
.I $D(^TMP($J,"GMR","C",5)) W "PLEASE SEE ATTACHED" Q
.S GMRACCT=4 D CONCO^GMRAFN5
.Q
W !
W ?66,"|",$E(LINE2,68,131)
W !,$E(LINE1,1,66),"|D. Suspect Medical Devices"
OTHER ;This code is for other relevant history
S GMRANOO=0 I GMRAPG1'=1 G OTHER2
I $D(^GMR(120.85,GMRAPA1,14,0)) S GMRANOO=1 K ^UTILITY($J,"W") S DIWL=5,DIWR=63,DIWF="" S GMRAX=0 D
.F S GMRAX=$O(^GMR(120.85,GMRAPA1,14,GMRAX)) Q:GMRAX<1 S X=$G(^(GMRAX,0)) D ^DIWP
.S X=0 F S X=$O(^UTILITY($J,"W",5,X)) Q:X<1 S ^TMP($J,"GMR","O",X)=$G(^UTILITY($J,"W",5,X,0))
.Q
OTHER2 W !,"7. Other relevant History, including preexisting medical",?66,"|",$E(LINE1,68,131)
W !," conditions",?66,"| Note: Please use the actual MedWatch form if the event"
W ! I GMRANOO W ?5,^TMP($J,"GMR","O",1) K ^(1) S:'$D(^TMP($J,"GMR","O",2)) GMRANOO=0
W ?66,"| involves a suspected device as well as a suspect drug"
W ! I GMRANOO W ?5,^TMP($J,"GMR","O",2) K ^(2) S:'$D(^TMP($J,"GMR","O",3)) GMRANOO=0
W ?66,"|",$E(LINE2,68,131)
W ! I GMRANOO W ?5,^TMP($J,"GMR","O",3) K ^(3) S:'$D(^TMP($J,"GMR","O",4)) GMRANOO=0
W ?66,"|E. Reporter"
W ! I GMRANOO W ?5,^TMP($J,"GMR","O",4) K ^(4) S:'$D(^TMP($J,"GMR","O",5)) GMRANOO=0
W ?66,"|",$E(LINE1,68,131)
W ! I GMRANOO D
.I $D(^TMP($J,"GMR","O",6)) W ?5,"PLEASE SEE ATTACHED" Q
.W ?5,^TMP($J,"GMR","O",5) K ^(5)
.Q
Q
GMRAFN4 ;HIRMFO/WAA-FDA MEDWATCH FORM ;11/30/95 15:22
+1 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
REL ;This code is to find all the revelant test
+1 SET GMRANOR=0
SET GMRANOC=0
+2 IF GMRAPG1'=1
GOTO RELCON
+3 IF $DATA(^GMR(120.85,GMRAPA1,4,0))
SET GMRAXX=1
Begin DoDot:1
+4 SET GMRAX=0
FOR
SET GMRAX=$ORDER(^GMR(120.85,GMRAPA1,4,GMRAX))
IF GMRAX<1
QUIT
SET ^TMP($JOB,"GMR","T",GMRAXX)=$GET(^GMR(120.85,GMRAPA1,4,GMRAX,0))
SET GMRAXX=GMRAXX+1
+5 KILL GMRAX,GMRAXX
+6 QUIT
End DoDot:1
SET GMRANOR=1
CON ;This code is to find all the concomitant drug info
+1 IF $DATA(^GMR(120.85,GMRAPA1,13,0))
SET GMRAXX=1
SET GMRANOC=1
Begin DoDot:1
+2 SET GMRAX=0
FOR
SET GMRAX=$ORDER(^GMR(120.85,GMRAPA1,13,GMRAX))
IF GMRAX<1
QUIT
SET ^TMP($JOB,"GMR","C",(GMRAXX))=^GMR(120.85,GMRAPA1,13,GMRAX,0)
SET GMRAXX=GMRAXX+1
+3 KILL GMRAX,GMRAXX
+4 QUIT
End DoDot:1
RELCON WRITE !,"6. Relevant test/laboratory data. including dates",?66,"|10. Concomitant medical products/therapy dates(exclude treatment)"
+1 WRITE !
IF GMRANOR
IF $DATA(^TMP($JOB,"GMR","T",1))
WRITE "PLEASE SEE ATTACHED"
+2 WRITE ?66,"|"
IF GMRANOC
SET GMRACCT=1
DO CONCO^GMRAFN5
+3 WRITE !
+4 WRITE ?66,"|"
IF GMRANOC
SET GMRACCT=2
DO CONCO^GMRAFN5
+5 WRITE !
+6 WRITE ?66,"|"
IF GMRANOC
SET GMRACCT=3
DO CONCO^GMRAFN5
+7 WRITE !
+8 WRITE ?66,"|"
IF GMRANOC
Begin DoDot:1
+9 IF $DATA(^TMP($JOB,"GMR","C",5))
WRITE "PLEASE SEE ATTACHED"
QUIT
+10 SET GMRACCT=4
DO CONCO^GMRAFN5
+11 QUIT
End DoDot:1
+12 WRITE !
+13 WRITE ?66,"|",$EXTRACT(LINE2,68,131)
+14 WRITE !,$EXTRACT(LINE1,1,66),"|D. Suspect Medical Devices"
OTHER ;This code is for other relevant history
+1 SET GMRANOO=0
IF GMRAPG1'=1
GOTO OTHER2
+2 IF $DATA(^GMR(120.85,GMRAPA1,14,0))
SET GMRANOO=1
KILL ^UTILITY($JOB,"W")
SET DIWL=5
SET DIWR=63
SET DIWF=""
SET GMRAX=0
Begin DoDot:1
+3 FOR
SET GMRAX=$ORDER(^GMR(120.85,GMRAPA1,14,GMRAX))
IF GMRAX<1
QUIT
SET X=$GET(^(GMRAX,0))
DO ^DIWP
+4 SET X=0
FOR
SET X=$ORDER(^UTILITY($JOB,"W",5,X))
IF X<1
QUIT
SET ^TMP($JOB,"GMR","O",X)=$GET(^UTILITY($JOB,"W",5,X,0))
+5 QUIT
End DoDot:1
OTHER2 WRITE !,"7. Other relevant History, including preexisting medical",?66,"|",$EXTRACT(LINE1,68,131)
+1 WRITE !," conditions",?66,"| Note: Please use the actual MedWatch form if the event"
+2 WRITE !
IF GMRANOO
WRITE ?5,^TMP($JOB,"GMR","O",1)
KILL ^(1)
IF '$DATA(^TMP($JOB,"GMR","O",2))
SET GMRANOO=0
+3 WRITE ?66,"| involves a suspected device as well as a suspect drug"
+4 WRITE !
IF GMRANOO
WRITE ?5,^TMP($JOB,"GMR","O",2)
KILL ^(2)
IF '$DATA(^TMP($JOB,"GMR","O",3))
SET GMRANOO=0
+5 WRITE ?66,"|",$EXTRACT(LINE2,68,131)
+6 WRITE !
IF GMRANOO
WRITE ?5,^TMP($JOB,"GMR","O",3)
KILL ^(3)
IF '$DATA(^TMP($JOB,"GMR","O",4))
SET GMRANOO=0
+7 WRITE ?66,"|E. Reporter"
+8 WRITE !
IF GMRANOO
WRITE ?5,^TMP($JOB,"GMR","O",4)
KILL ^(4)
IF '$DATA(^TMP($JOB,"GMR","O",5))
SET GMRANOO=0
+9 WRITE ?66,"|",$EXTRACT(LINE1,68,131)
+10 WRITE !
IF GMRANOO
Begin DoDot:1
+11 IF $DATA(^TMP($JOB,"GMR","O",6))
WRITE ?5,"PLEASE SEE ATTACHED"
QUIT
+12 WRITE ?5,^TMP($JOB,"GMR","O",5)
KILL ^(5)
+13 QUIT
End DoDot:1
+14 QUIT