Forward received HL7 messages - dcm4che/dcm4chee-arc-light GitHub Wiki

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 a configured HL7 sender has the ability to send HL7 messages only to one system (in this case DCM4CHEE Archive), then DCM4CHEE Archive can forward the same to multiple HL7 receivers.

Configuration

Note that the HL7 Forward Rule can be configured on Archive Device level or on Archive HL7 Application Extension level. Below configuration that is explained is on Archive Device level. Add a HL7 Receiver if not configured already.

Using Archive UI

  1. Select the level on which the feature needs to be configured :
    • To configure on Archive device level, go to Menu->Configuration, then on Devices page, Edit the dcm4chee-arc device. Go to Extensions and Edit extension of Device Extension. Again go to its Extensions and Edit extension of Archive device. Go to Child Objects and select + for adding HL7 Forward Rule.
    • To configure on Archive HL7 application extension level, go to Menu->Configuration, then on Devices page and
      Edit the dcm4chee-arc device. Go to Extensions and Edit extension of Device Extension. Go to Child Objects and select the HL7 application for which this feature needs to be configured. Go to Extensions and Edit extension of Archive HL7 Application. Go to Child Objects and select + for adding HL7 Forward Rule.
  2. Enter values in fields Name and HL7 Forward Application Name and Save.

Using LDAP

One may create a LDIF file and import it to the LDAP Server by using the ldapmodify command line utility shown below, as an example :

  • To configure on Archive device level,

      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
      -
    
  • To configure on Archive HL7 application extension level,

      version: 1
      dn: cn=Forward to HL7RCV|DCM4CHEE,hl7ApplicationName=*,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,hl7ApplicationName=*,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
      changetype: modify
      add: dcmProperty
      dcmProperty: MSH-9=ADT\^A28\^ADT_A05
      -
    

Note :

  • One may add multiple hl7FwdApplicationName for each of the configured HL7 receivers.

  • dcmProperty specifies the conditions which need to match in order to use this feature. For eg, 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.

Go to the Control tab on Configuration page in archive UI and reload the configuration.

Testing

One can test this feature on local systems using dcm4che tools.

  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|
    
⚠️ **GitHub.com Fallback** ⚠️