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

EASECU21.m

Go to the documentation of this file.
  1. EASECU21 ;ALB/LBD - Income Utilities Cont. ;14 AUG 2001
  1. ;;1.0;ENROLLMENT APPLICATION SYSTEM;**5**;Mar 15, 2001
  1. ;
  1. ; This routine was modified from DGMTU21 for LTC Co-pay
  1. ;
  1. ALL(DFN,DGTYPE,DGDT,DGRTY,DGMT) ;Select patient relation, individual annual
  1. ; income and income relation arrays of internal
  1. ; entry numbers
  1. ; Input -- DFN Patient file IEN
  1. ; DGTYPE Type of Relation which can
  1. ; contain:
  1. ; V for veteran
  1. ; S for spouse
  1. ; C for dependent children
  1. ; or
  1. ; D for all dependents
  1. ; DGDT Date/Time
  1. ; DGRTY Type of Array to Return
  1. ; which can contain:
  1. ; I for Ind Annual Income
  1. ; P for Patient Relation
  1. ; R for Income Relation
  1. ; (Optional - default IPR)
  1. ; DGMT IFN of Means Test (optional)
  1. ; Output -- DGREL Patient Relation IEN Array
  1. ; DGINC Individual Annual Income IEN Array
  1. ; DGINR Income Relation IEN Array
  1. ; DGDEP Number of Dependents
  1. K DGINC,DGINR,DGREL
  1. N DGCNT,DGLY,DGPRTY
  1. ; for LTC co-pay DGLY is set to current year
  1. S:'$D(DGRTY) DGRTY="IPR" S DGLY=$E(DGDT,1,3)_"0000"
  1. D GETREL^DGMTU11(DFN,DGTYPE,DGLY,$G(DGMT))
  1. S DGPRTY="" F S DGPRTY=$O(DGREL(DGPRTY)) Q:DGPRTY="" D SET
  1. I DGRTY'["P" K DGREL
  1. ALLQ Q
  1. ;
  1. SET ;Set individual annual income and income relation arrays
  1. N DGCNT,DGPRI,DGINI,DGIRI
  1. I "CD"[DGPRTY S DGCNT=0 F S DGCNT=$O(DGREL(DGPRTY,DGCNT)) Q:'DGCNT D
  1. .S DGPRI=+DGREL(DGPRTY,DGCNT) D GET
  1. .I DGINI,DGRTY["I" S DGINC(DGPRTY,DGCNT)=DGINI
  1. .I DGIRI,DGRTY["R" S DGINR(DGPRTY,DGCNT)=DGIRI
  1. I "SV"[DGPRTY D
  1. .S DGPRI=+DGREL(DGPRTY) D GET
  1. .I DGINI,DGRTY["I" S DGINC(DGPRTY)=DGINI
  1. .I DGIRI,DGRTY["R" S DGINR(DGPRTY)=DGIRI
  1. Q
  1. ;
  1. GET ;Look-up individual annual income and income relation IEN
  1. S DGINI=+$$IAI^DGMTU3(DGPRI,DGLY,$S($G(DGMT):$P($G(^DGMT(408.31,DGMT,0)),"^",19),1:1))
  1. S DGIRI=+$O(^DGMT(408.22,"AIND",DGINI,0))
  1. Q