Skip to content

ORU2DICOM ​

ORU2DICOM receives HL7 ORU results and sends generated DICOM objects to a storage SCP. Each converted message produces a Basic Text SR; a recognized Base64 PDF attachment adds an Encapsulated PDF object in a separate series of the same study.

Example configuration ​

yaml
HL7:
  ListenIP: 0.0.0.0
  ListenPort: 7777
  SenderName: DICOM7
  ReceiverName: RECEIVER_APPLICATION
  ReceiverFacility: RECEIVER_FACILITY
  DeferredAckCode: AA
Dicom:
  DestinationHost: pacs.example.org
  DestinationPort: 104
  DestinationAeTitle: PACS
  SourceAeTitle: ORU2DICOM
  DefaultStudyDescription: 'HL7 ORU Result'
  UseTls: false
Cache:
  Folder: cache
  RetentionDays: 3
  KeepSentItems: true
  AutoCleanup: true
  CleanupIntervalMinutes: 60
  PersistDicomFiles: true
Retry:
  RetryIntervalMinutes: 2
  MaxAttempts: 10

HL7 settings ​

SettingDefault / behavior
HL7.ListenIP0.0.0.0; bind on all IPv4 interfaces
HL7.ListenPort7777; inbound MLLP port
HL7.SenderNameDICOM7; retained setting; does not override ACK addressing
HL7.ReceiverNameRECEIVER_APPLICATION; retained setting; does not override ACK addressing
HL7.ReceiverFacilityRECEIVER_FACILITY; retained setting; does not override ACK addressing
HL7.DeferredAckCodeAA; ACK code when local conversion succeeds but DICOM delivery is deferred

ACK addressing normally swaps the sending and receiving entities from the incoming MSH. These settings are not inbound application/facility access controls.

DICOM settings ​

SettingDefault / behavior
Dicom.DestinationHostlocalhost; remote storage SCP host
Dicom.DestinationPort104; remote DICOM port
Dicom.DestinationAeTitlePACS; called AE title
Dicom.SourceAeTitleORU2DICOM; calling AE title
Dicom.DefaultStudyDescriptionHL7 ORU Result; fallback when the ORU supplies no description
Dicom.UseTlsfalse; enable TLS for the outbound association when supported by the destination and installation

The inherited Dicom.AETitle and Dicom.ListenPort values do not create a DICOM listener for this service. Use SourceAeTitle for its calling AE.

Cache and retry settings ​

SettingDefault / behavior
Cache.Foldercache beneath the service data directory when omitted
Cache.RetentionDays3; artifact retention
Cache.KeepSentItemstrue; retain successfully processed message artifacts
Cache.AutoCleanuptrue; retained setting; periodic cleanup is not implemented
Cache.CleanupIntervalMinutes60; retained setting; no periodic cleanup timer uses it
Cache.PersistDicomFilestrue; retain generated DICOM files after successful delivery when sent artifacts are kept
Retry.RetryIntervalMinutes2; delay between sweeps and minimum pending-message age, with a minimum of one minute
Retry.MaxAttempts10; limit tracked retry attempts before archiving to error; 0 or a negative value permits indefinite retries

Retention cleanup runs at startup, not periodically. It can remove old incoming messages and generated outgoing DICOM files, including those of items still waiting for a retry; the retry rebuilds them from its .pending file. See Cache and Retention before changing retention.

Messages are saved locally before conversion/delivery. Transport failures or a non-success C-STORE response defer delivery. Conversion failures are archived to error. Review both pending messages and error artifacts; an upstream AA does not clear a downstream delivery problem.

Deferred acknowledgments

By default, a queued delivery failure returns AA to the sender. This means DICOM7 has accepted responsibility for retrying; it does not mean the PACS has stored the report. Agree any change to DeferredAckCode with the sending application so upstream retries do not cause uncontrolled duplicates.

Conversion ​

The first PID, PV1, ORC, and OBR supply patient, visit, and procedure data; OBX segments supply the observation summary and optional PDF. Basic Text SR uses modality SR; Encapsulated PDF uses modality OT. See HL7 Conformance and DICOM Conformance for mapping details.

PDF extraction recognizes an ED-valued OBX with a PDF type/subtype indicator, Base64 encoding in OBX-5.4, and data in OBX-5.5. The first recognized decodable nonempty PDF is used. The service does not concatenate multiple PDFs or turn referenced filesystem PDFs into attachments.

Duplicate suppression uses the message's local identity, derived from MSH-10 where available and otherwise from the message content. A processed message with the same identity is acknowledged without another send. Use unique message control IDs for distinct results and corrections.

The generated series and instance UIDs are stable for the same local message identity. Study UID selection considers OBR-3.1, OBR-2.1, then MSH-10 after removing characters other than digits and dots; otherwise it generates a stable UID. This can differ from the accession identifier as displayed in the sending system. Verify study grouping with real representative identifiers before production use.

A retry can resend a previously delivered SR when the additional PDF failed. The destination must handle repeated SOP Instance UIDs appropriately. There is no DICOM Storage Commitment transaction.