SROREQ ;BIR/MAM - REQUEST FOR A DAY (LONG FORM) ; [ 12/09/99 11:54 AM ]
;;3.0; Surgery ;**92**;24 Jun 93
SPEC W @IOF,!,"Do you want the requests for all surgical specialties ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
S SRYN=$E(SRYN) I SRYN="" S SRYN="Y"
I "YyNn"'[SRYN W !!,"Enter 'YES' to print the requests for all surgical specialties, or 'NO'",!,"to select a specific specialty.",!!,"Press RETURN to continue " R X:DTIME G SPEC
I "Yy"[SRYN S (SRSS,SRSNM)="ALL" G ZIS
W ! K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print Requests for which Surgical Specialty ? " D ^DIC I Y<0 S SRSOUT=1 G END
S SRSS=+Y,SRSNM=$P(Y(0),"^")
ZIS W ! K IOP,%ZIS,POP,IO("Q") S %ZIS="Q",%ZIS("A")="Print the Requests on which Device: " D ^%ZIS I POP S SRSOUT=1 G END
I $D(IO("Q")) K IO("Q") S ZTDESC="OPERATION REQUESTS",(ZTSAVE("SRSS"),ZTSAVE("SRSNM"),ZTSAVE("SRSDATE"),ZTSAVE("SRSITE*"))="",ZTRTN=$S(SRSS="ALL":"BEG^SROREQ1",1:"BEG^SROREQ2") D ^%ZTLOAD G END
I SRSS="ALL" G ^SROREQ1
G BEG^SROREQ2
END W ! D ^%ZISC W @IOF K SRTN D ^SRSKILL
Q
HDR ; print heading
I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
W:$Y @IOF W ! F LINE=1:1:80 W "="
W !,"OPERATION REQUESTS FOR "_SRSNM,!,"ON "_SRSDT S SRHDR=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROREQ 1271 printed Dec 13, 2024@02:45:44 Page 2
SROREQ ;BIR/MAM - REQUEST FOR A DAY (LONG FORM) ; [ 12/09/99 11:54 AM ]
+1 ;;3.0; Surgery ;**92**;24 Jun 93
SPEC WRITE @IOF,!,"Do you want the requests for all surgical specialties ? 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 'YES' to print the requests for all surgical specialties, or 'NO'",!,"to select a specific specialty.",!!,"Press RETURN to continue "
READ X:DTIME
GOTO SPEC
+3 IF "Yy"[SRYN
SET (SRSS,SRSNM)="ALL"
GOTO ZIS
+4 WRITE !
KILL DIC
SET DIC("S")="I '$P(^(0),""^"",3)"
SET DIC=137.45
SET DIC(0)="QEAMZ"
SET DIC("A")="Print Requests for which Surgical Specialty ? "
DO ^DIC
IF Y<0
SET SRSOUT=1
GOTO END
+5 SET SRSS=+Y
SET SRSNM=$PIECE(Y(0),"^")
ZIS WRITE !
KILL IOP,%ZIS,POP,IO("Q")
SET %ZIS="Q"
SET %ZIS("A")="Print the Requests on which Device: "
DO ^%ZIS
IF POP
SET SRSOUT=1
GOTO END
+1 IF $DATA(IO("Q"))
KILL IO("Q")
SET ZTDESC="OPERATION REQUESTS"
SET (ZTSAVE("SRSS"),ZTSAVE("SRSNM"),ZTSAVE("SRSDATE"),ZTSAVE("SRSITE*"))=""
SET ZTRTN=$SELECT(SRSS="ALL":"BEG^SROREQ1",1:"BEG^SROREQ2")
DO ^%ZTLOAD
GOTO END
+2 IF SRSS="ALL"
GOTO ^SROREQ1
+3 GOTO BEG^SROREQ2
END WRITE !
DO ^%ZISC
WRITE @IOF
KILL SRTN
DO ^SRSKILL
+1 QUIT
HDR ; print heading
+1 IF $DATA(ZTQUEUED)
DO ^SROSTOP
IF SRHALT
SET SRSOUT=1
QUIT
+2 if $Y
WRITE @IOF
WRITE !
FOR LINE=1:1:80
WRITE "="
+3 WRITE !,"OPERATION REQUESTS FOR "_SRSNM,!,"ON "_SRSDT
SET SRHDR=1
+4 QUIT