source: WorldVistAEHR/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVMCM9.m@ 1724

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1IVMCM9 ;ALB/SEK,CKN - ADD DCD DEPENDENT CHANGES TO 408.13 & 408.41 ; 10/18/05 10:02am
2 ;;2.0;INCOME VERIFICATION MATCH;**17,105**;21-OCT-94;Build 2
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5AUDIT ; change dependent demo data in 408.13 and add changes to 408.41.
6 ; if IVM transmitted IEN of 408.12 and IEN found at VAMC, any of the
7 ; 4 demo fields could be different. if ien of 408.12 is not
8 ; transmitted and dependent is found in 408.13, name & ssn could be
9 ; different because sex, dob, & relationship (408.12) must be the same.
10 I IVMDOB'=IVMDOB13 D
11 .S DGMTACT="DOB",DGMTSOLD=IVMDOB13,DGMTSNEW=IVMDOB D SET^DGMTAUD
12 .S IVMDR=".03////^S X=IVMDOB"
13 .Q
14 I IVMSEX'=IVMSEX13 D
15 .S DGMTACT="SEX",DGMTSOLD=IVMSEX13,DGMTSNEW=IVMSEX D SET^DGMTAUD
16 .S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".02////^S X=IVMSEX"
17 .Q
18AUDIT1 I IVMNM'=IVMNM13 D
19 .S DGMTACT="NAM",DGMTSOLD=IVMNM13,DGMTSNEW=IVMNM D SET^DGMTAUD
20 .S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".01////^S X=IVMNM"
21 .Q
22 I IVMSSN'=IVMSSN13 D
23 .S DGMTACT="SSN",DGMTSOLD=IVMSSN13,DGMTSNEW=IVMSSN D SET^DGMTAUD
24 .S IVMSSN=$S(IVMSSN="":"@",1:IVMSSN)
25 .S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".09////^S X=IVMSSN"
26 .Q
27 I IVMPSSNR'=IVMPSR13 D
28 .S IVMPSSNR=$S(IVMPSSNR="":"@",1:IVMPSSNR)
29 .S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_".1////^S X=IVMPSSNR"
30 .Q
31 I IVMSPMNM'=IVMSMN13 D
32 .S IVMSPMNM=$S(IVMSPMNM="":"@",1:IVMSPMNM)
33 .S IVMDR=$S($D(IVMDR):IVMDR_";",1:"") S IVMDR=IVMDR_"1.1////^S X=IVMSPMNM"
34 .Q
35 ;
36 ; change 408.13
37 I $D(IVMDR) S DR=IVMDR,DA=DGIPI,DIE="^DGPR(408.13," D ^DIE K DA,DIE,DR,IVMDR Q
38 K DGDEPI,DGMTA,DGMTACT,DGMTSNEW,DGMTSOLD
39 Q
40 ;
41AUDITP ; set common variables for audit
42 S DGMTYPT=$S(IVMTYPE=3:"",1:IVMTYPE),DGDEPI=DGIPI
43 I IVMMTIEN S DGMTA=$G(^DGMT(408.31,IVMMTIEN,0))
44 S $P(DGMTA,"^",2)=DFN
45 K IVMDR
46 ;
47 ; dgrel("s") contains 408.12 IEN of active spouse of VAMC test
48 ; dgrel("c",xxx) contains 408.12 IEN of active children of VAMC test
49 ; if VAMC dependent not a DCD dependent the dependent must be inactivated
50 ; dependents remaining in dgrel after all DCD dependents are uploaded, will be inactivated
51 ; if DCD & VAMC dependent, kill dgrel to prevent inactivation of dependent
52 ; dgpri is DCD (or DCD & VAMC) dependent's 408.12 IEN
53 I IVMSPCHV="S" D Q
54 .I +$G(DGREL("S"))=DGPRI K DGREL("S")
55 S IVMFLG4=1,IVMCC=0 F S IVMCC=$O(DGREL("C",IVMCC)) Q:'IVMCC D Q:'IVMFLG4
56 .I +$G(DGREL("C",IVMCC))=DGPRI S IVMFLG4=0 K DGREL("C",IVMCC)
57 K IVMCC
58 Q
Note: See TracBrowser for help on using the repository browser.