EASEZPDG ;ALB/AMA/GTS/CMF - PRINT 10-10EZ OR EZR FROM DG OPTIONS ; 8/1/08 1:23pm
;;1.0;ENROLLMENT APPLICATION SYSTEM;**57,70**;Mar 15, 2001;Build 26
;
Q
;
ENEZR(EASDFN,EASMTIEN) ;DBIA 4600 - PRINT THE 10-10EZR FROM DG OPTIONS
; INPUT:
; EASDFN - POINTER TO THE PATIENT FILE (#2) - required
; EASMTIEN - POINTER TO MEANS TEST FILE (#408.31) - optional
; (+ien, "", or 0)
; OUTPUT:
; (+ien or ""):ZTSK - TASKMAN JOB NUMBER
; (0):mt ien (forces test lookup only)
;
N EASFLAG,X
S EASFLAG="EZR"
S EASDFN=$G(EASDFN)
S EASMTIEN=$G(EASMTIEN)
;
S X=$$ENEZ(EASDFN,EASMTIEN)
Q X
;
ENEZ(EASDFN,EASMTIEN) ;DBIA 4600 - PRINT THE 10-10EZ FROM DG OPTIONS
; INPUT:
; EASDFN - POINTER TO THE PATIENT FILE (#2) - required
; EASMTIEN - POINTER TO MEANS TEST FILE (#408.31) - optional
; (+ien, "", or 0)
; OUTPUT:
; (+ien or ""):ZTSK - TASKMAN JOB NUMBER
; (0):mt ien (forces test lookup only)
;
S EASDFN=$G(EASDFN)
S EASMTIEN=$G(EASMTIEN)
I EASMTIEN=0 Q $$PICK^EASEZPVU(EASDFN,0)
E S EASMTIEN=$$PICK^EASEZPVU(EASDFN,EASMTIEN)
;
;If any EAS applications exist, ensure they're all filed
N X,INPROG
S X=0,INPROG=0 F S X=$O(^EAS(712,"AC",EASDFN,X)) Q:'X!INPROG D
. I $$GET1^DIQ(712,X,7.1)="" D
. . N IX,DATE F IX="REV","PRT","SIG" Q:INPROG D
. . . S DATE=0 F S DATE=$O(^EAS(712,IX,DATE)) Q:'DATE!INPROG D
. . . . I $D(^EAS(712,IX,DATE,X)) S INPROG=1
I INPROG D Q 0
. N DIR
. W !!,"No data have been found for the selected patient, or"
. W !,"the patient may have an on-line 10-10EZ application"
. W !,"in progress. The 10-10EZ"_$S($G(EASFLAG)="EZR":"R",1:"")_" form shall not be printed."
. S DIR(0)="E" D ^DIR
;
N %ZIS,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,ZUSR,POP,ERR
;
W !!?5,*7,"Do not select a slave device for output."
W !?5,"This output requires a 132 column output printer."
W !?5,"Output to SCREEN will be unreadable.",!
;
;
DEV S %ZIS="QM"
S %ZIS("S")="I $P($G(^(1)),U)'[""SLAVE""&($P($G(^(0)),U)'[""SLAVE"")"
S %ZIS("B")=""
;S IOP="Q"
D ^%ZIS
;
I POP D G EXIT
. I $D(IO("Q")) K IO("Q")
. W !,"Print request cancelled!"
. Q
I IO=IO(0),$E(IOST,1,2)="C-" D G DEV
. W !,*7,"CANNOT QUEUE TO HOME DEVICE!",!
. Q
;
I $G(EASFLAG)="EZR" S ZTDESC="1010EZR PRINT"
E S ZTDESC="1010EZ PRINT"
S ZUSR=DUZ,ZTRTN="EN^EASEZPDG"
;
F X="ZUSR","EASDFN","EASMTIEN","EASFLAG" S ZTSAVE(X)=""
D ^%ZTLOAD
D HOME^%ZIS
;
EXIT Q +$G(ZTSK)
;
EN ;BACKGROUND JOB ENTRY POINT TO PRINT EZ/EZR FROM DG OPTIONS
;
N EASAPP,C2711
S EASAPP=0
I '$G(EASVRSN) S EASVRSN=6
;
;SET UP ^TMP("EZDATA" AND ^TMP("EZINDEX" FROM ^EAS(711,"A","A"
D LOCAL711^EASEZU2
;
S C2711=+$$KEY711^EASEZU1("TYPE OF BENEFIT-ENROLLMENT")
D VISTA^EASEZPVD(EASDFN,EASMTIEN)
;
;SET UP ^TMP("EZTEMP" AND ^TMP("EZDISP" GLOBALS
D SORT^EASEZC3(0)
;
;SET UP PRINT VARIABLES
N EALNE,EAINFO,EAABRT,EAADL,EAMULT,EAAD,EACNT,KEY
D SETUP^EASEZPDU(.EALNE,.EAINFO)
;
;DETERMINE WHICH FORM TO PRINT
I $G(EASFLAG)="EZR" D EZR I 1
E D EZ
;
K ^TMP("EASEZ",$J),^TMP("EASEZR",$J)
K ^TMP("EZDATA",$J),^TMP("EZRDATA",$J)
K ^TMP("EZINDEX",$J),^TMP("EZRINDEX",$J)
K ^TMP("EZTEMP",$J),^TMP("EZRTEMP",$J)
K ^TMP("EZDISP",$J),^TMP("EZRDISP",$J)
Q
;
EZR ; Entry point to print 1010EZR
;
N EASDG,EAADL,EAAD,EACNT
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
S EASDG=1 ;FLAG VARIABLE TO SIGNIFY PRINTING FROM DG
D EN^EASEZRP2(.EALNE,.EAINFO,EASDG)
;
;EAS*1.0*70
N EASMTV
I +$G(EASMTIEN) S EASMTV=+$P($G(^DGMT(408.31,EASMTIEN,2)),U,11)
I +$G(EASMTV)=0 D NETEZR^EASEZPDU(.EALNE,.EAINFO,EASDG) I 1
E D EN^EASEZRP3(.EALNE,.EAINFO,EASDG)
;
;Print additional insurance pages if more than 1 insurance company
F EAADL=1:1 Q:'$D(^TMP("EZRTEMP",$J,"IA",EAADL)) D
. S EAAD=1
. D PAGEI^EASEZRPU(EAADL)
I $G(EAAD) D EN^EASEZRPI(.EALNE,.EAINFO)
;
;Print additional dependent pages if more than 1 dependent
S EAAD=0 F EAADL=1:1 Q:'$D(^TMP("EZRTEMP",$J,"IIB",EAADL)) D
. S EAAD=1 ;FLAG THAT THERE ARE ADDITIONAL DEPENDENTS
. D PAGEN^EASEZRPU(EAADL)
I EAAD 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 EAAD=0,EAADL=1 F S EAADL=$O(^TMP("EZRTEMP",$J,"IIF",EAADL)) Q:'EAADL D
. S EAAD=1,KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
. S ^TMP("EZRTEMP",$J,"IIF",EAADL,"7.")=KEY_"^CHILD "_EAADL_"^1"
. D PAGEDFF^EASEZRPP(EAADL)
;
;EAS*1.0*70
I +$G(EASMTV)=0 D Q
. ;SINCE ANY ADDITIONAL DEPENDENTS' NET WORTH AMOUNTS (SECTION IIG)
. ;ARE INCLUDED IN THE VET'S AMOUNT, DISPLAY A MESSAGE ON THE FORM
. I EAAD D
. . N TEMP,HDR,FTR,BEGF,BEGG,ADFF,FNP,GNP
. . S TEMP="EASEZR",HDR="HDR^EASEZRPF(.EALNE,.EAINFO)"
. . S FTR="FT^EASEZRPF(.EALNE,.EAINFO)",BEGF="BEGINF^EASEZRPM"
. . S BEGG="BEGING^EASEZRPM",ADFF="ADFF^EASEZRPM"
. . S FNP=9,GNP=7
. . D NETMSG
. ;
E D
. ;WITH NEW MEANS TEST VERSION, DISPLAY EACH CHILD'S NET WORTH AMOUNTS
. N EAADG
. S EAADG=0,EAADL=1 F S EAADL=$O(^TMP("EZRTEMP",$J,"IIG",EAADL)) Q:'EAADL D
. . S EAADG=1,KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
. . S ^TMP("EZRTEMP",$J,"IIG",EAADL,"9.")=KEY_"^CHILD "_EAADL_"^1"
. . D PAGEDFG^EASEZRPP(EAADL)
. I EAAD!EAADG D EN^EASEZRPM(.EALNE,.EAINFO,EASDG)
;
Q
;
EZ ;PRINT THE 10-10EZ FORM (copied from EASEZP6F)
;
N EASDG,EAADL,EAAD,EACNT
D PAGE1^EASEZP6U
D PAGE1^EASEZPU3
D EN^EASEZP61(.EALNE,.EAINFO)
;
D PAGE2^EASEZPU2
D EN^EASEZP62(.EALNE,.EAINFO)
;
S EASDG=1 ;FLAG VARIABLE TO SIGNIFY PRINTING FROM DG
D EN^EASEZP63(.EALNE,.EAINFO,EASDG)
;
;EAS*1.0*70
N EASMTV
I +$G(EASMTIEN) S EASMTV=+$P($G(^DGMT(408.31,EASMTIEN,2)),U,11)
I +$G(EASMTV)=0 D NETEZ^EASEZPDU(.EALNE,.EAINFO,EASDG) I 1
E D EN^EASEZP64(.EALNE,.EAINFO,EASDG)
;
;Print additional insurance pages if more than 1 insurance company
F EAADL=1:1 Q:'$D(^TMP("EZTEMP",$J,"IA",EAADL)) D
. S EAAD=1
. D PAGEI^EASEZPU3(EAADL)
I $G(EAAD) D EN^EASEZP6I(.EALNE,.EAINFO)
;
;Print additional dependent pages if more than 1 dependent
S EAAD=0 F EAADL=1:1 Q:'$D(^TMP("EZTEMP",$J,"IIB",EAADL)) D
. S EAAD=1 ;FLAG THAT THERE ARE ADDITIONAL DEPENDENTS
. D PAGEN^EASEZPU3(EAADL)
I EAAD D EN^EASEZP6D(.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 EAAD=0,EAADL=1 F S EAADL=$O(^TMP("EZTEMP",$J,"IIF",EAADL)) Q:'EAADL D
. S EAAD=1,KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
. S ^TMP("EZTEMP",$J,"IIF",EAADL,"7.")=KEY_"^CHILD "_EAADL_"^1"
. D PAGEDFF^EASEZPU2(EAADL)
;
;EAS*1.0*70
I +$G(EASMTV)=0 D Q
. ;SINCE ANY ADDITIONAL DEPENDENTS' NET WORTH AMOUNTS (SECTION IIG)
. ;ARE INCLUDED IN THE VET'S AMOUNT, DISPLAY A MESSAGE ON THE FORM
. I EAAD D
. . ;PRINT IIF AND IIG SECTIONS
. . N TEMP,HDR,FTR,BEGF,BEGG,ADFF,FNP,GNP
. . S TEMP="EASEZ",HDR="HDR^EASEZP6F(.EALNE,.EAINFO)"
. . S FTR="FT^EASEZP6F(.EALNE,.EAINFO)",BEGF="BEGINF^EASEZP6M"
. . S BEGG="BEGING^EASEZP6M",ADFF="ADFF^EASEZP6M"
. . S FNP=9,GNP=7
. . D NETMSG
. ;
E D
. ;WITH NEW MEANS TEST VERSION, DISPLAY EACH CHILD'S NET WORTH AMOUNTS
. N EAADG
. S EAADG=0,EAADL=1 F S EAADL=$O(^TMP("EZTEMP",$J,"IIG",EAADL)) Q:'EAADL D
. . S EAADG=1,KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
. . S ^TMP("EZTEMP",$J,"IIG",EAADL,"9.")=KEY_"^CHILD "_EAADL_"^1"
. . D PAGEDFG^EASEZPU2(EAADL)
. I EAAD!EAADG D EN^EASEZP6M(.EALNE,.EAINFO,EASDG)
;
Q
;
NETMSG ;PRINT THE MESSAGE FOR THE NET WORTH SECTION
;
N EASF,DEPF,DFCNT,NEWPG
;
S EASF=$NA(^TMP(TEMP,$J,"DFF"))
I $O(@EASF@(1)) D @BEGF
;
;Start printing with 2nd dependent
S DEPF=1,DFCNT=0 F S DEPF=$O(@EASF@(DEPF)) Q:'DEPF D
. S DFCNT=DFCNT+1
. ;Check to see if a new page is needed
. I (DFCNT>1),'((DFCNT-1)#FNP) D
. . D @FTR
. . D @BEGF
. I (DFCNT#FNP)'=1 W !?131,$C(13) W:EALNE("ULC")="-" ! W EALNE("UL")
. D @ADFF
;
;PRINT NET WORTH MESSAGE IF THERE ARE *any* ADDITIONAL DEPENDENTS
I ((DFCNT#FNP)'=0),((DFCNT#FNP)'=GNP) W !!,?131,$C(13) W:EALNE("ULC")="-" ! W EALNE("UL")
;At the end of IIF, to find when to jump to the next page,
;55 print lines, minus 3 lines for Section IIG title header,
;minus the number of lines already used on current page,
;divided by the number of lines for a Section IIG entry
S NEWPG=(52-((DFCNT#FNP)*6))\7
I '(DFCNT#FNP)!'NEWPG!(NEWPG=GNP) S NEWPG=GNP D @FTR
D @BEGG
W !!?23,"ANY PREVIOUS CALENDAR YEAR NET WORTH AMOUNTS FROM ANY ADDITIONAL DEPENDENT CHILD(REN)"
W !!?29,"WILL BE INCLUDED IN THE VETERAN'S PREVIOUS CALENDAR YEAR NET WORTH AMOUNTS.",!
D @FTR
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEASEZPDG 9164 printed Dec 13, 2024@01:54:48 Page 2
EASEZPDG ;ALB/AMA/GTS/CMF - PRINT 10-10EZ OR EZR FROM DG OPTIONS ; 8/1/08 1:23pm
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**57,70**;Mar 15, 2001;Build 26
+2 ;
+3 QUIT
+4 ;
ENEZR(EASDFN,EASMTIEN) ;DBIA 4600 - PRINT THE 10-10EZR FROM DG OPTIONS
+1 ; INPUT:
+2 ; EASDFN - POINTER TO THE PATIENT FILE (#2) - required
+3 ; EASMTIEN - POINTER TO MEANS TEST FILE (#408.31) - optional
+4 ; (+ien, "", or 0)
+5 ; OUTPUT:
+6 ; (+ien or ""):ZTSK - TASKMAN JOB NUMBER
+7 ; (0):mt ien (forces test lookup only)
+8 ;
+9 NEW EASFLAG,X
+10 SET EASFLAG="EZR"
+11 SET EASDFN=$GET(EASDFN)
+12 SET EASMTIEN=$GET(EASMTIEN)
+13 ;
+14 SET X=$$ENEZ(EASDFN,EASMTIEN)
+15 QUIT X
+16 ;
ENEZ(EASDFN,EASMTIEN) ;DBIA 4600 - PRINT THE 10-10EZ FROM DG OPTIONS
+1 ; INPUT:
+2 ; EASDFN - POINTER TO THE PATIENT FILE (#2) - required
+3 ; EASMTIEN - POINTER TO MEANS TEST FILE (#408.31) - optional
+4 ; (+ien, "", or 0)
+5 ; OUTPUT:
+6 ; (+ien or ""):ZTSK - TASKMAN JOB NUMBER
+7 ; (0):mt ien (forces test lookup only)
+8 ;
+9 SET EASDFN=$GET(EASDFN)
+10 SET EASMTIEN=$GET(EASMTIEN)
+11 IF EASMTIEN=0
QUIT $$PICK^EASEZPVU(EASDFN,0)
+12 IF '$TEST
SET EASMTIEN=$$PICK^EASEZPVU(EASDFN,EASMTIEN)
+13 ;
+14 ;If any EAS applications exist, ensure they're all filed
+15 NEW X,INPROG
+16 SET X=0
SET INPROG=0
FOR
SET X=$ORDER(^EAS(712,"AC",EASDFN,X))
if 'X!INPROG
QUIT
Begin DoDot:1
+17 IF $$GET1^DIQ(712,X,7.1)=""
Begin DoDot:2
+18 NEW IX,DATE
FOR IX="REV","PRT","SIG"
if INPROG
QUIT
Begin DoDot:3
+19 SET DATE=0
FOR
SET DATE=$ORDER(^EAS(712,IX,DATE))
if 'DATE!INPROG
QUIT
Begin DoDot:4
+20 IF $DATA(^EAS(712,IX,DATE,X))
SET INPROG=1
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+21 IF INPROG
Begin DoDot:1
+22 NEW DIR
+23 WRITE !!,"No data have been found for the selected patient, or"
+24 WRITE !,"the patient may have an on-line 10-10EZ application"
+25 WRITE !,"in progress. The 10-10EZ"_$SELECT($GET(EASFLAG)="EZR":"R",1:"")_" form shall not be printed."
+26 SET DIR(0)="E"
DO ^DIR
End DoDot:1
QUIT 0
+27 ;
+28 NEW %ZIS,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,ZUSR,POP,ERR
+29 ;
+30 WRITE !!?5,*7,"Do not select a slave device for output."
+31 WRITE !?5,"This output requires a 132 column output printer."
+32 WRITE !?5,"Output to SCREEN will be unreadable.",!
+33 ;
+34 ;
DEV SET %ZIS="QM"
+1 SET %ZIS("S")="I $P($G(^(1)),U)'[""SLAVE""&($P($G(^(0)),U)'[""SLAVE"")"
+2 SET %ZIS("B")=""
+3 ;S IOP="Q"
+4 DO ^%ZIS
+5 ;
+6 IF POP
Begin DoDot:1
+7 IF $DATA(IO("Q"))
KILL IO("Q")
+8 WRITE !,"Print request cancelled!"
+9 QUIT
End DoDot:1
GOTO EXIT
+10 IF IO=IO(0)
IF $EXTRACT(IOST,1,2)="C-"
Begin DoDot:1
+11 WRITE !,*7,"CANNOT QUEUE TO HOME DEVICE!",!
+12 QUIT
End DoDot:1
GOTO DEV
+13 ;
+14 IF $GET(EASFLAG)="EZR"
SET ZTDESC="1010EZR PRINT"
+15 IF '$TEST
SET ZTDESC="1010EZ PRINT"
+16 SET ZUSR=DUZ
SET ZTRTN="EN^EASEZPDG"
+17 ;
+18 FOR X="ZUSR","EASDFN","EASMTIEN","EASFLAG"
SET ZTSAVE(X)=""
+19 DO ^%ZTLOAD
+20 DO HOME^%ZIS
+21 ;
EXIT QUIT +$GET(ZTSK)
+1 ;
EN ;BACKGROUND JOB ENTRY POINT TO PRINT EZ/EZR FROM DG OPTIONS
+1 ;
+2 NEW EASAPP,C2711
+3 SET EASAPP=0
+4 IF '$GET(EASVRSN)
SET EASVRSN=6
+5 ;
+6 ;SET UP ^TMP("EZDATA" AND ^TMP("EZINDEX" FROM ^EAS(711,"A","A"
+7 DO LOCAL711^EASEZU2
+8 ;
+9 SET C2711=+$$KEY711^EASEZU1("TYPE OF BENEFIT-ENROLLMENT")
+10 DO VISTA^EASEZPVD(EASDFN,EASMTIEN)
+11 ;
+12 ;SET UP ^TMP("EZTEMP" AND ^TMP("EZDISP" GLOBALS
+13 DO SORT^EASEZC3(0)
+14 ;
+15 ;SET UP PRINT VARIABLES
+16 NEW EALNE,EAINFO,EAABRT,EAADL,EAMULT,EAAD,EACNT,KEY
+17 DO SETUP^EASEZPDU(.EALNE,.EAINFO)
+18 ;
+19 ;DETERMINE WHICH FORM TO PRINT
+20 IF $GET(EASFLAG)="EZR"
DO EZR
IF 1
+21 IF '$TEST
DO EZ
+22 ;
+23 KILL ^TMP("EASEZ",$JOB),^TMP("EASEZR",$JOB)
+24 KILL ^TMP("EZDATA",$JOB),^TMP("EZRDATA",$JOB)
+25 KILL ^TMP("EZINDEX",$JOB),^TMP("EZRINDEX",$JOB)
+26 KILL ^TMP("EZTEMP",$JOB),^TMP("EZRTEMP",$JOB)
+27 KILL ^TMP("EZDISP",$JOB),^TMP("EZRDISP",$JOB)
+28 QUIT
+29 ;
EZR ; Entry point to print 1010EZR
+1 ;
+2 NEW EASDG,EAADL,EAAD,EACNT
+3 MERGE ^TMP("EASEZR",$JOB)=^TMP("EASEZ",$JOB)
KILL ^TMP("EASEZ",$JOB)
+4 MERGE ^TMP("EZRDATA",$JOB)=^TMP("EZDATA",$JOB)
KILL ^TMP("EZDATA",$JOB)
+5 MERGE ^TMP("EZRINDEX",$JOB)=^TMP("EZINDEX",$JOB)
KILL ^TMP("EZINDEX",$JOB)
+6 MERGE ^TMP("EZRTEMP",$JOB)=^TMP("EZTEMP",$JOB)
KILL ^TMP("EZTEMP",$JOB)
+7 MERGE ^TMP("EZRDISP",$JOB)=^TMP("EZDISP",$JOB)
KILL ^TMP("EZDISP",$JOB)
+8 ;
+9 DO PAGE1^EASEZRPU
+10 DO EN^EASEZRP1(.EALNE,.EAINFO)
+11 ;
+12 DO PAGE2^EASEZRPP
+13 ;FLAG VARIABLE TO SIGNIFY PRINTING FROM DG
SET EASDG=1
+14 DO EN^EASEZRP2(.EALNE,.EAINFO,EASDG)
+15 ;
+16 ;EAS*1.0*70
+17 NEW EASMTV
+18 IF +$GET(EASMTIEN)
SET EASMTV=+$PIECE($GET(^DGMT(408.31,EASMTIEN,2)),U,11)
+19 IF +$GET(EASMTV)=0
DO NETEZR^EASEZPDU(.EALNE,.EAINFO,EASDG)
IF 1
+20 IF '$TEST
DO EN^EASEZRP3(.EALNE,.EAINFO,EASDG)
+21 ;
+22 ;Print additional insurance pages if more than 1 insurance company
+23 FOR EAADL=1:1
if '$DATA(^TMP("EZRTEMP",$JOB,"IA",EAADL))
QUIT
Begin DoDot:1
+24 SET EAAD=1
+25 DO PAGEI^EASEZRPU(EAADL)
End DoDot:1
+26 IF $GET(EAAD)
DO EN^EASEZRPI(.EALNE,.EAINFO)
+27 ;
+28 ;Print additional dependent pages if more than 1 dependent
+29 SET EAAD=0
FOR EAADL=1:1
if '$DATA(^TMP("EZRTEMP",$JOB,"IIB",EAADL))
QUIT
Begin DoDot:1
+30 ;FLAG THAT THERE ARE ADDITIONAL DEPENDENTS
SET EAAD=1
+31 DO PAGEN^EASEZRPU(EAADL)
End DoDot:1
+32 IF EAAD
DO EN^EASEZRPD(.EALNE,.EAINFO)
+33 ;
+34 ;Print additional dependent financial pages if more
+35 ;than 1 dependent, starting with the 2nd one
+36 ;(since Child 1 info already displayed on pages 2 & 3)
+37 SET EAAD=0
SET EAADL=1
FOR
SET EAADL=$ORDER(^TMP("EZRTEMP",$JOB,"IIF",EAADL))
if 'EAADL
QUIT
Begin DoDot:1
+38 SET EAAD=1
SET KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
+39 SET ^TMP("EZRTEMP",$JOB,"IIF",EAADL,"7.")=KEY_"^CHILD "_EAADL_"^1"
+40 DO PAGEDFF^EASEZRPP(EAADL)
End DoDot:1
+41 ;
+42 ;EAS*1.0*70
+43 IF +$GET(EASMTV)=0
Begin DoDot:1
+44 ;SINCE ANY ADDITIONAL DEPENDENTS' NET WORTH AMOUNTS (SECTION IIG)
+45 ;ARE INCLUDED IN THE VET'S AMOUNT, DISPLAY A MESSAGE ON THE FORM
+46 IF EAAD
Begin DoDot:2
+47 NEW TEMP,HDR,FTR,BEGF,BEGG,ADFF,FNP,GNP
+48 SET TEMP="EASEZR"
SET HDR="HDR^EASEZRPF(.EALNE,.EAINFO)"
+49 SET FTR="FT^EASEZRPF(.EALNE,.EAINFO)"
SET BEGF="BEGINF^EASEZRPM"
+50 SET BEGG="BEGING^EASEZRPM"
SET ADFF="ADFF^EASEZRPM"
+51 SET FNP=9
SET GNP=7
+52 DO NETMSG
End DoDot:2
+53 ;
End DoDot:1
QUIT
+54 IF '$TEST
Begin DoDot:1
+55 ;WITH NEW MEANS TEST VERSION, DISPLAY EACH CHILD'S NET WORTH AMOUNTS
+56 NEW EAADG
+57 SET EAADG=0
SET EAADL=1
FOR
SET EAADL=$ORDER(^TMP("EZRTEMP",$JOB,"IIG",EAADL))
if 'EAADL
QUIT
Begin DoDot:2
+58 SET EAADG=1
SET KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
+59 SET ^TMP("EZRTEMP",$JOB,"IIG",EAADL,"9.")=KEY_"^CHILD "_EAADL_"^1"
+60 DO PAGEDFG^EASEZRPP(EAADL)
End DoDot:2
+61 IF EAAD!EAADG
DO EN^EASEZRPM(.EALNE,.EAINFO,EASDG)
End DoDot:1
+62 ;
+63 QUIT
+64 ;
EZ ;PRINT THE 10-10EZ FORM (copied from EASEZP6F)
+1 ;
+2 NEW EASDG,EAADL,EAAD,EACNT
+3 DO PAGE1^EASEZP6U
+4 DO PAGE1^EASEZPU3
+5 DO EN^EASEZP61(.EALNE,.EAINFO)
+6 ;
+7 DO PAGE2^EASEZPU2
+8 DO EN^EASEZP62(.EALNE,.EAINFO)
+9 ;
+10 ;FLAG VARIABLE TO SIGNIFY PRINTING FROM DG
SET EASDG=1
+11 DO EN^EASEZP63(.EALNE,.EAINFO,EASDG)
+12 ;
+13 ;EAS*1.0*70
+14 NEW EASMTV
+15 IF +$GET(EASMTIEN)
SET EASMTV=+$PIECE($GET(^DGMT(408.31,EASMTIEN,2)),U,11)
+16 IF +$GET(EASMTV)=0
DO NETEZ^EASEZPDU(.EALNE,.EAINFO,EASDG)
IF 1
+17 IF '$TEST
DO EN^EASEZP64(.EALNE,.EAINFO,EASDG)
+18 ;
+19 ;Print additional insurance pages if more than 1 insurance company
+20 FOR EAADL=1:1
if '$DATA(^TMP("EZTEMP",$JOB,"IA",EAADL))
QUIT
Begin DoDot:1
+21 SET EAAD=1
+22 DO PAGEI^EASEZPU3(EAADL)
End DoDot:1
+23 IF $GET(EAAD)
DO EN^EASEZP6I(.EALNE,.EAINFO)
+24 ;
+25 ;Print additional dependent pages if more than 1 dependent
+26 SET EAAD=0
FOR EAADL=1:1
if '$DATA(^TMP("EZTEMP",$JOB,"IIB",EAADL))
QUIT
Begin DoDot:1
+27 ;FLAG THAT THERE ARE ADDITIONAL DEPENDENTS
SET EAAD=1
+28 DO PAGEN^EASEZPU3(EAADL)
End DoDot:1
+29 IF EAAD
DO EN^EASEZP6D(.EALNE,.EAINFO)
+30 ;
+31 ;Print additional dependent financial pages if more
+32 ;than 1 dependent, starting with the 2nd one
+33 ;(since Child 1 info already displayed on pages 2 & 3)
+34 SET EAAD=0
SET EAADL=1
FOR
SET EAADL=$ORDER(^TMP("EZTEMP",$JOB,"IIF",EAADL))
if 'EAADL
QUIT
Begin DoDot:1
+35 SET EAAD=1
SET KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
+36 SET ^TMP("EZTEMP",$JOB,"IIF",EAADL,"7.")=KEY_"^CHILD "_EAADL_"^1"
+37 DO PAGEDFF^EASEZPU2(EAADL)
End DoDot:1
+38 ;
+39 ;EAS*1.0*70
+40 IF +$GET(EASMTV)=0
Begin DoDot:1
+41 ;SINCE ANY ADDITIONAL DEPENDENTS' NET WORTH AMOUNTS (SECTION IIG)
+42 ;ARE INCLUDED IN THE VET'S AMOUNT, DISPLAY A MESSAGE ON THE FORM
+43 IF EAAD
Begin DoDot:2
+44 ;PRINT IIF AND IIG SECTIONS
+45 NEW TEMP,HDR,FTR,BEGF,BEGG,ADFF,FNP,GNP
+46 SET TEMP="EASEZ"
SET HDR="HDR^EASEZP6F(.EALNE,.EAINFO)"
+47 SET FTR="FT^EASEZP6F(.EALNE,.EAINFO)"
SET BEGF="BEGINF^EASEZP6M"
+48 SET BEGG="BEGING^EASEZP6M"
SET ADFF="ADFF^EASEZP6M"
+49 SET FNP=9
SET GNP=7
+50 DO NETMSG
End DoDot:2
+51 ;
End DoDot:1
QUIT
+52 IF '$TEST
Begin DoDot:1
+53 ;WITH NEW MEANS TEST VERSION, DISPLAY EACH CHILD'S NET WORTH AMOUNTS
+54 NEW EAADG
+55 SET EAADG=0
SET EAADL=1
FOR
SET EAADL=$ORDER(^TMP("EZTEMP",$JOB,"IIG",EAADL))
if 'EAADL
QUIT
Begin DoDot:2
+56 SET EAADG=1
SET KEY=+$$KEY711^EASEZU1("CHILD(N) CHILD #")
+57 SET ^TMP("EZTEMP",$JOB,"IIG",EAADL,"9.")=KEY_"^CHILD "_EAADL_"^1"
+58 DO PAGEDFG^EASEZPU2(EAADL)
End DoDot:2
+59 IF EAAD!EAADG
DO EN^EASEZP6M(.EALNE,.EAINFO,EASDG)
End DoDot:1
+60 ;
+61 QUIT
+62 ;
NETMSG ;PRINT THE MESSAGE FOR THE NET WORTH SECTION
+1 ;
+2 NEW EASF,DEPF,DFCNT,NEWPG
+3 ;
+4 SET EASF=$NAME(^TMP(TEMP,$JOB,"DFF"))
+5 IF $ORDER(@EASF@(1))
DO @BEGF
+6 ;
+7 ;Start printing with 2nd dependent
+8 SET DEPF=1
SET DFCNT=0
FOR
SET DEPF=$ORDER(@EASF@(DEPF))
if 'DEPF
QUIT
Begin DoDot:1
+9 SET DFCNT=DFCNT+1
+10 ;Check to see if a new page is needed
+11 IF (DFCNT>1)
IF '((DFCNT-1)#FNP)
Begin DoDot:2
+12 DO @FTR
+13 DO @BEGF
End DoDot:2
+14 IF (DFCNT#FNP)'=1
WRITE !?131,$CHAR(13)
if EALNE("ULC")="-"
WRITE !
WRITE EALNE("UL")
+15 DO @ADFF
End DoDot:1
+16 ;
+17 ;PRINT NET WORTH MESSAGE IF THERE ARE *any* ADDITIONAL DEPENDENTS
+18 IF ((DFCNT#FNP)'=0)
IF ((DFCNT#FNP)'=GNP)
WRITE !!,?131,$CHAR(13)
if EALNE("ULC")="-"
WRITE !
WRITE EALNE("UL")
+19 ;At the end of IIF, to find when to jump to the next page,
+20 ;55 print lines, minus 3 lines for Section IIG title header,
+21 ;minus the number of lines already used on current page,
+22 ;divided by the number of lines for a Section IIG entry
+23 SET NEWPG=(52-((DFCNT#FNP)*6))\7
+24 IF '(DFCNT#FNP)!'NEWPG!(NEWPG=GNP)
SET NEWPG=GNP
DO @FTR
+25 DO @BEGG
+26 WRITE !!?23,"ANY PREVIOUS CALENDAR YEAR NET WORTH AMOUNTS FROM ANY ADDITIONAL DEPENDENT CHILD(REN)"
+27 WRITE !!?29,"WILL BE INCLUDED IN THE VETERAN'S PREVIOUS CALENDAR YEAR NET WORTH AMOUNTS.",!
+28 DO @FTR
+29 ;
+30 QUIT