SROSNR ;B'HAM ISC/MAM - SCRUB NURSE REPORT ; [ 09/22/98 11:36 AM ]
;;3.0; Surgery ;**77,50**;24 Jun 93
S SRSOUT=0,SRINST=SRSITE("SITE")
ALL W @IOF,!,"Scrub Nurse Staffing Report",!!,"Do you want the report for all nurses ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
I "YyNn"'[SRYN W !!,"Enter RETURN to print the Scrub Nurse Staffing Report for all nurses, or 'NO'",!,"to select a specific person.",!!,"Press RETURN to continue " R X:DTIME G ALL
S SRALL=$S("Yy"[SRYN:1,1:0) I SRALL S NURSE="" G DATE
W ! K DIC S DIC=200,DIC(0)="QEAMZ",DIC("A")="Print the Report for which Scrub Nurse ? " D ^DIC I Y<0 S SRSOUT=1 G END
S NURSE=+Y,NURSE("NAME")=$P(Y(0),"^")
DATE D DATE^SROUTL(.SRSD,.SRED,.SRSOUT) G:SRSOUT END
S SRSD1=$E(SRSD,4,5)_"/"_$E(SRSD,6,7)_"/"_$E(SRSD,2,3)
S SRED1=$E(SRED,4,5)_"/"_$E(SRED,6,7)_"/"_$E(SRED,2,3)
K %ZIS,IOP,IO("Q"),POP S %ZIS="QM",%ZIS("A")="Print the Report on which Device: " W !!,"This report is designed to use a 132 column format.",! D ^%ZIS I POP S SRSOUT=1 G END
I $D(IO("Q")) K IO("Q") S ZTDESC="SCRUB NURSE STAFFING REPORT",ZTRTN="BEG^SROSNR",(ZTSAVE("SRALL"),ZTSAVE("SRINST"),ZTSAVE("SRSD*"),ZTSAVE("SRED*"),ZTSAVE("NURSE*"),ZTSAVE("SRSITE*"))="" D ^%ZTLOAD G END
BEG N SRFRTO S Y=DT X ^DD("DD") S SRPRINT="DATE PRINTED: "_Y S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y
I SRALL D BEG^SROSNR1 G END
D BEG^SROSNR2
END ;
I $E(IOST)="P" W @IOF S SRSOUT=1
I 'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
D ^SRSKILL K SRTN D ^%ZISC W @IOF
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROSNR 1668 printed Nov 22, 2024@17:56 Page 2
SROSNR ;B'HAM ISC/MAM - SCRUB NURSE REPORT ; [ 09/22/98 11:36 AM ]
+1 ;;3.0; Surgery ;**77,50**;24 Jun 93
+2 SET SRSOUT=0
SET SRINST=SRSITE("SITE")
ALL WRITE @IOF,!,"Scrub Nurse Staffing Report",!!,"Do you want the report for all nurses ? YES// "
READ SRYN:DTIME
IF '$TEST!(SRYN["^")
SET SRSOUT=1
GOTO END
+1 SET SRYN=$EXTRACT(SRYN)
if SRYN=""
SET SRYN="Y"
+2 IF "YyNn"'[SRYN
WRITE !!,"Enter RETURN to print the Scrub Nurse Staffing Report for all nurses, or 'NO'",!,"to select a specific person.",!!,"Press RETURN to continue "
READ X:DTIME
GOTO ALL
+3 SET SRALL=$SELECT("Yy"[SRYN:1,1:0)
IF SRALL
SET NURSE=""
GOTO DATE
+4 WRITE !
KILL DIC
SET DIC=200
SET DIC(0)="QEAMZ"
SET DIC("A")="Print the Report for which Scrub Nurse ? "
DO ^DIC
IF Y<0
SET SRSOUT=1
GOTO END
+5 SET NURSE=+Y
SET NURSE("NAME")=$PIECE(Y(0),"^")
DATE DO DATE^SROUTL(.SRSD,.SRED,.SRSOUT)
if SRSOUT
GOTO END
+1 SET SRSD1=$EXTRACT(SRSD,4,5)_"/"_$EXTRACT(SRSD,6,7)_"/"_$EXTRACT(SRSD,2,3)
+2 SET SRED1=$EXTRACT(SRED,4,5)_"/"_$EXTRACT(SRED,6,7)_"/"_$EXTRACT(SRED,2,3)
+3 KILL %ZIS,IOP,IO("Q"),POP
SET %ZIS="QM"
SET %ZIS("A")="Print the Report on which Device: "
WRITE !!,"This report is designed to use a 132 column format.",!
DO ^%ZIS
IF POP
SET SRSOUT=1
GOTO END
+4 IF $DATA(IO("Q"))
KILL IO("Q")
SET ZTDESC="SCRUB NURSE STAFFING REPORT"
SET ZTRTN="BEG^SROSNR"
SET (ZTSAVE("SRALL"),ZTSAVE("SRINST"),ZTSAVE("SRSD*"),ZTSAVE("SRED*"),ZTSAVE("NURSE*"),ZTSAVE("SRSITE*"))=""
DO ^%ZTLOAD
GOTO END
BEG NEW SRFRTO
SET Y=DT
XECUTE ^DD("DD")
SET SRPRINT="DATE PRINTED: "_Y
SET Y=SRSD
XECUTE ^DD("DD")
SET SRFRTO="FROM: "_Y_" TO: "
SET Y=SRED
XECUTE ^DD("DD")
SET SRFRTO=SRFRTO_Y
+1 IF SRALL
DO BEG^SROSNR1
GOTO END
+2 DO BEG^SROSNR2
END ;
+1 IF $EXTRACT(IOST)="P"
WRITE @IOF
SET SRSOUT=1
+2 IF 'SRSOUT
WRITE !!,"Press RETURN to continue "
READ X:DTIME
+3 IF $DATA(ZTQUEUED)
KILL ^TMP("SR",$JOB)
if $GET(ZTSTOP)
QUIT
SET ZTREQ="@"
QUIT
+4 DO ^SRSKILL
KILL SRTN
DO ^%ZISC
WRITE @IOF
+5 QUIT