IBCNEHLD ;DAOU/ALA - IIV Deactivate MFN Message ;02-AUG-2002
;;2.0;INTEGRATED BILLING;**184,271,300**;21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
;**Program Description**
; This program will process deactivate registration MFN message
;
;*** WARNING-This program should only be executed by the integration team ***
;
Q
;
; Variables
; HL* = HL7 package specific variables
; MGRP = Mailgroup to email messages to
; APP = Application
; EVENT = HL7 Event
; CODE = Values sent in the MFN message
;
DEAC ; Deactivation message for when a site consolidates with another site
NEW MGRP,APP,EVENT,CODE,MFN,HL,HLFS,HLECH,MCT,HLPROD,HLX
NEW HLEID,HLCS,HLINST,HLN,HLPARAM,HLDOM,HLHDR,HLSAN
NEW HLTYPE,HLQ,HLRESLT,ID,DA,DISYS,MFE,RESP,ZMID
K ^TMP("HLS",$J)
;
S MGRP=$$MGRP^IBCNEUT5()
;
HL ; When a site deactivates, the enrollment should be an
; "MDC" (delete) record
S MFE(1)="MDC"
;
; Initialize the HL7
D INIT^HLFNC2("IBCNE IIV REGISTER",.HL)
S HLFS=HL("FS"),HLECH=HL("ECH"),HL("SAF")=$P($$SITE^VASITE,U,2,3)
; S HLEID=$$HLP^IBCNEHLU("IBCNE IIV REGISTER")
;
; Set the MFI segment
S ID="Facility Table",APP="",EVENT="UPD",RESP="AL"
S ^TMP("HLS",$J,1)=$$MFI^VAFHLMFI(ID,APP,EVENT,,,RESP)
;
; Set the MFE segment
S EVENT=MFE(1),MFN="",EDT=$$DT^XLFDT()
S CODE=""
S ^TMP("HLS",$J,2)=$$MFE^VAFHLMFE(EVENT,MFN,EDT,CODE)_HLFS_"CE"
;
D GENERATE^HLMA("IBCNE IIV REGISTER","GM",1,.HLRESLT,"")
I $P(HLRESLT,U,2)]"" S HLRESLT="Error - "_$P(HLRESLT,U,2,99) D Q
. S MSG(1)="IIV Deactivation Message not created."
. S MSG(2)=HLRESLT
. S MSG(3)="Please log a NOIS for this problem."
. D MLMN
K ^TMP("HLS",$J),%H,%I,X,EDT
Q
;
MLMN ; MailMan Message
S XMSUB="IIV Deactivation Failure"
D MSG^IBCNEUT5(MGRP,XMSUB,"MSG(")
K XMSUB,XMY,MSG,XMZ,XMDUZ
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCNEHLD 1892 printed Nov 22, 2024@17:24:46 Page 2
IBCNEHLD ;DAOU/ALA - IIV Deactivate MFN Message ;02-AUG-2002
+1 ;;2.0;INTEGRATED BILLING;**184,271,300**;21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 ;**Program Description**
+5 ; This program will process deactivate registration MFN message
+6 ;
+7 ;*** WARNING-This program should only be executed by the integration team ***
+8 ;
+9 QUIT
+10 ;
+11 ; Variables
+12 ; HL* = HL7 package specific variables
+13 ; MGRP = Mailgroup to email messages to
+14 ; APP = Application
+15 ; EVENT = HL7 Event
+16 ; CODE = Values sent in the MFN message
+17 ;
DEAC ; Deactivation message for when a site consolidates with another site
+1 NEW MGRP,APP,EVENT,CODE,MFN,HL,HLFS,HLECH,MCT,HLPROD,HLX
+2 NEW HLEID,HLCS,HLINST,HLN,HLPARAM,HLDOM,HLHDR,HLSAN
+3 NEW HLTYPE,HLQ,HLRESLT,ID,DA,DISYS,MFE,RESP,ZMID
+4 KILL ^TMP("HLS",$JOB)
+5 ;
+6 SET MGRP=$$MGRP^IBCNEUT5()
+7 ;
HL ; When a site deactivates, the enrollment should be an
+1 ; "MDC" (delete) record
+2 SET MFE(1)="MDC"
+3 ;
+4 ; Initialize the HL7
+5 DO INIT^HLFNC2("IBCNE IIV REGISTER",.HL)
+6 SET HLFS=HL("FS")
SET HLECH=HL("ECH")
SET HL("SAF")=$PIECE($$SITE^VASITE,U,2,3)
+7 ; S HLEID=$$HLP^IBCNEHLU("IBCNE IIV REGISTER")
+8 ;
+9 ; Set the MFI segment
+10 SET ID="Facility Table"
SET APP=""
SET EVENT="UPD"
SET RESP="AL"
+11 SET ^TMP("HLS",$JOB,1)=$$MFI^VAFHLMFI(ID,APP,EVENT,,,RESP)
+12 ;
+13 ; Set the MFE segment
+14 SET EVENT=MFE(1)
SET MFN=""
SET EDT=$$DT^XLFDT()
+15 SET CODE=""
+16 SET ^TMP("HLS",$JOB,2)=$$MFE^VAFHLMFE(EVENT,MFN,EDT,CODE)_HLFS_"CE"
+17 ;
+18 DO GENERATE^HLMA("IBCNE IIV REGISTER","GM",1,.HLRESLT,"")
+19 IF $PIECE(HLRESLT,U,2)]""
SET HLRESLT="Error - "_$PIECE(HLRESLT,U,2,99)
Begin DoDot:1
+20 SET MSG(1)="IIV Deactivation Message not created."
+21 SET MSG(2)=HLRESLT
+22 SET MSG(3)="Please log a NOIS for this problem."
+23 DO MLMN
End DoDot:1
QUIT
+24 KILL ^TMP("HLS",$JOB),%H,%I,X,EDT
+25 QUIT
+26 ;
MLMN ; MailMan Message
+1 SET XMSUB="IIV Deactivation Failure"
+2 DO MSG^IBCNEUT5(MGRP,XMSUB,"MSG(")
+3 KILL XMSUB,XMY,MSG,XMZ,XMDUZ
+4 QUIT