source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAFN2.m@ 701

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

initial load of WorldVistAEHR

File size: 4.0 KB
Line 
1GMRAFN2 ;HIRMFO/WAA-FDA PART 2 MEDWATCH FORM ;11/30/95 15:19
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3FORM ;This is the main form entry point
4 W !,"MEDWatch",?80,"Approved by FDA on 10/20/93"
5 W !,$E(LINE1,1,42),?79,$E(LINE1,79,131)
6 W !,"THE FDA MEDICAL PRODUCTS REPORTING PROGRAM",?79,"| Triage unit sequence #",?131,"|"
7 W !,$E(LINE1,1,42),?79,$E(LINE1,79,131)
8 W !,?79,"|",?131,"|"
9 W !,?59,"Page ",GMRAPG1," of ",GMRAPG2,?79,$E(LINE1,79,131)
10 W !,$E(LINE2,1,66),"|",$E(LINE2,68,131)
11 W !,"A. Patient Information",?66,"| C. Suspect Medication(s)"
12 W !,$E(LINE1,1,66),"|",$E(LINE1,68,131)
13 W !,"1. Patient Indentifier|2. DOB: ",+$E(GMRADOB,4,5),"/",+$E(GMRADOB,6,7),"/",$E(GMRADOB,2,3),?43,"|3. Sex|4. Weight",?66,"|1. Name"
14 W !,GMRAID,?22,"| AGE: "
15AGE ;Age at time of event
16 I GMRAPG1=1 S X1=$P(GMRAPA1(0),U),X2=GMRADOB S X=($E(X1,1,3))-($E(X2,1,3)) S:($E(X1,4,7))<($E(X2,4,7)) X=X-1 W X K X,X1,X2 W ?39,"yrs |"
17 I GMRAPG1'=1 W ?39,"yrs |"
18SEX ;Sex,weight
19 I GMRAPG1=1 W $P(GMRASEX,U,2),?50,"|",$J((GMRAWEI*.4536),5,1) W:GMRAWEI'="" " kg" W ?66
20 I GMRAPG1'=1 W ?50,"| kg",?66
21SUSPECT ;THIS WILL GET THE NEXT SUSPECTED AGENT
22 S GMRASUS=$O(^TMP($J,"GMR","A",GMRASUS)) I GMRASUS'<1 S GMRASUS1=GMRASUS
23 S GMRAGNT1=$S(GMRASUS="":"",1:$G(^TMP($J,"GMR","A",GMRASUS1)))
24 S:GMRASUS="" GMRASUS1=""
25 W "| #",GMRASUS1," : " W $E($P(GMRAGNT1,U),1,30)
26 W !,$E(LINE2,1,66),"|",$E(LINE1,68,131)
27 W !,"B. Adverse Event or Product Problem",?66
28 S GMRASUS=$O(^TMP($J,"GMR","A",GMRASUS)) I GMRASUS'<1 S GMRASUS2=GMRASUS
29 I GMRASUS<1 S GMRASUS2=""
30 E S GMRAGNT2=(^TMP($J,"GMR","A",GMRASUS))
31 W "|" W:GMRASUS2'="" " #",GMRASUS2," : ",$E($P(GMRAGNT2,U),1,30)
32 W !,$E(LINE1,1,66),"|",$E(LINE1,68,131)
33 W !,"1. [X]Adverse Event [ ]Product problem",?66,"|2. Dose,frequency & route used",?99,"| 3. Therapy dates"
34 W !,$E(LINE1,1,66),"| #",GMRASUS1,":" W $E($P(GMRAGNT1,U,2),1,8) I $P(GMRAGNT1,U,2)'="",$P($G(^TMP($J,"GMR","A",GMRASUS1,1)),U,5)'="" W ","
35 I GMRASUS1'="",$P($G(^TMP($J,"GMR","A",GMRASUS1,1)),U,5)'="" W $E($P($G(^TMP($J,"GMR","A",GMRASUS1,1)),U,5),1,8) I $P(GMRAGNT1,U,3)'="" W ","
36 W $E($P(GMRAGNT1,U,3),1,8),?99,"| #",GMRASUS1," : "
37 I GMRASUS1'="",$D(^TMP($J,"GMR","A",GMRASUS1,1)) S DT=$P(^(1),U) I DT'="" S DT=$E(DT,4,5)_"/"_$E(DT,6,7)_"/"_$E(DT,2,3) W DT
38 I GMRASUS1'="",$D(^TMP($J,"GMR","A",GMRASUS1,1)) S DT=$P(^(1),U,2) I DT'="" S DT=$E(DT,4,5)_"/"_$E(DT,6,7)_"/"_$E(DT,2,3) W "-",DT
39 W !,"2. Outcomes attributed to adverse event",?66,"|",$E(LINE1,66,97),"|",$E(LINE1,99,130)
40 S X1=0 W !," ["
41 I GMRAPG1=1 W $S($P(^GMR(120.85,GMRAPA1,0),U,3)="y":"X",1:" ") S:$P(^(0),U,3)="y" X1=1 W "] death: " I X1=1 S Y=$P($G(^DPT(DFN,.35)),U) I Y'<1 W $E(Y,4,5),"/",$E(Y,6,7),"/",$E(Y,2,3)
42 I GMRAPG1'=1 W " ] death:"
43 W ?30,"["
44 I GMRAPG1=1 W $S($P(^GMR(120.85,GMRAPA1,0),U,10)="y":"X",1:" ") S:$P(^(0),U,10)="y" X1=1 W "] disability"
45 I GMRAPG1'=1 W " ] disability"
46 W ?66,"|" I GMRASUS2'="" W " #",GMRASUS2,":" W $E($P(GMRAGNT2,U,2),1,8) I $P(GMRAGNT2,U,2)'="",$P($G(^TMP($J,"GMR","A",GMRASUS2,1)),U,5)'="" W ","
47 I GMRASUS2,$P($G(^TMP($J,"GMR","A",GMRASUS2,1)),U,5)'="" W $E($P($G(^TMP($J,"GMR","A",GMRASUS2,1)),U,5),1,8) I $P(GMRAGNT2,U,3)'="" W ","
48 I GMRASUS2'="" W $E($P(GMRAGNT2,U,3),1,(24-$L($E($P(GMRAGNT2,U,2),1,12)))),?99,"| #",GMRASUS2," : " D
49 .I $D(^TMP($J,"GMR","A",GMRASUS2,1)) S DT=$P(^(1),U) S DT=$E(DT,4,5)_"/"_$E(DT,6,7)_"/"_$E(DT,2,3) W DT
50 .I $D(^TMP($J,"GMR","A",GMRASUS2,1)) S DT=$P(^(1),U,2) I DT'="" S DT=$E(DT,4,5)_"/"_$E(DT,6,7)_"/"_$E(DT,2,3) W "-",DT
51 .Q
52 I GMRASUS2="" W ?99,"|"
53 S X2=0 W !," ["
54 I GMRAPG1=1 W $S($P(^GMR(120.85,GMRAPA1,0),U,5)="y":"X",1:" ") S:$P(^(0),U,5)="y" X1=1 W "] life-threatening"
55 I GMRAPG1'=1 W " ] life-threatening"
56 S X2=0 W ?30,"["
57 I GMRAPG1=1 W $S($P(^GMR(120.85,GMRAPA1,0),U,16)="y":"X",1:" ") S:$P(^(0),U,16)="y" X1=1 W "] congenital anomaly",?66,"|",$E(LINE1,68,131)
58 I GMRAPG1'=1 W " ] congenital anomaly",?66,"|",$E(LINE1,68,131)
59 W !," [" I GMRAPG1=1 D
60 .I $P(^GMR(120.85,GMRAPA1,0),U,9)="y" W "X" S X1=1 Q
61 .I $P(^GMR(120.85,GMRAPA1,0),U,7)="y" W "X" S X1=1 Q
62 .W " "
63 .Q
64 I GMRAPG1'=1 W " "
65 Q
Note: See TracBrowser for help on using the repository browser.