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
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