source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZPU3.m@ 1211

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

initial load of WorldVistAEHR

File size: 5.4 KB
Line 
1EASEZPU3 ;ALB/AMA - Print utility for 10-10EZ, Version 6 or greater; 10/23/00
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**57**;Mar 15, 2001
3 ;
4 Q
5 ;Split from EASEZP6U
6 ;
7PAGE1 ;This function retrieves and formats the page 1 application data from
8 ;the 1010EZ Holding File, #712, for the printed version of the VistA
9 ;10-10EZ form. If the holding file entry has not been accepted, and
10 ;a vista entry is available, the vista entry is printed.
11 ; Called from EN^EASEZP6F
12 ;
13 ;The ^TMP("EZTEMP") global is built in SETUP^EASEZP6F and
14 ;remains until the printed form is complete.
15 ; Variables
16 ; ZDATA - references TMP global for output data
17 ; EZDATA - references available data from 1010EZ holding file
18 ; EAX - Temporary data variables
19 ; EACT - Temporary city variable
20 ;
21 N ZDATA,EZDATA,EAX,EACT
22 ;
23 S ZDATA=$NA(^TMP("EASEZ",$J,1))
24 S EZDATA=$NA(^TMP("EZTEMP",$J,"I",1))
25 ;
26 S EAX=$$PROCESS("17.") ;Covered by health insurance?
27 ;EAS*1.0*57 - print full word "UNKNOWN"
28 S @ZDATA@(17)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
29 ;
30 S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
31 S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
32 S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
33 S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
34 ;
35 S EACT="",EACT=$$PROCESS("17F.") ;Insurance company's city
36 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
37 ;Insurance company's street^city, state zip
38 S @ZDATA@("17E")=$$PROCESS("17E.")_U_EACT_$$PROCESS("17G.")_" "_$$PROCESS("17H.")
39 S @ZDATA@("17I")=$$PROCESS("17I.") ;Insurance company's phone
40 ;
41 S EACT="",EACT=$E($$PROCESS("19A.4"),1,30) ;Next-of-kin's city
42 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
43 ;Next-of-kin's name^street^city, state zip^relationship
44 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")
45 S @ZDATA@("19B")=$$PROCESS("19B.1") ;Next-of-kin's home phone
46 S @ZDATA@("19C")=$$PROCESS("19C.1") ;Next-of-kin's work phone
47 ;
48 S EACT="",EACT=$E($$PROCESS("20A.4"),1,30) ;Emergency contact's city
49 I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
50 ;Emergency contact's name^street^city, state zip^relationship
51 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")
52 S @ZDATA@("20B")=$$PROCESS("20B.1") ;EC's home phone
53 S @ZDATA@("20C")=$$PROCESS("20C.1") ;EC's work phone
54 ;
55 S @ZDATA@("21")=$$PROCESS("21.") ;Who receives property?
56 S EAX=$$PROCESS("22A.") ;On-the-job injury?
57 ;EAS*1.0*57 - print full word "UNKNOWN"
58 S @ZDATA@("22A")=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
59 ;
60 S EAX=$$PROCESS("22B.") ;Accident?
61 ;EAS*1.0*57 - print full word "UNKNOWN"
62 S @ZDATA@("22B")=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
63 Q
64 ;
65PAGEI(EAINS) ; Additional Insurance pages
66 ; Called from EN^EASEZP6F
67 N ZDATA,EZDATA,EACT
68 ;
69 S ZDATA=$NA(^TMP("EASEZ",$J,"I",EAINS))
70 K @ZDATA
71 ;
72 ; Process Section IA
73 S EZDATA=$NA(^TMP("EZTEMP",$J,"IA",EAINS))
74 ;
75 S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
76 S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
77 S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
78 S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
79 S EACT="",EACT=$$PROCESS("17F.") ;Insurance company's city
80 I EACT]"" S EACT=EACT_", " ;if there's a street, add comma & space
81 ;Health insurance company's street^city, state zip
82 S @ZDATA@("17E")=$$PROCESS("17E.")_U_EACT_$$PROCESS("17G.")_" "_$$PROCESS("17H.")
83 S @ZDATA@("17I")=$$PROCESS("17I.") ;Insurance company's phone
84 ;
85 Q
86 ;
87PAGEN(EADEP) ; Additional dependent page(s)
88 ; Called from EN^EASEZP6F
89 N ZDATA,EZDATA,EAX
90 ;
91 S ZDATA=$NA(^TMP("EASEZ",$J,"D",EADEP))
92 K @ZDATA
93 ;
94 ; Process Section IIB
95 S EZDATA=$NA(^TMP("EZTEMP",$J,"IIB",EADEP))
96 ;
97 S @ZDATA@(2)=$$PROCESS(1.1) ;Child's name
98 S @ZDATA@(5)=$$PROCESS("3.") ;Date of birth
99 S @ZDATA@(7)=$$PROCESS("2.") ;SSN
100 S @ZDATA@(9)=$$PROCESS("4.") ;Relationship
101 S @ZDATA@(11)=$$PROCESS("5.") ;Date of dependency
102 ;Amount contributed
103 S EAX=$$PROCESS("6."),@ZDATA@(12)=U_$S(EAX="":"",1:$J(EAX,0,2))
104 ;Education expenses
105 S EAX=$$PROCESS("7."),@ZDATA@(13)=$S(EAX="":"",1:$J(EAX,0,2))
106 ;
107 S EAX=$$PROCESS("8.") ;Permanently disabled?
108 ;EAS*1.0*57 - print full word "UNKNOWN"
109 S @ZDATA@(14)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
110 S EAX=$$PROCESS("9.") ;School last year?
111 ;EAS*1.0*57 - print full word "UNKNOWN"
112 S @ZDATA@(15)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
113 ;
114 Q
115 ;
116PROCESS(KEY) ; Process data value from ^TMP("EZTEMP" array
117 ;format = IEN ^ EAS DATA ^ ACCEPT VALUE ^ 712 SUBIEN ^ VISTA DATA
118 ;Take #712 value from 2nd piece, if it's accepted;
119 ;otherwise, take the Patient File value from the 5th piece
120 ;
121 N EAV,RSLT
122 ;
123 I '$D(@EZDATA@(KEY)) G PQ
124 S EAV=@EZDATA@(KEY)
125 S RSLT=$S(+$P(EAV,U,3):$P(EAV,U,2),1:$P(EAV,U,5))
126PQ Q $G(RSLT)
Note: See TracBrowser for help on using the repository browser.