LRMITS ;SLC/STAFF - MICRO TREND ;10/14/92 15:59
;;5.2;LAB SERVICE;**96**;Sep 27, 1994
; from option LRMITS
;
S LREND=0 D ^LRMITSE I LREND D CLEANUP Q
; device
DEVICE S %ZIS="MNQ",%ZIS("B")="",IOP="Q" D ^%ZIS I POP D CLEANUP Q
; default time
S %DT="AET",%DT("A")="TIME TO RUN: T+1@1AM// " D ^%DT I X[U!$D(DTOUT) D CLEANUP Q
S:Y>0 ZTDTH=Y I Y'>0 S %DT="T",X="T+1@1AM" D ^%DT S ZTDTH=Y
; it's possible to display this report to the home device
; for device enter 0, for queueing enter NO, then return at device and time prompts (time is ignored)
I '$D(IO("Q"))&(IO'=IO(0)) W !!,"Please queue this report if not viewing on your screen",!! H 2 G DEVICE
I '$D(IO("Q")) K ZTDTH D DQ^LRMITSP,CLEANUP Q
; queue report
S ZTIO=ION,ZTDESC="MICRO TREND REPORT",ZTRTN="DQ^LRMITSP",ZTSAVE("LR*")=""
D ^%ZTLOAD W !,$S($D(ZTSK):"Request queued",1:"Request canceled") D HOME^%ZIS K ZTSK
CLEANUP ; from LRMITSP
W !! W:$E(IOST)="P" @IOF D ^%ZISC K ^TMP($J),%DT,DIR,DIRUT,DTOUT,DUOUT,LRAP,LRATS,LRDETAIL,LREND,LRFBEG,LRFEND,LRLOS,LRMERGE,LRM,LROTYPE,LRSORG,LRTBEG,LRTEND,LRTSAL,LRUNK,X,Y,LRAINT,LRNODE,LRSORT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRMITS 1128 printed Dec 13, 2024@02:17:29 Page 2
LRMITS ;SLC/STAFF - MICRO TREND ;10/14/92 15:59
+1 ;;5.2;LAB SERVICE;**96**;Sep 27, 1994
+2 ; from option LRMITS
+3 ;
+4 SET LREND=0
DO ^LRMITSE
IF LREND
DO CLEANUP
QUIT
+5 ; device
DEVICE SET %ZIS="MNQ"
SET %ZIS("B")=""
SET IOP="Q"
DO ^%ZIS
IF POP
DO CLEANUP
QUIT
+1 ; default time
+2 SET %DT="AET"
SET %DT("A")="TIME TO RUN: T+1@1AM// "
DO ^%DT
IF X[U!$DATA(DTOUT)
DO CLEANUP
QUIT
+3 if Y>0
SET ZTDTH=Y
IF Y'>0
SET %DT="T"
SET X="T+1@1AM"
DO ^%DT
SET ZTDTH=Y
+4 ; it's possible to display this report to the home device
+5 ; for device enter 0, for queueing enter NO, then return at device and time prompts (time is ignored)
+6 IF '$DATA(IO("Q"))&(IO'=IO(0))
WRITE !!,"Please queue this report if not viewing on your screen",!!
HANG 2
GOTO DEVICE
+7 IF '$DATA(IO("Q"))
KILL ZTDTH
DO DQ^LRMITSP
DO CLEANUP
QUIT
+8 ; queue report
+9 SET ZTIO=ION
SET ZTDESC="MICRO TREND REPORT"
SET ZTRTN="DQ^LRMITSP"
SET ZTSAVE("LR*")=""
+10 DO ^%ZTLOAD
WRITE !,$SELECT($DATA(ZTSK):"Request queued",1:"Request canceled")
DO HOME^%ZIS
KILL ZTSK
CLEANUP ; from LRMITSP
+1 WRITE !!
if $EXTRACT(IOST)="P"
WRITE @IOF
DO ^%ZISC
KILL ^TMP($JOB),%DT,DIR,DIRUT,DTOUT,DUOUT,LRAP,LRATS,LRDETAIL,LREND,LRFBEG,LRFEND,LRLOS,LRMERGE,LRM,LROTYPE,LRSORG,LRTBEG,LRTEND,LRTSAL,LRUNK,X,Y,LRAINT,LRNODE,LRSORT
+2 QUIT