source: FOIAVistA/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZRPP.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 6.4 KB
Line 
1EASEZRPP ;ALB/AMA - Print utility for 10-10EZR, Part 2
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**57**;Mar 15, 2001
3 ;
4 Q
5 ;
6PAGE2 ;Retrieve page 2 data and format for output on 10-10EZR form
7 ; Called from EN^EASEZRPF
8 ;
9 ;Variables
10 ; ZDATA - references TMP global for output data
11 ; EZDATA - references available data from 1010EZ holding file
12 ; EACT - Temporary city variable
13 ; EAX, EAY - temporary storage variables
14 ; EAV, EAS, EAC - temp storage for vet, spouse, and child variables
15 ;
16 N ZDATA,EZDATA,EACT,EAX,EAY,EAV,EAS,EAC
17 ;
18 S ZDATA=$NA(^TMP("EASEZR",$J,2))
19 K @ZDATA
20 ;
21 ; Process Section IIA - Dependent Info
22 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIA",1))
23 ;
24 ;Spouse's name^maiden name
25 S @ZDATA@(1)=$$PROCESS(1.1)_U_$$PROCESS(1.5)
26 S @ZDATA@(2)=$$PROCESS(2.1) ;Child 1's name
27 S @ZDATA@(3)=$$PROCESS("3.") ;Spouse's SSN
28 S @ZDATA@(4)=$$PROCESS("4.") ;Spouse's date of birth
29 S @ZDATA@(5)=$$PROCESS("5.") ;Child 1's date of birth
30 S EACT="",EACT=$$PROCESS(6.2) ;Spouse's city
31 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
32 ;Spouse's street^city, state zip
33 S @ZDATA@(6)=$$PROCESS(6.1)_U_EACT_$$PROCESS(6.3)_" "_$$PROCESS(6.4)
34 ;
35 S @ZDATA@(7)=$$PROCESS("7.") ;Child 1's SSN
36 S @ZDATA@(8)=$$PROCESS(8.1) ;Spouse's phone
37 S @ZDATA@(9)=$$PROCESS("9.") ;Child 1's relationship
38 S @ZDATA@(10)=$$PROCESS("10.") ;Date of marriage to spouse
39 S @ZDATA@(11)=$$PROCESS("11.") ;Date Child 1 became dependent
40 ;
41 S EAX=$$PROCESS(12.1) ;Amount contributed to spouse
42 S EAY=$$PROCESS(12.2) ;Amount contributed to Child 1
43 S @ZDATA@(12)=$S(EAX="":"",1:$J(EAX,0,2))_U_$S(EAY="":"",1:$J(EAY,0,2))
44 ;
45 S @ZDATA@(13)=$$PROCESS("13.") ;Educational expenses for Child 1
46 S @ZDATA@(13)=$S(@ZDATA@(13)="":"",1:$J(@ZDATA@(13),0,2))
47 ;
48 S EAX=$$PROCESS("14.") ;Child 1 disabled?
49 I (EAX=""),(@ZDATA@(2)]"") S EAX="UNKNOWN"
50 I @ZDATA@(2)']"" S EAX=""
51 S @ZDATA@(14)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
52 S EAX=$$PROCESS("15.") ;Child 1 attend school last year?
53 I (EAX=""),(@ZDATA@(2)]"") S EAX="UNKNOWN"
54 I @ZDATA@(2)']"" S EAX=""
55 S @ZDATA@(15)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
56 ;
57 ; Process Section IIC - Previous Calendar Year Gross Annual Income
58 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIC",1))
59 S EAV=$$PROCESS(1.4),EAS=$$PROCESS(1.5) ;Vet & spouse gross income
60 S @ZDATA@("2C1")=$S(EAV="":"",1:$J(EAV,0,2))_U_$S(EAS="":"",1:$J(EAS,0,2))
61 S EAV=$$PROCESS(2.1),EAS=$$PROCESS(2.2) ;Vet & spouse other income
62 S @ZDATA@("2C2")=$S(EAV="":"",1:$J(EAV,0,2))_U_$S(EAS="":"",1:$J(EAS,0,2))
63 S EAV=$$PROCESS(3.1),EAS=$$PROCESS(3.2) ;Vet & spouse net income
64 S @ZDATA@("2C3")=$S(EAV="":"",1:$J(EAV,0,2))_U_$S(EAS="":"",1:$J(EAS,0,2))
65 ;
66 S @ZDATA@(999)=$$PROCESS(999) ;Vet income year
67 I $D(@EZDATA@(998)) D
68 . S @ZDATA@(998)=$$PROCESS(998) ;Vet Declines To Give Info
69 ;
70 ;Since Child amounts in Section IIC are for ALL dependents,
71 ;get just Child 1 amounts from Section IIF - Dependent Gross Incomes
72 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIF",1))
73 S EAC=$$PROCESS(7.1) ;Child 1 gross income
74 S @ZDATA@("2C1")=@ZDATA@("2C1")_U_$S(EAC="":"",1:$J(EAC,0,2))
75 S EAC=$$PROCESS(7.2) ;Child 1 net income
76 S @ZDATA@("2C3")=@ZDATA@("2C3")_U_$S(EAC="":"",1:$J(EAC,0,2))
77 S EAC=$$PROCESS(7.3) ;Child 1 other income
78 S @ZDATA@("2C2")=@ZDATA@("2C2")_U_$S(EAC="":"",1:$J(EAC,0,2))
79 ;
80 ; Process Section IID - Previous Calendar Year Expenses
81 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IID",1))
82 ;Medical expenses
83 S EAX=$$PROCESS("1."),@ZDATA@("2D1")=$S(EAX="":"",1:$J(EAX,0,2))
84 ;Funeral expenses
85 S EAX=$$PROCESS("2."),@ZDATA@("2D2")=$S(EAX="":"",1:$J(EAX,0,2))
86 ;Educational expenses
87 S EAX=$$PROCESS("3."),@ZDATA@("2D3")=$S(EAX="":"",1:$J(EAX,0,2))
88 ;
89 ; Process Section IIE - Previous Calendar Year Net Worth
90 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIE",1))
91 S EAV=$$PROCESS("1."),EAS=$$PROCESS(1.2) ;Vet & spouse cash
92 S @ZDATA@("2E1")=$S(EAV="":"",1:$J(EAV,0,2))_U_$S(EAS="":"",1:$J(EAS,0,2))
93 S EAV=$$PROCESS("2."),EAS=$$PROCESS(2.2) ;Vet & spouse land value
94 S @ZDATA@("2E2")=$S(EAV="":"",1:$J(EAV,0,2))_U_$S(EAS="":"",1:$J(EAS,0,2))
95 S EAV=$$PROCESS("3."),EAS=$$PROCESS(3.2) ;Vet & spouse other property
96 S @ZDATA@("2E3")=$S(EAV="":"",1:$J(EAV,0,2))_U_$S(EAS="":"",1:$J(EAS,0,2))
97 ;
98 ;Since Child amounts in Section IIE are for ALL dependents,
99 ;get just Child 1 amounts from Section IIG - Dependent Net Worths
100 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIG",1))
101 S EAC=$$PROCESS(9.1) ;Child 1 cash
102 S @ZDATA@("2E1")=@ZDATA@("2E1")_U_$S(EAC="":"",1:$J(EAC,0,2))
103 S EAC=$$PROCESS(9.2) ;Child 1 land value
104 S @ZDATA@("2E2")=@ZDATA@("2E2")_U_$S(EAC="":"",1:$J(EAC,0,2))
105 S EAC=$$PROCESS(9.3) ;Child 1 other property
106 S @ZDATA@("2E3")=@ZDATA@("2E3")_U_$S(EAC="":"",1:$J(EAC,0,2))
107 ;
108 Q
109 ;
110PAGEDFF(EADEP) ; Additional dependent financial page(s) for Section IIF
111 ; Called from EN^EASEZRPF
112 N ZDATA,EZDATA,EANAME,EAGROSS,EANET,EAOTHER
113 ;
114 S ZDATA=$NA(^TMP("EASEZR",$J,"DFF",EADEP))
115 K @ZDATA
116 ;
117 ; Process Section IIF
118 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIF",EADEP))
119 ;
120 S EANAME=$$PROCESS("7.") ;Child number (2 through 19)
121 S EAGROSS=$$PROCESS(7.1),EANET=$$PROCESS(7.2),EAOTHER=$$PROCESS(7.3)
122 ;Child #^gross income^net income^other income
123 S @ZDATA@(7)=EANAME_U_$S(EAGROSS="":"",1:$J(EAGROSS,0,2))_U_$S(EANET="":"",1:$J(EANET,0,2))_U_$S(EAOTHER="":"",1:$J(EAOTHER,0,2))
124 ;
125 Q
126 ;
127PAGEDFG(EADEP) ; Additional dependent financial page(s) for Section IIG
128 ; Called from EN^EASEZRPF
129 N ZDATA,EZDATA,EANAME,EACASH,EAREAL,EAOTHER
130 ;
131 S ZDATA=$NA(^TMP("EASEZR",$J,"DFG",EADEP))
132 K @ZDATA
133 ;
134 ; Process Section IIG
135 S EZDATA=$NA(^TMP("EZRTEMP",$J,"IIG",EADEP))
136 ;
137 S EANAME=$$PROCESS("9.") ;Child number (2 through 19)
138 S EACASH=$$PROCESS(9.1),EAREAL=$$PROCESS(9.2),EAOTHER=$$PROCESS(9.3)
139 ;Child #^cash^land value^other property
140 S @ZDATA@(9)=EANAME_U_$S(EACASH="":"",1:$J(EACASH,0,2))_U_$S(EAREAL="":"",1:$J(EAREAL,0,2))_U_$S(EAOTHER="":"",1:$J(EAOTHER,0,2))
141 ;
142 Q
143 ;
144PROCESS(KEY) ; Process data value from EZRTEMP array, take #712 value
145 ; if it's accepted, otherwise take the Patient File value
146 ;
147 N EAV,RSLT
148 ;
149 I '$D(@EZDATA@(KEY)) G PQ
150 S EAV=@EZDATA@(KEY)
151 S RSLT=$S(+$P(EAV,U,3):$P(EAV,U,2),1:$P(EAV,U,5))
152PQ Q $G(RSLT)
Note: See TracBrowser for help on using the repository browser.