Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: EASEZRPF

EASEZRPF.m

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