source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAFN3.m

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

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1GMRAFN3 ;HIRMFO/WAA-FDA PART 3 MEDWATCH FORM ;11/30/95 15:19
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3 S X2=0 W "] Hospitalization",?30,"["
4 I GMRAPG1=1 W:$P(^GMR(120.85,GMRAPA1,0),U,17)="y" "X" S:$P(^(0),U,17)="y" (X2,X1)=1 W:'X2 " "
5 W:GMRAPG1'=1 " " W "] required intervention to",?66,"|4. Diagnosis for use(indication)|5. Event abated after use"
6 W !," initial or prolonged prevent impairment/damage",?66,"|",?99,"| stopped or dose reduced?"
7 W ! I GMRAPG1=1 I $P(^GMR(120.85,GMRAPA1,0),U,7)="y"!($P(^(0),U,9)="y") D
8 .I $P(^GMR(120.85,GMRAPA1,0),U,9)'="y" W ?7,"-------"
9 .I $P(^GMR(120.85,GMRAPA1,0),U,9)="y" W ?18,"---------"
10 .Q
11 W ?30,"[" I GMRAPG1=1 W $S('X1:"X",1:" "),"] other"
12 I GMRAPG1'=1 W " ] other"
13 W ?66,"| #",GMRASUS1,":",$E($P(GMRAGNT1,U,4),1,27),?99,"| #",GMRASUS1,": [",$S(GMRASUS1="":" ",$P($G(^TMP($J,"GMR","A",GMRASUS1,"LIKE")),U,3)="y":"YES",$P($G(^("LIKE")),U,3)="n":"NO",1:"N/A") W "]"
14 W !,$E(LINE1,1,66),"|",$E(LINE1,68,99),"|",$E(LINE1,101,131)
15 W !,"3. Date of event",?33,"|4. Date of this report"
16 W ?66,"|" I GMRASUS2'="" W " #",GMRASUS2,":",$E($P(GMRAGNT2,U,4),1,27),?99,"| #",GMRASUS2,": [",$S($P($G(^TMP($J,"GMR","A",GMRASUS2,"LIKE")),U,3)="y":"YES",$P($G(^("LIKE")),U,3)="n":"NO",1:"N/A") W "]"
17 I GMRASUS2="" W ?99,"|"
18 W ! S %=$P(GMRAPA1(0),U) W ?4,$E(%,4,5)_"/"_$E(%,6,7)_"/"_$E(%,2,3),?33,"|",?37 D NOW^%DTC W $E(%,4,5)_"/"_$E(%,6,7)_"/"_$E(%,2,3)
19 W ?66,"|",$E(LINE1,68,131)
20 W !,$E(LINE1,1,66),"|6. Lot # (if known) |7. Exp. date|8. Event reappeared after"
21 W !,"5. Describe event or problem",?66,"|",?88,"|",?101,"| reintroduction"
22DESC ;This code is to find and print the reaction description
23 S GMRANO=0 I GMRAPG1'=1 G DESC1
24 I $D(^GMR(120.85,GMRAPA1,2,0)) S GMRANO=1,DIWL=5,DIWR=63,DIWF="" K ^UTILITY($J,"W",5) S GMRAX=0 D K ^UTILITY($J,"W",5)
25 .F S GMRAX=$O(^GMR(120.85,GMRAPA1,2,GMRAX)) Q:GMRAX<1 S X=$P($G(^GMRD(120.83,$P($G(^GMR(120.85,GMRAPA1,2,GMRAX,0)),U),0)),U) D
26 ..I X="OTHER REACTION" S X=$P($G(^GMR(120.85,GMRAPA1,2,GMRAX,0)),U,2)
27 ..I GMRAX'=1 S X=", "_X
28 ..D ^DIWP
29 ..Q
30 .S X=0 F S X=$O(^UTILITY($J,"W",5,X)) Q:X<1 S ^TMP($J,"GMR","R",X)=$G(^UTILITY($J,"W",5,X,0))
31 .Q
32DESC1 W ! I GMRANO W ^TMP($J,"GMR","R",1) K ^(1) I '$D(^TMP($J,"GMR","R",2)) S GMRANO=0
33 W ?66,"| #",GMRASUS1,":",$E($P(GMRAGNT1,U,8),1,16),?88,"| #",GMRASUS1,":" I GMRASUS1'="" S GMRAX=$P($G(^TMP($J,"GMR","A",GMRASUS1,1)),U,3) D
34 .I GMRAX'="" W $E(GMRAX,4,5),"/",$E(GMRAX,6,7),"/",$E(GMRAX,2,3)
35 .W ?101,"| #",GMRASUS1,": [",$S(GMRASUS1="":" ",$P($G(^TMP($J,"GMR","A",GMRASUS1,"LIKE")),U,6)="y":"YES",$P($G(^("LIKE")),U,6)="n":"NO",1:" "),"]"
36 .Q
37 W ! I GMRANO W ^TMP($J,"GMR","R",2) K ^(2) I '$D(^TMP($J,"GMR","R",3)) S GMRANO=0
38 W ?66,"|",$E(LINE1,68,88),"|",$E(LINE1,90,101),"|",$E(LINE1,103,131)
39 W ! I GMRANO W ^TMP($J,"GMR","R",3) K ^(3) I '$D(^TMP($J,"GMR","R",4)) S GMRANO=0
40 W ?66,"| " I GMRASUS2'="" W "#",GMRASUS2,":",$E($P(GMRAGNT2,U,8),1,16)
41 W ?88,"| " I GMRASUS2'="" W "#",GMRASUS2,":" S GMRAX=$P($G(^TMP($J,"GMR","A",GMRASUS2,1)),U,3) I GMRAX'="" W $E(GMRAX,4,5),"/",$E(GMRAX,6,7),"/",$E(GMRAX,2,3)
42 W ?101,"| " I GMRASUS2'="" W "#",GMRASUS2,": [",$S($P($G(^TMP($J,"GMR","A",GMRASUS2,"LIKE")),U,6)="y":"YES",$P($G(^("LIKE")),U,6)="n":"NO",1:" "),"]"
43 W ! I GMRANO W ^TMP($J,"GMR","R",4) K ^(4) I '$D(^TMP($J,"GMR","R",5)) S GMRANO=0
44 W ?66,"|",$E(LINE1,67,130)
45 W ! I GMRANO W $S('$D(^TMP($J,"GMR","R",6)):^TMP($J,"GMR","R",5),1:" SEE ATTACHED") K:'$D(^TMP($J,"GMR","R",6)) ^TMP($J,"GMR","R",5)
46 W ?66,"|9. (Not applicable to adverse drug event reports)"
47 K GMRANO W !,$E(LINE1,1,66),"|",$E(LINE1,68,131)
48 K GMRAGNT1 K:GMRASUS1'="" ^TMP($J,"GMR","A",GMRASUS1)
49 I GMRASUS2'="" K ^TMP($J,"GMR","A",GMRASUS2),GMRAGNT2
50 Q
Note: See TracBrowser for help on using the repository browser.