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

DGMTSC2V.m

Go to the documentation of this file.
  1. DGMTSC2V ;ALB/GTS - Means Test Screen Income (version 1) ;15 DEC 2005 15:45 pm
  1. ;;5.3;PIMS;**1016**;JUN 30, 2012;Build 20
  1. ;
  1. ; Input -- DFN Patient IEN
  1. ; DGMTDT Date of Test
  1. ; DGVINI Veteran Individual Annual Income IEN
  1. ; DGVIRI Veteran Income Relation IEN
  1. ; DGVPRI Veteran Patient Relation IEN
  1. ; DGMTI Means Test IEN
  1. ; Output -- None
  1. ;
  1. EN ;Entry point for previous calendar year income screen
  1. S DGMTSCI=2 D HD^DGMTSCU
  1. D DIS
  1. S DGRNG="1-3" G EN^DGMTSCR
  1. ;
  1. EN1 ;Entry point for read processor return
  1. D ALL^DGMTU21(DFN,"CS",DGMTDT,"IPR",$S($G(DGMTI):DGMTI,1:""))
  1. I DGX!($G(DGSELTY)["V") S DGPRI=DGVPRI,DGPRTY="V" D EDT
  1. I '$G(DGMTOUT)&($G(DGSEL)["S")&(DGX!($G(DGSELTY)["S")) S DGPRI=+DGREL("S"),DGPRTY="S" D EDT
  1. I '$G(DGMTOUT)&($G(DGSEL)["C")&(DGX!($G(DGSELTY)["C")) S DGPRTY="C",DGCNT=0 F S DGCNT=$O(DGREL("C",DGCNT)) Q:'DGCNT!($G(DGMTOUT)) D
  1. .D CHK^DGMTSCU2 I Y S DGPRI=+DGREL("C",DGCNT) D EDT
  1. Q K DGCNT,DGDEP,DGDR,DGMTOUT,DGPRI,DGPRTY,DGREL,DGSEL,DGSELTY,DGX,DGY,DTOUT,DUOUT,Y
  1. G EN
  1. ;
  1. DIS ;Display income
  1. N DGDC,DGDET,DGIN0,DGIN1,DGIN2,DGINT,DGINTF,DGNC,DGND,DGNWT,DGNWTF,DGSP,DGVIR0,DGCNT,DGFV2
  1. S DGFV2=1
  1. D DEP^DGMTSCU2,INC^DGMTSCU3 S DGCNT=1
  1. W !!?34,"Veteran" W:DGSP ?46,"Spouse" W:DGDC ?56,"Children" W ?73,"Total"
  1. W !?31,"-----------------------------------------------"
  1. D HIGH^DGMTSCU1(1,DGMTACT) W " Total Employment Income",!
  1. D FLD^DGMTSC2(.DGIN0,14," (Wages, Bonuses, Tips): ")
  1. D HIGH^DGMTSCU1(2,DGMTACT) W " Net Income from Farm,",!
  1. D FLD^DGMTSC2(.DGIN0,17," Ranch, Property, Bus.: ")
  1. D HIGH^DGMTSCU1(3,DGMTACT) W " Other Income Amounts",!
  1. W " (Soc. Sec., Compensation,",!
  1. D FLD^DGMTSC2(.DGIN0,8," Pension, Interest, Div.): ")
  1. W !?51,"Total -->",?66,$J($$AMT^DGMTSCU1(DGINT),12)
  1. Q
  1. ;
  1. EDT ;Edit income fields
  1. N DA,DGERR,DGFIN,DGINI,DGIN0,DGIRI,DIE,DR
  1. D GETIENS^DGMTU2(DFN,DGPRI,DGMTDT) G EDTQ:DGERR
  1. I $G(DGSEL)]"" W !!,"NAME: ",$$NAME^DGMTU1(DGPRI)
  1. S DGIN0=$G(^DGMT(408.21,DGINI,0))
  1. S DR="[DGMT V1 ENTER/EDIT ANNUAL INC]"
  1. S DA=DGINI,DIE="^DGMT(408.21," D ^DIE S:'$D(DGFIN) DGMTOUT=1
  1. I DGIN0'=$G(^DGMT(408.21,DGINI,0)) S DR="103////^S X=DUZ;104///^S X=""NOW""" D ^DIE
  1. EDTQ Q