GMRAPER1 ;HIRMFO/RM-REACTION EDIT MODULE DELETE REACTIONS ;12/1/95 13:52
;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
DELREAC ; DELETE SIGNS/SYMPTOMS FROM PATIENT DATA
K DIR S DIR(0)="LOA^1:"_GMRACTR
S DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
S DIR("A")="Delete which signs/symptoms: "
S DIR("?",1)="PLEASE ENTER THE NUMBERS OF THE SIGNS/SYMPTOMS YOU WOULD LIKE TO DELETE."
S DIR("?",2)="RANGES CAN BE SEPARATED BY A HYPHEN (-) AND GROUPS OF NUMBERS,"
S DIR("?")="SEPARATED BY A COMMA (,)."
D ^DIR K DIR
I $D(DTOUT)!($D(DUOUT)) S GMRAOUT=1 Q
S GMRADO=Y
F Y=1:1:$L(GMRADO,",") S GMRAY=$P(GMRADO,",",Y) I +GMRAY D DEL
Q
VALD ; VALIDATE CHOICE NUMBER
I +GMRAPC(1)'=GMRAPC(1)!(GMRAPC(1)>GMRACTR)!(GMRAPC(1)<1) S GMRAOK=0
Q
DEL ;
S GMRARECN=$P(GMRACHC(GMRAY),"^"),GMRAREAC=$P(GMRACHC(GMRAY),"^",2)
I GMRARECN'=GMRAOTH S GMRARDL(GMRARECN)="" K GMRARPR(GMRAREAC,GMRARECN),GMRARAD(GMRARECN)
E K GMRAROT(GMRAREAC),GMRARPR(GMRAREAC,GMRARECN) S GMRAROTD(GMRAREAC)=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRAPER1 1034 printed Nov 22, 2024@16:50:16 Page 2
GMRAPER1 ;HIRMFO/RM-REACTION EDIT MODULE DELETE REACTIONS ;12/1/95 13:52
+1 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
DELREAC ; DELETE SIGNS/SYMPTOMS FROM PATIENT DATA
+1 KILL DIR
SET DIR(0)="LOA^1:"_GMRACTR
+2 SET DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
+3 SET DIR("A")="Delete which signs/symptoms: "
+4 SET DIR("?",1)="PLEASE ENTER THE NUMBERS OF THE SIGNS/SYMPTOMS YOU WOULD LIKE TO DELETE."
+5 SET DIR("?",2)="RANGES CAN BE SEPARATED BY A HYPHEN (-) AND GROUPS OF NUMBERS,"
+6 SET DIR("?")="SEPARATED BY A COMMA (,)."
+7 DO ^DIR
KILL DIR
+8 IF $DATA(DTOUT)!($DATA(DUOUT))
SET GMRAOUT=1
QUIT
+9 SET GMRADO=Y
+10 FOR Y=1:1:$LENGTH(GMRADO,",")
SET GMRAY=$PIECE(GMRADO,",",Y)
IF +GMRAY
DO DEL
+11 QUIT
VALD ; VALIDATE CHOICE NUMBER
+1 IF +GMRAPC(1)'=GMRAPC(1)!(GMRAPC(1)>GMRACTR)!(GMRAPC(1)<1)
SET GMRAOK=0
+2 QUIT
DEL ;
+1 SET GMRARECN=$PIECE(GMRACHC(GMRAY),"^")
SET GMRAREAC=$PIECE(GMRACHC(GMRAY),"^",2)
+2 IF GMRARECN'=GMRAOTH
SET GMRARDL(GMRARECN)=""
KILL GMRARPR(GMRAREAC,GMRARECN),GMRARAD(GMRARECN)
+3 IF '$TEST
KILL GMRAROT(GMRAREAC),GMRARPR(GMRAREAC,GMRARECN)
SET GMRAROTD(GMRAREAC)=""
+4 QUIT