source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZRPU.m@ 824

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

initial load of WorldVistAEHR

File size: 7.2 KB
Line 
1EASEZRPU ;ALB/AMA - Print utility for 10-10EZR
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**57**;Mar 15, 2001
3 ;
4 Q
5 ;
6PAGE1 ;This function retrieves and formats the page 1 application data from
7 ;the 1010EZ Holding File, #712, for the printed version of the VistA
8 ;10-10EZR form. If the holding file entry has not been accepted, and
9 ;a vista entry is available, the vista entry is printed.
10 ; Called from EN^EASEZRPF
11 ;
12 ;The ^TMP("EZRTEMP") global is built in SETUP^EASEZRPF and
13 ;remains until the printed form is complete.
14 ; Variables
15 ; ZDATA - references TMP global for output data
16 ; EZDATA - references available data from 1010EZ holding file
17 ; EASTR - Temporary String data variable
18 ; EAX,EAY - Temporary data variables
19 ; EACT - Temporary city variable
20 ;
21 ;THIS ROUTINE WAS COPIED FROM EASEZP6U, AND MODIFIED TO
22 ;PROCESS JUST THE DATA ELEMENTS NEEDED FOR THE EZR FORM
23 ;
24 N ZDATA,EZDATA,EASTR,EAX,EAY,EACT
25 ;
26 S ZDATA=$NA(^TMP("EASEZR",$J,1))
27 S EZDATA=$NA(^TMP("EZRTEMP",$J,"I",1))
28 K @ZDATA
29 ;
30 S @ZDATA@(2)=$$PROCESS(2.1) ;Vet's name
31 S @ZDATA@(3)=$E($$PROCESS("3."),1,35) ;Other names used
32 S @ZDATA@(4)=$$PROCESS("4.") ;Gender
33 ;
34 S @ZDATA@(5)=$$PROCESS("5.") ;SSN
35 S @ZDATA@(7)=$$PROCESS("7.") ;Date of birth
36 S @ZDATA@("9A")=$E($$PROCESS("9A."),1,35) ;Address
37 S @ZDATA@("9B")=$E($$PROCESS("9B."),1,32) ;City
38 S @ZDATA@("9C")=$$PROCESS("9C.") ;State
39 S @ZDATA@("9D")=$$PROCESS("9D.") ;Zip
40 S @ZDATA@("9E")=$$PROCESS("9E.") ;County
41 S @ZDATA@(10)=$$PROCESS("10.1") ;Home phone
42 S @ZDATA@("11A")=$$PROCESS("11A.") ;E-mail
43 S @ZDATA@("11G")=$$PROCESS("11A1.") ;Cell phone number
44 S @ZDATA@("11H")=$$PROCESS("11A3.") ;Pager number
45 S @ZDATA@(12)=$$PROCESS("12.") ;Marital status
46 ;
47 K EAX
48 F EAX="14J","14K","14L" D ;Medicare eligible, Enrolled in Part A/B?
49 . S EAY=$$PROCESS(EAX_".")
50 . S @ZDATA@(EAX)=$S(EAY="Y"!(EAY="YES"):"YES",EAY="N"!(EAY="NO"):"NO",EAY="UNKNOWN":"UNKNOWN",1:"")
51 ;
52 S @ZDATA@("14K1")=$$PROCESS("14K1.") ;Medicare Part A effective date
53 S @ZDATA@("14L1")=$$PROCESS("14L1.") ;Medicare Part B effective date
54 S @ZDATA@("14M")=$$PROCESS("14M.") ;Medicare claim number
55 S @ZDATA@("14N")=$$PROCESS("14N.") ;Name on Medicare card
56 ;
57 ;Vet's employment status^Date of retirement
58 S @ZDATA@("15A")=$$PROCESS("15A.1")_U_$$PROCESS("15A.2")
59 K EAX
60 S EAX=$E($$PROCESS("15B.1"),1,30) ;Company's name
61 S EACT="",EACT=$E($$PROCESS("15B.3"),1,30) ;Company's city
62 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
63 ;Company's name^Street^City, State Zip^Phone
64 S EAX=EAX_U_$E($$PROCESS("15B.2"),1,30)_U_EACT_$$PROCESS("15B.4")_" "_$E($$PROCESS("15B.5"),1,10)_U_$$PROCESS("15B.6")
65 S @ZDATA@("15B")=EAX
66 ;
67 ;Spouse's employment status^Date of retirement
68 S @ZDATA@("16A")=$$PROCESS("16A.1")_U_$$PROCESS("16A.2")
69 ;
70 K EAX
71 S EAX=$E($$PROCESS("16B.1"),1,30) ;Spouse's company's name
72 S EACT="",EACT=$E($$PROCESS("16B.3"),1,30) ;Spouse's company's city
73 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
74 ;Spouse's company's name^Street^City, State Zip^Phone
75 S EAX=EAX_U_$E($$PROCESS("16B.2"),1,30)_U_EACT_$$PROCESS("16B.4")_" "_$E($$PROCESS("16B.5"),1,10)_U_$$PROCESS("16B.6")
76 S @ZDATA@("16B")=EAX
77 ;
78 S EAX=$$PROCESS("17.") ;Covered by health insurance?
79 S @ZDATA@(17)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
80 ;
81 S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
82 S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
83 S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
84 S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
85 ;
86 S EACT="",EACT=$$PROCESS("17F.") ;Insurance company's city
87 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
88 ;Insurance company's street^city, state zip
89 S @ZDATA@("17E")=$$PROCESS("17E.")_U_EACT_$$PROCESS("17G.")_" "_$$PROCESS("17H.")
90 S @ZDATA@("17I")=$$PROCESS("17I.") ;Insurance company's phone
91 ;
92 S EACT="",EACT=$E($$PROCESS("19A.4"),1,30) ;Next-of-kin's city
93 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
94 ;Next-of-kin's name^street^city, state zip^relationship
95 S @ZDATA@("19A")=$$PROCESS("19A.1")_U_$E($$PROCESS("19A.3"),1,30)_U_EACT_$$PROCESS("19A.5")_" "_$E($$PROCESS("19A.6"),1,10)_U_$$PROCESS("19A.7")
96 S @ZDATA@("19B")=$$PROCESS("19B.1") ;Next-of-kin's home phone
97 S @ZDATA@("19C")=$$PROCESS("19C.1") ;Next-of-kin's work phone
98 ;
99 S EACT="",EACT=$E($$PROCESS("20A.4"),1,30) ;Emergency contact's city
100 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
101 ;Emergency contact's name^street^city, state zip^relationship
102 S @ZDATA@("20A")=$$PROCESS("20A.1")_U_$E($$PROCESS("20A.3"),1,30)_U_EACT_$$PROCESS("20A.5")_" "_$E($$PROCESS("20A.6"),1,10)_U_$$PROCESS("20A.7")
103 S @ZDATA@("20B")=$$PROCESS("20B.1") ;EC's home phone
104 S @ZDATA@("20C")=$$PROCESS("20C.1") ;EC's work phone
105 S @ZDATA@("21")=$$PROCESS("21.") ;Who receives property?
106 ;
107 Q
108 ;
109PAGEI(EAINS) ; Additional Insurance pages
110 ; Called from EN^EASEZRPF
111 N ZDATA,EZDATA,EACT
112 ;
113 S ZDATA=$NA(^TMP("EASEZR",$J,"I",EAINS))
114 K @ZDATA
115 ;
116 ; Process Section IA
117 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IA",EAINS))
118 ;
119 S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
120 S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
121 S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
122 S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
123 S EACT="",EACT=$$PROCESS("17F.") ;Insurance company's city
124 I EACT]"" S EACT=EACT_", " ;if there's a street, add comma & space
125 ;Health insurance company's street^city, state zip
126 S @ZDATA@("17E")=$$PROCESS("17E.")_U_EACT_$$PROCESS("17G.")_" "_$$PROCESS("17H.")
127 S @ZDATA@("17I")=$$PROCESS("17I.") ;Insurance company's phone
128 ;
129 Q
130 ;
131PAGEN(EADEP) ; Additional dependent page(s)
132 ; Called from EN^EASEZRPF
133 N ZDATA,EZDATA,EAX
134 ;
135 S ZDATA=$NA(^TMP("EASEZR",$J,"D",EADEP))
136 K @ZDATA
137 ;
138 ; Process Section IIB
139 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIB",EADEP))
140 ;
141 S @ZDATA@(2)=$$PROCESS(1.1) ;Child's name
142 S @ZDATA@(5)=$$PROCESS("3.") ;Date of birth
143 S @ZDATA@(7)=$$PROCESS("2.") ;SSN
144 S @ZDATA@(9)=$$PROCESS("4.") ;Relationship
145 S @ZDATA@(11)=$$PROCESS("5.") ;Date of dependency
146 S EAX=$$PROCESS("6.") ;Amount contributed
147 S @ZDATA@(12)=U_$S(EAX="":"",1:$J(EAX,0,2))
148 S EAX=$$PROCESS("7.") ;Education expenses
149 S @ZDATA@(13)=$S(EAX="":"",1:$J(EAX,0,2))
150 ;
151 S EAX=$$PROCESS("8.") ;Permanently disabled?
152 S @ZDATA@(14)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
153 S EAX=$$PROCESS("9.") ;School last year?
154 S @ZDATA@(15)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
155 ;
156 Q
157 ;
158PROCESS(KEY) ; Process data value from EZRTEMP array, take #712 value
159 ; if it's accepted, otherwise take the Patient File value
160 ;
161 N EAV,RSLT
162 ;
163 I '$D(@EZDATA@(KEY)) G PQ
164 S EAV=@EZDATA@(KEY)
165 S RSLT=$S(+$P(EAV,U,3):$P(EAV,U,2),1:$P(EAV,U,5))
166PQ Q $G(RSLT)
Note: See TracBrowser for help on using the repository browser.