VistA-WorldVistAEHR/r/ADVERSE_REACTION_TRACKING-G.../GMRAREP.m

27 lines
914 B
Mathematica

GMRAREP ;HIRMFO/WAA-REPORTER REPORT COMPLETION SYSTEM ; 1/6/93
;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
EN1 ;
S GMRAOUT=+($G(GMRAOUT))
S GMRALAGO=1 D EN1^GMRAU85 G:GMRAPA1<1 EXIT
S GMRAPA=0 D ^GMRADSP7
REP1 ;
I $P(GMRAPA(0),U,20)'["D" W !,"YOU CAN ONLY EDIT DRUG REACTIONS",! D UNLOCK^GMRAUTL(120.85,GMRAPA1) G EXIT
W @IOF,!,"Reporter Completion"
N GMRAT
S GMRAT=$P($G(^VA(200,DUZ,0)),U,9)
S:GMRAT'="" GMRAT=$P($G(^DIC(3.1,GMRAT,0)),U)
S DIE="^GMR(120.85,",DA=GMRAPA1
S DR="43//"_$P(^VA(200,DUZ,0),U)_";44;45;46;47;48;49;50;51T;52T;52.1//"_GMRAT_";63"
D ^DIE
D UNLOCK^GMRAUTL(120.85,GMRAPA1)
G EXIT
Q
EXIT ;
K %,CX,DX,DY,GMRAAR,GMRACHC,GMRACHK,GMRADFN,GMRADIG,GMRADRUG
K GMRAFLAG,GMRAG,GMRAIV,GMRALL,GMRALLER,GMRALOC,GMRANAM,GMRANAME
K GMRANS,GMRAOTH,GMRAOUT,GMRAPA,GMRAREC,GMRASEX,GMRASWH,GMRAVEDT
K GMRAVER,X,^TMP($J),^TMP("GMRA",$J)
K GMRANAM,GMRAPA1,GMRAX,GMRASITE
D KILL^XUSCLEAN
Q