DGMTDD3 ;ALB/RMO - Individual Annual Income file (#408.21) Data Dictionary Calls ;17 MAR 1992 10:46 am
;;5.3;PIMS;**1015,1016**;JUN 30, 2012;Build 20
;
;DG*688 changed NET tag to only screen entry of Child Net Worth data when the means test is version 0
;
ID ;Identifier for Individual Annual Income file
N DGPRI
S DGPRI=+$P($G(^(0)),U,2)
W " ",$P($G(^DPT(+$G(^DGPR(408.12,DGPRI,0)),0)),U) W:$P($G(^DGPR(408.12,DGPRI,0)),U,2)'=1 " Relation: ",$$NAME^DGMTU1(DGPRI)," (",$$REL^DGMTU1(DGPRI),")"
Q
;
EMP ;"Trigger" Cross-reference on the Total Income From Employment
;field (#.14) to delete educational expenses on file for a child
N DGFLD,DGIN0,DGLY,DGMTPAR,DGVAL
S DGIN0=$G(^DGMT(408.21,DA,0)),DGLY=+DGIN0 D PAR^DGMTSCU
I "^3^4^5^6^"[(U_$P($G(^DGPR(408.12,+$P(DGIN0,U,2),0)),U,2)_U),$P(DGIN0,U,14)-$P(DGMTPAR,U,17)'>0 D
. I $P($G(^DGMT(408.21,DA,1)),U,3)]"" S DGVAL=$P(^(1),U,3),DGFLD=1.03 D KILL S $P(^DGMT(408.21,DA,1),U,3)=""
Q
;
OTH ;"Trigger" Cross-reference on the Other Property or Assets
;field (#2.04) to delete debts on file
N DGFLD,DGVAL
I $P($G(^DGMT(408.21,DA,2)),U,5)]"" S DGVAL=$P(^(2),U,5),DGFLD=2.05 D KILL S $P(^DGMT(408.21,DA,2),U,5)=""
Q
;
KILL ;Kill Cross-references
N DGIX,X
S X=DGVAL,DGIX=0
F S DGIX=$O(^DD(408.21,DGFLD,1,DGIX)) Q:'DGIX X ^(DGIX,2) S X=DGVAL
Q
;
FUN ;Input Transform check for Funeral and Burial Expenses field (#1.02)
N DGIRI
S DGIRI=+$O(^DGMT(408.22,"AIND",DA,0))
I $D(^DGMT(408.22,DGIRI,0)),'$P(^(0),U,5),'$P(^(0),U,8) W !?5,"This field does not need to be filled in unless the patient was married",!?5,"or had dependent children last calendar year." K X
Q
;
NET ;Input Transform check for Net Worth fields (#2.01-#2.05)
N DGPRI
S DGPRI=+$P($G(^DGMT(408.21,DA,0)),U,2)
;DG*5.3*688 -- DGMTVR is the Means Test version indicator
I '$D(DGMTVR) D
. N DGMT22I,DGMTVR1,DGMTVR2
. S (DGMT22I,DGMTVR2)=0 F Q:DGMTVR2 S DGMT22I=$O(^DGMT(408.22,"AIND",DA,DGMT22I)) Q:'DGMT22I D
. . S DGMTVR2=+$G(^DGMT(408.22,DGMT22I,"MT"))
. I DGMTVR2 S DGMTVR=+$P($G(^DGMT(408.31,DGMTVR2,2)),U,11) Q
. S DGMTVR1=+$G(^DGMT(408.21,DA,"MT"))
. I DGMTVR1 S DGMTVR=+$P($G(^DGMT(408.31,DGMTVR1,2)),U,11) Q
I +$G(DGMTVR)=0 DO
. I "^3^4^5^6^"[(U_$P($G(^DGPR(408.12,DGPRI,0)),U,2)_U) W !?5,"This field does not need to be filled in for a child." K X
Q
;
DEB ;Input Transform check for Net Worth Debts field (#2.05)
D NET
I $D(X),$P($G(^DGMT(408.21,DA,2)),U,4)<X W !?5,"'Debts' cannot exceed 'Other Property or Assets'." K X
Q
;
NAM ;Output Transform for Patient Relation field (#.02)
S Y=$$NAME^DGMTU1(Y)
Q
;
EDHLP ;Executable Help for Educational Expenses field (#1.03)
N DGPRI
S DGPRI=+$P($G(^DGMT(408.21,DA,0)),U,2)
I $P($G(^DGPR(408.12,DGPRI,0)),U,2)=1 D VET
I "^3^4^5^6^"[(U_$P($G(^DGPR(408.12,DGPRI,0)),U,2)_U) D CHILD
W !!?5,"Type a Dollar Amount between 0 and 99999, 2 Decimal Digits",!
Q
;
VET ;Veteran's educational expenses
W !?5,"Enter in this field amounts paid by the veteran during the previous",!?5,"calendar year for the veteran's educational expense. Do not report"
W !?5,"educational expenses of the veteran's children or spouse. Educational",!?5,"expenses include tuition, fees, and books if the veteran is enrolled",!?5,"in a program of education."
Q
;
CHILD ;Child's educational expenses
W !?5,"Enter in this field the child's educational expenses if the child is",!?5,"enrolled in a program of education beyond the high school level."
W !?5,"Educational expenses include amounts paid for tuition, fees and books."
Q
DGMTDD3 ;ALB/RMO - Individual Annual Income file (#408.21) Data Dictionary Calls ;17 MAR 1992 10:46 am
+1 ;;5.3;PIMS;**1015,1016**;JUN 30, 2012;Build 20
+2 ;
+3 ;DG*688 changed NET tag to only screen entry of Child Net Worth data when the means test is version 0
+4 ;
ID ;Identifier for Individual Annual Income file
+1 NEW DGPRI
+2 SET DGPRI=+$PIECE($GET(^(0)),U,2)
+3 WRITE " ",$PIECE($GET(^DPT(+$GET(^DGPR(408.12,DGPRI,0)),0)),U)
IF $PIECE($GET(^DGPR(408.12,DGPRI,0)),U,2)'=1
WRITE " Relation: ",$$NAME^DGMTU1(DGPRI)," (",$$REL^DGMTU1(DGPRI),")"
+4 QUIT
+5 ;
EMP ;"Trigger" Cross-reference on the Total Income From Employment
+1 ;field (#.14) to delete educational expenses on file for a child
+2 NEW DGFLD,DGIN0,DGLY,DGMTPAR,DGVAL
+3 SET DGIN0=$GET(^DGMT(408.21,DA,0))
SET DGLY=+DGIN0
DO PAR^DGMTSCU
+4 IF "^3^4^5^6^"[(U_$PIECE($GET(^DGPR(408.12,+$PIECE(DGIN0,U,2),0)),U,2)_U)
IF $PIECE(DGIN0,U,14)-$PIECE(DGMTPAR,U,17)'>0
Begin DoDot:1
+5 IF $PIECE($GET(^DGMT(408.21,DA,1)),U,3)]""
SET DGVAL=$PIECE(^(1),U,3)
SET DGFLD=1.03
DO KILL
SET $PIECE(^DGMT(408.21,DA,1),U,3)=""
End DoDot:1
+6 QUIT
+7 ;
OTH ;"Trigger" Cross-reference on the Other Property or Assets
+1 ;field (#2.04) to delete debts on file
+2 NEW DGFLD,DGVAL
+3 IF $PIECE($GET(^DGMT(408.21,DA,2)),U,5)]""
SET DGVAL=$PIECE(^(2),U,5)
SET DGFLD=2.05
DO KILL
SET $PIECE(^DGMT(408.21,DA,2),U,5)=""
+4 QUIT
+5 ;
KILL ;Kill Cross-references
+1 NEW DGIX,X
+2 SET X=DGVAL
SET DGIX=0
+3 FOR
SET DGIX=$ORDER(^DD(408.21,DGFLD,1,DGIX))
IF 'DGIX
QUIT
XECUTE ^(DGIX,2)
SET X=DGVAL
+4 QUIT
+5 ;
FUN ;Input Transform check for Funeral and Burial Expenses field (#1.02)
+1 NEW DGIRI
+2 SET DGIRI=+$ORDER(^DGMT(408.22,"AIND",DA,0))
+3 IF $DATA(^DGMT(408.22,DGIRI,0))
IF '$PIECE(^(0),U,5)
IF '$PIECE(^(0),U,8)
WRITE !?5,"This field does not need to be filled in unless the patient was married",!?5,"or had dependent children last calendar year."
KILL X
+4 QUIT
+5 ;
NET ;Input Transform check for Net Worth fields (#2.01-#2.05)
+1 NEW DGPRI
+2 SET DGPRI=+$PIECE($GET(^DGMT(408.21,DA,0)),U,2)
+3 ;DG*5.3*688 -- DGMTVR is the Means Test version indicator
+4 IF '$DATA(DGMTVR)
Begin DoDot:1
+5 NEW DGMT22I,DGMTVR1,DGMTVR2
+6 SET (DGMT22I,DGMTVR2)=0
FOR
IF DGMTVR2
QUIT
SET DGMT22I=$ORDER(^DGMT(408.22,"AIND",DA,DGMT22I))
IF 'DGMT22I
QUIT
Begin DoDot:2
+7 SET DGMTVR2=+$GET(^DGMT(408.22,DGMT22I,"MT"))
End DoDot:2
+8 IF DGMTVR2
SET DGMTVR=+$PIECE($GET(^DGMT(408.31,DGMTVR2,2)),U,11)
QUIT
+9 SET DGMTVR1=+$GET(^DGMT(408.21,DA,"MT"))
+10 IF DGMTVR1
SET DGMTVR=+$PIECE($GET(^DGMT(408.31,DGMTVR1,2)),U,11)
QUIT
End DoDot:1
+11 IF +$GET(DGMTVR)=0
Begin DoDot:1
+12 IF "^3^4^5^6^"[(U_$PIECE($GET(^DGPR(408.12,DGPRI,0)),U,2)_U)
WRITE !?5,"This field does not need to be filled in for a child."
KILL X
End DoDot:1
+13 QUIT
+14 ;
DEB ;Input Transform check for Net Worth Debts field (#2.05)
+1 DO NET
+2 IF $DATA(X)
IF $PIECE($GET(^DGMT(408.21,DA,2)),U,4)<X
WRITE !?5,"'Debts' cannot exceed 'Other Property or Assets'."
KILL X
+3 QUIT
+4 ;
NAM ;Output Transform for Patient Relation field (#.02)
+1 SET Y=$$NAME^DGMTU1(Y)
+2 QUIT
+3 ;
EDHLP ;Executable Help for Educational Expenses field (#1.03)
+1 NEW DGPRI
+2 SET DGPRI=+$PIECE($GET(^DGMT(408.21,DA,0)),U,2)
+3 IF $PIECE($GET(^DGPR(408.12,DGPRI,0)),U,2)=1
DO VET
+4 IF "^3^4^5^6^"[(U_$PIECE($GET(^DGPR(408.12,DGPRI,0)),U,2)_U)
DO CHILD
+5 WRITE !!?5,"Type a Dollar Amount between 0 and 99999, 2 Decimal Digits",!
+6 QUIT
+7 ;
VET ;Veteran's educational expenses
+1 WRITE !?5,"Enter in this field amounts paid by the veteran during the previous",!?5,"calendar year for the veteran's educational expense. Do not report"
+2 WRITE !?5,"educational expenses of the veteran's children or spouse. Educational",!?5,"expenses include tuition, fees, and books if the veteran is enrolled",!?5,"in a program of education."
+3 QUIT
+4 ;
CHILD ;Child's educational expenses
+1 WRITE !?5,"Enter in this field the child's educational expenses if the child is",!?5,"enrolled in a program of education beyond the high school level."
+2 WRITE !?5,"Educational expenses include amounts paid for tuition, fees and books."
+3 QUIT