WVUTL10 ;HCIOFO/FT-Women's Health Utility Routine ;1/12/01 14:41
;;1.0;WOMEN'S HEALTH;**14**;Sep 30, 1998
STOPCHK(FLAG) ; Does user want to stop background task?
; FLAG: 0 - Check is done before any output to the user.
; 1 - Check is done after output to user has begun.
Q:'$D(ZTQUEUED) ;not a background task
I $$S^%ZTLOAD D
.S ZTSTOP=1 ;set TaskMan variable equal to 1 to stop task
.K ZTREQ ;keep record of task in task log
.Q
Q:+$G(ZTSTOP)=0 ;no request to stop task
Q:'FLAG ;don't send message to output device
; Print message to output device
N WVSTOP
S WVSTOP(1)=" *** OUTPUT STOPPED AT USER'S REQUEST ***"
S WVSTOP(2)=" Option Name: "_$S($P($G(XQY0),"^")]"":$P($G(XQY0),"^"),1:"Unknown")
S WVSTOP(3)=" Option Menu Text: "_$S($P($G(XQY0),"^",2)]"":$P($G(XQY0),"^",2),1:"Unknown")
S WVSTOP(4)=" Task #: "_$S(+$G(ZTSK)>0:+$G(ZTSK),1:"Unknown")
D EN^DDIOL(.WVSTOP,"","!?10")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HWVUTL10 979 printed Nov 22, 2024@17:57:58 Page 2
WVUTL10 ;HCIOFO/FT-Women's Health Utility Routine ;1/12/01 14:41
+1 ;;1.0;WOMEN'S HEALTH;**14**;Sep 30, 1998
STOPCHK(FLAG) ; Does user want to stop background task?
+1 ; FLAG: 0 - Check is done before any output to the user.
+2 ; 1 - Check is done after output to user has begun.
+3 ;not a background task
if '$DATA(ZTQUEUED)
QUIT
+4 IF $$S^%ZTLOAD
Begin DoDot:1
+5 ;set TaskMan variable equal to 1 to stop task
SET ZTSTOP=1
+6 ;keep record of task in task log
KILL ZTREQ
+7 QUIT
End DoDot:1
+8 ;no request to stop task
if +$GET(ZTSTOP)=0
QUIT
+9 ;don't send message to output device
if 'FLAG
QUIT
+10 ; Print message to output device
+11 NEW WVSTOP
+12 SET WVSTOP(1)=" *** OUTPUT STOPPED AT USER'S REQUEST ***"
+13 SET WVSTOP(2)=" Option Name: "_$SELECT($PIECE($GET(XQY0),"^")]"":$PIECE($GET(XQY0),"^"),1:"Unknown")
+14 SET WVSTOP(3)=" Option Menu Text: "_$SELECT($PIECE($GET(XQY0),"^",2)]"":$PIECE($GET(XQY0),"^",2),1:"Unknown")
+15 SET WVSTOP(4)=" Task #: "_$SELECT(+$GET(ZTSK)>0:+$GET(ZTSK),1:"Unknown")
+16 DO EN^DDIOL(.WVSTOP,"","!?10")
+17 QUIT