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

IVMCME2.m

Go to the documentation of this file.
  1. IVMCME2 ;ALB/SEK,BRM - CHECK ANNUAL INCOME DATA ; 12/18/01 2:19pm
  1. ;;2.0;INCOME VERIFICATION MATCH;**17,49**;21-OCT-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ; This routine is called from IVMCME.
  1. ;
  1. ;
  1. ZIC(STRING,DEPIEN) ; check validity of ZIC segment
  1. ;
  1. ; Input: STRING as ZIC segment
  1. ; DEPIEN as the IEN of the dependent in the array, if applicable
  1. ;
  1. ; Output: ERROR message or null
  1. ;
  1. N ERROR,FLAG,I,X,Y
  1. S ERROR="",X=$P(STRING,HLFS,2),FLAG=0
  1. I $E(X,1,4)<1992!($E(X,5,8)'="0000") S ERROR="Invalid Income Year in ZIC" G ZICQ
  1. F I=3:1:20 I $$NUM($P(STRING,HLFS,I),7,2) S ERROR=$P($T(ZICFLD+I),";;",2)_" field content/length error" Q
  1. I ERROR]"" G ZICQ
  1. I $G(DEPIEN) D I ERROR]"" G ZICQ
  1. . F I=13,14 I $P(STRING,HLFS,I)]"" S ERROR="Dependents can't have medical or funeral expenses" Q
  1. . I DEPIEN=SPOUSE,($P(STRING,HLFS,15)]"") S ERROR="No educational expenses for spouse" Q
  1. . I DEPIEN'=SPOUSE D Q:ERROR]""
  1. . . I $P(STRING,HLFS,15)&('$P(ARRAY(DEPIEN,"ZIR"),U,9)) S ERROR="Dependent Educational Exp. error-income not avail. to vet" Q
  1. . . S X=$E($P(STRING,HLFS,2),1,4) D ^%DT S X=Y
  1. . . I $P(STRING,HLFS,15)]"" S X=$P(^DG(43,1,"MT",X,0),U,17) I X'<$P(STRING,HLFS,9) S ERROR="Income does not exceed child exclusion amount-educational expense not allowed" Q
  1. . . F I=16:1:20 I $P(STRING,HLFS,I)]"" S ERROR="No net worth figures allowed for dependent children"
  1. I $P(STRING,HLFS,20)>$P(STRING,HLFS,19) S ERROR="Debts can't be greater than Other Property or Assets" G ZICQ
  1. I '$G(DEPIEN) D I ERROR]"" G ZICQ
  1. . I IVMTYPE'=1 Q
  1. . I $P(ARRAY("ZMT"),HLFS,3)="C" Q
  1. . S FLAG=0 F I=16:1:20 I $P(STRING,HLFS,I)]"" S FLAG=1 Q
  1. . I 'FLAG,SPOUSE F I=16:1:20 I $P(ARRAY(SPOUSE,"ZIC"),HLFS,I)]"" S FLAG=1 Q
  1. ZICQ Q ERROR
  1. ;
  1. ;
  1. NUM(NUMBER,DIGIT,DECIMAL) ; function to determine if valid numeric value
  1. ;
  1. ; Input: NUMBER as data element to evaluate
  1. ; DIGIT as number of digits allowed
  1. ; DECIMAL as number of decimal places
  1. ;
  1. N ERROR
  1. S ERROR=0
  1. I NUMBER'?.N.1".".2N S ERROR=1 G NUMQ
  1. I $L($P(NUMBER,".",1))>DIGIT S ERROR=1 G NUMQ
  1. I NUMBER<0 S ERROR=1
  1. NUMQ Q ERROR
  1. ;
  1. ;
  1. ZICFLD ; ZIC field names
  1. ;;
  1. ;;INCOME YEAR
  1. ;;SOCIAL SECURITY
  1. ;;US CIVIL SERVICE
  1. ;;US RAILROAD RETIREMENT
  1. ;;MILITARY RETIREMENT
  1. ;;UNEMPLOYMENT COMPENSATION
  1. ;;OTHER RETIREMENT
  1. ;;EMPLOYMENT INCOME
  1. ;;INTEREST, DIVIDEND, ANNUITY
  1. ;;WORKERS COMP/BLACK LUNG
  1. ;;OTHER INCOME
  1. ;;MEDICAL EXPENSES
  1. ;;FUNERAL AND BURIAL EXPENSES
  1. ;;EDUCATIONAL EXPENSES
  1. ;;CASH AMOUNT IN BANK ACCOUNTS
  1. ;;STOCKS AND BONDS
  1. ;;REAL PROPERTY
  1. ;;OTHER PROPERTY OR ASSETS
  1. ;;DEBTS