Skip to content

DICOM2ORU ​

DICOM2ORU accepts DICOM C-STORE objects and generates HL7 ORU^R01 messages (the default template declares v2.5.1) for an MLLP receiver. It can include embedded PDF bytes from Encapsulated PDF objects and first-frame pixel bytes from Secondary Capture objects.

Example configuration ​

yaml
Dicom:
  AETitle: DICOM7
  ListenPort: 104
HL7:
  SenderName: DICOM7
  ReceiverName: RIS
  ReceiverFacility: HOSPITAL
  ReceiverHost: hl7.example.org
  ReceiverPort: 7777
  WaitForAck: true
Cache:
  Folder: cache
  RetentionDays: 7
  KeepSentItems: true
Retry:
  RetryIntervalMinutes: 1

Settings ​

SettingDefault / behavior
Dicom.AETitleDICOM7; called AE title required on incoming associations
Dicom.ListenPort104; DICOM listener port
HL7.SenderNameDICOM7; retained setting; set MSH-3 in the template
HL7.ReceiverNameRECEIVER_APPLICATION; retained setting; set MSH-5 in the template
HL7.ReceiverFacilityRECEIVER_FACILITY; retained setting; set MSH-6 in the template
HL7.ReceiverHostlocalhost; outbound MLLP host
HL7.ReceiverPort7777; outbound MLLP port
HL7.WaitForAcktrue; read a response after sending. Set false only when the receiver intentionally supplies no ACK.
Cache.Foldercache beneath the service data directory when omitted
Cache.RetentionDays3 when omitted; the example explicitly uses 7 days
Cache.KeepSentItemstrue; retain processed ORU records
Retry.RetryIntervalMinutes1; delay between outgoing/retry processing cycles, in minutes

Templates and attachments ​

Set MSH-3 through MSH-6 explicitly in the template; the three application/facility configuration values do not replace the outgoing template header.

The service loads oruTemplate.hl7 from its data directory. When absent, a default template is written there. Restart after edits. The default contains MSH, PID, PV1, ORC, OBR, and an ED-type OBX. See Templates for substitution syntax, including #{CurrentDateTime} and #{StudyDateTime}.

Incoming objectOutgoing content
Encapsulated PDF StorageEmbedded document bytes are Base64-encoded into OBX-5
Secondary Capture Image StorageFirst-frame pixel bytes are Base64-encoded into OBX-5, with image metadata in the generated message
Other accepted storage classesTemplate fields are populated from DICOM attributes; no general image-to-report rendering is performed

The Secondary Capture path uses stored pixel-frame bytes. Do not assume the result is a rendered PNG, JPEG, or multi-frame document. Confirm the ED content with the receiver. If attachment extraction fails, the service logs the error and may continue with the basic template message.

Acceptance and delivery ​

A C-STORE success means the service has generated an ORU and written it to the outgoing queue. Downstream HL7 delivery happens separately. It does not mean the receiving application accepted the result, and it is not DICOM Storage Commitment.

The service identifies duplicates by SOP Instance UID. A UID already marked processed or present in the retry queue is acknowledged successfully without another conversion. Retained processed records therefore affect later retransmissions.

Outgoing messages are stored under cache\outgoing\. Delivery failures are persisted in the retry queue and retried without a configured maximum attempt count. Unreadable outgoing files can be moved to cache\error\.

ACK contents are not validated

With WaitForAck: true, the sender reads and logs a response but does not validate MSA-1 or correlate MSA-2. An application rejection can therefore still be logged as a successful send. Verify the received result in the destination application. Use HL7 Conformance to compare acknowledgment behavior across DICOM7 services.

The DICOM listener requires the configured called AE title and uses unencrypted TCP. See DICOM Conformance for accepted presentation contexts, transfer syntaxes, and status behavior.