source: WorldVistAEHR/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVMCMF2.m@ 862

Last change on this file since 862 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1IVMCMF2 ;ALB/SEK,CKN - CHECK INCOME DEPENDENT DATA ; 11/8/05 3:27pm
2 ;;2.0;INCOME VERIFICATION MATCH;**71,107,105**;21-OCT-94;Build 2
3 ;
4 ; This routine is a called from IVMCMF.
5 ;
6ZMT(STRING) ; check ZMT segment
7 ;
8 ; Input: STRING as ZMT segment
9 ;
10 N X,Y
11 ;
12 ; Means Test Status Checks
13 I IVMTYPE=1,$P(STRING,HLFS,3)'="G" D MT^IVMCMF3(STRING,ARRAY("ZIC"))
14 ;
15 ; Copay Test Status Checks
16 I IVMTYPE=2 D CO^IVMCMF3(STRING)
17 ;
18 ; Hardship consistency checks
19 N HARDSHIP K HARDSHIP
20 S HARDSHIP("Y/N")=$P(STRING,HLFS,13)
21 S HARDSHIP("SITE")=$P(STRING,HLFS,23)
22 S HARDSHIP("EFFDATE")=$P(STRING,HLFS,24)
23 ;
24 I (IVMTYPE'=4),(HARDSHIP("Y/N"))!(+HARDSHIP("SITE"))!(HARDSHIP("EFFDATE")) D
25 .I HARDSHIP("Y/N")="" S CNT=CNT+1,IVMERR(CNT)="Missing Hardship Indicator"
26 .I HARDSHIP("SITE")="" S CNT=CNT+1,IVMERR(CNT)="Missing Site Granting Hardship"
27 .;starting in year 2000, all hardships should have an effective date
28 .I $E($P(STRING,HLFS,2),1,4)'<2000,(HARDSHIP("EFFDATE")="") S CNT=CNT+1,IVMERR(CNT)="Missing Hardship Effective Date"
29 .I $L(HARDSHIP("EFFDATE")) S X=$$FMDATE^HLFNC(HARDSHIP("EFFDATE")),%DT=X D ^%DT I Y<0 S CNT=CNT+1,IVMERR(CNT)="Invalid Hardship Effective Date"
30 .I HARDSHIP("EFFDATE"),(HARDSHIP("EFFDATE")<($P(STRING,HLFS,2))-1) S CNT=CNT+1,IVMERR(CNT)="Hardship Effective Date earlier than Means Test Date"
31 ;
32 ; Source of Test
33 S X=$P(STRING,HLFS,18)
34 I "^1^2^3^4^"'[(U_X_U) S CNT=CNT+1,IVMERR(CNT)="Source of Test must be identified"
35 I X=4,$P(STRING,HLFS,22)="" S CNT=CNT+1,IVMERR(CNT)="Site Conducting Test must be identified"
36 ;
37ZMTQ Q
38 ;
39ZDP(STRING) ; Check validity of ZDP segment
40 ;
41 ; Input: STRING as ZDP segment
42 ;
43 N RELAT,IVMZDP5,PSSNRSN
44 S IVMZDP5=$P(STRING,HLFS,5)
45 I +IVMZDP5'>0 D G ZDPQ
46 .S RELAT=$P(STRING,HLFS,6),RELAT=$S($D(^DG(408.11,RELAT,0)):$P(^DG(408.11,RELAT,0),HLFS),1:"OTHER")
47 .S CNT=CNT+1,IVMERR(CNT)="Dependent ("_RELAT_") transmitted without SSN"
48 I $D(IVMAR2(IVMZDP5)) S CNT=CNT+1,IVMERR(CNT)="Two dependents transmitted with same SSN"
49 S IVMAR2(IVMZDP5)=""
50 S PSSNRSN=$P(STRING,HLFS,10) I PSSNRSN]"",(PSSNRSN'="R"),(PSSNRSN'="S"),(PSSNRSN'="N") S CNT=CNT+1,IVMERR(CNT)="Invalid Pseudo SSN Reason transmitted for Spouse/Dependent."
51ZDPQ Q
Note: See TracBrowser for help on using the repository browser.