source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNEHLD.m@ 1804

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1IBCNEHLD ;DAOU/ALA - IIV Deactivate MFN Message ;02-AUG-2002
2 ;;2.0;INTEGRATED BILLING;**184,271,300**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;**Program Description**
6 ; This program will process deactivate registration MFN message
7 ;
8 ;*** WARNING-This program should only be executed by the integration team ***
9 ;
10 Q
11 ;
12 ; Variables
13 ; HL* = HL7 package specific variables
14 ; MGRP = Mailgroup to email messages to
15 ; APP = Application
16 ; EVENT = HL7 Event
17 ; CODE = Values sent in the MFN message
18 ;
19DEAC ; Deactivation message for when a site consolidates with another site
20 NEW MGRP,APP,EVENT,CODE,MFN,HL,HLFS,HLECH,MCT,HLPROD,HLX
21 NEW HLEID,HLCS,HLINST,HLN,HLPARAM,HLDOM,HLHDR,HLSAN
22 NEW HLTYPE,HLQ,HLRESLT,ID,DA,DISYS,MFE,RESP,ZMID
23 K ^TMP("HLS",$J)
24 ;
25 S MGRP=$$MGRP^IBCNEUT5()
26 ;
27HL ; When a site deactivates, the enrollment should be an
28 ; "MDC" (delete) record
29 S MFE(1)="MDC"
30 ;
31 ; Initialize the HL7
32 D INIT^HLFNC2("IBCNE IIV REGISTER",.HL)
33 S HLFS=HL("FS"),HLECH=HL("ECH"),HL("SAF")=$P($$SITE^VASITE,U,2,3)
34 ; S HLEID=$$HLP^IBCNEHLU("IBCNE IIV REGISTER")
35 ;
36 ; Set the MFI segment
37 S ID="Facility Table",APP="",EVENT="UPD",RESP="AL"
38 S ^TMP("HLS",$J,1)=$$MFI^VAFHLMFI(ID,APP,EVENT,,,RESP)
39 ;
40 ; Set the MFE segment
41 S EVENT=MFE(1),MFN="",EDT=$$DT^XLFDT()
42 S CODE=""
43 S ^TMP("HLS",$J,2)=$$MFE^VAFHLMFE(EVENT,MFN,EDT,CODE)_HLFS_"CE"
44 ;
45 D GENERATE^HLMA("IBCNE IIV REGISTER","GM",1,.HLRESLT,"")
46 I $P(HLRESLT,U,2)]"" S HLRESLT="Error - "_$P(HLRESLT,U,2,99) D Q
47 . S MSG(1)="IIV Deactivation Message not created."
48 . S MSG(2)=HLRESLT
49 . S MSG(3)="Please log a NOIS for this problem."
50 . D MLMN
51 K ^TMP("HLS",$J),%H,%I,X,EDT
52 Q
53 ;
54MLMN ; MailMan Message
55 S XMSUB="IIV Deactivation Failure"
56 D MSG^IBCNEUT5(MGRP,XMSUB,"MSG(")
57 K XMSUB,XMY,MSG,XMZ,XMDUZ
58 Q
Note: See TracBrowser for help on using the repository browser.