EASEZRPF ;ALB/AMA,TDM - Print 1010EZR ; 2/8/13 12:00pm
;;1.0;ENROLLMENT APPLICATION SYSTEM;**57,107**;Mar 15, 2001;Build 32
;
; These routines print a version of the OMB approved VA10-10EZR form.
; No local modifications to these routines will be made. Any changes
; will be provided through the National Patch Module release process.
;
Q
EN ; Entry point to print 1010EZR
N EALNE,EAINFO,EAADL,EAABRT,EAMULT
;
D SETUP(.EALNE,.EAINFO,EASAPP,EASDFN)
;
M ^TMP("EASEZR",$J)=^TMP("EASEZ",$J) K ^TMP("EASEZ",$J)
M ^TMP("EZRDATA",$J)=^TMP("EZDATA",$J) K ^TMP("EZDATA",$J)
M ^TMP("EZRINDEX",$J)=^TMP("EZINDEX",$J) K ^TMP("EZINDEX",$J)
M ^TMP("EZRTEMP",$J)=^TMP("EZTEMP",$J) K ^TMP("EZTEMP",$J)
M ^TMP("EZRDISP",$J)=^TMP("EZDISP",$J) K ^TMP("EZDISP",$J)
;
D PAGE1^EASEZRPU
D EN^EASEZRP1(.EALNE,.EAINFO)
;
D PAGE2^EASEZRPP
D EN^EASEZRP2(.EALNE,.EAINFO)
;
D EN^EASEZRP3(.EALNE,.EAINFO)
;
;Print additional insurance pages if more than 1 insurance company
F EAADL=1:1 D Q:$G(EAABRT)
. I '$D(^TMP("EZRTEMP",$J,"IA",EAADL)) S EAABRT=1 Q
. S EAMULT=1
. D PAGEI^EASEZRPU(EAADL)
I $G(EAMULT) D EN^EASEZRPI(.EALNE,.EAINFO)
;
;Print additional dependent pages if more than 1 dependent
S (EAABRT,EAMULT)=0 F EAADL=1:1 D Q:$G(EAABRT)
. I '$D(^TMP("EZRTEMP",$J,"IIB",EAADL)) S EAABRT=1 Q
. S EAMULT=1
. D PAGEN^EASEZRPU(EAADL)
I EAMULT D EN^EASEZRPD(.EALNE,.EAINFO)
;
;Print additional dependent financial pages if more
;than 1 dependent, starting with the 2nd one
;(since Child 1 info already displayed on pages 2 & 3)
S (EAABRT,EAMULT)=0 F EAADL=2:1 D Q:$G(EAABRT)
. I '$D(^TMP("EZRTEMP",$J,"IIF",EAADL)) S EAABRT=1 Q
. S EAMULT=1
. D PAGEDFF^EASEZRPP(EAADL)
S EAABRT=0 F EAADL=2:1 D Q:$G(EAABRT)
. I '$D(^TMP("EZRTEMP",$J,"IIG",EAADL)) S EAABRT=1 Q
. S EAMULT=1
. D PAGEDFG^EASEZRPP(EAADL)
I EAMULT D EN^EASEZRPM(.EALNE,.EAINFO)
;
ENQUIT ; Clean up temp globals after printing is complete
K ^TMP("EASEZR",$J)
K ^TMP("EZRDATA",$J)
K ^TMP("EZRINDEX",$J)
K ^TMP("EZRTEMP",$J)
K ^TMP("EZRDISP",$J)
Q
;
SETUP(EALNE,EAINFO,EASAPP,EASDFN) ; Set-up print variables
; Input
; EALNE - Line format array
; EAINFO - Misc Data
; ("CLRK") - Clerk's initials
; ("ID") - Web ID from #712
; ("PGE") - Page number
; ("VET" ) - Veteran's name submitting the application
; ("SSN") - Veteran's SSN
; ("DISC") - Financial Disclosure status
; EASAPP - IEN of applicant on the 1010EZ HOLDING File, #712
; EASDFN - DFN of applicant in the PATIENT File, #2
;
N X
;
; Build Line array for printout
S EALNE("ULC")=$S('($D(IOST)#2):"-",IOST["C-":"-",1:"_")
S EALNE("D")="",EALNE("DD")="",EALNE("UL")=""
S $P(EALNE("D"),"-",133)="",$P(EALNE("DD"),"=",133)="",$P(EALNE("UL"),EALNE("ULC"),133)=""
;
; Set up information array & get clerk's initials
S ZUSR=$G(ZUSR)
I +ZUSR>0 D
. S EAINFO("CLRK")=$$GET1^DIQ(200,ZUSR,1)
. I EAINFO("CLRK")']"" D
. . S X=$$GET1^DIQ(200,ZUSR,.01)
. . S EAINFO("CLRK")=$E($P(X,",",2),1)_$E($P(X,","),1)
E D
. S EAINFO("CLRK")="unk"
;
; Set data elements
S EAINFO("PGE")=0
S EAINFO("ID")=$$GET1^DIQ(712,EASAPP_",",.1)
S EAINFO("PD")=$$FMTE^XLFDT($$NOW^XLFDT)
S EAINFO("DISC")=$$GET1^DIQ(712,EASAPP_",",3.8)
S EAINFO("EASAPP")=EASAPP
S EAINFO("VET")=$$GET1^DIQ(712,EASAPP_",",1)
S EAINFO("SSN")=$$GET1^DIQ(712,EASAPP_",",2)
;
; Retrieve application data from holding file, #712
D EN^EASEZC1(EASAPP)
D SORT^EASEZC3(EASAPP)
SETQ Q
;
HDRMAIN(EALNE) ; PRINT THE FIRST PAGE HEADER INFORMATION
W @IOF
W ?44,"OMB APPROVED NO. 2900-0091 / Estimated Burden Avg. 24 min.",!,EALNE("DD")
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",?76,"HEALTH BENEFITS RENEWAL FORM",!,EALNE("DD")
Q
;
HDR(EALNE,EAINFO) ; PRINT THE PAGE HEADER INFO FOR PAGES GREATER THAN 1
W @IOF
W "DEPARTMENT OF VETERANS AFFAIRS",?40,"| VETERAN'S NAME (Last, First, Middle)",?106,"| SOCIAL SECURITY NUMBER"
W !?40,"| ",EAINFO("VET"),?106,"| ",EAINFO("SSN")
W ?131,$C(13) W:EALNE("ULC")="-" ! W EALNE("UL")
Q
;
FT(EALNE,EAINFO) ; PRINT THE PAGE FOOTER INFORMATION
W !,EALNE("DD")
W !,"VA FORM 10-10EZR FEB 2011",?40,"PRINTED: ",EAINFO("PD")
W ?80,"Clerk: ",EAINFO("CLRK"),"/",EAINFO("ID")
W ?120,"PAGE " S EAINFO("PGE")=EAINFO("PGE")+1 W EAINFO("PGE")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEASEZRPF 4403 printed Oct 16, 2024@17:55:53 Page 2
EASEZRPF ;ALB/AMA,TDM - Print 1010EZR ; 2/8/13 12:00pm
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**57,107**;Mar 15, 2001;Build 32
+2 ;
+3 ; These routines print a version of the OMB approved VA10-10EZR form.
+4 ; No local modifications to these routines will be made. Any changes
+5 ; will be provided through the National Patch Module release process.
+6 ;
+7 QUIT
EN ; Entry point to print 1010EZR
+1 NEW EALNE,EAINFO,EAADL,EAABRT,EAMULT
+2 ;
+3 DO SETUP(.EALNE,.EAINFO,EASAPP,EASDFN)
+4 ;
+5 MERGE ^TMP("EASEZR",$JOB)=^TMP("EASEZ",$JOB)
KILL ^TMP("EASEZ",$JOB)
+6 MERGE ^TMP("EZRDATA",$JOB)=^TMP("EZDATA",$JOB)
KILL ^TMP("EZDATA",$JOB)
+7 MERGE ^TMP("EZRINDEX",$JOB)=^TMP("EZINDEX",$JOB)
KILL ^TMP("EZINDEX",$JOB)
+8 MERGE ^TMP("EZRTEMP",$JOB)=^TMP("EZTEMP",$JOB)
KILL ^TMP("EZTEMP",$JOB)
+9 MERGE ^TMP("EZRDISP",$JOB)=^TMP("EZDISP",$JOB)
KILL ^TMP("EZDISP",$JOB)
+10 ;
+11 DO PAGE1^EASEZRPU
+12 DO EN^EASEZRP1(.EALNE,.EAINFO)
+13 ;
+14 DO PAGE2^EASEZRPP
+15 DO EN^EASEZRP2(.EALNE,.EAINFO)
+16 ;
+17 DO EN^EASEZRP3(.EALNE,.EAINFO)
+18 ;
+19 ;Print additional insurance pages if more than 1 insurance company
+20 FOR EAADL=1:1
Begin DoDot:1
+21 IF '$DATA(^TMP("EZRTEMP",$JOB,"IA",EAADL))
SET EAABRT=1
QUIT
+22 SET EAMULT=1
+23 DO PAGEI^EASEZRPU(EAADL)
End DoDot:1
if $GET(EAABRT)
QUIT
+24 IF $GET(EAMULT)
DO EN^EASEZRPI(.EALNE,.EAINFO)
+25 ;
+26 ;Print additional dependent pages if more than 1 dependent
+27 SET (EAABRT,EAMULT)=0
FOR EAADL=1:1
Begin DoDot:1
+28 IF '$DATA(^TMP("EZRTEMP",$JOB,"IIB",EAADL))
SET EAABRT=1
QUIT
+29 SET EAMULT=1
+30 DO PAGEN^EASEZRPU(EAADL)
End DoDot:1
if $GET(EAABRT)
QUIT
+31 IF EAMULT
DO EN^EASEZRPD(.EALNE,.EAINFO)
+32 ;
+33 ;Print additional dependent financial pages if more
+34 ;than 1 dependent, starting with the 2nd one
+35 ;(since Child 1 info already displayed on pages 2 & 3)
+36 SET (EAABRT,EAMULT)=0
FOR EAADL=2:1
Begin DoDot:1
+37 IF '$DATA(^TMP("EZRTEMP",$JOB,"IIF",EAADL))
SET EAABRT=1
QUIT
+38 SET EAMULT=1
+39 DO PAGEDFF^EASEZRPP(EAADL)
End DoDot:1
if $GET(EAABRT)
QUIT
+40 SET EAABRT=0
FOR EAADL=2:1
Begin DoDot:1
+41 IF '$DATA(^TMP("EZRTEMP",$JOB,"IIG",EAADL))
SET EAABRT=1
QUIT
+42 SET EAMULT=1
+43 DO PAGEDFG^EASEZRPP(EAADL)
End DoDot:1
if $GET(EAABRT)
QUIT
+44 IF EAMULT
DO EN^EASEZRPM(.EALNE,.EAINFO)
+45 ;
ENQUIT ; Clean up temp globals after printing is complete
+1 KILL ^TMP("EASEZR",$JOB)
+2 KILL ^TMP("EZRDATA",$JOB)
+3 KILL ^TMP("EZRINDEX",$JOB)
+4 KILL ^TMP("EZRTEMP",$JOB)
+5 KILL ^TMP("EZRDISP",$JOB)
+6 QUIT
+7 ;
SETUP(EALNE,EAINFO,EASAPP,EASDFN) ; Set-up print variables
+1 ; Input
+2 ; EALNE - Line format array
+3 ; EAINFO - Misc Data
+4 ; ("CLRK") - Clerk's initials
+5 ; ("ID") - Web ID from #712
+6 ; ("PGE") - Page number
+7 ; ("VET" ) - Veteran's name submitting the application
+8 ; ("SSN") - Veteran's SSN
+9 ; ("DISC") - Financial Disclosure status
+10 ; EASAPP - IEN of applicant on the 1010EZ HOLDING File, #712
+11 ; EASDFN - DFN of applicant in the PATIENT File, #2
+12 ;
+13 NEW X
+14 ;
+15 ; Build Line array for printout
+16 SET EALNE("ULC")=$SELECT('($DATA(IOST)#2):"-",IOST["C-":"-",1:"_")
+17 SET EALNE("D")=""
SET EALNE("DD")=""
SET EALNE("UL")=""
+18 SET $PIECE(EALNE("D"),"-",133)=""
SET $PIECE(EALNE("DD"),"=",133)=""
SET $PIECE(EALNE("UL"),EALNE("ULC"),133)=""
+19 ;
+20 ; Set up information array & get clerk's initials
+21 SET ZUSR=$GET(ZUSR)
+22 IF +ZUSR>0
Begin DoDot:1
+23 SET EAINFO("CLRK")=$$GET1^DIQ(200,ZUSR,1)
+24 IF EAINFO("CLRK")']""
Begin DoDot:2
+25 SET X=$$GET1^DIQ(200,ZUSR,.01)
+26 SET EAINFO("CLRK")=$EXTRACT($PIECE(X,",",2),1)_$EXTRACT($PIECE(X,","),1)
End DoDot:2
End DoDot:1
+27 IF '$TEST
Begin DoDot:1
+28 SET EAINFO("CLRK")="unk"
End DoDot:1
+29 ;
+30 ; Set data elements
+31 SET EAINFO("PGE")=0
+32 SET EAINFO("ID")=$$GET1^DIQ(712,EASAPP_",",.1)
+33 SET EAINFO("PD")=$$FMTE^XLFDT($$NOW^XLFDT)
+34 SET EAINFO("DISC")=$$GET1^DIQ(712,EASAPP_",",3.8)
+35 SET EAINFO("EASAPP")=EASAPP
+36 SET EAINFO("VET")=$$GET1^DIQ(712,EASAPP_",",1)
+37 SET EAINFO("SSN")=$$GET1^DIQ(712,EASAPP_",",2)
+38 ;
+39 ; Retrieve application data from holding file, #712
+40 DO EN^EASEZC1(EASAPP)
+41 DO SORT^EASEZC3(EASAPP)
SETQ QUIT
+1 ;
HDRMAIN(EALNE) ; PRINT THE FIRST PAGE HEADER INFORMATION
+1 WRITE @IOF
+2 WRITE ?44,"OMB APPROVED NO. 2900-0091 / Estimated Burden Avg. 24 min.",!,EALNE("DD")
+3 WRITE !,"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",?76,"HEALTH BENEFITS RENEWAL FORM",!,EALNE("DD")
+4 QUIT
+5 ;
HDR(EALNE,EAINFO) ; PRINT THE PAGE HEADER INFO FOR PAGES GREATER THAN 1
+1 WRITE @IOF
+2 WRITE "DEPARTMENT OF VETERANS AFFAIRS",?40,"| VETERAN'S NAME (Last, First, Middle)",?106,"| SOCIAL SECURITY NUMBER"
+3 WRITE !?40,"| ",EAINFO("VET"),?106,"| ",EAINFO("SSN")
+4 WRITE ?131,$CHAR(13)
if EALNE("ULC")="-"
WRITE !
WRITE EALNE("UL")
+5 QUIT
+6 ;
FT(EALNE,EAINFO) ; PRINT THE PAGE FOOTER INFORMATION
+1 WRITE !,EALNE("DD")
+2 WRITE !,"VA FORM 10-10EZR FEB 2011",?40,"PRINTED: ",EAINFO("PD")
+3 WRITE ?80,"Clerk: ",EAINFO("CLRK"),"/",EAINFO("ID")
+4 WRITE ?120,"PAGE "
SET EAINFO("PGE")=EAINFO("PGE")+1
WRITE EAINFO("PGE")
+5 QUIT