WVUTL7 ;HCIOFO/FT,JR - UTIL: HEADERS & TRAILERS ;05/25/2017 15:30
;;1.0;WOMEN'S HEALTH;**5,7,10,14,24**;Sep 30, 1998;Build 582
;; Original routine created by IHS/ANMC/MWR
;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
;; UTILITY: HEADERS AND TRAILERS.
;
; This routine uses the following IAs:
; #10060 - FILE 200 fields (supported)
;
S(S) ;EP
;---> RETURN A VALUE OF SPACES EQUAL IN LENGTH TO THE NUMBER S.
N I,SP S SP=$$REPEAT^XLFSTR(" ",80)
Q $E(SP,1,$G(S))
;
TOPHEAD ;EP
;---> CODE TO SET VARIABLES FOR HEADER.
N X,%
D NOW^%DTC S WVNOW=$$SLDT1^WVUTL5(%)
S WVLINE=$$REPEAT^XLFSTR("-",80)
S WVPAGE=1
S WVCRT=$S($E(IOST)="C":1,1:0)
S WVCONFF="*********************** CONFIDENTIAL PATIENT INFORMATION "
S WVCONFF=WVCONFF_"***********************"
S WVTIMLN=$E(WVLINE,1,26)_" printed: "_WVNOW_" "_$E(WVLINE,1,27)
Q
;
TOPHEAD1 ;EP
;---> CODE TO SET VARIABLES FOR HEADER.
N X,%
D NOW^%DTC S WVNOW=$$SLDT1^WVUTL5(%)
S WVLINE=$$REPEAT^XLFSTR("-",80)
S WVPAGE=$G(WVPAGE)+1
S WVCRT=$S($E(IOST)="C":1,1:0)
S WVCONFF="*********************** CONFIDENTIAL PATIENT INFORMATION "
S WVCONFF=WVCONFF_"***********************"
S WVTIMLN=$E(WVLINE,1,26)_" printed: "_WVNOW_" "_$E(WVLINE,1,27)
Q
;
;---> BROWSE/REPORT HEADER: MULTIPLE PATIENTS, MULTIPLE PROCEDURES.
;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
N X
W:WVPAGE>1!WVCRT @IOF,!
W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
W !,$$RUNDT^WVUTL1A("C"),!
W !,"Case Mgr: " D
.I '$D(WVE) W "ALL" Q
.I WVE W "ALL" Q
.I '$D(WVCMGR) W "UNKNOWN" Q
.I WVCMGR="" W "UNKNOWN" Q
.N WVCMGRNM
.S WVCMGRNM=$$GET1^DIQ(200,WVCMGR,.01,"E")
.W $S(WVCMGRNM]"":WVCMGRNM,1:"UNKNOWN")
W ?56,"For period: ",$$TXDT^WVUTL5(WVBEGDT)
W !,"Facility: ",$$INSTTX^WVUTL6(DUZ(2))
W ?64,"To: ",$$TXDT^WVUTL5(WVENDDT)
W !,$$REPEAT^XLFSTR("=",80)
I $D(WVSUBH) D @WVSUBH
Q
;
;---> PATIENT REPORT HEADER: ONE PATIENT, MULTIPLE PROCEDURES.
;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
N X
D FAC^WVUTL1A
W:WVPAGE>1!WVCRT @IOF,!
W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
W !,$$RUNDT^WVUTL1A("C")
W !,"Patient Name: ",WVNAMAGE,?52,$$PNLAB^WVUTL5(),WVCHRT
W !,"Case Manager: ",WVCMGR
W ?50,"Facility: ",$E($$INSTTX^WVUTL6(DUZ(2)),1,19)
W !,"Cx Tx Need : ",WVCNEED
W ?47,"Cx Facility: ",$G(WVJCFAC)
W !,"PAP Regimen : ",WVPAPRG,?47,"Pr Provider: ",$G(WVJPCP)
W !,"Br Tx Need : ",WVBNEED
W ?47,"Br Facility: ",$G(WVJBFAC)
W !,"Hx of BR CA : ",$$GET1^DIQ(790,WVDFN,.23,"E")
W !,"Elig Code : ",$P($$ELIG^WVUTL9(WVDFN),U,2)
W ?51,"Veteran: ",$$VET^WVUTL1A(WVDFN)
W !,"MST : ",$$MST^WVUTL1A(WVDFN)
W ?55,"CST: ",$$CST^WVUTL1A(WVDFN)
W !,"Maternity Care Coordinator: ",$$MCMGR^WVUTL1(WVDFN)
W !,$$REPEAT^XLFSTR("=",49)
W $S(WVEDC]""&(WVEDC'="UNKNOWN"):WVEDC_"======",1:"===============================")
I $D(WVSUBH) D @WVSUBH
Q
;
;---> LAB LOG REPORT HEADER: MULTIPLE PATIENTS, MULTIPLE PROCEDURES.
;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
N X
W:WVPAGE>1!WVCRT @IOF,!
W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
W !!,$$RUNDT^WVUTL1A("C")
W !,"Facility: ",$$INSTTX^WVUTL6($S($G(WVFAC):WVFAC,1:DUZ(2)))
W ?53,"From: ",$$SLDT2^WVUTL5(WVBEGDT)
W " to ",$$SLDT2^WVUTL5(WVENDDT)
W !,$$REPEAT^XLFSTR("=",80)
I $D(WVSUBH) D @WVSUBH
Q
;
;---> PATIENT REPORT HEADER: ONE PATIENT, ONE PROCEDURE.
;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE1,DUZ(2)
;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
W:WVPAGE>1!WVCRT @IOF,!
W WVCONFF W:'WVCRT !,WVTIMLN
W !!,WVTITLE1,?70,"page: ",WVPAGE S WVPAGE=WVPAGE+1
;---> CALLED BY WVPROC; BYPASSES FORMFEED, TITLE, ETC.
N WVDES
W !,$$RUNDT^WVUTL1A("C"),!
W !,"Patient Name: ",WVNAMAGE,?53,$$PNLAB^WVUTL5(),WVCHRT
W !,"Case Manager: ",WVCMGR
W ?50,"Procedure: ",$E(WVPN,1,19)
W !,"PAP Regimen : ",WVPAPRG
W ?55,"Acc#: ",WVACCN
W !,"Cx Tx Need : ",WVCNEED
W ?48,"Cx Facility: ",$$FACIL^WVUTL1A(WVDFN,"C")
W !,"Br Tx Need : ",WVBNEED
W ?48,"Br Facility: ",$$FACIL^WVUTL1A(WVDFN,"B")
W !,"Elig Code : ",$P($$ELIG^WVUTL9(WVDFN),U,2)
W ?52,"Veteran: ",$$VET^WVUTL1A(WVDFN)
W !,"MST : ",$$MST^WVUTL1A(WVDFN)
W ?56,"CST: ",$$CST^WVUTL1A(WVDFN)
W !,"Maternity Care Coordinator: ",$$MCMGR^WVUTL1(WVDFN)
S WVDES=$$DES^WVUTL1(WVDFN)
W !,$S(WVDES="YES":"*DES DAUGHTER*",1:"--------------")
W $$REPEAT^XLFSTR("-",37)
W $S(WVEDC]"":WVEDC_"----",1:"-----------------------------")
Q
;
;---> DELINQUENT NEEDS REPORT HEADER: MULTIPLE PATIENTS
;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
N X
W:WVPAGE>1!WVCRT @IOF,!
W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
W !,"Case Mgr: " D
.I '$D(WVE) W "ALL" Q
.I WVE W "ALL" Q
.I $G(WVMGR)']"" W "UNKNOWN" Q
.N WVCMGRNM
.S WVCMGRNM=$$GET1^DIQ(200,WVMGR,.01,"E")
.W $S(WVCMGRNM]"":WVCMGRNM,1:"UNKNOWN")
S Y=DT D DD^%DT W ?46,"Run Date: ",Y
W !,"Facility: ",$$INSTTX^WVUTL6(WVFAC)
W ?46,"Tx Needs Past Due as of ",$$SLDT2^WVUTL5(WVDDATE)
W !,$$REPEAT^XLFSTR("=",80)
I $D(WVSUBH) D @WVSUBH
Q
;
;---> PROGRAM SNAPSHOT HEADER: JUST TITLE AND FACILITY (NO PATIENTS)
;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
N X
W:WVPAGE>1!WVCRT @IOF,!
W:'WVCRT !,WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
W !?3,$$RUNDT^WVUTL1A() I $D(WVJTOY) W ?60,"(",WVJTOY,")"
W !," Note: This report includes all divisions"
W " using this database."
W !,$$REPEAT^XLFSTR("=",80)
I $D(WVSUBH) D @WVSUBH
Q
;
;---> AUTOLOAD OF PATIENTS HEADER
;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
N X
W:WVPAGE>1!WVCRT @IOF,!
W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE S WVPAGE=WVPAGE+1
W !!,$$RUNDT^WVUTL1A()
W ?45,"Date Range: "_$$FMTE^XLFDT($G(WVJSDT),"2D")_"-"_$$FMTE^XLFDT($P($G(WVJEDT),".",1),"2D")
W !,"Facility: ",$$INSTTX^WVUTL6(DUZ(2))
W ?45,"Cutoff Age: ",WVAGE
W !,$$REPEAT^XLFSTR("=",80)
W !,?3,"NAME",?30,$$PNLB^WVUTL5(),?45,"DOB",?60,"STATUS"
W !,WVLINE
Q
;
;---> SCREENING RATES REPORT HEADER: (NO PATIENTS)
;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
N X
W:WVPAGE>1!WVCRT @IOF,!
W:'WVCRT !,WVTIMLN,!
W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
W !!?4,"For Age Range: ",$S(WVAGRG=1:"ALL",1:WVAGRG)
W ?56,"For period: ",$$SLDT2^WVUTL5(WVBEGDT)
S Y=DT D DD^%DT W !?4,"Run Date: ",Y
W ?64,"To: ",$$SLDT2^WVUTL5(WVENDDT)
W !,$$REPEAT^XLFSTR("=",80)
W !?4,"(Note: This report includes all divisions using this database.)"
W !?11,"Number of Active Patients: "_$G(WVTOT),!
Q
;
ENDREP(X) ;EP
;---> END A REPORT, DO FORMFEED OR "Press <Return>" IF NECESSARY.
;---> REQUIRED VARIABLES: WVCRT=1 IF OUTPUT TO SCREEN
;---> WVPOP=1 IF ESCAPING
;---> OPTIONAL VARIABLE: X=1 IF "End of Report" SHOULD NOT DISPLAY.
;
S WVTITLE="----- End of Report -----"
I '$G(X)&('WVPOP) D CENTERT^WVUTL5(.WVTITLE) W !,WVTITLE
I WVCRT&('$D(IO("S")))&('WVPOP) D DIRZ^WVUTL3 W @IOF,!
D ^%ZISC
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HWVUTL7 7699 printed Dec 13, 2024@02:48:16 Page 2
WVUTL7 ;HCIOFO/FT,JR - UTIL: HEADERS & TRAILERS ;05/25/2017 15:30
+1 ;;1.0;WOMEN'S HEALTH;**5,7,10,14,24**;Sep 30, 1998;Build 582
+2 ;; Original routine created by IHS/ANMC/MWR
+3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
+4 ;; UTILITY: HEADERS AND TRAILERS.
+5 ;
+6 ; This routine uses the following IAs:
+7 ; #10060 - FILE 200 fields (supported)
+8 ;
S(S) ;EP
+1 ;---> RETURN A VALUE OF SPACES EQUAL IN LENGTH TO THE NUMBER S.
+2 NEW I,SP
SET SP=$$REPEAT^XLFSTR(" ",80)
+3 QUIT $EXTRACT(SP,1,$GET(S))
+4 ;
TOPHEAD ;EP
+1 ;---> CODE TO SET VARIABLES FOR HEADER.
+2 NEW X,%
+3 DO NOW^%DTC
SET WVNOW=$$SLDT1^WVUTL5(%)
+4 SET WVLINE=$$REPEAT^XLFSTR("-",80)
+5 SET WVPAGE=1
+6 SET WVCRT=$SELECT($EXTRACT(IOST)="C":1,1:0)
+7 SET WVCONFF="*********************** CONFIDENTIAL PATIENT INFORMATION "
+8 SET WVCONFF=WVCONFF_"***********************"
+9 SET WVTIMLN=$EXTRACT(WVLINE,1,26)_" printed: "_WVNOW_" "_$EXTRACT(WVLINE,1,27)
+10 QUIT
+11 ;
TOPHEAD1 ;EP
+1 ;---> CODE TO SET VARIABLES FOR HEADER.
+2 NEW X,%
+3 DO NOW^%DTC
SET WVNOW=$$SLDT1^WVUTL5(%)
+4 SET WVLINE=$$REPEAT^XLFSTR("-",80)
+5 SET WVPAGE=$GET(WVPAGE)+1
+6 SET WVCRT=$SELECT($EXTRACT(IOST)="C":1,1:0)
+7 SET WVCONFF="*********************** CONFIDENTIAL PATIENT INFORMATION "
+8 SET WVCONFF=WVCONFF_"***********************"
+9 SET WVTIMLN=$EXTRACT(WVLINE,1,26)_" printed: "_WVNOW_" "_$EXTRACT(WVLINE,1,27)
+10 QUIT
+11 ;
+1 ;---> BROWSE/REPORT HEADER: MULTIPLE PATIENTS, MULTIPLE PROCEDURES.
+2 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
+3 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
+4 NEW X
+5 if WVPAGE>1!WVCRT
WRITE @IOF,!
+6 if $DATA(WVCONF)
WRITE WVCONFF,!
if 'WVCRT
WRITE WVTIMLN,!
+7 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
+8 WRITE !,$$RUNDT^WVUTL1A("C"),!
+9 WRITE !,"Case Mgr: "
Begin DoDot:1
+10 IF '$DATA(WVE)
WRITE "ALL"
QUIT
+11 IF WVE
WRITE "ALL"
QUIT
+12 IF '$DATA(WVCMGR)
WRITE "UNKNOWN"
QUIT
+13 IF WVCMGR=""
WRITE "UNKNOWN"
QUIT
+14 NEW WVCMGRNM
+15 SET WVCMGRNM=$$GET1^DIQ(200,WVCMGR,.01,"E")
+16 WRITE $SELECT(WVCMGRNM]"":WVCMGRNM,1:"UNKNOWN")
End DoDot:1
+17 WRITE ?56,"For period: ",$$TXDT^WVUTL5(WVBEGDT)
+18 WRITE !,"Facility: ",$$INSTTX^WVUTL6(DUZ(2))
+19 WRITE ?64,"To: ",$$TXDT^WVUTL5(WVENDDT)
+20 WRITE !,$$REPEAT^XLFSTR("=",80)
+21 IF $DATA(WVSUBH)
DO @WVSUBH
+22 QUIT
+23 ;
+1 ;---> PATIENT REPORT HEADER: ONE PATIENT, MULTIPLE PROCEDURES.
+2 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
+3 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
+4 NEW X
+5 DO FAC^WVUTL1A
+6 if WVPAGE>1!WVCRT
WRITE @IOF,!
+7 if $DATA(WVCONF)
WRITE WVCONFF,!
if 'WVCRT
WRITE WVTIMLN,!
+8 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
+9 WRITE !,$$RUNDT^WVUTL1A("C")
+10 WRITE !,"Patient Name: ",WVNAMAGE,?52,$$PNLAB^WVUTL5(),WVCHRT
+11 WRITE !,"Case Manager: ",WVCMGR
+12 WRITE ?50,"Facility: ",$EXTRACT($$INSTTX^WVUTL6(DUZ(2)),1,19)
+13 WRITE !,"Cx Tx Need : ",WVCNEED
+14 WRITE ?47,"Cx Facility: ",$GET(WVJCFAC)
+15 WRITE !,"PAP Regimen : ",WVPAPRG,?47,"Pr Provider: ",$GET(WVJPCP)
+16 WRITE !,"Br Tx Need : ",WVBNEED
+17 WRITE ?47,"Br Facility: ",$GET(WVJBFAC)
+18 WRITE !,"Hx of BR CA : ",$$GET1^DIQ(790,WVDFN,.23,"E")
+19 WRITE !,"Elig Code : ",$PIECE($$ELIG^WVUTL9(WVDFN),U,2)
+20 WRITE ?51,"Veteran: ",$$VET^WVUTL1A(WVDFN)
+21 WRITE !,"MST : ",$$MST^WVUTL1A(WVDFN)
+22 WRITE ?55,"CST: ",$$CST^WVUTL1A(WVDFN)
+23 WRITE !,"Maternity Care Coordinator: ",$$MCMGR^WVUTL1(WVDFN)
+24 WRITE !,$$REPEAT^XLFSTR("=",49)
+25 WRITE $SELECT(WVEDC]""&(WVEDC'="UNKNOWN"):WVEDC_"======",1:"===============================")
+26 IF $DATA(WVSUBH)
DO @WVSUBH
+27 QUIT
+28 ;
+1 ;---> LAB LOG REPORT HEADER: MULTIPLE PATIENTS, MULTIPLE PROCEDURES.
+2 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
+3 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
+4 NEW X
+5 if WVPAGE>1!WVCRT
WRITE @IOF,!
+6 if $DATA(WVCONF)
WRITE WVCONFF,!
if 'WVCRT
WRITE WVTIMLN,!
+7 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
+8 WRITE !!,$$RUNDT^WVUTL1A("C")
+9 WRITE !,"Facility: ",$$INSTTX^WVUTL6($SELECT($GET(WVFAC):WVFAC,1:DUZ(2)))
+10 WRITE ?53,"From: ",$$SLDT2^WVUTL5(WVBEGDT)
+11 WRITE " to ",$$SLDT2^WVUTL5(WVENDDT)
+12 WRITE !,$$REPEAT^XLFSTR("=",80)
+13 IF $DATA(WVSUBH)
DO @WVSUBH
+14 QUIT
+15 ;
+1 ;---> PATIENT REPORT HEADER: ONE PATIENT, ONE PROCEDURE.
+2 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE1,DUZ(2)
+3 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
+4 if WVPAGE>1!WVCRT
WRITE @IOF,!
+5 WRITE WVCONFF
if 'WVCRT
WRITE !,WVTIMLN
+6 WRITE !!,WVTITLE1,?70,"page: ",WVPAGE
SET WVPAGE=WVPAGE+1
+1 ;---> CALLED BY WVPROC; BYPASSES FORMFEED, TITLE, ETC.
+2 NEW WVDES
+3 WRITE !,$$RUNDT^WVUTL1A("C"),!
+4 WRITE !,"Patient Name: ",WVNAMAGE,?53,$$PNLAB^WVUTL5(),WVCHRT
+5 WRITE !,"Case Manager: ",WVCMGR
+6 WRITE ?50,"Procedure: ",$EXTRACT(WVPN,1,19)
+7 WRITE !,"PAP Regimen : ",WVPAPRG
+8 WRITE ?55,"Acc#: ",WVACCN
+9 WRITE !,"Cx Tx Need : ",WVCNEED
+10 WRITE ?48,"Cx Facility: ",$$FACIL^WVUTL1A(WVDFN,"C")
+11 WRITE !,"Br Tx Need : ",WVBNEED
+12 WRITE ?48,"Br Facility: ",$$FACIL^WVUTL1A(WVDFN,"B")
+13 WRITE !,"Elig Code : ",$PIECE($$ELIG^WVUTL9(WVDFN),U,2)
+14 WRITE ?52,"Veteran: ",$$VET^WVUTL1A(WVDFN)
+15 WRITE !,"MST : ",$$MST^WVUTL1A(WVDFN)
+16 WRITE ?56,"CST: ",$$CST^WVUTL1A(WVDFN)
+17 WRITE !,"Maternity Care Coordinator: ",$$MCMGR^WVUTL1(WVDFN)
+18 SET WVDES=$$DES^WVUTL1(WVDFN)
+19 WRITE !,$SELECT(WVDES="YES":"*DES DAUGHTER*",1:"--------------")
+20 WRITE $$REPEAT^XLFSTR("-",37)
+21 WRITE $SELECT(WVEDC]"":WVEDC_"----",1:"-----------------------------")
+22 QUIT
+23 ;
+1 ;---> DELINQUENT NEEDS REPORT HEADER: MULTIPLE PATIENTS
+2 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
+3 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
+4 NEW X
+5 if WVPAGE>1!WVCRT
WRITE @IOF,!
+6 if $DATA(WVCONF)
WRITE WVCONFF,!
if 'WVCRT
WRITE WVTIMLN,!
+7 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
+8 WRITE !,"Case Mgr: "
Begin DoDot:1
+9 IF '$DATA(WVE)
WRITE "ALL"
QUIT
+10 IF WVE
WRITE "ALL"
QUIT
+11 IF $GET(WVMGR)']""
WRITE "UNKNOWN"
QUIT
+12 NEW WVCMGRNM
+13 SET WVCMGRNM=$$GET1^DIQ(200,WVMGR,.01,"E")
+14 WRITE $SELECT(WVCMGRNM]"":WVCMGRNM,1:"UNKNOWN")
End DoDot:1
+15 SET Y=DT
DO DD^%DT
WRITE ?46,"Run Date: ",Y
+16 WRITE !,"Facility: ",$$INSTTX^WVUTL6(WVFAC)
+17 WRITE ?46,"Tx Needs Past Due as of ",$$SLDT2^WVUTL5(WVDDATE)
+18 WRITE !,$$REPEAT^XLFSTR("=",80)
+19 IF $DATA(WVSUBH)
DO @WVSUBH
+20 QUIT
+21 ;
+1 ;---> PROGRAM SNAPSHOT HEADER: JUST TITLE AND FACILITY (NO PATIENTS)
+2 ;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
+3 NEW X
+4 if WVPAGE>1!WVCRT
WRITE @IOF,!
+5 if 'WVCRT
WRITE !,WVTIMLN,!
+6 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
+7 WRITE !?3,$$RUNDT^WVUTL1A()
IF $DATA(WVJTOY)
WRITE ?60,"(",WVJTOY,")"
+8 WRITE !," Note: This report includes all divisions"
+9 WRITE " using this database."
+10 WRITE !,$$REPEAT^XLFSTR("=",80)
+11 IF $DATA(WVSUBH)
DO @WVSUBH
+12 QUIT
+13 ;
+1 ;---> AUTOLOAD OF PATIENTS HEADER
+2 ;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
+3 NEW X
+4 if WVPAGE>1!WVCRT
WRITE @IOF,!
+5 if $DATA(WVCONF)
WRITE WVCONFF,!
if 'WVCRT
WRITE WVTIMLN,!
+6 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
SET WVPAGE=WVPAGE+1
+7 WRITE !!,$$RUNDT^WVUTL1A()
+8 WRITE ?45,"Date Range: "_$$FMTE^XLFDT($GET(WVJSDT),"2D")_"-"_$$FMTE^XLFDT($PIECE($GET(WVJEDT),".",1),"2D")
+9 WRITE !,"Facility: ",$$INSTTX^WVUTL6(DUZ(2))
+10 WRITE ?45,"Cutoff Age: ",WVAGE
+11 WRITE !,$$REPEAT^XLFSTR("=",80)
+12 WRITE !,?3,"NAME",?30,$$PNLB^WVUTL5(),?45,"DOB",?60,"STATUS"
+13 WRITE !,WVLINE
+14 QUIT
+15 ;
+1 ;---> SCREENING RATES REPORT HEADER: (NO PATIENTS)
+2 ;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
+3 NEW X
+4 if WVPAGE>1!WVCRT
WRITE @IOF,!
+5 if 'WVCRT
WRITE !,WVTIMLN,!
+6 WRITE !,WVTITLE
if 'WVCRT
WRITE ?70,"page: ",WVPAGE
+7 WRITE !!?4,"For Age Range: ",$SELECT(WVAGRG=1:"ALL",1:WVAGRG)
+8 WRITE ?56,"For period: ",$$SLDT2^WVUTL5(WVBEGDT)
+9 SET Y=DT
DO DD^%DT
WRITE !?4,"Run Date: ",Y
+10 WRITE ?64,"To: ",$$SLDT2^WVUTL5(WVENDDT)
+11 WRITE !,$$REPEAT^XLFSTR("=",80)
+12 WRITE !?4,"(Note: This report includes all divisions using this database.)"
+13 WRITE !?11,"Number of Active Patients: "_$GET(WVTOT),!
+14 QUIT
+15 ;
ENDREP(X) ;EP
+1 ;---> END A REPORT, DO FORMFEED OR "Press <Return>" IF NECESSARY.
+2 ;---> REQUIRED VARIABLES: WVCRT=1 IF OUTPUT TO SCREEN
+3 ;---> WVPOP=1 IF ESCAPING
+4 ;---> OPTIONAL VARIABLE: X=1 IF "End of Report" SHOULD NOT DISPLAY.
+5 ;
+6 SET WVTITLE="----- End of Report -----"
+7 IF '$GET(X)&('WVPOP)
DO CENTERT^WVUTL5(.WVTITLE)
WRITE !,WVTITLE
+8 IF WVCRT&('$DATA(IO("S")))&('WVPOP)
DO DIRZ^WVUTL3
WRITE @IOF,!
+9 DO ^%ZISC
+10 QUIT