source: FOIAVistA/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZPU.m@ 1713

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

initial load of FOIAVistA 6/30/08 version

File size: 7.3 KB
Line 
1EASEZPU ; ALB/SCK - Format VA10-10EZ print output utility ; 10/23/00
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;;Mar 15, 2001
3 ;
4 Q
5 ;
6PAGE1 ; This function retrieves and formats the page 1 application data from the 1010EZ Holding File, #712,
7 ; for the printed version of the Vista 10-10EZ form. If the hoding file entry has not been
8 ; accepted, and a vista entry is available, the vista entry is printed.
9 ; The ^TMP("EZTEMP") global is built in SETUP^EASEZPF and remains until the printed
10 ; form is complete.
11 ; Variables
12 ; ZDATA - Variable which references the TMP global for the output data.
13 ; EZDATA - Variable which references the available data from the 1010EZ holding file
14 ; EAX - Temporary data variable
15 ; EASTR - Temporary String data variable
16 ;
17 N ZDATA,EZDATA,EAX,EASTR,X
18 ;
19 S EZDATA="^TMP(""EZTEMP"",$J,""I"",1)"
20 S ZDATA="^TMP(""EASEZ"",$J,1)"
21 K @ZDATA
22 ;
23 S EASTR="" F EAX="1A.1","1A.2","1A.3","1A.4","1A.5" D
24 . I $$PROCESS(EAX)="YES" S EASTR=EASTR_$$BENEFIT(EAX)_", "
25 S @ZDATA@("1A")=EASTR
26 ;
27 S @ZDATA@("1B")=$$PROCESS("1B.")
28 S @ZDATA@(2)=$$PROCESS(2.1)
29 S @ZDATA@(3)=$E($$PROCESS("3."),1,35)
30 S @ZDATA@(4)=$$PROCESS("4.")
31 S @ZDATA@(5)=$$PROCESS("5.")
32 S @ZDATA@(6)=$$PROCESS("6.")
33 S @ZDATA@(7)=$$PROCESS("7.")
34 S @ZDATA@(8)=$$PROCESS("8.")
35 S @ZDATA@("9A")=$E($$PROCESS("9A."),1,35)
36 S @ZDATA@("9B")=$E($$PROCESS("9B."),1,32)
37 S @ZDATA@("9C")=$$PROCESS("9C.")
38 S @ZDATA@("9D")=$$PROCESS("9D.")
39 S @ZDATA@("9E")=$$PROCESS("9E.")
40 S @ZDATA@(10)=$$PROCESS("10.1")
41 S @ZDATA@(11)=$$PROCESS("11.1")
42 S @ZDATA@(12)=$$PROCESS("12.")
43 S @ZDATA@("13A")=$$PROCESS("13A.")
44 S @ZDATA@("13B")=$$PROCESS("13B.")
45 S @ZDATA@("13C")=$$PROCESS("13C.")
46 S @ZDATA@("13D")=$$PROCESS("13D.")
47 S @ZDATA@("13E")=$$PROCESS("13E.")
48 ;
49 K EAX
50 F EAX="14A1","14A2","14B","14C","14D","14D1","14D2","14E","14F","14G","14H","14I","14J","14K","14L" D
51 . S X=$$PROCESS(EAX_".")
52 . S @ZDATA@(EAX)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
53 ;
54 S @ZDATA@("14B1")=$$PROCESS("14B1.")
55 S @ZDATA@("14K1")=$$PROCESS("14K1.")
56 S @ZDATA@("14L1")=$$PROCESS("14L1.")
57 S @ZDATA@("14M")=$$PROCESS("14M.")
58 S @ZDATA@("14N")=$$PROCESS("14N.")
59 S @ZDATA@("15A")=$$PROCESS("15A.1")_"^"_$$PROCESS("15A.2")
60 ;
61 K EAX
62 S EAX=$E($$PROCESS("15B.1"),1,30)
63 S EAX=EAX_"^"_$E($$PROCESS("15B.2"),1,30)_" "_$E($$PROCESS("15B.3"),1,30)_" "_$$PROCESS("15B.4")_" "_$E($$PROCESS("15B.5"),1,10)_"^"_$$PROCESS("15B.6")
64 S @ZDATA@("15B")=EAX
65 ;
66 S @ZDATA@("16A")=$$PROCESS("16A.1")_U_$$PROCESS("16A.2")
67 ;
68 K EAX
69 S EAX=$E($$PROCESS("16B.1"),1,30)
70 S EAX=EAX_"^"_$E($$PROCESS("16B.2"),1,30)_" "_$E($$PROCESS("16B.3"),1,30)_" "_$$PROCESS("16B.4")_" "_$E($$PROCESS("16B.5"),1,10)_"^"_$$PROCESS("16B.6")
71 S @ZDATA@("16B")=EAX
72 ;
73 S X=$$PROCESS("17.")
74 S @ZDATA@(17)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
75 ;
76 S @ZDATA@("17A")=$$PROCESS("17A.")
77 S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30)
78 S @ZDATA@("17C")=$$PROCESS("17C.")
79 S @ZDATA@("17D")=$$PROCESS("17D.")
80 ;
81 S X=$$PROCESS("18.")
82 S @ZDATA@(18)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
83 ;
84 S @ZDATA@("18A")=$$PROCESS("18A.")
85 S @ZDATA@("18B")=$E($$PROCESS("18B."),1,30)
86 S @ZDATA@("18C")=$$PROCESS("18C.")
87 S @ZDATA@("18D")=$$PROCESS("18D.")
88 ;
89 S @ZDATA@("19A")=$$PROCESS("19A.1")_"^"_$E($$PROCESS("19A.3"),1,30)_", "_$E($$PROCESS("19A.4"),1,30)_" "_$$PROCESS("19A.5")_" "_$E($$PROCESS("19A.6"),1,10)_"^"_$$PROCESS("19A.7")
90 S @ZDATA@("19B")=$$PROCESS("19B.1")
91 S @ZDATA@("19C")=$$PROCESS("19C.1")
92 ;
93 S @ZDATA@("20A")=$$PROCESS("20A.1")_"^"_$E($$PROCESS("20A.3"),1,30)_", "_$E($$PROCESS("20A.4"),1,30)_" "_$$PROCESS("20A.5")_" "_$E($$PROCESS("20A.6"),1,10)_"^"_$$PROCESS("20A.7")
94 S @ZDATA@("20B")=$$PROCESS("20B.1")
95 S @ZDATA@("20C")=$$PROCESS("20C.1")
96 ;
97 S @ZDATA@("21")=$$PROCESS("21.")
98 S X=$$PROCESS("22A.")
99 S @ZDATA@("22A")=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",(X="UNKNOWN"):"UNK",1:"")
100 ;
101 S X=$$PROCESS("22B.")
102 S @ZDATA@("22B")=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",(X="UNKNOWN"):"UNK",1:"")
103 Q
104 ;
105PAGE2 ; Retrieve page 2 data and format for output on 10-10EZ form
106 ;
107 ; Variables
108 ; ZDATA, EZDATA, EAX - See above
109 ; EAV, EAS, EAC, X12A, X12B - temporary storage variables
110 ;
111 N ZDATA,EZDATA,X,EAX,EAV,EAS,EAC,X12A,X12B
112 ;
113 S ZDATA="^TMP(""EASEZ"",$J,2)"
114 K @ZDATA
115 ;
116 ; Process Section IIA
117 S EZDATA="^TMP(""EZTEMP"",$J,""IIA"",1)"
118 ;
119 S @ZDATA@(1)=$$PROCESS(1.1)
120 S @ZDATA@(2)=$$PROCESS(2.1)
121 S @ZDATA@(3)=$$PROCESS("3.")
122 S @ZDATA@(4)=$$PROCESS("4.")
123 S @ZDATA@(5)=$$PROCESS("5.")
124 S @ZDATA@(6)=$$PROCESS(6.1)_"^"_$$PROCESS(6.2)_" "_$$PROCESS(6.3)_" "_$$PROCESS(6.4)
125 ;
126 S @ZDATA@(7)=$$PROCESS("7.")
127 S @ZDATA@(8)=$$PROCESS(8.1)
128 S @ZDATA@(9)=$$PROCESS("9.")
129 S @ZDATA@(10)=$$PROCESS("10.")
130 S @ZDATA@(11)=$$PROCESS("11.")
131 ;
132 S X12A=$$PROCESS(12.1)
133 S X12B=$$PROCESS(12.2)
134 S @ZDATA@(12)=X12A_"^"_X12B
135 ;
136 S @ZDATA@(13)=$$PROCESS("13.")
137 ;
138 S X=$$PROCESS("14.")
139 S @ZDATA@(14)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
140 S X=$$PROCESS("15.")
141 S @ZDATA@(15)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
142 ;
143 ; Process Section IIC
144 S EZDATA="^TMP(""EZTEMP"",$J,""IIC"",1)"
145 ;
146 S EAV=$$PROCESS(1.1),EAS=$$PROCESS(1.2),EAC=$$PROCESS(1.3)
147 S @ZDATA@("2C1")=EAV_"^"_EAS_"^"_EAC
148 ;
149 K EAV,EAS,EAC
150 S EAV=$$PROCESS(2.1),EAS=$$PROCESS(2.2),EAC=$$PROCESS(2.3)
151 S @ZDATA@("2C2")=EAV_"^"_EAS_"^"_EAC
152 S X=$$PROCESS("3.")
153 S @ZDATA@("2C3")=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
154 ;
155 ; Process Section IID
156 S EZDATA="^TMP(""EZTEMP"",$J,""IID"",1)"
157 ;
158 S X=$$PROCESS("1."),@ZDATA@("2D1")=X
159 S X=$$PROCESS("2."),@ZDATA@("2D2")=X
160 S X=$$PROCESS("3."),@ZDATA@("2D3")=X
161 ;
162 ; Process Section IIE
163 S EZDATA="^TMP(""EZTEMP"",$J,""IIE"",1)"
164 ;
165 K EAV,EAS
166 S EAV=$$PROCESS(1.1),EAS=$$PROCESS(1.2)
167 S @ZDATA@("2E1")=EAV_"^"_EAS
168 ;
169 K EAV,EAS
170 S EAV=$$PROCESS(2.1),EAS=$$PROCESS(2.2)
171 S @ZDATA@("2E2")=EAV_"^"_EAS
172 ;
173 K EAV,EAS
174 S EAV=$$PROCESS(3.1),EAS=$$PROCESS(3.2)
175 S @ZDATA@("2E3")=EAV_"^"_EAS
176 ;
177 Q
178 ;
179PAGEN(EADEP) ; Additional dependent pages. Prints Child data only on page 2 format.
180 ;
181 N ZDATA,EZDATA,EAX,X
182 ;
183 S ZDATA="^TMP(""EASEZ"",$J,2)"
184 K @ZDATA
185 ;
186 ; Process Section IIA
187 S EZDATA="^TMP(""EZTEMP"",$J,""IIB"",EADEP)"
188 ;
189 S @ZDATA@(1)=""
190 S @ZDATA@(2)=$$PROCESS(1.1)
191 S @ZDATA@(3)=""
192 S @ZDATA@(4)=""
193 S @ZDATA@(5)=$$PROCESS("3.")
194 S @ZDATA@(6)=""
195 S @ZDATA@(7)=$$PROCESS("2.")
196 S @ZDATA@(8)=""
197 S @ZDATA@(9)=$$PROCESS("4.")
198 S @ZDATA@(10)=""
199 S @ZDATA@(11)=$$PROCESS("5.")
200 S X=$$PROCESS("6."),@ZDATA@(12)="^"_X
201 S X=$$PROCESS("7."),@ZDATA@(13)=X
202 ;
203 S X=$$PROCESS("8.")
204 S @ZDATA@(14)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
205 S X=$$PROCESS("9.")
206 S @ZDATA@(15)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
207 ;
208 ; Process Section IIB
209 S @ZDATA@("2B")=-1
210 ;
211 F EAX="2C1","2C2","2C3","2D1","2D2","2D3","2E1","2E2","2E3" S @ZDATA@(EAX)=""
212 Q
213 ;
214PROCESS(KEY) ; Process data value form EXTEMP array, take #712 value if it's accepted,
215 ; otherwise take the Patient File value
216 ;
217 N EAV,RSLT
218 ;
219 I '$D(@EZDATA@(KEY)) G PQ
220 S EAV=@EZDATA@(KEY)
221 S RSLT=$S(+$P(EAV,U,3):$P(EAV,U,2),1:$P(EAV,U,5))
222 ;S RSLT=$P(EAV,U,2)
223PQ Q $G(RSLT)
224 ;
225BENEFIT(X) ; Return External format of benefit applied for for printing on the VA 1010EZ form.
226 ;
227 Q $S(X="1A.1":"HEALTH SERVICES",X="1A.2":"NURSING HOME",X="1A.3":"DOMICILIARY",X="1A.4":"DENTAL",X="1A.5":"ENROLLMENT",1:"")
Note: See TracBrowser for help on using the repository browser.