DGMTSC2V ;ALB/GTS - Means Test Screen Income (version 1) ;15 DEC 2005 15:45 pm
;;5.3;Registration;**688**;Aug 13, 1993;Build 29
;
; Input -- DFN Patient IEN
; DGMTDT Date of Test
; DGVINI Veteran Individual Annual Income IEN
; DGVIRI Veteran Income Relation IEN
; DGVPRI Veteran Patient Relation IEN
; DGMTI Means Test IEN
; Output -- None
;
EN ;Entry point for previous calendar year income screen
S DGMTSCI=2 D HD^DGMTSCU
D DIS
S DGRNG="1-3" G EN^DGMTSCR
;
EN1 ;Entry point for read processor return
D ALL^DGMTU21(DFN,"CS",DGMTDT,"IPR",$S($G(DGMTI):DGMTI,1:""))
I DGX!($G(DGSELTY)["V") S DGPRI=DGVPRI,DGPRTY="V" D EDT
I '$G(DGMTOUT)&($G(DGSEL)["S")&(DGX!($G(DGSELTY)["S")) S DGPRI=+DGREL("S"),DGPRTY="S" D EDT
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
.D CHK^DGMTSCU2 I Y S DGPRI=+DGREL("C",DGCNT) D EDT
Q K DGCNT,DGDEP,DGDR,DGMTOUT,DGPRI,DGPRTY,DGREL,DGSEL,DGSELTY,DGX,DGY,DTOUT,DUOUT,Y
G EN
;
DIS ;Display income
N DGDC,DGDET,DGIN0,DGIN1,DGIN2,DGINT,DGINTF,DGNC,DGND,DGNWT,DGNWTF,DGSP,DGVIR0,DGCNT,DGFV2
S DGFV2=1
D DEP^DGMTSCU2,INC^DGMTSCU3 S DGCNT=1
W !!?34,"Veteran" W:DGSP ?46,"Spouse" W:DGDC ?56,"Children" W ?73,"Total"
W !?31,"-----------------------------------------------"
D HIGH^DGMTSCU1(1,DGMTACT) W " Total Employment Income",!
D FLD^DGMTSC2(.DGIN0,14," (Wages, Bonuses, Tips): ")
D HIGH^DGMTSCU1(2,DGMTACT) W " Net Income from Farm,",!
D FLD^DGMTSC2(.DGIN0,17," Ranch, Property, Bus.: ")
D HIGH^DGMTSCU1(3,DGMTACT) W " Other Income Amounts",!
W " (Soc. Sec., Compensation,",!
D FLD^DGMTSC2(.DGIN0,8," Pension, Interest, Div.): ")
W !?51,"Total -->",?66,$J($$AMT^DGMTSCU1(DGINT),12)
Q
;
EDT ;Edit income fields
N DA,DGERR,DGFIN,DGINI,DGIN0,DGIRI,DIE,DR
D GETIENS^DGMTU2(DFN,DGPRI,DGMTDT) G EDTQ:DGERR
I $G(DGSEL)]"" W !!,"NAME: ",$$NAME^DGMTU1(DGPRI)
S DGIN0=$G(^DGMT(408.21,DGINI,0))
S DR="[DGMT V1 ENTER/EDIT ANNUAL INC]"
S DA=DGINI,DIE="^DGMT(408.21," D ^DIE S:'$D(DGFIN) DGMTOUT=1
I DGIN0'=$G(^DGMT(408.21,DGINI,0)) S DR="103////^S X=DUZ;104///^S X=""NOW""" D ^DIE
EDTQ Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGMTSC2V 2258 printed Oct 16, 2024@18:45:58 Page 2
DGMTSC2V ;ALB/GTS - Means Test Screen Income (version 1) ;15 DEC 2005 15:45 pm
+1 ;;5.3;Registration;**688**;Aug 13, 1993;Build 29
+2 ;
+3 ; Input -- DFN Patient IEN
+4 ; DGMTDT Date of Test
+5 ; DGVINI Veteran Individual Annual Income IEN
+6 ; DGVIRI Veteran Income Relation IEN
+7 ; DGVPRI Veteran Patient Relation IEN
+8 ; DGMTI Means Test IEN
+9 ; Output -- None
+10 ;
EN ;Entry point for previous calendar year income screen
+1 SET DGMTSCI=2
DO HD^DGMTSCU
+2 DO DIS
+3 SET DGRNG="1-3"
GOTO EN^DGMTSCR
+4 ;
EN1 ;Entry point for read processor return
+1 DO ALL^DGMTU21(DFN,"CS",DGMTDT,"IPR",$SELECT($GET(DGMTI):DGMTI,1:""))
+2 IF DGX!($GET(DGSELTY)["V")
SET DGPRI=DGVPRI
SET DGPRTY="V"
DO EDT
+3 IF '$GET(DGMTOUT)&($GET(DGSEL)["S")&(DGX!($GET(DGSELTY)["S"))
SET DGPRI=+DGREL("S")
SET DGPRTY="S"
DO EDT
+4 IF '$GET(DGMTOUT)&($GET(DGSEL)["C")&(DGX!($GET(DGSELTY)["C"))
SET DGPRTY="C"
SET DGCNT=0
FOR
SET DGCNT=$ORDER(DGREL("C",DGCNT))
if 'DGCNT!($GET(DGMTOUT))
QUIT
Begin DoDot:1
+5 DO CHK^DGMTSCU2
IF Y
SET DGPRI=+DGREL("C",DGCNT)
DO EDT
End DoDot:1
Q KILL DGCNT,DGDEP,DGDR,DGMTOUT,DGPRI,DGPRTY,DGREL,DGSEL,DGSELTY,DGX,DGY,DTOUT,DUOUT,Y
+1 GOTO EN
+2 ;
DIS ;Display income
+1 NEW DGDC,DGDET,DGIN0,DGIN1,DGIN2,DGINT,DGINTF,DGNC,DGND,DGNWT,DGNWTF,DGSP,DGVIR0,DGCNT,DGFV2
+2 SET DGFV2=1
+3 DO DEP^DGMTSCU2
DO INC^DGMTSCU3
SET DGCNT=1
+4 WRITE !!?34,"Veteran"
if DGSP
WRITE ?46,"Spouse"
if DGDC
WRITE ?56,"Children"
WRITE ?73,"Total"
+5 WRITE !?31,"-----------------------------------------------"
+6 DO HIGH^DGMTSCU1(1,DGMTACT)
WRITE " Total Employment Income",!
+7 DO FLD^DGMTSC2(.DGIN0,14," (Wages, Bonuses, Tips): ")
+8 DO HIGH^DGMTSCU1(2,DGMTACT)
WRITE " Net Income from Farm,",!
+9 DO FLD^DGMTSC2(.DGIN0,17," Ranch, Property, Bus.: ")
+10 DO HIGH^DGMTSCU1(3,DGMTACT)
WRITE " Other Income Amounts",!
+11 WRITE " (Soc. Sec., Compensation,",!
+12 DO FLD^DGMTSC2(.DGIN0,8," Pension, Interest, Div.): ")
+13 WRITE !?51,"Total -->",?66,$JUSTIFY($$AMT^DGMTSCU1(DGINT),12)
+14 QUIT
+15 ;
EDT ;Edit income fields
+1 NEW DA,DGERR,DGFIN,DGINI,DGIN0,DGIRI,DIE,DR
+2 DO GETIENS^DGMTU2(DFN,DGPRI,DGMTDT)
if DGERR
GOTO EDTQ
+3 IF $GET(DGSEL)]""
WRITE !!,"NAME: ",$$NAME^DGMTU1(DGPRI)
+4 SET DGIN0=$GET(^DGMT(408.21,DGINI,0))
+5 SET DR="[DGMT V1 ENTER/EDIT ANNUAL INC]"
+6 SET DA=DGINI
SET DIE="^DGMT(408.21,"
DO ^DIE
if '$DATA(DGFIN)
SET DGMTOUT=1
+7 IF DGIN0'=$GET(^DGMT(408.21,DGINI,0))
SET DR="103////^S X=DUZ;104///^S X=""NOW"""
DO ^DIE
EDTQ QUIT