Skip to content

ORM2DICOM ​

ORM2DICOM receives HL7 ORM messages over MLLP, stores them as active orders, and exposes the converted data through a DICOM Modality Worklist SCP.

Example configuration ​

yaml
Dicom:
  AETitle: DICOM7
  ListenPort: 11112
HL7:
  ListenIP: 0.0.0.0
  ListenPort: 7777
  MaxORMsPerPatient: 5
Cache:
  Folder: cache
  RetentionDays: 3
  KeepSentItems: true
  AutoCleanup: true
  CleanupIntervalMinutes: 60
Order:
  ExpiryHours: 72

Settings ​

SettingDefault / behavior
Dicom.AETitleDICOM7; required called AE title for the MWL service
Dicom.ListenPort11112; DICOM MWL listener port
HL7.ListenIP0.0.0.0; HL7 bind address, all IPv4 interfaces by default
HL7.ListenPort7777; inbound MLLP port
HL7.MaxORMsPerPatient5; retained configuration field, not an enforced per-patient limit
HL7.SenderNameDICOM7; inherited configuration value; ACK addressing is derived from the incoming MSH
HL7.ReceiverNameRECEIVER_APPLICATION; inherited value; not a receiving-application allowlist
HL7.ReceiverFacilityRECEIVER_FACILITY; inherited value; not a receiving-facility allowlist
Cache.Foldercache beneath the service data directory when omitted
Cache.RetentionDays3; shared cache retention setting; active-order expiry is controlled separately
Cache.KeepSentItemstrue; shared setting, not the active worklist lifecycle control
Cache.AutoCleanuptrue; enable periodic expired-order removal
Cache.CleanupIntervalMinutes60; interval between expired-order sweeps; use a positive value
Order.ExpiryHours72; expire active records based on file last-modified time; values below 1 disable expiry

The inherited HL7 addressing fields are normally unnecessary for this receiving service. Do not use them as security controls.

Receiving orders ​

The listener accepts message types beginning with ORM. Messages are written under cache\active\ and acknowledged with AA once they convert to a worklist entry. A failure to write the file is logged but does not change the acknowledgement. Non-ORM types are rejected with AR; messages that cannot be parsed or converted return AE. See HL7 Conformance for framing and field behavior.

The complete message text determines the stored identity. Resending identical text refreshes the existing file's last-modified time. Changed text produces another active record; MSH-10 or the placer order number is not an update key.

Order changes and cancellation

Do not assume a replacement or cancellation ORM removes an earlier worklist item. ORC control/status values do not implement an order update/cancellation lifecycle. Arrange an expiry and reconciliation workflow with the sending system before using a live feed.

Expired records are removed at startup even when periodic cleanup is disabled. During operation, periodic expiry runs only when Cache.AutoCleanup is enabled. An order can remain visible until the next sweep. Repeated identical messages extend its lifetime.

Worklist mapping ​

The first MSH and PID are required for conversion; the first PV1, ORC, and OBR supply optional fields. Multiple order groups do not generate multiple worklist datasets from one message.

HL7 sourceDICOM output
PID-3Patient ID (0010,0020)
PID-5Patient Name (0010,0010)
PID-7Patient Birth Date (0010,0030)
PID-8Patient Sex (0010,0040)
PID-11Patient Address (0010,1040)
PV1-8Referring Physician's Name (0008,0090)
PV1-3.4Institution Name (0008,0080)
PV1-7Scheduled Performing Physician's Name (0040,0006) inside SPS
ORC-2.1Accession Number (0008,0050)
ORC-12Requesting Physician (0032,1032)
OBR-7, first eight charactersScheduled Procedure Step Start Date (0040,0002) inside SPS
OBR-4Scheduled Procedure Step Description (0040,0007) inside SPS

SPS means Scheduled Procedure Step Sequence (0040,0100). Names are converted to DICOM person-name component order, and bounded text values may be truncated. The conversion does not populate a modality, scheduled station AE, Study Instance UID, or scheduled start time. Check the needs of each consuming modality before commissioning.

Query matching limits ​

The MWL service returns one pending response per matching active order, followed by success. It compares nonempty top-level query attributes that are present in the generated dataset. Sequence matching is not performed: filters inside SPS, including date, station AE, and modality, do not restrict results. A query attribute absent from the generated dataset does not exclude that item.

Top-level exact matching is case-sensitive. * matches any value; other values containing * use a simple substring comparison after removing all asterisks. Date ranges, ? wildcards, and full DICOM wildcard semantics are not implemented.

See DICOM Conformance before relying on query filtering.