Appearance
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: 1Settings
| Setting | Default / behavior |
|---|---|
Dicom.AETitle | DICOM7; called AE title required on incoming associations |
Dicom.ListenPort | 104; DICOM listener port |
HL7.SenderName | DICOM7; retained setting; set MSH-3 in the template |
HL7.ReceiverName | RECEIVER_APPLICATION; retained setting; set MSH-5 in the template |
HL7.ReceiverFacility | RECEIVER_FACILITY; retained setting; set MSH-6 in the template |
HL7.ReceiverHost | localhost; outbound MLLP host |
HL7.ReceiverPort | 7777; outbound MLLP port |
HL7.WaitForAck | true; read a response after sending. Set false only when the receiver intentionally supplies no ACK. |
Cache.Folder | cache beneath the service data directory when omitted |
Cache.RetentionDays | 3 when omitted; the example explicitly uses 7 days |
Cache.KeepSentItems | true; retain processed ORU records |
Retry.RetryIntervalMinutes | 1; 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 object | Outgoing content |
|---|---|
| Encapsulated PDF Storage | Embedded document bytes are Base64-encoded into OBX-5 |
| Secondary Capture Image Storage | First-frame pixel bytes are Base64-encoded into OBX-5, with image metadata in the generated message |
| Other accepted storage classes | Template 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.