source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASECU21.m@ 1639

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1EASECU21 ;ALB/LBD - Income Utilities Cont. ;14 AUG 2001
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**5**;Mar 15, 2001
3 ;
4 ; This routine was modified from DGMTU21 for LTC Co-pay
5 ;
6ALL(DFN,DGTYPE,DGDT,DGRTY,DGMT) ;Select patient relation, individual annual
7 ; income and income relation arrays of internal
8 ; entry numbers
9 ; Input -- DFN Patient file IEN
10 ; DGTYPE Type of Relation which can
11 ; contain:
12 ; V for veteran
13 ; S for spouse
14 ; C for dependent children
15 ; or
16 ; D for all dependents
17 ; DGDT Date/Time
18 ; DGRTY Type of Array to Return
19 ; which can contain:
20 ; I for Ind Annual Income
21 ; P for Patient Relation
22 ; R for Income Relation
23 ; (Optional - default IPR)
24 ; DGMT IFN of Means Test (optional)
25 ; Output -- DGREL Patient Relation IEN Array
26 ; DGINC Individual Annual Income IEN Array
27 ; DGINR Income Relation IEN Array
28 ; DGDEP Number of Dependents
29 K DGINC,DGINR,DGREL
30 N DGCNT,DGLY,DGPRTY
31 ; for LTC co-pay DGLY is set to current year
32 S:'$D(DGRTY) DGRTY="IPR" S DGLY=$E(DGDT,1,3)_"0000"
33 D GETREL^DGMTU11(DFN,DGTYPE,DGLY,$G(DGMT))
34 S DGPRTY="" F S DGPRTY=$O(DGREL(DGPRTY)) Q:DGPRTY="" D SET
35 I DGRTY'["P" K DGREL
36ALLQ Q
37 ;
38SET ;Set individual annual income and income relation arrays
39 N DGCNT,DGPRI,DGINI,DGIRI
40 I "CD"[DGPRTY S DGCNT=0 F S DGCNT=$O(DGREL(DGPRTY,DGCNT)) Q:'DGCNT D
41 .S DGPRI=+DGREL(DGPRTY,DGCNT) D GET
42 .I DGINI,DGRTY["I" S DGINC(DGPRTY,DGCNT)=DGINI
43 .I DGIRI,DGRTY["R" S DGINR(DGPRTY,DGCNT)=DGIRI
44 I "SV"[DGPRTY D
45 .S DGPRI=+DGREL(DGPRTY) D GET
46 .I DGINI,DGRTY["I" S DGINC(DGPRTY)=DGINI
47 .I DGIRI,DGRTY["R" S DGINR(DGPRTY)=DGIRI
48 Q
49 ;
50GET ;Look-up individual annual income and income relation IEN
51 S DGINI=+$$IAI^DGMTU3(DGPRI,DGLY,$S($G(DGMT):$P($G(^DGMT(408.31,DGMT,0)),"^",19),1:1))
52 S DGIRI=+$O(^DGMT(408.22,"AIND",DGINI,0))
53 Q
Note: See TracBrowser for help on using the repository browser.