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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRAREP 940 printed Dec 13, 2024@01:40:29 Page 2
GMRAREP ;HIRMFO/WAA-REPORTER REPORT COMPLETION SYSTEM ; 1/6/93
+1 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
EN1 ;
+1 SET GMRAOUT=+($GET(GMRAOUT))
+2 SET GMRALAGO=1
DO EN1^GMRAU85
if GMRAPA1<1
GOTO EXIT
+3 SET GMRAPA=0
DO ^GMRADSP7
REP1 ;
+1 IF $PIECE(GMRAPA(0),U,20)'["D"
WRITE !,"YOU CAN ONLY EDIT DRUG REACTIONS",!
DO UNLOCK^GMRAUTL(120.85,GMRAPA1)
GOTO EXIT
+2 WRITE @IOF,!,"Reporter Completion"
+3 NEW GMRAT
+4 SET GMRAT=$PIECE($GET(^VA(200,DUZ,0)),U,9)
+5 if GMRAT'=""
SET GMRAT=$PIECE($GET(^DIC(3.1,GMRAT,0)),U)
+6 SET DIE="^GMR(120.85,"
SET DA=GMRAPA1
+7 SET DR="43//"_$PIECE(^VA(200,DUZ,0),U)_";44;45;46;47;48;49;50;51T;52T;52.1//"_GMRAT_";63"
+8 DO ^DIE
+9 DO UNLOCK^GMRAUTL(120.85,GMRAPA1)
+10 GOTO EXIT
+11 QUIT
EXIT ;
+1 KILL %,CX,DX,DY,GMRAAR,GMRACHC,GMRACHK,GMRADFN,GMRADIG,GMRADRUG
+2 KILL GMRAFLAG,GMRAG,GMRAIV,GMRALL,GMRALLER,GMRALOC,GMRANAM,GMRANAME
+3 KILL GMRANS,GMRAOTH,GMRAOUT,GMRAPA,GMRAREC,GMRASEX,GMRASWH,GMRAVEDT
+4 KILL GMRAVER,X,^TMP($JOB),^TMP("GMRA",$JOB)
+5 KILL GMRANAM,GMRAPA1,GMRAX,GMRASITE
+6 DO KILL^XUSCLEAN
+7 QUIT