source: FOIAVistA/tag/r/INCOME_VERIFICATION_MATCH-IVM/IVMUCHK4.m@ 628

Last change on this file since 628 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1IVMUCHK4 ;ALB/CAW - Filter routine to validate IVM Center Transmission, Con't ; September 19, 1994
2 ;;Version 2.0 ; INCOME VERIFICATION MATCH ;**1**; 21-OCT-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; This routine is a continuation of IVMUCHK. It performs checks on incoming means test
6 ; transmissions to ensure they are accurate prior to their upload into DHCP.
7 ;
8 ;
9ZMT(STRING) ; check ZMT segment
10 ;
11 ; Input: STRING as ZMT segment
12 ;
13 ; Output: ERROR message or null
14 ;
15 N ERROR,I,X
16 S ERROR=""
17 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
18 S X=$$FMDATE^HLFNC(X),%DT="X" D ^%DT I Y<0 S ERROR="Invalid Date of Test" G ZMTQ
19 ;
20 ; Status Checks
21 D MT^IVMUCHK5(STRING,ARRAY("ZIC")) I ERROR]"" G ZMTQ
22 ;
23 ; Field content/lenght
24 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"
25 I ERROR]"" G ZMTQ
26 ;
27 ; gather income totals
28 D INC^IVMUCHK5 I ERROR]"" G ZMTQ
29 ;
30 ; Adjudicate Date/Time
31 S X=$P(STRING,HLFS,6) I X]"" D I ERROR]"" G ZMTQ
32 . I $E(X,1,4)<1993!($E(X,1,4)>($E(DT,1,3)+1700)) S ERROR="Invalid Adjudication Date/Time" Q
33 . S X=$$FMDATE^HLFNC(X),%DT="TX" D ^%DT I Y<0 S ERROR="Invalid Adjudication Date/Time" Q
34 ;
35 ; Agree to Pay Deductible
36 S X=$P(STRING,HLFS,7) I X]"",(X'=0),(X'=1) S ERROR="Invalid Agreed To Pay Deductible Value" G ZMTQ
37 I $P(STRING,HLFS,3)="A",X'="" S ERROR="Cat A veteran-Agree to Pay Deductible should be null" G ZMTQ
38 ;
39 ; Threshold A value
40 S X=$P(STRING,HLFS,8) I X']"" S ERROR="Invalid Threshold A value" G ZMTQ
41 I (X'>0)!(X'<99001) S ERROR="Invalid Threshold A value" G ZMTQ
42 ;
43 ; Deductibe Expenses
44 I $$NUM^IVMUCHK2($P(STRING,HLFS,9),10,2) S ERROR="Deductible Expenses field content/length error" G ZMTQ
45 I $P(STRING,HLFS,4)<($P(STRING,HLFS,9)) S ERROR="Deductible Expenses cannot exceed income" G ZMTQ
46 ;
47 ; Means Test Completion Date/Time
48 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
49 S X=$$FMDATE^HLFNC(X),%DT="TX" D ^%DT I Y<0 S ERROR="Invalid Completion Date/Time" G ZMTQ
50 ;
51 ; Previous Year Threshold
52 S X=$P(STRING,HLFS,11) I X]"" S ERROR="Previous year threshold value must be null" G ZMTQ
53 ;
54 ; Dependents
55 I $P(STRING,HLFS,12)'=DEP S ERROR="Number of Dependents does not match dependents transmitted" G ZMTQ
56 ;
57 ; Hardship
58 S X=$P(STRING,HLFS,13) I X]"",X'=0 S ERROR="Can't accept Hardship transmissions" G ZMTQ
59 I $P(STRING,HLFS,14)]"" S ERROR="Hardship Review Date should be null" G ZMTQ
60 ;
61 ; Date Veteran Signed/Refused to Sign
62 D SIGN^IVMUCHK5 I ERROR]"" G ZMTQ
63 ;
64 ; Date IVM Verif. MT Complete
65 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
66 ;
67 ; Declines to Give Info
68 S X=$P(STRING,HLFS,16) I X]"" S ERROR="Declines to give Income Info must be null" G ZMTQ
69 ;
70 ; Type of Test/Source of Test/Primary Income Test
71 S X=$P(STRING,HLFS,17) I X'=1 S ERROR="Type of Test must be set to 1 for Means Test" G ZMTQ
72 S X=$P(STRING,HLFS,18) I X'=2 S ERROR="Source of Test must be set to 2 for IVM" G ZMTQ
73 S X=$P(STRING,HLFS,19) I 'X S ERROR="Primary Income Test should be set to 1 if returned" G ZMTQ
74 ;
75 ;Refused to Sign
76 S X=$P(STRING,HLFS,21) I X]"",(X'=0),(X'=1) S ERROR="Refused to Sign has invalid value" G ZMTQ
77 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"
78ZMTQ Q ERROR
Note: See TracBrowser for help on using the repository browser.