source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVUTL7.m@ 1087

Last change on this file since 1087 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 7.2 KB
RevLine 
[613]1WVUTL7 ;HCIOFO/FT,JR-UTIL: HEADERS & TRAILERS; ;4/2/01 11:23
2 ;;1.0;WOMEN'S HEALTH;**5,7,10,14**;Sep 30, 1998
3 ;; Original routine created by IHS/ANMC/MWR
4 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
5 ;; UTILITY: HEADERS AND TRAILERS.
6 ;
7 ; This routine uses the following IAs:
8 ; #10060 - FILE 200 fields (supported)
9 ;
10S(S) ;EP
11 ;---> RETURN A VALUE OF SPACES EQUAL IN LENGTH TO THE NUMBER S.
12 N I,SP S SP=$$REPEAT^XLFSTR(" ",80)
13 Q $E(SP,1,$G(S))
14 ;
15TOPHEAD ;EP
16 ;---> CODE TO SET VARIABLES FOR HEADER.
17 N X
18 D NOW^%DTC S WVNOW=$$SLDT1^WVUTL5(%)
19 S WVLINE=$$REPEAT^XLFSTR("-",80)
20 S WVPAGE=1
21 S WVCRT=$S($E(IOST)="C":1,1:0)
22 S WVCONFF="*********************** CONFIDENTIAL PATIENT INFORMATION "
23 S WVCONFF=WVCONFF_"***********************"
24 S WVTIMLN=$E(WVLINE,1,26)_" printed: "_WVNOW_" "_$E(WVLINE,1,27)
25 Q
26 ;
27TOPHEAD1 ;EP
28 ;---> CODE TO SET VARIABLES FOR HEADER.
29 N X
30 D NOW^%DTC S WVNOW=$$SLDT1^WVUTL5(%)
31 S WVLINE=$$REPEAT^XLFSTR("-",80)
32 S WVPAGE=$G(WVPAGE)+1
33 S WVCRT=$S($E(IOST)="C":1,1:0)
34 S WVCONFF="*********************** CONFIDENTIAL PATIENT INFORMATION "
35 S WVCONFF=WVCONFF_"***********************"
36 S WVTIMLN=$E(WVLINE,1,26)_" printed: "_WVNOW_" "_$E(WVLINE,1,27)
37 Q
38 ;
39HEADER1 ;EP
40 ;---> BROWSE/REPORT HEADER: MULTIPLE PATIENTS, MULTIPLE PROCEDURES.
41 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
42 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
43 N X
44 W:WVPAGE>1!WVCRT @IOF,!
45 W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
46 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
47 W !,$$RUNDT^WVUTL1A("C"),!
48 W !,"Case Mgr: " D
49 .I '$D(WVE) W "ALL" Q
50 .I WVE W "ALL" Q
51 .I '$D(WVCMGR) W "UNKNOWN" Q
52 .I WVCMGR="" W "UNKNOWN" Q
53 .N WVCMGRNM
54 .S WVCMGRNM=$$GET1^DIQ(200,WVCMGR,.01,"E")
55 .W $S(WVCMGRNM]"":WVCMGRNM,1:"UNKNOWN")
56 W ?56,"For period: ",$$TXDT^WVUTL5(WVBEGDT)
57 W !,"Facility: ",$$INSTTX^WVUTL6(DUZ(2))
58 W ?64,"To: ",$$TXDT^WVUTL5(WVENDDT)
59 W !,$$REPEAT^XLFSTR("=",80)
60 I $D(WVSUBH) D @WVSUBH
61 Q
62 ;
63HEADER2 ;EP
64 ;---> PATIENT REPORT HEADER: ONE PATIENT, MULTIPLE PROCEDURES.
65 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
66 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
67 N X
68 D FAC^WVUTL1A
69 W:WVPAGE>1!WVCRT @IOF,!
70 W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
71 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
72 W !,$$RUNDT^WVUTL1A("C")
73 W !,"Patient Name: ",WVNAMAGE,?52,$$PNLAB^WVUTL5(),WVCHRT
74 W !,"Case Manager: ",WVCMGR
75 W ?50,"Facility: ",$E($$INSTTX^WVUTL6(DUZ(2)),1,19)
76 W !,"Cx Tx Need : ",WVCNEED
77 W ?47,"Cx Facility: ",$G(WVJCFAC)
78 W !,"PAP Regimen : ",WVPAPRG,?47,"Pr Provider: ",$G(WVJPCP)
79 W !,"Br Tx Need : ",WVBNEED
80 W ?47,"Br Facility: ",$G(WVJBFAC)
81 W !,"Hx of BR CA : ",$$GET1^DIQ(790,WVDFN,.23,"E")
82 W !,"Elig Code : ",$P($$ELIG^WVUTL9(WVDFN),U,2)
83 W ?51,"Veteran: ",$$VET^WVUTL1A(WVDFN)
84 W !,"MST : ",$$MST^WVUTL1A(WVDFN)
85 W ?55,"CST: ",$$CST^WVUTL1A(WVDFN)
86 W !,$$REPEAT^XLFSTR("=",49)
87 W $S(WVEDC]"":WVEDC_"======",1:"===============================")
88 I $D(WVSUBH) D @WVSUBH
89 Q
90 ;
91HEADER3 ;EP
92 ;---> LAB LOG REPORT HEADER: MULTIPLE PATIENTS, MULTIPLE PROCEDURES.
93 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
94 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
95 N X
96 W:WVPAGE>1!WVCRT @IOF,!
97 W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
98 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
99 W !!,$$RUNDT^WVUTL1A("C")
100 W !,"Facility: ",$$INSTTX^WVUTL6($S($G(WVFAC):WVFAC,1:DUZ(2)))
101 W ?53,"From: ",$$SLDT2^WVUTL5(WVBEGDT)
102 W " to ",$$SLDT2^WVUTL5(WVENDDT)
103 W !,$$REPEAT^XLFSTR("=",80)
104 I $D(WVSUBH) D @WVSUBH
105 Q
106 ;
107HEADER4 ;EP
108 ;---> PATIENT REPORT HEADER: ONE PATIENT, ONE PROCEDURE.
109 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE1,DUZ(2)
110 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
111 W:WVPAGE>1!WVCRT @IOF,!
112 W WVCONFF W:'WVCRT !,WVTIMLN
113 W !!,WVTITLE1,?70,"page: ",WVPAGE S WVPAGE=WVPAGE+1
114HEADER41 ;EP
115 ;---> CALLED BY WVPROC; BYPASSES FORMFEED, TITLE, ETC.
116 N WVDES
117 W !,$$RUNDT^WVUTL1A("C"),!
118 W !,"Patient Name: ",WVNAMAGE,?53,$$PNLAB^WVUTL5(),WVCHRT
119 W !,"Case Manager: ",WVCMGR
120 W ?50,"Procedure: ",$E(WVPN,1,19)
121 W !,"PAP Regimen : ",WVPAPRG
122 W ?55,"Acc#: ",WVACCN
123 W !,"Cx Tx Need : ",WVCNEED
124 W ?48,"Cx Facility: ",$$FACIL^WVUTL1A(WVDFN,"C")
125 W !,"Br Tx Need : ",WVBNEED
126 W ?48,"Br Facility: ",$$FACIL^WVUTL1A(WVDFN,"B")
127 W !,"Elig Code : ",$P($$ELIG^WVUTL9(WVDFN),U,2)
128 W ?52,"Veteran: ",$$VET^WVUTL1A(WVDFN)
129 W !,"MST : ",$$MST^WVUTL1A(WVDFN)
130 W ?56,"CST: ",$$CST^WVUTL1A(WVDFN)
131 S WVDES=$$DES^WVUTL1(WVDFN)
132 W !,$S(WVDES="YES":"*DES DAUGHTER*",1:"--------------")
133 W $$REPEAT^XLFSTR("-",37)
134 W $S(WVEDC]"":WVEDC_"----",1:"-----------------------------")
135 Q
136 ;
137HEADER5 ;EP
138 ;---> DELINQUENT NEEDS REPORT HEADER: MULTIPLE PATIENTS
139 ;---> REQUIRED VARIABLES: WVBEGDT,WVCRT,WVENDDT,WVPAGE,WVTITLE,DUZ(2)
140 ;---> OPTIONAL VARIABLE: WVCONF (CONFIDENTIAL), WVSUBH (SUBHEADER).
141 N X
142 W:WVPAGE>1!WVCRT @IOF,!
143 W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
144 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
145 W !,"Case Mgr: " D
146 .I '$D(WVE) W "ALL" Q
147 .I WVE W "ALL" Q
148 .I $G(WVMGR)']"" W "UNKNOWN" Q
149 .N WVCMGRNM
150 .S WVCMGRNM=$$GET1^DIQ(200,WVMGR,.01,"E")
151 .W $S(WVCMGRNM]"":WVCMGRNM,1:"UNKNOWN")
152 S Y=DT D DD^%DT W ?46,"Run Date: ",Y
153 W !,"Facility: ",$$INSTTX^WVUTL6(WVFAC)
154 W ?46,"Tx Needs Past Due as of ",$$SLDT2^WVUTL5(WVDDATE)
155 W !,$$REPEAT^XLFSTR("=",80)
156 I $D(WVSUBH) D @WVSUBH
157 Q
158 ;
159HEADER6 ;EP
160 ;---> PROGRAM SNAPSHOT HEADER: JUST TITLE AND FACILITY (NO PATIENTS)
161 ;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
162 N X
163 W:WVPAGE>1!WVCRT @IOF,!
164 W:'WVCRT !,WVTIMLN,!
165 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
166 W !?3,$$RUNDT^WVUTL1A() I $D(WVJTOY) W ?60,"(",WVJTOY,")"
167 W !," Note: This report includes all divisions"
168 W " using this database."
169 W !,$$REPEAT^XLFSTR("=",80)
170 I $D(WVSUBH) D @WVSUBH
171 Q
172 ;
173HEADER7 ;EP
174 ;---> AUTOLOAD OF PATIENTS HEADER
175 ;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
176 N X
177 W:WVPAGE>1!WVCRT @IOF,!
178 W:$D(WVCONF) WVCONFF,! W:'WVCRT WVTIMLN,!
179 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE S WVPAGE=WVPAGE+1
180 W !!,$$RUNDT^WVUTL1A()
181 W ?45,"Date Range: "_$$FMTE^XLFDT($G(WVJSDT),"2D")_"-"_$$FMTE^XLFDT($P($G(WVJEDT),".",1),"2D")
182 W !,"Facility: ",$$INSTTX^WVUTL6(DUZ(2))
183 W ?45,"Cutoff Age: ",WVAGE
184 W !,$$REPEAT^XLFSTR("=",80)
185 W !,?3,"NAME",?30,$$PNLB^WVUTL5(),?45,"DOB",?60,"STATUS"
186 W !,WVLINE
187 Q
188 ;
189HEADER8 ;EP
190 ;---> SCREENING RATES REPORT HEADER: (NO PATIENTS)
191 ;---> REQUIRED VARIABLES: WVCRT,WVTITLE,DUZ(2)
192 N X
193 W:WVPAGE>1!WVCRT @IOF,!
194 W:'WVCRT !,WVTIMLN,!
195 W !,WVTITLE W:'WVCRT ?70,"page: ",WVPAGE
196 W !!?4,"For Age Range: ",$S(WVAGRG=1:"ALL",1:WVAGRG)
197 W ?56,"For period: ",$$SLDT2^WVUTL5(WVBEGDT)
198 S Y=DT D DD^%DT W !?4,"Run Date: ",Y
199 W ?64,"To: ",$$SLDT2^WVUTL5(WVENDDT)
200 W !,$$REPEAT^XLFSTR("=",80)
201 W !?4,"(Note: This report includes all divisions using this database.)"
202 W !?11,"Number of Active Patients: "_$G(WVTOT),!
203 Q
204 ;
205ENDREP(X) ;EP
206 ;---> END A REPORT, DO FORMFEED OR "Press <Return>" IF NECESSARY.
207 ;---> REQUIRED VARIABLES: WVCRT=1 IF OUTPUT TO SCREEN
208 ;---> WVPOP=1 IF ESCAPING
209 ;---> OPTIONAL VARIABLE: X=1 IF "End of Report" SHOULD NOT DISPLAY.
210 ;
211 S WVTITLE="----- End of Report -----"
212 I '$G(X)&('WVPOP) D CENTERT^WVUTL5(.WVTITLE) W !,WVTITLE
213 I WVCRT&('$D(IO("S")))&('WVPOP) D DIRZ^WVUTL3 W @IOF,!
214 D ^%ZISC
215 Q
Note: See TracBrowser for help on using the repository browser.