source: FOIAVistA/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAUIX1.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1GMRAUIX1 ;HIRMFO/RM-XREF UTILITY FOR "ASGN" AND "AVER" XREFS ; 11/6/91
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3EN1 ; ENTRY FROM EITHER FIELD .01 (AVER1), 19 (AVER0) OR 22 (AVER2) XREFS
4 ; OF FILE 120.8.
5 ; FOR FURTHER INFO ON THESE XREFS SEE INTERNAL RELATIONS SECTION
6 ; OF THE ALLERGY TRACKING SYSTEM TECHNICAL MANUAL.
7 S GMRA(0)=$G(^GMR(120.8,DA,0)),GMRA("ER")=$S(+GMRA=22:X,1:+$G(^GMR(120.8,DA,"ER"))),GMRA("VER")=$S(+GMRA=19:X,1:$P(GMRA(0),"^",16)),GMRA("DFN")=$S(+GMRA=.01:X,1:$P(GMRA(0),"^"))
8 I $P(GMRA,"^",2),GMRA("DFN") S:'GMRA("ER")&(GMRA("VER")=0) ^GMR(120.8,"AVER",GMRA("DFN"),DA)="" K:GMRA("ER")!(GMRA("VER")'=0) ^GMR(120.8,"AVER",GMRA("DFN"),DA)
9 I '$P(GMRA,"^",2),GMRA("DFN") S:+GMRA=22&(GMRA("VER")=0) ^GMR(120.8,"AVER",GMRA("DFN"),DA)="" K:+GMRA'=22!(GMRA("VER")'=0) ^GMR(120.8,"AVER",GMRA("DFN"),DA)
10 K GMRA
11 Q
12EN2 ; ENTRY FROM EITHER FIELD 15 (ASGN) OR 22 (ASGN1) XREFS OF FILE 120.8.
13 ; FOR FURTHER INFO ON THESE XREFS SEE INTERNAL RELATIONS SECTION
14 ; OF THE ALLERGY TRACKING SYSTEM TECHNICAL MANUAL.
15 S GMRA("ER")=$S(+GMRA=22:X,1:+$G(^GMR(120.8,DA,"ER"))),GMRA("SGN")=$S(+GMRA=15:X,1:$P($G(^GMR(120.8,DA,0)),"^",12))
16 I $P(GMRA,"^",2) S:'GMRA("ER")&(GMRA("SGN")=0) ^GMR(120.8,"ASGN",DA)="" K:GMRA("ER")!(GMRA("SGN")'=0) ^GMR(120.8,"ASGN",DA)
17 I '$P(GMRA,"^",2) S:+GMRA=22&(GMRA("SGN")=0) ^GMR(120.8,"ASGN",DA)="" K:+GMRA'=22!(GMRA("SGN")'=0) ^GMR(120.8,"ASGN",DA)
18 K GMRA
19 Q
Note: See TracBrowser for help on using the repository browser.