Log received HL7 messages - dcm4che/dcm4chee-arc-light GitHub Wiki
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.
- Select the level on which the feature needs to be configured :
- To configure on Archive device level, go to
Menu->Configuration
, then onDevices
page,Edit
thedcm4chee-arc
device. Go toExtensions
andEdit extension
ofDevice Extension
. Again go to itsExtensions
andEdit extension
ofArchive device
. - To configure on Archive HL7 application extension level, go to
Menu->Configuration
, then onDevices
page and
Edit
thedcm4chee-arc
device. Go toExtensions
andEdit extension
ofDevice Extension
. Go toChild Objects
and select the HL7 application for which this feature needs to be configured. Go toExtensions
andEdit extension
ofArchive HL7 Application
.
- To configure on Archive device level, go to
- Enter values in fields
HL7 Log File Pattern
andHL7 Error Log File Pattern
as shown below andSave
.
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.