Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRAUIX1

GMRAUIX1.m

Go to the documentation of this file.
GMRAUIX1 ;HIRMFO/RM-XREF UTILITY FOR "ASGN" AND "AVER" XREFS ; 11/6/91
 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
EN1 ; ENTRY FROM EITHER FIELD .01 (AVER1), 19 (AVER0) OR 22 (AVER2) XREFS
 ; OF FILE 120.8.
 ; FOR FURTHER INFO ON THESE XREFS SEE INTERNAL RELATIONS SECTION
 ; OF THE ALLERGY TRACKING SYSTEM TECHNICAL MANUAL.
 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),"^"))
 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)
 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)
 K GMRA
 Q
EN2 ; ENTRY FROM EITHER FIELD 15 (ASGN) OR 22 (ASGN1) XREFS OF FILE 120.8.
 ; FOR FURTHER INFO ON THESE XREFS SEE INTERNAL RELATIONS SECTION
 ; OF THE ALLERGY TRACKING SYSTEM TECHNICAL MANUAL.
 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))
 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)
 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)
 K GMRA
 Q