source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAVAB.m@ 699

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1GMRAVAB ;HIRMFO/RM-BULLETIN SENT TO VERIFY A/AR ; 12/18/90
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3EN1 ; SEND BULLETIN TO ALL VERIFIERS INDICATING A/AR NEEDS VERIFICATION
4 D KILL^XM
5 N GMRAGRUP,%
6 S GMRANAM="",GMRALOC="",GMRASSN=""
7 ; Build XMB array
8 D VAD^GMRAUTL1($P(GMRAPA(0),U),"",.GMRALOC,.GMRANAM,"",.GMRASSN)
9 I GMRALOC'="",+$G(^DIC(42,GMRALOC,44)) S GMRALOC=$P($G(^SC(+$G(^DIC(42,GMRALOC,44)),0)),U)
10 I GMRALOC="" S GMRALOC="OUT PATIENT"
11 S XMB="GMRA VERIFY ALLERGY"
12 S XMB(1)=GMRANAM
13 S XMB(2)=$P(GMRAPA(0),"^",2)
14 S XMB(3)=$S(GMRALOC'="":GMRALOC,1:"Outpatient"),XMB(4)=GMRASSN
15 S XMB(5)=$S($P(GMRAPA(0),U,6)="o":"Observed",$P(GMRAPA(0),U,6)="h":"Historical",1:"")
16 ; Build XMT array
17 F %=1:1:$L($P(GMRAPA(0),"^",20)) D
18 .S GMRAGRUP=$E($P(GMRAPA(0),"^",20),%)
19 .S XMY("G.GMRA VERIFY "_$S(GMRAGRUP="D":"DRUG",GMRAGRUP="F":"FOOD",1:"OTHER")_" ALLERGY")=""
20 .Q
21 K GMRAREC I $D(^GMR(120.8,GMRAPA,10,0)) D
22 .S GMRAOTH=$O(^GMRD(120.83,"B","OTHER REACTION",0))
23 .S GMRAREC=0 F S GMRAREC=$O(^GMR(120.8,GMRAPA,10,GMRAREC)) Q:GMRAREC'>0 D
24 ..S X=$G(^GMR(120.8,GMRAPA,10,GMRAREC,0))
25 ..S GMRAREC(GMRAREC)=$S($P(X,U)'=GMRAOTH:$P($G(^GMRD(120.83,+$P(X,U),0)),"^"),1:$P(X,U,2))
26 ..I +$P(X,U,4)>0 D
27 ...N GMRASP,GMRAI S GMRASP=" "
28 ...S GMRAREC(GMRAREC)=$E(GMRAREC(GMRAREC),1,40)
29 ...F GMRAI=$L(GMRAREC(GMRAREC)):1:40 S GMRAREC(GMRAREC)=GMRAREC(GMRAREC)_GMRASP
30 ...S GMRAREC(GMRAREC)=GMRAREC(GMRAREC)_" "_$$FMTE^XLFDT($P(X,U,4),1)
31 ...Q
32 ..Q
33 .Q
34 K GMRATXT
35 I $D(GMRAREC)=11 S GMRACNT=3,GMRAREC=0 D
36 .S GMRATXT(1)="Signs/Symptoms Date Observed"
37 .S GMRATXT(2)=$$REPEAT^XLFSTR("-",60)
38 .F S GMRAREC=$O(GMRAREC(GMRAREC)) Q:GMRAREC<1 S GMRATXT(GMRACNT)=GMRAREC(GMRAREC),GMRACNT=GMRACNT+1
39 .Q
40 I $D(GMRATXT) S XMTEXT="GMRATXT("
41 D ^XMB
42 K XMB,XMY,GMRACNT,GMRAREC,GMRATXT,XMTEXT
43 Q
Note: See TracBrowser for help on using the repository browser.