APCDEQX ; IHS/CMI/LAB - QUICK EXIT FROM ADD MODE DATA ENTRY ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;
START ;
I '$D(APCDVSIT("NEW")),$P(^AUPNVSIT(APCDVSIT,0),U,9) D INF1 Q
W !!,$C(7),$C(7),"This is the 'Quick Exit' from Data Entry Enter Mode. This visit will",!,"be deleted and you will be returned to the 'VISIT/DATE TIME' prompt.",!
S DIR(0)="Y",DIR("A")="Do you wish to Proceed with the Deletion",DIR("B")="N" D ^DIR K DIR
I $D(DIRUT) K APCDEQX Q
I Y'=1 K APCDEQX D ASK Q
S $P(^AUPNVSIT(APCDVSIT,22),U)="DATA ENTRY EXITED VISIT/DELETED"
D UPDLOG^APCDVDEL(APCDVSIT)
S APCDVDLT=APCDVSIT D ^APCDVDLT K APCDLPAT,APCDLDAT,APCDLVST,APCDODAT
Q
ASK ;
S DIR(0)="Y",DIR("A")="Do you still wish to EXIT this Visit",DIR("B")="Y" D ^DIR K DIR
I $D(DIRUT) K APCDEQX Q
I Y'=1 K APCDEQX Q
S APCDEQX=""
W !!,$C(7),$C(7),"WARNING - You may be leaving an INCOMPLETE VISIT!!"
;
Q
INF1 ;
W $C(7),$C(7),!!,"This visit was created by another module (Pharm, Lab, Dental, etc.)",!,"and CANNOT be deleted with the XIT mnemonic.",!
W !,"Use the MOD mnemonic or MODIFY Menu option to make any changes to this visit.",!,"Use the DELETE Menu option to delete the entire visit.",!!
Q
APCDEQX ; IHS/CMI/LAB - QUICK EXIT FROM ADD MODE DATA ENTRY ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;
START ;
+1 IF '$DATA(APCDVSIT("NEW"))
IF $PIECE(^AUPNVSIT(APCDVSIT,0),U,9)
DO INF1
QUIT
+2 WRITE !!,$CHAR(7),$CHAR(7),"This is the 'Quick Exit' from Data Entry Enter Mode. This visit will",!,"be deleted and you will be returned to the 'VISIT/DATE TIME' prompt.",!
+3 SET DIR(0)="Y"
SET DIR("A")="Do you wish to Proceed with the Deletion"
SET DIR("B")="N"
DO ^DIR
KILL DIR
+4 IF $DATA(DIRUT)
KILL APCDEQX
QUIT
+5 IF Y'=1
KILL APCDEQX
DO ASK
QUIT
+6 SET $PIECE(^AUPNVSIT(APCDVSIT,22),U)="DATA ENTRY EXITED VISIT/DELETED"
+7 DO UPDLOG^APCDVDEL(APCDVSIT)
+8 SET APCDVDLT=APCDVSIT
DO ^APCDVDLT
KILL APCDLPAT,APCDLDAT,APCDLVST,APCDODAT
+9 QUIT
ASK ;
+1 SET DIR(0)="Y"
SET DIR("A")="Do you still wish to EXIT this Visit"
SET DIR("B")="Y"
DO ^DIR
KILL DIR
+2 IF $DATA(DIRUT)
KILL APCDEQX
QUIT
+3 IF Y'=1
KILL APCDEQX
QUIT
+4 SET APCDEQX=""
+5 WRITE !!,$CHAR(7),$CHAR(7),"WARNING - You may be leaving an INCOMPLETE VISIT!!"
+6 ;
+7 QUIT
INF1 ;
+1 WRITE $CHAR(7),$CHAR(7),!!,"This visit was created by another module (Pharm, Lab, Dental, etc.)",!,"and CANNOT be deleted with the XIT mnemonic.",!
+2 WRITE !,"Use the MOD mnemonic or MODIFY Menu option to make any changes to this visit.",!,"Use the DELETE Menu option to delete the entire visit.",!!
+3 QUIT