source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZPF.m@ 972

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

initial load of WorldVistAEHR

File size: 4.7 KB
Line 
1EASEZPF ;ALB/SCK - Print 1010EZ Enrollment form ; 10/19/2000
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**44,51**;Mar 15, 2001
3 ;
4 ; These routines print a version of the OMB approved VA10-10EZ form.
5 ; No local modifications to these routines will be made. Any changes
6 ; will be provided through the National Patch Module release process.
7 ;
8QUE(EASAPP,EASDFN) ; Queue the 1010EZ print
9 ; Input
10 ; EASAPP - Internal entry number in the 1010EZ HOLDING File, #712
11 ; EASDFN - [Optionla] Patient DFN
12 ;
13 ; Output
14 ; ZTSK - Task Number returned from call to Task Manager
15 ;
16 ;
17 N ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,ZUSR,POP,X,ERR
18 ;
19 ; Check for conditions to print form. If conditions not met, quit
20 G:$$CHECKS(EASAPP) EXIT
21 ;
22 W !!?5,*7,"Do not select a slave device for output."
23 W !?5,"This output requires a 132 column output printer."
24 W !?5,"Output to SCREEN will be unreadable.",!
25 ;
26 S EASAPP=$G(EASAPP),EASDFN=$G(EASDFN)
27 ;
28 S %ZIS="Q",%ZIS("S")="I $P($G(^(1)),U)'[""SLAVE""&($P($G(^(0)),U)'[""SLAVE"")"
29 D ^%ZIS
30 ;
31 G:POP EXIT
32 S ZUSR=DUZ,ZTRTN="EN^EASEZPF",ZTDESC="1010EZ PRINT"
33 ;EAS*1*51 -- if version # 6 or greater, use new print format
34 I '$G(EASVRSN) S EASVRSN=$$VERSION^EASEZU4(EASAPP)
35 I '(EASVRSN<6) S ZTRTN="EN^EASEZP6F"
36 ;
37 F X="ZUSR","EASAPP","EASDFN" S ZTSAVE(X)=""
38 D ^%ZTLOAD
39 D HOME^%ZIS
40 ;
41EXIT Q +$G(ZTSK)
42 ;
43CHECKS(EASAPP) ; Check for quit conditions
44 ;
45 Q 0
46 N RSLT
47 ;
48 S X=$$GET1^DIQ(712,EASAPP_",",3.4,"I") D
49 . I +X'>0 S ERR(3.4)="The applicant has not been linked to the PATIENT File, #2"
50 ;
51 S X=$$GET1^DIQ(712,EASAPP_",",5.1,"I") D
52 . I +X'>0 S ERR(5.1)="This application has not been reviewed"
53 ;
54 S X=$$GET1^DIQ(712,EASAPP_",",9.1,"I") D
55 . I X>0 S ERR(9.1)="This application has already been closed, thE VA10-10EZ cannot be printed"
56 ;
57 I $D(ERR)>0 D
58 . W !!?3,*7,"The VA10-10EZ for "
59 . W $$GET1^DIQ(712,EASAPP_",",1),", ",$$GET1^DIQ(712,EASAPP_",",2),", "
60 . W !?3,"WEB submission ID: ",$$GET1^DIQ(712,EASAPP_",",.1)
61 . W !?3,"could not be printed for the following reason(s): "
62 . S X=0
63 . F S X=$O(ERR(X)) Q:'X D
64 . . W !?5,">> ",ERR(X)
65 . S RSLT=1
66 ;
67 Q $G(RSLT)
68 ;
69EN ; Entry point to print 1010EZ
70 N EALNE,EAINFO,EAABRT,EAADL,ERR
71 ;
72 D SETUP(.EALNE,.EAINFO,EASAPP,EASDFN)
73 ;
74 D PAGE1^EASEZPU
75 D EN^EASEZPF1(.EALNE,.EAINFO)
76 ;
77 D PAGE2^EASEZPU
78 D EN^EASEZPF2(.EALNE,.EAINFO)
79 ;
80 D EN^EASEZPF3(.EALNE,.EAINFO)
81 ;
82 ; Print additional second pages if more than 1 dependent.
83 F EAADL=1:1 D Q:$G(EAABRT)
84 . I '$D(^TMP("EZTEMP",$J,"IIB",EAADL)) S EAABRT=1 Q
85 . D PAGEN^EASEZPU(EAADL)
86 . D EN^EASEZPF2(.EALNE,.EAINFO)
87 ;
88ENQUIT ; Cleanup temp globals after printing is complete
89 K ^TMP("EASEZ",$J)
90 K ^TMP("EZDATA",$J)
91 K ^TMP("EZINDEX",$J)
92 K ^TMP("EZTEMP",$J)
93 K ^TMP("EZDISP",$J)
94 Q
95 ;
96SETUP(EALNE,EAINFO,EASAPP,EASDFN) ; Set-up print variables
97 ; Input
98 ; EALNE - Line format array
99 ; EAINFO - Misc Data
100 ; ("CLRK") - Clerk's intials
101 ; ("ID") - Web ID from #712
102 ; ("PGE") - Page number
103 ; ("VET" ) - Veteran's name submitting the application
104 ; ("SSN") - Veteran's SSN
105 ; ("DISC") - Financial Disclosure status
106 ; EASAPP - IEN of applicant on the 1010EZ HOLDING File, #712
107 ; EASDFN - DFN of applicant in the PATIENT File, #2
108 ;
109 N X
110 ;
111 ; Build Line array for printout
112 S EALNE("ULC")=$S('($D(IOST)#2):"-",IOST["C-":"-",1:"_")
113 S EALNE("D")="",EALNE("DD")="",EALNE("UL")=""
114 S $P(EALNE("D"),"-",131)="",$P(EALNE("DD"),"=",131)="",$P(EALNE("UL"),EALNE("ULC"),131)=""
115 ;
116 ; Setup information array
117 ; Get clerk's initals
118 S ZUSR=$G(ZUSR)
119 I +ZUSR>0 D
120 . S EAINFO("CLRK")=$$GET1^DIQ(200,ZUSR,1)
121 . I EAINFO("CLRK")']"" D
122 . . S X=$$GET1^DIQ(200,ZUSR,.01)
123 . . S EAINFO("CLRK")=$E($P(X,",",2),1)_$E($P(X,","),1)
124 E D
125 . S EAINFO("CLRK")="unk"
126 ;
127 ; Set data elements
128 S EAINFO("PGE")=0
129 S EAINFO("ID")=$$GET1^DIQ(712,EASAPP_",",.1)
130 S EAINFO("PD")=$$FMTE^XLFDT($$NOW^XLFDT)
131 S EAINFO("DISC")=$$GET1^DIQ(712,EASAPP_",",3.8)
132 S EAINFO("EASAPP")=EASAPP
133 S EAINFO("VET")=$$GET1^DIQ(712,EASAPP_",",1)
134 S EAINFO("SSN")=$$GET1^DIQ(712,EASAPP_",",2)
135 ;
136 ; Retrieve applciation data from holding file, #712
137 D EN^EASEZC1(EASAPP)
138 D SORT^EASEZC3(EASAPP)
139SETQ Q
140 ;
141HDRMAIN(EALNE) ;
142 W @IOF
143 W ?75,"OMB APPROVED NO. 2900-0091 / Est. Burden Avg. 20 min.",!,EALNE("DD")
144 W !,"D E P A R T M E N T O F V E T E R A N S A F F A I R S",?96,"APPLICATION FOR HEALTH BENEFITS",!,EALNE("DD")
145 W !?50,"SECTION I - GENERAL INFORMATION",!,EALNE("D")
146 Q
147 ;
148HDR(EALNE,EAINFO) ;
149 W @IOF
150 W !,"APPLICATION FOR HEALTH BENEFITS, Continued",?65,"| ",EAINFO("VET"),?100,"| ",EAINFO("SSN")
151 W !,EALNE("DD")
152 Q
153 ;
154FT(EALNE,EAINFO) ;
155 N %,Y
156 ;
157 W !,EALNE("DD")
158 W !,"AUTOMATED VA FORM 10-10EZ APR 1998",?40,"PRINTED: ",EAINFO("PD")
159 W ?80,"Clerk: ",EAINFO("CLRK"),"/",EAINFO("ID")
160 W ?120,"Page " S EAINFO("PGE")=EAINFO("PGE")+1 W EAINFO("PGE")
161 Q
Note: See TracBrowser for help on using the repository browser.