source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRADGMV.m@ 836

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

initial load of WorldVistAEHR

File size: 1.3 KB
RevLine 
[613]1GMRADGMV ;HIRMFO/RM-ALLERGY PT. MOVEMENT EVENTS ; 7/24/91
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3EN1 ; CALLED FROM GMRADGPM MARK CHART PROTOCOL
4 Q:DGPMP'=""!($P(DGPMA,"^",2)'=1)!'$O(^GMR(120.8,"B",DFN,0))
5 S ZTDTH=$H,ZTDESC="Fire Bulletin to Mark Patient Allergy DFN="_DFN,ZTRTN="EN2^GMRADGMV",ZTIO="",ZTSAVE("DFN")="",ZTSAVE("DGPMA")="" D ^%ZTLOAD K ZTSK
6 Q
7EN2 ; FIRE BULLETINS FOR ACTIVE PATIENT ALLERGIES
8 S GMRANAM=$P($G(^DPT(DFN,0)),"^"),GMRALOC=$P($G(^(.1)),"^"),GMRAMOV=+$G(^(.102)),GMRAWLOC=$P($G(^DGPM(+GMRAMOV,0)),"^",6),GMRAHLOC=+$G(^DIC(42,+GMRAWLOC,44)) G:'GMRAHLOC Q2
9 D PID^VADPT6 S GMRAVIP=VA("PID") D KVAR^VADPT K VA
10 S (GMRAPA,GMRAPA2)=0 F S GMRAPA=$O(^GMR(120.8,"B",DFN,GMRAPA)) Q:GMRAPA'>0 D
11 .S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0))
12 .I $P(GMRAPA(0),"^",12),'+$G(^GMR(120.8,GMRAPA,"ER")),'$O(^GMR(120.8,GMRAPA,13,"B",+DGPMA-.0001)) D
13 ..S GMRAPA2=GMRAPA2+1,GMRAPA2(GMRAPA2)=$P(GMRAPA(0),U,2)
14 ..S GMRAPA2(GMRAPA2)=GMRAPA2(GMRAPA2)_U_$S($P(GMRAPA(0),U,14)="A":"Allergy",$P(GMRAPA(0),U,14)="P":"Adverse Reaction",$P(GMRAPA(0),U,14)="U":"Unknown",1:"")
15 ..Q
16 .Q
17 ;This routine is to send one message with all of the patient's allergies
18 D SITE^GMRAUTL S GMRASITE(0)=$G(^GMRD(120.84,GMRASITE,0))
19 I GMRAPA2,$P(GMRASITE(0),U,10) D BULLT^GMRASEN2
20Q2 K DFN,DGPMA,GMRAHLOC,GMRALOC,GMRAMOV,GMRANAM,GMRAPA,GMRAPA2,GMRAWLOC,GMRASITE S ZTREQ="@"
21 Q
Note: See TracBrowser for help on using the repository browser.