XUTMUTL ;SFISC/RWF - TaskMan: Utility ;3/4/96 12:55 [ 04/02/2003 8:29 AM ]
;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
;;8.0;KERNEL;**20**;Jul 10, 1995
Q
ENV ;Establish Routine Environment
K DIRUT,DTOUT,DUOUT ;Clean-up for so we can use them too.
Q:$D(ZTENV)&$D(ZTKEY)
I $S($D(DUZ)[0:1,DUZ="":1,1:0) W !?5,"I do not know who you are (your DUZ variable is ",$S($D(DUZ)[0:"undefined).",1:"null).") Q
I $D(^VA(200,DUZ,0))[0 W !?5,"User # ",DUZ," is not defined in this uci. I'm not sure who you are." Q
S ZTKEY=$D(^XUSEC("ZTMQ",DUZ)),ZTNAME=$P(^VA(200,DUZ,0),U) X ^%ZOSF("UCI") S XUTMUCI=Y
S ZTENV=1 ;Use as a flag to show OK.
I '$D(ZTQUEUED) D HOME^%ZIS W @IOF
Q
;
LOAD(XUTSK,XUR) ;Load Task data
S @XUR@(0)=$G(^%ZTSK(XUTSK,0)),@XUR@(.03)=$G(^(.03)),@XUR@(.1)=$G(^(.1)),@XUR@(.2)=$G(^(.2)),@XUR@(.25)=$G(^(.25))
Q
XQA ;Call from the Alert system
Q:XQADATA'>0
N ZTKEY,ZTNAME,XUTMUCI,ZTENV,DIR,DIRUT,Y
D ENV,EN^XUTMTP(XQADATA)
S DIR(0)="E" D ^DIR
Q
;
OPTSCH(OPTION,WHEN,DEVICE,FREQ) ;Schedule an Option.
N DIE,DR,DA ;,XUTMDA
D FIND^DIC(19.2,,,"X",OPTION,5,,,,"XUTMDA","XUTMMSG")
Q
XUTMUTL ;SFISC/RWF - TaskMan: Utility ;3/4/96 12:55 [ 04/02/2003 8:29 AM ]
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
+2 ;;8.0;KERNEL;**20**;Jul 10, 1995
+3 QUIT
ENV ;Establish Routine Environment
+1 ;Clean-up for so we can use them too.
KILL DIRUT,DTOUT,DUOUT
+2 IF $DATA(ZTENV)&$DATA(ZTKEY)
QUIT
+3 IF $SELECT($DATA(DUZ)[0:1,DUZ="":1,1:0)
WRITE !?5,"I do not know who you are (your DUZ variable is ",$SELECT($DATA(DUZ)[0:"undefined).",1:"null).")
QUIT
+4 IF $DATA(^VA(200,DUZ,0))[0
WRITE !?5,"User # ",DUZ," is not defined in this uci. I'm not sure who you are."
QUIT
+5 SET ZTKEY=$DATA(^XUSEC("ZTMQ",DUZ))
SET ZTNAME=$PIECE(^VA(200,DUZ,0),U)
XECUTE ^%ZOSF("UCI")
SET XUTMUCI=Y
+6 ;Use as a flag to show OK.
SET ZTENV=1
+7 IF '$DATA(ZTQUEUED)
DO HOME^%ZIS
WRITE @IOF
+8 QUIT
+9 ;
LOAD(XUTSK,XUR) ;Load Task data
+1 SET @XUR@(0)=$GET(^%ZTSK(XUTSK,0))
SET @XUR@(.03)=$GET(^(.03))
SET @XUR@(.1)=$GET(^(.1))
SET @XUR@(.2)=$GET(^(.2))
SET @XUR@(.25)=$GET(^(.25))
+2 QUIT
XQA ;Call from the Alert system
+1 IF XQADATA'>0
QUIT
+2 NEW ZTKEY,ZTNAME,XUTMUCI,ZTENV,DIR,DIRUT,Y
+3 DO ENV
DO EN^XUTMTP(XQADATA)
+4 SET DIR(0)="E"
DO ^DIR
+5 QUIT
+6 ;
OPTSCH(OPTION,WHEN,DEVICE,FREQ) ;Schedule an Option.
+1 ;,XUTMDA
NEW DIE,DR,DA
+2 DO FIND^DIC(19.2,,,"X",OPTION,5,,,,"XUTMDA","XUTMMSG")
+3 QUIT