PSBOHDR1 ;AITC/CR - REPORT FOR RESPIRATORY THERAPY MEDS ;7/30/18 12:32pm
;;3.0;BAR CODE MED ADMIN;**103**;Mar 2004;Build 21
;Per VA Directive 6402, this routine should not be modified.
;
WARD(PSBWP,PSBHDR,PSBCONT,PSBDT,SRCHTXT) ; called from PSBORT
; PSBWP: Nurse Location File IEN (optional)
; PSBHDR: array for header
; PSBCONT: True if this is a continuation page
; PSBDT: Date of Pt Information (Default to DT)
; SRCHTXT: search text - optional
;
N PSBMODE,PSBWRDA,Y
S:'$G(PSBDT) PSBDT=DT
I '$D(PSBHDR("DATE")) D NOW^%DTC S Y=+$E(%,1,12) D D^DIQ S PSBHDR("DATE")="Run Date: "_Y
S:'$D(PSBHDR("PAGE")) PSBHDR("PAGE")=0
;W:$Y>1 @IOF
I $E(IOST,1,2)="C-" W !!
E W:$Y>1 @IOF ; printout goes to a printer
W:$X>0 !
W $TR($J("",IOM)," ","=")
W !,$G(PSBHDR(0))
S PSBMODE="Include Inpatient Orders Only"
I $G(PSBHDR(0))]"" W !,PSBMODE
W $G(PSBHDR(1)),?102,PSBHDR("DATE")
I $G(PSBHDR(0))="" W !,PSBMODE
S PSBHDR("PAGE")=PSBHDR("PAGE")+1
W $G(PSBHDR(2)),?103,$J("Page: "_PSBHDR("PAGE"),10)
F X=3:1 Q:'$D(PSBHDR(X)) D
. W !,PSBHDR(X)
. I PSBHDR(X)["Clinic Search" W $$WRAP^PSBO(21,111,SRCHTXT)
. I PSBHDR(X)["Ward Location" W SRCHTXT
I $G(PSBCONT) W !?(IOM-35\2),"*** CONTINUED FROM PREVIOUS PAGE ***"
I $G(PSBMUDV)=1 S X="Division: "_PSBNAME D HDR1 Q ; Div prompt
I $G(PSBMUDV)=2 S X="Division: "_"ALL" D HDR1 Q ; Div prompt
I $G(PSBMUDV)=0 S X="Division: "_$$NAME^XUAF4(DUZ(2)) D HDR1 Q ; no Div prompt, single site support
Q
HDR1 ;
W !,X,!,$TR($J("",IOM)," ","=")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSBOHDR1 1547 printed Dec 13, 2024@01:40:35 Page 2
PSBOHDR1 ;AITC/CR - REPORT FOR RESPIRATORY THERAPY MEDS ;7/30/18 12:32pm
+1 ;;3.0;BAR CODE MED ADMIN;**103**;Mar 2004;Build 21
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
WARD(PSBWP,PSBHDR,PSBCONT,PSBDT,SRCHTXT) ; called from PSBORT
+1 ; PSBWP: Nurse Location File IEN (optional)
+2 ; PSBHDR: array for header
+3 ; PSBCONT: True if this is a continuation page
+4 ; PSBDT: Date of Pt Information (Default to DT)
+5 ; SRCHTXT: search text - optional
+6 ;
+7 NEW PSBMODE,PSBWRDA,Y
+8 if '$GET(PSBDT)
SET PSBDT=DT
+9 IF '$DATA(PSBHDR("DATE"))
DO NOW^%DTC
SET Y=+$EXTRACT(%,1,12)
DO D^DIQ
SET PSBHDR("DATE")="Run Date: "_Y
+10 if '$DATA(PSBHDR("PAGE"))
SET PSBHDR("PAGE")=0
+11 ;W:$Y>1 @IOF
+12 IF $EXTRACT(IOST,1,2)="C-"
WRITE !!
+13 ; printout goes to a printer
IF '$TEST
if $Y>1
WRITE @IOF
+14 if $X>0
WRITE !
+15 WRITE $TRANSLATE($JUSTIFY("",IOM)," ","=")
+16 WRITE !,$GET(PSBHDR(0))
+17 SET PSBMODE="Include Inpatient Orders Only"
+18 IF $GET(PSBHDR(0))]""
WRITE !,PSBMODE
+19 WRITE $GET(PSBHDR(1)),?102,PSBHDR("DATE")
+20 IF $GET(PSBHDR(0))=""
WRITE !,PSBMODE
+21 SET PSBHDR("PAGE")=PSBHDR("PAGE")+1
+22 WRITE $GET(PSBHDR(2)),?103,$JUSTIFY("Page: "_PSBHDR("PAGE"),10)
+23 FOR X=3:1
if '$DATA(PSBHDR(X))
QUIT
Begin DoDot:1
+24 WRITE !,PSBHDR(X)
+25 IF PSBHDR(X)["Clinic Search"
WRITE $$WRAP^PSBO(21,111,SRCHTXT)
+26 IF PSBHDR(X)["Ward Location"
WRITE SRCHTXT
End DoDot:1
+27 IF $GET(PSBCONT)
WRITE !?(IOM-35\2),"*** CONTINUED FROM PREVIOUS PAGE ***"
+28 ; Div prompt
IF $GET(PSBMUDV)=1
SET X="Division: "_PSBNAME
DO HDR1
QUIT
+29 ; Div prompt
IF $GET(PSBMUDV)=2
SET X="Division: "_"ALL"
DO HDR1
QUIT
+30 ; no Div prompt, single site support
IF $GET(PSBMUDV)=0
SET X="Division: "_$$NAME^XUAF4(DUZ(2))
DO HDR1
QUIT
+31 QUIT
HDR1 ;
+1 WRITE !,X,!,$TRANSLATE($JUSTIFY("",IOM)," ","=")
+2 QUIT