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

IVMCMF3.m

Go to the documentation of this file.
  1. IVMCMF3 ;ALB/RMM - CHECK INCOME TEST DATA (CON'T.) ; 01/02/03
  1. ;;2.0;INCOME VERIFICATION MATCH;**71,107**;21-OCT-94
  1. ;
  1. ;
  1. ; This routine is called from IVMCMF2.
  1. ;
  1. MT(STRING,INCOME) ; Calculate means test status
  1. ; DGMTBS - BASE THRESHOLD VALUE FOR SITE
  1. ; DGMTBH - BASE THRESHOLD VALUE SENT FROM HEC
  1. ; DGTDEP - TOTAL # OF DEPENDENTS SENT BY HEC.
  1. ;
  1. N X,Y,ADJ,HAR,INC,NET,THRESH,THRESHA,THRESHT,IVMTEXT,XMSUB,CAT,CAT1
  1. N VADM,DGMTBS,DGMTBH,DGTDEP,DGMTICY,DGMTCMP,DECLINE,DGMTICYR
  1. S CAT1=$P(STRING,HLFS,3),CAT=$P(STRING,HLFS,26) I CAT="" S CAT=CAT1
  1. ;
  1. ; If previous yr mt threshold flag is set use date of prev year
  1. S X=$S($P(STRING,HLFS,11):($E($P(STRING,HLFS,2),1,4)-1),1:$E($P(STRING,HLFS,2),1,4)),DGMTICY=$P($G(STRING),HLFS,2)
  1. N Y S Y=$$HL7TFM^XLFDT(DGMTICY,"1D") X ^DD("DD") S DGMTICY=Y
  1. S %DT="" D ^%DT S X=Y K %DT
  1. S THRESH=$G(^DG(43,1,"MT",X,0)),THRESHT=$P(THRESH,U,2),DGMTBS=THRESHT
  1. I $P(STRING,HLFS,12) S THRESHT=THRESHT+$P(THRESH,U,3)+(($P(STRING,HLFS,12)-1)*$P(THRESH,U,4)),DGTDEP=$P($G(STRING),HLFS,12)
  1. ;
  1. S INC=$P(STRING,HLFS,4)-$P(STRING,HLFS,9),NET=$P(STRING,HLFS,5)
  1. S ADJ=$P(STRING,HLFS,6),THRESHA=$P(STRING,HLFS,8),DGMTBH=THRESHA
  1. I $P(STRING,HLFS,12),(THRESHA'=THRESHT) S THRESHA=THRESHA+$P(THRESH,U,3)+(($P(STRING,HLFS,12)-1)*$P(THRESH,U,4))
  1. S DECLINE=$P(STRING,HLFS,16),HAR=$P(STRING,HLFS,13),DGMTCMP=+$P(STRING,HLFS,10)
  1. S DGMTICYR=$$LYR^DGMTSCU1($$HL7TFM^XLFDT($P(STRING,HLFS,2)))
  1. ;
  1. ; If Decline to Give Incone Info & MT CP Req, Quit
  1. I DECLINE,CAT="C" G MTQ
  1. ;
  1. ; If threshold A is incorrect, send message to sites's IVM MESSAGE
  1. ; mail group and continue to process
  1. I +DGMTBH>0,DGMTCMP>0,(CAT'="G"&(THRESHT'=THRESHA)) D
  1. .D:$G(DFN)'=""
  1. ..N VAHOW,VAROOT,VAPTYP
  1. ..D DEM^VADPT
  1. .S XMSUB="MT threshold discrepancy - "_"PID - "_$P($G(VADM(2)),U,2)
  1. .S IVMTEXT(1)="While uploading the following income test from HEC a"
  1. .S IVMTEXT(2)="discrepancy was found with the threshold A values."
  1. .S IVMTEXT(3)=" ",IVMTEXT(4)=" NAME: "_$G(VADM(1))
  1. .S IVMTEXT(5)=" ",IVMTEXT(6)=" PID : "_$P($G(VADM(2)),"^",2)
  1. .S IVMTEXT(8)=" ",IVMTEXT(9)="Date of Test sent from HEC: "_DGMTICY
  1. .S IVMTEXT(10)=" "
  1. .S IVMTEXT(11)="Site MT Threshold value: "_$J($FN($G(THRESHT),",",0),6)
  1. .S IVMTEXT(12)=" "
  1. .S IVMTEXT(13)="HEC Transmitted MT Threshold value: "_$J($FN($G(DGMTBH),",",0),6)
  1. .S IVMTEXT(14)=" ",IVMTEXT(16)="Total number of dependents: "_$G(DGTDEP)
  1. .S IVMTEXT(17)=" "
  1. .D MAIL^IVMUFNC("DGMT MT/CT UPLOAD ALERTS")
  1. .Q
  1. ;
  1. I INC'>THRESHA I ((INC+NET)'>$P(THRESH,U,8))&(CAT="C") S CNT=CNT+1,IVMERR(CNT)="Income plus net worth not greater than threshold value-incorrect status"
  1. I INC>THRESHA,CAT'="C",'HAR,'ADJ,CAT'="P" S CNT=CNT+1,IVMERR(CNT)="Incorrect means test status for Test-Determined Status"
  1. MTQ Q
  1. ;
  1. ;
  1. CO(STRING) ; Calculate copay test status
  1. ;
  1. ; Variables containing ZMT fields
  1. N CAT,CAT1,DGCAT,DGCOPS,DGCOST
  1. S CAT1=$P(STRING,HLFS,3),CAT=$P(STRING,HLFS,26) I CAT="" S CAT=CAT1
  1. S DGCOST=$$FMDATE^HLFNC($P(STRING,HLFS,2))_U_DFN_U_U_$P(STRING,HLFS,4)_U_U_U_U_U_U_U_U_U_U_$P(STRING,HLFS,16)_U_$P(STRING,HLFS,9)_U_U_U_$P(STRING,HLFS,12)_U_2
  1. S DGCOPS=$$INCDT^IBARXEU1(DGCOST),DGCAT=$S(+DGCOPS=1:"E",+DGCOPS=2:"M",+DGCOPS=3:"P",1:"I")
  1. I CAT'=DGCAT S CNT=CNT+1,IVMERR(CNT)="Copay Test Status should be "_DGCAT
  1. COQ Q