source: FOIAVistA/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZPF.m@ 1470

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

initial load of FOIAVistA 6/30/08 version

File size: 4.9 KB
Line 
1EASEZPF ;ALB/SCK/GAH - Print 1010EZ Enrollment form ; 10/19/2000
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**44,51,84**;Sep 5, 2006;Build 2
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 ; Can't be a slave
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 ;EAS*1*51 -- if version # 6 or greater, use new print format
33 S ZTRTN="EN^EASEZPF"
34 I '$G(EASVRSN) S EASVRSN=$$VERSION^EASEZU4(EASAPP)
35 I '(EASVRSN<6) S ZTRTN="EN^EASEZP6F"
36 ; Either queue for print or print manually by user choice (EAS*1.0*84)
37 I $D(IO("Q")) D G EXIT ;Queued print chosen
38 . S ZUSR=DUZ,ZTDESC="1010EZ PRINT"
39 . F X="ZUSR","EASAPP","EASDFN" S ZTSAVE(X)=""
40 . D ^%ZTLOAD
41 . D HOME^%ZIS
42 ;
43 ;Manual print chosen
44 D @ZTRTN
45 D ^%ZISC
46 G EXIT
47 ;
48EXIT Q +$G(ZTSK)
49 ;
50CHECKS(EASAPP) ; Check for quit conditions
51 ;
52 Q 0
53 N RSLT
54 ;
55 S X=$$GET1^DIQ(712,EASAPP_",",3.4,"I") D
56 . I +X'>0 S ERR(3.4)="The applicant has not been linked to the PATIENT File, #2"
57 ;
58 S X=$$GET1^DIQ(712,EASAPP_",",5.1,"I") D
59 . I +X'>0 S ERR(5.1)="This application has not been reviewed"
60 ;
61 S X=$$GET1^DIQ(712,EASAPP_",",9.1,"I") D
62 . I X>0 S ERR(9.1)="This application has already been closed, thE VA10-10EZ cannot be printed"
63 ;
64 I $D(ERR)>0 D
65 . W !!?3,*7,"The VA10-10EZ for "
66 . W $$GET1^DIQ(712,EASAPP_",",1),", ",$$GET1^DIQ(712,EASAPP_",",2),", "
67 . W !?3,"WEB submission ID: ",$$GET1^DIQ(712,EASAPP_",",.1)
68 . W !?3,"could not be printed for the following reason(s): "
69 . S X=0
70 . F S X=$O(ERR(X)) Q:'X D
71 . . W !?5,">> ",ERR(X)
72 . S RSLT=1
73 ;
74 Q $G(RSLT)
75 ;
76EN ; Entry point to print 1010EZ
77 N EALNE,EAINFO,EAABRT,EAADL,ERR
78 ;
79 D SETUP(.EALNE,.EAINFO,EASAPP,EASDFN)
80 ;
81 D PAGE1^EASEZPU
82 D EN^EASEZPF1(.EALNE,.EAINFO)
83 ;
84 D PAGE2^EASEZPU
85 D EN^EASEZPF2(.EALNE,.EAINFO)
86 ;
87 D EN^EASEZPF3(.EALNE,.EAINFO)
88 ;
89 ; Print additional second pages if more than 1 dependent.
90 F EAADL=1:1 D Q:$G(EAABRT)
91 . I '$D(^TMP("EZTEMP",$J,"IIB",EAADL)) S EAABRT=1 Q
92 . D PAGEN^EASEZPU(EAADL)
93 . D EN^EASEZPF2(.EALNE,.EAINFO)
94 ;
95ENQUIT ; Cleanup temp globals after printing is complete
96 K ^TMP("EASEZ",$J)
97 K ^TMP("EZDATA",$J)
98 K ^TMP("EZINDEX",$J)
99 K ^TMP("EZTEMP",$J)
100 K ^TMP("EZDISP",$J)
101 Q
102 ;
103SETUP(EALNE,EAINFO,EASAPP,EASDFN) ; Set-up print variables
104 ; Input
105 ; EALNE - Line format array
106 ; EAINFO - Misc Data
107 ; ("CLRK") - Clerk's intials
108 ; ("ID") - Web ID from #712
109 ; ("PGE") - Page number
110 ; ("VET" ) - Veteran's name submitting the application
111 ; ("SSN") - Veteran's SSN
112 ; ("DISC") - Financial Disclosure status
113 ; EASAPP - IEN of applicant on the 1010EZ HOLDING File, #712
114 ; EASDFN - DFN of applicant in the PATIENT File, #2
115 ;
116 N X
117 ;
118 ; Build Line array for printout
119 S EALNE("ULC")=$S('($D(IOST)#2):"-",IOST["C-":"-",1:"_")
120 S EALNE("D")="",EALNE("DD")="",EALNE("UL")=""
121 S $P(EALNE("D"),"-",131)="",$P(EALNE("DD"),"=",131)="",$P(EALNE("UL"),EALNE("ULC"),131)=""
122 ;
123 ; Setup information array
124 ; Get clerk's initals
125 S ZUSR=$G(ZUSR)
126 I +ZUSR>0 D
127 . S EAINFO("CLRK")=$$GET1^DIQ(200,ZUSR,1)
128 . I EAINFO("CLRK")']"" D
129 . . S X=$$GET1^DIQ(200,ZUSR,.01)
130 . . S EAINFO("CLRK")=$E($P(X,",",2),1)_$E($P(X,","),1)
131 E D
132 . S EAINFO("CLRK")="unk"
133 ;
134 ; Set data elements
135 S EAINFO("PGE")=0
136 S EAINFO("ID")=$$GET1^DIQ(712,EASAPP_",",.1)
137 S EAINFO("PD")=$$FMTE^XLFDT($$NOW^XLFDT)
138 S EAINFO("DISC")=$$GET1^DIQ(712,EASAPP_",",3.8)
139 S EAINFO("EASAPP")=EASAPP
140 S EAINFO("VET")=$$GET1^DIQ(712,EASAPP_",",1)
141 S EAINFO("SSN")=$$GET1^DIQ(712,EASAPP_",",2)
142 ;
143 ; Retrieve applciation data from holding file, #712
144 D EN^EASEZC1(EASAPP)
145 D SORT^EASEZC3(EASAPP)
146SETQ Q
147 ;
148HDRMAIN(EALNE) ;
149 W @IOF
150 W ?75,"OMB APPROVED NO. 2900-0091 / Est. Burden Avg. 20 min.",!,EALNE("DD")
151 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")
152 W !?50,"SECTION I - GENERAL INFORMATION",!,EALNE("D")
153 Q
154 ;
155HDR(EALNE,EAINFO) ;
156 W @IOF
157 W !,"APPLICATION FOR HEALTH BENEFITS, Continued",?65,"| ",EAINFO("VET"),?100,"| ",EAINFO("SSN")
158 W !,EALNE("DD")
159 Q
160 ;
161FT(EALNE,EAINFO) ;
162 N %,Y
163 ;
164 W !,EALNE("DD")
165 W !,"AUTOMATED VA FORM 10-10EZ APR 1998",?40,"PRINTED: ",EAINFO("PD")
166 W ?80,"Clerk: ",EAINFO("CLRK"),"/",EAINFO("ID")
167 W ?120,"Page " S EAINFO("PGE")=EAINFO("PGE")+1 W EAINFO("PGE")
168 Q
Note: See TracBrowser for help on using the repository browser.