IVMPXFR ;ALB/MLI/CJM - Called from DD to update IVM transmit flag ; 14 APR 93
;;2.0;INCOME VERIFICATION MATCH;**9,17**;21-OCT-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
DPT ; Update transmit status if patient file fields are updated
;
N DFN
S DFN=+DA I '$D(^DPT(DFN,0)) Q
D IVM
;
; log DCD event for nightly transmission to HEC
D LOGDCD^IVMCUC(DFN)
;
; if change in SSN, DOB, or SEX see if financial query needs to
; be sent to HEC Center
I $D(IVMKILL),$P($G(^DPT(+DA,0)),"^",IVMKILL)'="" D QRYQUE^IVMCQ2(DFN)
;
Q
;
IVM ; check to see if patient needs to be retransmitted
N DA,I,NODE,X,IVMDT,EVENTS
Q:'$D(^IVM(301.5,"B",DFN))
F DA=0:0 S DA=$O(^IVM(301.5,"B",DFN,DA)) Q:'DA D
.S X=$G(^IVM(301.5,DA,0))
.I 'X!($P(X,"^",3)=0)!$P(X,"^",4) Q ; stop if transmit=no or stop=yes
.S IVMDT=$E($P(X,"^",2),1,3)+1_"1231.9999"
.Q:'$$IVM^IVMUFNC(DFN,IVMDT) ;stop if not an IVM patient
.S EVENTS("IVM")=1
.I $$SETSTAT^IVMPLOG(DA,.EVENTS)
Q
;
SPSSN ; Update transmit status if the spouse's SSN has been updated
N DFN,IVMPR,IVMPRN
S IVMPR=$O(^DGPR(408.12,"C",+DA_";DGPR(408.13,",0)) Q:'IVMPR
S IVMPRN=$G(^DGPR(408.12,IVMPR,0)) Q:'IVMPRN
Q:$P(IVMPRN,"^",2)'=2 ; not a spouse
S DFN=+IVMPRN
D IVM
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMPXFR 1287 printed Oct 16, 2024@18:03:16 Page 2
IVMPXFR ;ALB/MLI/CJM - Called from DD to update IVM transmit flag ; 14 APR 93
+1 ;;2.0;INCOME VERIFICATION MATCH;**9,17**;21-OCT-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
DPT ; Update transmit status if patient file fields are updated
+1 ;
+2 NEW DFN
+3 SET DFN=+DA
IF '$DATA(^DPT(DFN,0))
QUIT
+4 DO IVM
+5 ;
+6 ; log DCD event for nightly transmission to HEC
+7 DO LOGDCD^IVMCUC(DFN)
+8 ;
+9 ; if change in SSN, DOB, or SEX see if financial query needs to
+10 ; be sent to HEC Center
+11 IF $DATA(IVMKILL)
IF $PIECE($GET(^DPT(+DA,0)),"^",IVMKILL)'=""
DO QRYQUE^IVMCQ2(DFN)
+12 ;
+13 QUIT
+14 ;
IVM ; check to see if patient needs to be retransmitted
+1 NEW DA,I,NODE,X,IVMDT,EVENTS
+2 if '$DATA(^IVM(301.5,"B",DFN))
QUIT
+3 FOR DA=0:0
SET DA=$ORDER(^IVM(301.5,"B",DFN,DA))
if 'DA
QUIT
Begin DoDot:1
+4 SET X=$GET(^IVM(301.5,DA,0))
+5 ; stop if transmit=no or stop=yes
IF 'X!($PIECE(X,"^",3)=0)!$PIECE(X,"^",4)
QUIT
+6 SET IVMDT=$EXTRACT($PIECE(X,"^",2),1,3)+1_"1231.9999"
+7 ;stop if not an IVM patient
if '$$IVM^IVMUFNC(DFN,IVMDT)
QUIT
+8 SET EVENTS("IVM")=1
+9 IF $$SETSTAT^IVMPLOG(DA,.EVENTS)
End DoDot:1
+10 QUIT
+11 ;
SPSSN ; Update transmit status if the spouse's SSN has been updated
+1 NEW DFN,IVMPR,IVMPRN
+2 SET IVMPR=$ORDER(^DGPR(408.12,"C",+DA_";DGPR(408.13,",0))
if 'IVMPR
QUIT
+3 SET IVMPRN=$GET(^DGPR(408.12,IVMPR,0))
if 'IVMPRN
QUIT
+4 ; not a spouse
if $PIECE(IVMPRN,"^",2)'=2
QUIT
+5 SET DFN=+IVMPRN
+6 DO IVM
+7 QUIT