IVMCM9 ;ALB/SEK,CKN,TDM - ADD DCD DEPENDENT CHANGES TO 408.13 & 408.41 ; 6/17/09 2:30pm
;;2.0;INCOME VERIFICATION MATCH;**17,105,115,121**;21-OCT-94;Build 45
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
AUDIT ; change dependent demo data in 408.13 and add changes to 408.41.
; if IVM transmitted IEN of 408.12 and IEN found at VAMC, any of the
; 4 demo fields could be different. if ien of 408.12 is not
; transmitted and dependent is found in 408.13, name & ssn could be
; different because sex, dob, & relationship (408.12) must be the same.
I IVMDOB'=IVMDOB13 D
.S DGMTACT="DOB",DGMTSOLD=IVMDOB13,DGMTSNEW=IVMDOB D SET^DGMTAUD
.S IVMDR=".03////^S X=IVMDOB"
.Q
I IVMSEX'=IVMSEX13 D
.S DGMTACT="SEX",DGMTSOLD=IVMSEX13,DGMTSNEW=IVMSEX D SET^DGMTAUD
.S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".02////^S X=IVMSEX"
.Q
AUDIT1 I IVMNM'=IVMNM13 D
.S DGMTACT="NAM",DGMTSOLD=IVMNM13,DGMTSNEW=IVMNM D SET^DGMTAUD
.S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".01////^S X=IVMNM"
.Q
I IVMSSN'=IVMSSN13 D
.;If not a pseudo quit if not verified
.Q:(IVMSSNVS'=4)&(IVMSSN'["P")
.S DGMTACT="SSN",DGMTSOLD=IVMSSN13,DGMTSNEW=IVMSSN D SET^DGMTAUD
.S IVMSSN=$S(IVMSSN="":"@",1:IVMSSN)
.S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".09////^S X=IVMSSN"
.Q
I IVMPSSNR'=IVMPSR13 D
.S IVMPSSNR=$S(IVMPSSNR="":"@",1:IVMPSSNR)
.S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".1////^S X=IVMPSSNR"
.Q
I IVMSSNVS'=IVMSVS13 D
.I IVMSSNVS="" Q ;quit if no verify status
.I IVMSSNVS=2,IVMSSN'=IVMSSN13 Q ;Quit if verify status=Invalid and NO SSN match
.S IVMSSNVS=$S(IVMSSNVS="":"@",1:IVMSSNVS)
.S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".11////^S X=IVMSSNVS"
.Q
I IVMSPMNM'=IVMSMN13 D
.S IVMSPMNM=$S(IVMSPMNM="":"@",1:IVMSPMNM)
.S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.1////^S X=IVMSPMNM"
.Q
;
I IVMSALU'=""&(IVMSADL1'=""&(IVMSALU>IVMALU13)) D
. I IVMSADL1'=IVMAL113 D
. . S IVMSADL1=$S(IVMSADL1="":"@",1:IVMSADL1)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.2////^S X=IVMSADL1"
. I IVMSADL2'=IVMAL213 D
. . S IVMSADL2=$S(IVMSADL2="":"@",1:IVMSADL2)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.3////^S X=IVMSADL2"
. I IVMSADL3'=IVMAL313 D
. . S IVMSADL3=$S(IVMSADL3="":"@",1:IVMSADL3)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.4////^S X=IVMSADL3"
. I IVMSCITY'=IVMCTY13 D
. . S IVMSCITY=$S(IVMSCITY="":"@",1:IVMSCITY)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.5////^S X=IVMSCITY"
. I IVMSST'=IVMST13 D
. . S IVMSST=$S(IVMSST="":"@",1:IVMSST)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.6////^S X=IVMSST"
. I IVMSZIP'=IVMZIP13 D
. . S IVMSZIP=$S(IVMSZIP="":"@",1:IVMSZIP)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.7////^S X=IVMSZIP"
. I IVMSTELE'=IVMTEL13 D
. . S IVMSTELE=$S(IVMSTELE="":"@",1:IVMSTELE)
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.8////^S X=IVMSTELE"
. I IVMSALU'=IVMALU13 D
. . S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.9////^S X=IVMSALU"
;
; change 408.13
I $D(IVMDR) S DR=IVMDR,DA=DGIPI,DIE="^DGPR(408.13," D ^DIE K DA,DIE,DR,IVMDR Q
K DGDEPI,DGMTA,DGMTACT,DGMTSNEW,DGMTSOLD
Q
;
AUDITP ; set common variables for audit
S DGMTYPT=$S(IVMTYPE=3:"",1:IVMTYPE),DGDEPI=DGIPI
I IVMMTIEN S DGMTA=$G(^DGMT(408.31,IVMMTIEN,0))
S $P(DGMTA,"^",2)=DFN
K IVMDR
;
; dgrel("s") contains 408.12 IEN of active spouse of VAMC test
; dgrel("c",xxx) contains 408.12 IEN of active children of VAMC test
; if VAMC dependent not a DCD dependent the dependent must be inactivated
; dependents remaining in dgrel after all DCD dependents are uploaded, will be inactivated
; if DCD & VAMC dependent, kill dgrel to prevent inactivation of dependent
; dgpri is DCD (or DCD & VAMC) dependent's 408.12 IEN
I IVMSPCHV="S" D Q
.I +$G(DGREL("S"))=DGPRI K DGREL("S")
S IVMFLG4=1,IVMCC=0 F S IVMCC=$O(DGREL("C",IVMCC)) Q:'IVMCC D Q:'IVMFLG4
.I +$G(DGREL("C",IVMCC))=DGPRI S IVMFLG4=0 K DGREL("C",IVMCC)
K IVMCC
Q
;
TRIGGER(IVMDA) ; Trigger logic for Spouse Address fields to update the Spouse
; Addr Last Update Date/Time' field. The variable IVMSPFLG is set at
; the beginning of IVMCM2 to specify a Z10 spouse address update.
; A Z10 transmission should not allow the trigger to run.
; If IVMSPFLG does NOT exist then a manual update will be assumed. A
; manual update is the only change allowed by the trigger.
;
; INPUT
; IVMDA: The IEN of the field that was changed to cause the trigger
Q:$D(IVMSPFLG)
N DGIEN,DATA
S DATA(1.9)=$$NOW^XLFDT(),DGIEN=IVMDA
I $$UPD^DGENDBS(408.13,.DGIEN,.DATA)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMCM9 4759 printed Oct 16, 2024@18:02:02 Page 2
IVMCM9 ;ALB/SEK,CKN,TDM - ADD DCD DEPENDENT CHANGES TO 408.13 & 408.41 ; 6/17/09 2:30pm
+1 ;;2.0;INCOME VERIFICATION MATCH;**17,105,115,121**;21-OCT-94;Build 45
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
AUDIT ; change dependent demo data in 408.13 and add changes to 408.41.
+1 ; if IVM transmitted IEN of 408.12 and IEN found at VAMC, any of the
+2 ; 4 demo fields could be different. if ien of 408.12 is not
+3 ; transmitted and dependent is found in 408.13, name & ssn could be
+4 ; different because sex, dob, & relationship (408.12) must be the same.
+5 IF IVMDOB'=IVMDOB13
Begin DoDot:1
+6 SET DGMTACT="DOB"
SET DGMTSOLD=IVMDOB13
SET DGMTSNEW=IVMDOB
DO SET^DGMTAUD
+7 SET IVMDR=".03////^S X=IVMDOB"
+8 QUIT
End DoDot:1
+9 IF IVMSEX'=IVMSEX13
Begin DoDot:1
+10 SET DGMTACT="SEX"
SET DGMTSOLD=IVMSEX13
SET DGMTSNEW=IVMSEX
DO SET^DGMTAUD
+11 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_".02////^S X=IVMSEX"
+12 QUIT
End DoDot:1
AUDIT1 IF IVMNM'=IVMNM13
Begin DoDot:1
+1 SET DGMTACT="NAM"
SET DGMTSOLD=IVMNM13
SET DGMTSNEW=IVMNM
DO SET^DGMTAUD
+2 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_".01////^S X=IVMNM"
+3 QUIT
End DoDot:1
+4 IF IVMSSN'=IVMSSN13
Begin DoDot:1
+5 ;If not a pseudo quit if not verified
+6 if (IVMSSNVS'=4)&(IVMSSN'["P")
QUIT
+7 SET DGMTACT="SSN"
SET DGMTSOLD=IVMSSN13
SET DGMTSNEW=IVMSSN
DO SET^DGMTAUD
+8 SET IVMSSN=$SELECT(IVMSSN="":"@",1:IVMSSN)
+9 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_".09////^S X=IVMSSN"
+10 QUIT
End DoDot:1
+11 IF IVMPSSNR'=IVMPSR13
Begin DoDot:1
+12 SET IVMPSSNR=$SELECT(IVMPSSNR="":"@",1:IVMPSSNR)
+13 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_".1////^S X=IVMPSSNR"
+14 QUIT
End DoDot:1
+15 IF IVMSSNVS'=IVMSVS13
Begin DoDot:1
+16 ;quit if no verify status
IF IVMSSNVS=""
QUIT
+17 ;Quit if verify status=Invalid and NO SSN match
IF IVMSSNVS=2
IF IVMSSN'=IVMSSN13
QUIT
+18 SET IVMSSNVS=$SELECT(IVMSSNVS="":"@",1:IVMSSNVS)
+19 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_".11////^S X=IVMSSNVS"
+20 QUIT
End DoDot:1
+21 IF IVMSPMNM'=IVMSMN13
Begin DoDot:1
+22 SET IVMSPMNM=$SELECT(IVMSPMNM="":"@",1:IVMSPMNM)
+23 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.1////^S X=IVMSPMNM"
+24 QUIT
End DoDot:1
+25 ;
+26 IF IVMSALU'=""&(IVMSADL1'=""&(IVMSALU>IVMALU13))
Begin DoDot:1
+27 IF IVMSADL1'=IVMAL113
Begin DoDot:2
+28 SET IVMSADL1=$SELECT(IVMSADL1="":"@",1:IVMSADL1)
+29 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.2////^S X=IVMSADL1"
End DoDot:2
+30 IF IVMSADL2'=IVMAL213
Begin DoDot:2
+31 SET IVMSADL2=$SELECT(IVMSADL2="":"@",1:IVMSADL2)
+32 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.3////^S X=IVMSADL2"
End DoDot:2
+33 IF IVMSADL3'=IVMAL313
Begin DoDot:2
+34 SET IVMSADL3=$SELECT(IVMSADL3="":"@",1:IVMSADL3)
+35 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.4////^S X=IVMSADL3"
End DoDot:2
+36 IF IVMSCITY'=IVMCTY13
Begin DoDot:2
+37 SET IVMSCITY=$SELECT(IVMSCITY="":"@",1:IVMSCITY)
+38 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.5////^S X=IVMSCITY"
End DoDot:2
+39 IF IVMSST'=IVMST13
Begin DoDot:2
+40 SET IVMSST=$SELECT(IVMSST="":"@",1:IVMSST)
+41 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.6////^S X=IVMSST"
End DoDot:2
+42 IF IVMSZIP'=IVMZIP13
Begin DoDot:2
+43 SET IVMSZIP=$SELECT(IVMSZIP="":"@",1:IVMSZIP)
+44 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.7////^S X=IVMSZIP"
End DoDot:2
+45 IF IVMSTELE'=IVMTEL13
Begin DoDot:2
+46 SET IVMSTELE=$SELECT(IVMSTELE="":"@",1:IVMSTELE)
+47 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.8////^S X=IVMSTELE"
End DoDot:2
+48 IF IVMSALU'=IVMALU13
Begin DoDot:2
+49 SET IVMDR=$SELECT($DATA(IVMDR):IVMDR_";",1:"")
SET IVMDR=IVMDR_"1.9////^S X=IVMSALU"
End DoDot:2
End DoDot:1
+50 ;
+51 ; change 408.13
+52 IF $DATA(IVMDR)
SET DR=IVMDR
SET DA=DGIPI
SET DIE="^DGPR(408.13,"
DO ^DIE
KILL DA,DIE,DR,IVMDR
QUIT
+53 KILL DGDEPI,DGMTA,DGMTACT,DGMTSNEW,DGMTSOLD
+54 QUIT
+55 ;
AUDITP ; set common variables for audit
+1 SET DGMTYPT=$SELECT(IVMTYPE=3:"",1:IVMTYPE)
SET DGDEPI=DGIPI
+2 IF IVMMTIEN
SET DGMTA=$GET(^DGMT(408.31,IVMMTIEN,0))
+3 SET $PIECE(DGMTA,"^",2)=DFN
+4 KILL IVMDR
+5 ;
+6 ; dgrel("s") contains 408.12 IEN of active spouse of VAMC test
+7 ; dgrel("c",xxx) contains 408.12 IEN of active children of VAMC test
+8 ; if VAMC dependent not a DCD dependent the dependent must be inactivated
+9 ; dependents remaining in dgrel after all DCD dependents are uploaded, will be inactivated
+10 ; if DCD & VAMC dependent, kill dgrel to prevent inactivation of dependent
+11 ; dgpri is DCD (or DCD & VAMC) dependent's 408.12 IEN
+12 IF IVMSPCHV="S"
Begin DoDot:1
+13 IF +$GET(DGREL("S"))=DGPRI
KILL DGREL("S")
End DoDot:1
QUIT
+14 SET IVMFLG4=1
SET IVMCC=0
FOR
SET IVMCC=$ORDER(DGREL("C",IVMCC))
if 'IVMCC
QUIT
Begin DoDot:1
+15 IF +$GET(DGREL("C",IVMCC))=DGPRI
SET IVMFLG4=0
KILL DGREL("C",IVMCC)
End DoDot:1
if 'IVMFLG4
QUIT
+16 KILL IVMCC
+17 QUIT
+18 ;
TRIGGER(IVMDA) ; Trigger logic for Spouse Address fields to update the Spouse
+1 ; Addr Last Update Date/Time' field. The variable IVMSPFLG is set at
+2 ; the beginning of IVMCM2 to specify a Z10 spouse address update.
+3 ; A Z10 transmission should not allow the trigger to run.
+4 ; If IVMSPFLG does NOT exist then a manual update will be assumed. A
+5 ; manual update is the only change allowed by the trigger.
+6 ;
+7 ; INPUT
+8 ; IVMDA: The IEN of the field that was changed to cause the trigger
+9 if $DATA(IVMSPFLG)
QUIT
+10 NEW DGIEN,DATA
+11 SET DATA(1.9)=$$NOW^XLFDT()
SET DGIEN=IVMDA
+12 IF $$UPD^DGENDBS(408.13,.DGIEN,.DATA)
+13 QUIT