Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCDEQX

APCDEQX.m

Go to the documentation of this file.
  1. APCDEQX ; IHS/CMI/LAB - QUICK EXIT FROM ADD MODE DATA ENTRY ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ;
  1. START ;
  1. I '$D(APCDVSIT("NEW")),$P(^AUPNVSIT(APCDVSIT,0),U,9) D INF1 Q
  1. 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.",!
  1. S DIR(0)="Y",DIR("A")="Do you wish to Proceed with the Deletion",DIR("B")="N" D ^DIR K DIR
  1. I $D(DIRUT) K APCDEQX Q
  1. I Y'=1 K APCDEQX D ASK Q
  1. S $P(^AUPNVSIT(APCDVSIT,22),U)="DATA ENTRY EXITED VISIT/DELETED"
  1. D UPDLOG^APCDVDEL(APCDVSIT)
  1. S APCDVDLT=APCDVSIT D ^APCDVDLT K APCDLPAT,APCDLDAT,APCDLVST,APCDODAT
  1. Q
  1. ASK ;
  1. S DIR(0)="Y",DIR("A")="Do you still wish to EXIT this Visit",DIR("B")="Y" D ^DIR K DIR
  1. I $D(DIRUT) K APCDEQX Q
  1. I Y'=1 K APCDEQX Q
  1. S APCDEQX=""
  1. W !!,$C(7),$C(7),"WARNING - You may be leaving an INCOMPLETE VISIT!!"
  1. ;
  1. Q
  1. INF1 ;
  1. W $C(7),$C(7),!!,"This visit was created by another module (Pharm, Lab, Dental, etc.)",!,"and CANNOT be deleted with the XIT mnemonic.",!
  1. 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.",!!
  1. Q