SRONBCH ;B'HAM ISC/MAM - BATCH PRINT NURSE REPORTS ; 8 JUNE 1990 10:25 AM
;;3.0; Surgery ;;24 Jun 93
S SRSOUT=0,X1=DT,X2=-1 D C^%DTC S SRSDATE=X-.0001
F S SRSDATE=$O(^SRF("AC",SRSDATE)) Q:'SRSDATE!(SRSDATE>DT)!SRSOUT S SRTN=0 F S SRTN=$O(^SRF("AC",SRSDATE,SRTN)) Q:'SRTN!SRSOUT I $D(^SRF(SRTN,.2)),$P(^(.2),"^",3) D OP
END W:$E(IOST)="P" @IOF I $D(ZTQUEUED) Q:$G(ZTSTOP) S ZTREQ="@" Q
D ^%ZISC,^SRSKILL K SRSITE,SRTN
Q
OP ; set info to print nurse report
S SRNIGHT=1,X=$P($G(^SRF(SRTN,8)),"^"),SRSITE("SITE")=$S(X:$P(^DIC(4,X,0),"^"),1:$P($$SITE^SROVAR,"^",2))
N SRSDATE D RPT^SRONRPT Q:SRSOUT S X=SRTN K SRTN S SRTN=X D ^SRSKILL
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSRONBCH 657 printed Dec 13, 2024@02:44:14 Page 2
SRONBCH ;B'HAM ISC/MAM - BATCH PRINT NURSE REPORTS ; 8 JUNE 1990 10:25 AM
+1 ;;3.0; Surgery ;;24 Jun 93
+2 SET SRSOUT=0
SET X1=DT
SET X2=-1
DO C^%DTC
SET SRSDATE=X-.0001
+3 FOR
SET SRSDATE=$ORDER(^SRF("AC",SRSDATE))
if 'SRSDATE!(SRSDATE>DT)!SRSOUT
QUIT
SET SRTN=0
FOR
SET SRTN=$ORDER(^SRF("AC",SRSDATE,SRTN))
if 'SRTN!SRSOUT
QUIT
IF $DATA(^SRF(SRTN,.2))
IF $PIECE(^(.2),"^",3)
DO OP
END if $EXTRACT(IOST)="P"
WRITE @IOF
IF $DATA(ZTQUEUED)
if $GET(ZTSTOP)
QUIT
SET ZTREQ="@"
QUIT
+1 DO ^%ZISC
DO ^SRSKILL
KILL SRSITE,SRTN
+2 QUIT
OP ; set info to print nurse report
+1 SET SRNIGHT=1
SET X=$PIECE($GET(^SRF(SRTN,8)),"^")
SET SRSITE("SITE")=$SELECT(X:$PIECE(^DIC(4,X,0),"^"),1:$PIECE($$SITE^SROVAR,"^",2))
+2 NEW SRSDATE
DO RPT^SRONRPT
if SRSOUT
QUIT
SET X=SRTN
KILL SRTN
SET SRTN=X
DO ^SRSKILL
+3 QUIT