source: FOIAVistA/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECLOC.m@ 710

Last change on this file since 710 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1ECLOC ;BIR/MAM,RHK,JPW-Flag Current Locations ;1 May 96
2 ;;2.0; EVENT CAPTURE ;;8 May 96
3 ;
4START S (ECUNM,ECOUT)=0
5 W @IOF,!,"Create/Remove current locations for Event Capture use.",!
6 W !,"Do you want to create or remove access for a location ? CREATE// " R ECACC:DTIME I '$T!(ECACC="^") S ECOUT=1 G END
7 S ECACC=$E(ECACC) S:ECACC="" ECACC="C" I "CcRr"'[ECACC W !!,"Enter <RET> to flag a location to be used in the Event Capture software, or",!,"REMOVE to delete access to a location."
8 I "CcRr"'[ECACC W !!,"Press <RET> to continue " R X:DTIME G START
9 I "Cc"[ECACC G FLAG
10 S ECUNM=1
11FLAG ; entry to flag current locations
12 W @IOF,!,$S('ECUNM:"Create",1:"Remove")," current locations for Event Capture use.",!
13 K DIC S ECOUT=0,DIC=4,DIC(0)="QEAMZ" I ECUNM S DIC("S")="I $G(^DIC(4,+Y,""EC""))"
14 D ^DIC K DIC S:Y<0 ECOUT=1 G:Y<0 END S ECL=+Y,ECLN=$P(Y(0),"^")
15 I ECUNM G UN
16 K DIE,DR S DIE=4,DR="720///1",DA=ECL D ^DIE K DIE,DR W !!,ECLN_" has been flagged for use in the Event Capture software."
17 G END
18UN ; unflag location
19 S ECNO=0 I '$D(^DIC(4,ECL,"EC")) S ECNO=1
20 I $D(^DIC(4,ECL,"EC")),+$P(^("EC"),"^")=0 S ECNO=1
21 I ECNO W !!,ECLN_" has not been flagged as a current location." G END
22ASK W !!,"Are you sure that you want to remove access to this location ? NO// " R ECYN:DTIME I '$T!(ECYN="^") S ECOUT=1 G END
23 S ECYN=$E(ECYN) S:ECYN="" ECYN="N" I "YyNn"'[ECYN W !!,"If this location should no longer be used for the Event Capture software,",!,"enter YES. Enter <RET> to leave this location flagged for use." G ASK
24 G END:"Yy"'[ECYN S DIE=4,DA=ECL,DR="720///@" D ^DIE K DIE,DR
25INAC W !!,"Do you wish to inactivate all event code screens",!,"for this location? " R ECYN:DTIME S ECYN=$E(ECYN) G END:'$T,END:"nN^"[ECYN
26 I "yY"'[ECYN W !!,"Enter Y to inactivate all screens for this location",!," N or return to leave them active." G INAC
27QUE ;que job to batch inactivate
28 W !,"Please wait a few moments"
29 S ZTRTN="DEQ^ECLOC",ZTSAVE("ECL")="",ZTIO="",ZTDESC="INACTIVATE EVENT CODE SCREENS",ZTDTH=$H D ^%ZTLOAD,HOME^%ZIS
30END I 'ECOUT W !!,"Press <RET> to continue " R X:DTIME
31 D ^ECKILL S:$D(ZTQUEUED) ZTREQ="@" W @IOF
32 Q
33DEQ ;queued batch job to inactivate all screens for location ECLOC
34 ;
35 F ECX=0:0 S ECX=$O(^ECJ("AST",ECL,ECX)) Q:'ECX S DA=ECX,DIE=720.3,DR="1///"_DT D ^DIE
36 I $D(ZTQUEUED) S ZTREQ="@"
37 Q
Note: See TracBrowser for help on using the repository browser.