source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAFN4.m@ 1046

Last change on this file since 1046 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1GMRAFN4 ;HIRMFO/WAA-FDA MEDWATCH FORM ;11/30/95 15:22
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3REL ;This code is to find all the revelant test
4 S GMRANOR=0,GMRANOC=0
5 I GMRAPG1'=1 G RELCON
6 I $D(^GMR(120.85,GMRAPA1,4,0)) S GMRAXX=1 D S GMRANOR=1
7 .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
8 .K GMRAX,GMRAXX
9 .Q
10CON ;This code is to find all the concomitant drug info
11 I $D(^GMR(120.85,GMRAPA1,13,0)) S GMRAXX=1,GMRANOC=1 D
12 .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
13 .K GMRAX,GMRAXX
14 .Q
15RELCON W !,"6. Relevant test/laboratory data. including dates",?66,"|10. Concomitant medical products/therapy dates(exclude treatment)"
16 W ! I GMRANOR I $D(^TMP($J,"GMR","T",1)) W "PLEASE SEE ATTACHED"
17 W ?66,"|" I GMRANOC S GMRACCT=1 D CONCO^GMRAFN5
18 W !
19 W ?66,"|" I GMRANOC S GMRACCT=2 D CONCO^GMRAFN5
20 W !
21 W ?66,"|" I GMRANOC S GMRACCT=3 D CONCO^GMRAFN5
22 W !
23 W ?66,"|" I GMRANOC D
24 .I $D(^TMP($J,"GMR","C",5)) W "PLEASE SEE ATTACHED" Q
25 .S GMRACCT=4 D CONCO^GMRAFN5
26 .Q
27 W !
28 W ?66,"|",$E(LINE2,68,131)
29 W !,$E(LINE1,1,66),"|D. Suspect Medical Devices"
30OTHER ;This code is for other relevant history
31 S GMRANOO=0 I GMRAPG1'=1 G OTHER2
32 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
33 .F S GMRAX=$O(^GMR(120.85,GMRAPA1,14,GMRAX)) Q:GMRAX<1 S X=$G(^(GMRAX,0)) D ^DIWP
34 .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))
35 .Q
36OTHER2 W !,"7. Other relevant History, including preexisting medical",?66,"|",$E(LINE1,68,131)
37 W !," conditions",?66,"| Note: Please use the actual MedWatch form if the event"
38 W ! I GMRANOO W ?5,^TMP($J,"GMR","O",1) K ^(1) S:'$D(^TMP($J,"GMR","O",2)) GMRANOO=0
39 W ?66,"| involves a suspected device as well as a suspect drug"
40 W ! I GMRANOO W ?5,^TMP($J,"GMR","O",2) K ^(2) S:'$D(^TMP($J,"GMR","O",3)) GMRANOO=0
41 W ?66,"|",$E(LINE2,68,131)
42 W ! I GMRANOO W ?5,^TMP($J,"GMR","O",3) K ^(3) S:'$D(^TMP($J,"GMR","O",4)) GMRANOO=0
43 W ?66,"|E. Reporter"
44 W ! I GMRANOO W ?5,^TMP($J,"GMR","O",4) K ^(4) S:'$D(^TMP($J,"GMR","O",5)) GMRANOO=0
45 W ?66,"|",$E(LINE1,68,131)
46 W ! I GMRANOO D
47 .I $D(^TMP($J,"GMR","O",6)) W ?5,"PLEASE SEE ATTACHED" Q
48 .W ?5,^TMP($J,"GMR","O",5) K ^(5)
49 .Q
50 Q
Note: See TracBrowser for help on using the repository browser.