source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTU21.m@ 619

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1DGMTU21 ;ALB/RMO - Income Utilities Cont. ;6 MAR 1992 8:40 am
2 ;;5.3;Registration;**33,45,182**;Aug 13, 1993
3 ;
4ALL(DFN,DGTYPE,DGDT,DGRTY,DGMT) ;Select patient relation, individual annual
5 ; income and income relation arrays of internal
6 ; entry numbers
7 ; Input -- DFN Patient file IEN
8 ; DGTYPE Type of Relation which can
9 ; contain:
10 ; V for veteran
11 ; S for spouse
12 ; C for dependent children
13 ; or
14 ; D for all dependents
15 ; DGDT Date/Time
16 ; DGRTY Type of Array to Return
17 ; which can contain:
18 ; I for Ind Annual Income
19 ; P for Patient Relation
20 ; R for Income Relation
21 ; (Optional - default IPR)
22 ; DGMT IFN of Means Test (optional)
23 ; Output -- DGREL Patient Relation IEN Array
24 ; DGINC Individual Annual Income IEN Array
25 ; DGINR Income Relation IEN Array
26 ; DGDEP Number of Dependents
27 K DGINC,DGINR,DGREL
28 N DGCNT,DGLY,DGPRTY
29 S:'$D(DGRTY) DGRTY="IPR" S DGLY=$$LYR^DGMTSCU1(DGDT)
30 D GETREL^DGMTU11(DFN,DGTYPE,DGLY,$G(DGMT))
31 S DGPRTY="" F S DGPRTY=$O(DGREL(DGPRTY)) Q:DGPRTY="" D SET
32 I DGRTY'["P" K DGREL
33ALLQ Q
34 ;
35SET ;Set individual annual income and income relation arrays
36 N DGCNT,DGPRI,DGINI,DGIRI
37 I "CD"[DGPRTY S DGCNT=0 F S DGCNT=$O(DGREL(DGPRTY,DGCNT)) Q:'DGCNT D
38 .S DGPRI=+DGREL(DGPRTY,DGCNT) D GET
39 .I DGINI,DGRTY["I" S DGINC(DGPRTY,DGCNT)=DGINI
40 .I DGIRI,DGRTY["R" S DGINR(DGPRTY,DGCNT)=DGIRI
41 I "SV"[DGPRTY D
42 .S DGPRI=+DGREL(DGPRTY) D GET
43 .I DGINI,DGRTY["I" S DGINC(DGPRTY)=DGINI
44 .I DGIRI,DGRTY["R" S DGINR(DGPRTY)=DGIRI
45 Q
46 ;
47GET ;Look-up individual annual income and income relation IEN
48 S DGINI=+$$IAI^DGMTU3(DGPRI,DGLY,$S($G(DGMT):$P($G(^DGMT(408.31,DGMT,0)),"^",19),1:1))
49 S DGIRI=+$O(^DGMT(408.22,"AIND",DGINI,0))
50 Q
Note: See TracBrowser for help on using the repository browser.