VistA-FOIAVistA/r/ADVERSE_REACTION_TRACKING-G.../GMRAPEV0.m

20 lines
1.1 KiB
Mathematica

GMRAPEV0 ;HIRMFO/RM,WAA-VERIFIED A/AR FIELDS EDIT ; 1/13/91
;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
EN1 ; EDIT FIELDS FOR VERIFIER
K GMRAVFY S GMRAVER=0 D EN1^GMRAPEE0 G Q1:GMRAOUT!GMRAERR
G:$P(GMRAPA(0),"^",16) Q1
EN2 ;The is the entry point for GMRAVFY routine
; Variable GMRAVFY is defined if coming from GMRAVFY routine.
D EN1^GMRAPED0 G:GMRAOUT Q1
I '$D(GMRAVFY) S GMRAVCM="V" D ENDING^GMRAPEM1
K GMRAHEAD S GMRAPRNT=0 D EN1^GMRADSP2
YNVER W !,"Change status of this allergy/adverse reaction to verified" S %=0 D YN^DICN I '% W !?4,$C(7),"ANSWER YES IF THIS ALLERGY/ADVERSE REACTION IS TO BE VERIFIED,",!?4,"ELSE ANSWER NO." G YNVER
S:%=-1 GMRAOUT=1 I %=1 S GMRAVER=1,DA=GMRAPA,DIE="^GMR(120.8,",DR="19////1;20///N;21////"_DUZ D ^DIE K DIE,DR,DA D ; Execute the event point for this reaction
.Q:'$D(GMRAPA) S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
.N OROLD,DFN S DFN=$P(GMRAPA(0),U)
.D INP^VADPT S X=$O(^ORD(101,"B","GMRA VERIFY DATA",0))_";ORD(101," D EN^XQOR:X K VAIN,X
.Q
Q1 S GMRAPA(0)=$S($D(^GMR(120.8,GMRAPA,0)):^(0),1:"")
K %,DA,DIC,DIE,DR,GMRAPG,GMRAPRNT
Q