Skip to content

Log received HL7 messages

Vrinda edited this page Mar 27, 2023 · 1 revision

Overview

One can enable this feature if logging of the HL7 messages is required by the application. Enabling this feature will log the unparsed HL7 messages to a location configured by user. It also provides the user to log the unparsed HL7 messages which were not successfully accepted by the archive.

Note : If messages do not contain date in field 6 of MSH segment or if any other exception is encountered while parsing the date, then system current date is selected for logging successful or erroneous messages. The location will be the same as configured by user.

Configuration

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.
    • 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.
  2. Enter values in fields HL7 Log File Pattern and HL7 Error Log File Pattern as shown below and Save.

Using LDAP

One may create a LDIF file and import it to the LDAP Server by using the ldapmodify command line utility.

  • To configure on Archive device level,

      version: 1
      dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
      changetype: modify
      add: hl7LogFilePattern
      hl7LogFilePattern: ${jboss.server.data.dir}/hl7/${date,yyyy/MM/dd}/${SerialNo}-${MSH-9}.hl7
      -
      
      dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
      changetype: modify
      add: hl7ErrorLogFilePattern
      hl7ErrorLogFilePattern: ${jboss.server.data.dir}/hl7-error/${date,yyyy/MM/dd}/${SerialNo}-${MSH-9}.hl7
      -
    
  • To configure on Archive HL7 application extension level,

      version: 1
      dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
      changetype: modify
      add: hl7LogFilePattern
      hl7LogFilePattern: ${jboss.server.data.dir}/hl7/${date,yyyy/MM/dd}/${SerialNo}-${MSH-9}.hl7
      -
      
      dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
      changetype: modify
      add: hl7ErrorLogFilePattern
      hl7ErrorLogFilePattern: ${jboss.server.data.dir}/hl7-error/${date,yyyy/MM/dd}/${SerialNo}-${MSH-9}.hl7
      -
    

or use the Add Attribute... and Add Value... function of Apache Directory Studio.

One may refer to Archive Device and/or Archive HL7 Application to understand the description of attributes.

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

Note : In case of any error, it would be logged to both path locations (if configured).

As shown in the above attributes, user can provide date format as per one's choice, HL7 message header field number and a SerialNo for uniqueness of file names.

Clone this wiki locally