source: FOIAVistA/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAUIX0.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1GMRAUIX0 ;HIRMFO/RM-CROSS REFERENCES FOR FILE 120.8 ;12/1/95 15:30
2 ;;4.0;Adverse Reaction Tracking;**14**;Mar 29, 1996
3EN1 ; ENTRY FROM THE ADRG01 OR ADRG22 XREF [^DD(120.8,.01 and ^DD(120.8,22]
4 ; FOR FURTHER INFO ON THESE XREFS SEE INTERNAL RELATIONS SECTION
5 ; OF THE ADVERSE REACTION TRACKING TECHNICAL MANUAL.
6 S GMRA("DA")=DA N DA S DA(1)=GMRA("DA")
7 S GMRA("ER")=$S(+GMRA=22:X,1:+$G(^GMR(120.8,DA(1),"ER"))),GMRA(1)=$S(+GMRA=.01:X,1:$P($G(^GMR(120.8,DA(1),0)),"^"))
8 F GMRA("X")=2,3 F DA=0:0 S DA=$O(^GMR(120.8,DA(1),GMRA("X"),DA)) Q:DA'>0 S GMRA("INCL")=$P($G(^GMR(120.8,DA(1),GMRA("X"),DA,0)),"^") D IX
9 K GMRA
10 Q
11EN2 ; ENTRY FROM THE ADRG2 OR ADRG3 XREF [^DD(120.802,.01 & ^DD(120.803,.01]
12 ; FOR FURTHER INFO ON THESE XREFS SEE INTERNAL RELATIONS SECTION
13 ; OF THE ADVERSE REACTION TRACKING TECHNICAL MANUAL.
14 S GMRA("INCL")=X,GMRA("X")=+GMRA,GMRA("ER")=+$G(^GMR(120.8,DA(1),"ER")),GMRA(1)=$P($G(^GMR(120.8,DA(1),0)),"^") D IX
15 K GMRA
16 Q
17IX ; SET/KILL THE INDEX
18 S GMRA("INCL")=$S(GMRA("X")=2:GMRA("INCL"),1:$P($G(^PS(50.605,+GMRA("INCL"),0)),"^"))
19 Q:'$L(GMRA("INCL"))!'$L(GMRA(1))
20 I $P(GMRA,"^",2)&GMRA("ER")!('$P(GMRA,"^",2)&(+GMRA'=22)) K ^GMR(120.8,$P("API^APC","^",GMRA("X")-1),GMRA(1),GMRA("INCL"),DA(1),DA)
21 E S ^GMR(120.8,$P("API^APC","^",GMRA("X")-1),GMRA(1),GMRA("INCL"),DA(1),DA)=""
22 Q
Note: See TracBrowser for help on using the repository browser.