Appearance
DICOM2ORM
DICOM2ORM polls a remote DICOM Modality Worklist (MWL) server and converts returned items into HL7 ORM^O01 orders. Use it when a system can expose worklist items through DICOM but the receiving application needs HL7 orders.
Example configuration
yaml
Dicom:
ScuAeTitle: DICOM7
ScpHost: worklist.example.org
ScpPort: 104
ScpAeTitle: WORKLIST
Query:
ScheduledStationAeTitle: ''
ScheduledProcedureStepStartDate:
Mode: today
DaysBefore: 1
DaysAfter: 1
Date: ''
Modality: ''
IntervalSeconds: 60
HL7:
SenderName: DICOM7
ReceiverName: RIS
ReceiverFacility: HOSPITAL
ReceiverHost: hl7.example.org
ReceiverPort: 7777
Cache:
Folder: cache
RetentionDays: 2
KeepSentItems: true
Retry:
RetryIntervalMinutes: 1Set all four DICOM connection values explicitly before starting. The example uses a generic worklist endpoint; it is not a preconfigured service.
DICOM and query settings
| Setting | Default / behavior |
|---|---|
Dicom.ScuAeTitle | DICOM7; calling AE title used by the worklist client |
Dicom.ScpHost | Remote MWL host; set explicitly for your installation |
Dicom.ScpPort | Remote MWL port; set explicitly for your installation |
Dicom.ScpAeTitle | Remote called AE title; set explicitly for your installation |
Query.ScheduledStationAeTitle | Empty; an empty value requests all stations |
Query.Modality | Empty; an empty value requests all modalities |
Query.IntervalSeconds | 60; delay after a query cycle, in seconds |
Query.ScheduledProcedureStepStartDate.Mode | today; accepts today, range, or specific, case-insensitively |
Query.ScheduledProcedureStepStartDate.DaysBefore | 1; number of preceding days included in range mode |
Query.ScheduledProcedureStepStartDate.DaysAfter | 1; number of following days included in range mode |
Query.ScheduledProcedureStepStartDate.Date | Empty; in specific mode this value is sent unchanged |
Dates use the service host's local date. In range mode, the generated filter is yyyyMMdd-yyyyMMdd, inclusive as interpreted by the remote MWL server. For a specific date, use the DICOM format, for example Date: '20261030'. An empty Date in specific mode sends an empty date key. An unknown mode falls back to today's date and logs a warning.
The station, date, and modality filters are sent inside Scheduled Procedure Step Sequence (0040,0100). The remote MWL server performs the matching. See DICOM Conformance for requested attributes.
HL7 settings
| Setting | Default / behavior |
|---|---|
HL7.SenderName | DICOM7; sender application substitution in generated messages |
HL7.ReceiverName | RECEIVER_APPLICATION; set the actual receiving application explicitly in the template |
HL7.ReceiverFacility | RECEIVER_FACILITY; set the actual receiving facility explicitly in the template |
HL7.ReceiverHost | localhost; receiving MLLP endpoint |
HL7.ReceiverPort | 7777; receiving MLLP port |
Retry.RetryIntervalMinutes | 1; minimum age of a failed message before a retry sweep picks it up |
The service loads ormTemplate.hl7 from its data directory at startup. If absent, it creates a default HL7 v2.3 ORM^O01 template. Edit the template to agree the field mapping with your receiver, then restart. See Templates for tag placeholders and the special values #{CurrentDateTime}, #{ScheduledDateTime}, and #{ScheduledProcedureStepID}.
Set the intended MSH-3 through MSH-6 explicitly in the template and check the emitted message; do not rely on the receiver configuration values to replace default header placeholders.
The default template includes MSH, PID, PV1, ORC, and OBR. It uses the Study Instance UID as MSH-10, patient data from DICOM patient tags, accession number for the placer order number, and scheduled date/time values for visit and procedure fields. Template substitution is not a general HL7 escaping or mapping engine; check delimiters and populated fields with representative worklist data.
Delivery and duplicates
Only a successfully completed C-FIND query is processed. Each returned Study Instance UID is checked against the local successful-message cache; an existing record suppresses subsequent orders for that UID, including later changes to that worklist item. The worklist must supply a Study Instance UID.
Failed sends are persisted for indefinite retries. Retry sweeps run before each worklist query, so the effective retry frequency also depends on Query.IntervalSeconds and query duration.
A successful send is not strict application acceptance
The sender accepts a response containing AA or ACK; an empty response or ACK read timeout can also be treated as success. It does not correlate MSA-2 with MSH-10. Confirm the order in the receiving application during commissioning and investigate receiver rejections there. This behavior differs from HL72HL7's strict ACK validation.
Cache settings
The example sets Cache.RetentionDays: 2; set retention explicitly for your operating requirements. Successful ORM text is cached by Study Instance UID in the cache root. This send path does not move records into sent according to KeepSentItems. Removing successful records can allow the next poll to send those orders again.
See Configuration, Cache and Retention, and Troubleshooting.