How to configure forwarding of received HL7 messages

vrindanayak edited this page Oct 18, 2016 · 2 revisions
Clone this wiki locally

Overview

DCM4CHEE Archive, if configured for this feature, implements the auto forwarding of incoming HL7 messages to other HL7 receiving systems. This can be used in the cases when some HL7 sender is configured or has the ability to send HL7 messages only to one system (in this case DCM4CHEE Archive), then DCM4CHEE Archive can forward to same to multiple other systems who need these HL7 messages.

Configuration

You may either

  • create a LDIF file (e.g.):

    version: 1
    dn: cn=Forward to HL7RCV|DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: hl7ForwardRule
    cn: Forward to HL7RCV|DCM4CHEE
    hl7FwdApplicationName: HL7RCV|DCM4CHEE
    dcmProperty: MSH-3=FORWARD
    -
    
    dn: cn=Forward to HL7RCV|DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmProperty
    dcmProperty: MSH-9=ADT^A28^ADT_A05
    -
    

    and import it to the LDAP Server by using the ldapmodify command line utility.

Note :

  1. One has to configure the HL7 receive destinations in LDAP for each hl7FwdApplicationName defined in the rule.

  2. dcmProperty specifies the conditions which need to match in order to use this feature. For eg, we set it to MSH-9=ADT^A28^ADT_A05. This can take values as any of the message header elements, as indicated in the example. It could also take values as below :

     SendingHostName[!]=<regex> 
     SendingApplicationEntityTitle[!]=<regex> 
     ReceivingingApplicationEntityTitle[!]=<regex> 
    

    The ! given in [] means that one may even specify a ‘not equal to’ in the condition. may contain value of host name or application entity title.

One may refer to HL7 Forward Rule to understand the description of attributes.

Testing

One can test this feature on local systems using dcm4che tools and sample-config.ldif

  1. Start the HL7 receiver

     hl7rcv -b 2576
    

    Log snippet :

     11:46:31,297 INFO  - Start TCP Listener on 0.0.0.0/0.0.0.0:2576
    
  2. Send an example HL7 message to the archive

     hl7snd -c localhost:2575  /path_to_msg.hl7
    

    Log snippet :

     11:47:35,182 DEBUG - Socket[addr=localhost/127.0.0.1,port=2575,localport=51032] >> MSH|^~\&|MESA_IM|XYZ_IMAGE_MANAGER|MESA_OF|XYZ_RADIOLOGY|20161018114735.179||ACK^O23^ACK|766494118|P|2.3.1|||||| || MSA|AA|100112|
    
  3. See the message being received in the HL7 receive tool window. Log snippet :

      11:47:33,242 DEBUG - Socket[addr=/127.0.0.1,port=51033,localport=2576] << MSH|^~\&|HL7RCV|DCM4CHEE|MESA_IM|XYZ_IMAGE_MANAGER|20161018114733.214||ACK^O23^ACK|1994945151|P|2.3.1|||||| || MSA|AA|100112|