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

IVMUCHK4.m

Go to the documentation of this file.
  1. IVMUCHK4 ;ALB/CAW - Filter routine to validate IVM Center Transmission, Con't ; September 19, 1994
  1. ;;Version 2.0 ; INCOME VERIFICATION MATCH ;**1**; 21-OCT-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ; This routine is a continuation of IVMUCHK. It performs checks on incoming means test
  1. ; transmissions to ensure they are accurate prior to their upload into DHCP.
  1. ;
  1. ;
  1. ZMT(STRING) ; check ZMT segment
  1. ;
  1. ; Input: STRING as ZMT segment
  1. ;
  1. ; Output: ERROR message or null
  1. ;
  1. N ERROR,I,X
  1. S ERROR=""
  1. S X=$P(STRING,HLFS,2) I $E(X,1,4)<1993!($E(X,1,4)>($E(DT,1,3)+1700)) S ERROR="Invalid Date of Test" G ZMTQ
  1. S X=$$FMDATE^HLFNC(X),%DT="X" D ^%DT I Y<0 S ERROR="Invalid Date of Test" G ZMTQ
  1. ;
  1. ; Status Checks
  1. D MT^IVMUCHK5(STRING,ARRAY("ZIC")) I ERROR]"" G ZMTQ
  1. ;
  1. ; Field content/lenght
  1. F I=4,5 I $$NUM^IVMUCHK2($P(STRING,HLFS,I),10,2) S ERROR=$S(I=4:"INCOME",1:"NET WORTH")_" field content/length error"
  1. I ERROR]"" G ZMTQ
  1. ;
  1. ; gather income totals
  1. D INC^IVMUCHK5 I ERROR]"" G ZMTQ
  1. ;
  1. ; Adjudicate Date/Time
  1. S X=$P(STRING,HLFS,6) I X]"" D I ERROR]"" G ZMTQ
  1. . I $E(X,1,4)<1993!($E(X,1,4)>($E(DT,1,3)+1700)) S ERROR="Invalid Adjudication Date/Time" Q
  1. . S X=$$FMDATE^HLFNC(X),%DT="TX" D ^%DT I Y<0 S ERROR="Invalid Adjudication Date/Time" Q
  1. ;
  1. ; Agree to Pay Deductible
  1. S X=$P(STRING,HLFS,7) I X]"",(X'=0),(X'=1) S ERROR="Invalid Agreed To Pay Deductible Value" G ZMTQ
  1. I $P(STRING,HLFS,3)="A",X'="" S ERROR="Cat A veteran-Agree to Pay Deductible should be null" G ZMTQ
  1. ;
  1. ; Threshold A value
  1. S X=$P(STRING,HLFS,8) I X']"" S ERROR="Invalid Threshold A value" G ZMTQ
  1. I (X'>0)!(X'<99001) S ERROR="Invalid Threshold A value" G ZMTQ
  1. ;
  1. ; Deductibe Expenses
  1. I $$NUM^IVMUCHK2($P(STRING,HLFS,9),10,2) S ERROR="Deductible Expenses field content/length error" G ZMTQ
  1. I $P(STRING,HLFS,4)<($P(STRING,HLFS,9)) S ERROR="Deductible Expenses cannot exceed income" G ZMTQ
  1. ;
  1. ; Means Test Completion Date/Time
  1. S X=$P(STRING,HLFS,10) I $E(X,1,4)<1992!($E(X,1,4)>($E(DT,1,3)+1700)) S ERROR="Invalid Completion Date/Time" G ZMTQ
  1. S X=$$FMDATE^HLFNC(X),%DT="TX" D ^%DT I Y<0 S ERROR="Invalid Completion Date/Time" G ZMTQ
  1. ;
  1. ; Previous Year Threshold
  1. S X=$P(STRING,HLFS,11) I X]"" S ERROR="Previous year threshold value must be null" G ZMTQ
  1. ;
  1. ; Dependents
  1. I $P(STRING,HLFS,12)'=DEP S ERROR="Number of Dependents does not match dependents transmitted" G ZMTQ
  1. ;
  1. ; Hardship
  1. S X=$P(STRING,HLFS,13) I X]"",X'=0 S ERROR="Can't accept Hardship transmissions" G ZMTQ
  1. I $P(STRING,HLFS,14)]"" S ERROR="Hardship Review Date should be null" G ZMTQ
  1. ;
  1. ; Date Veteran Signed/Refused to Sign
  1. D SIGN^IVMUCHK5 I ERROR]"" G ZMTQ
  1. ;
  1. ; Date IVM Verif. MT Complete
  1. I $P(STRING,HLFS,20)]"" S X=$$FMDATE^HLFNC($P(STRING,HLFS,20)),%DT="X" D ^%DT I Y<0 S ERROR="Invalid Date IVM Verif. MT Complete Test" G ZMTQ
  1. ;
  1. ; Declines to Give Info
  1. S X=$P(STRING,HLFS,16) I X]"" S ERROR="Declines to give Income Info must be null" G ZMTQ
  1. ;
  1. ; Type of Test/Source of Test/Primary Income Test
  1. S X=$P(STRING,HLFS,17) I X'=1 S ERROR="Type of Test must be set to 1 for Means Test" G ZMTQ
  1. S X=$P(STRING,HLFS,18) I X'=2 S ERROR="Source of Test must be set to 2 for IVM" G ZMTQ
  1. S X=$P(STRING,HLFS,19) I 'X S ERROR="Primary Income Test should be set to 1 if returned" G ZMTQ
  1. ;
  1. ;Refused to Sign
  1. S X=$P(STRING,HLFS,21) I X]"",(X'=0),(X'=1) S ERROR="Refused to Sign has invalid value" G ZMTQ
  1. I $P(STRING,HLFS,21)]"",X=1,$P(STRING,HLFS,7)'=0 S ERROR="Veteran Refused To Sign-Agreed to Pay Deductible set to yes"
  1. ZMTQ Q ERROR