Send, receive, and route DICOM imaging
Receive stored DICOM objects with C-STORE SCP and send them to a PACS with C-STORE SCU. Verify connections with C-ECHO or send through DICOMweb STOW-RS. Write Structured Report mappings to HL7 v2 in Python.
The scope covers headers and Structured Reports only. It excludes pixel data and numpy.
DICOM transports and delivery
DIMSE and DICOMweb connections use the engine’s staged pipeline, retries, and audit records.
C-STORE SCP — receive
A pynetdicom Application Entity accepts stored objects. It returns C-STORE Success only after committing the object to durable storage.
C-STORE SCU — send
Forward an object to a downstream PACS over a C-STORE association. The blocking association runs outside the event loop, so a slow peer does not stall the engine.
C-ECHO — verify
The SCP accepts Verification requests. For an outbound destination, Test Connection sends a C-ECHO to check connectivity.
DICOMweb STOW-RS — send over HTTP
Store or send to {base}/studies as multipart/related. The REST connection verifies TLS, blocks redirects, and checks outbound destinations against an allowlist.
SR / header → HL7 v2
Map a Structured Report or header to HL7 v2 fields such as ORU/OBX or PID/OBR in a Python Handler. Keep the mapping in version control and unit-test it.
DICOM-over-TLS
Both server and client support Transport Layer Security (TLS), with optional mutual TLS. Startup rejects a non-loopback cleartext listener unless you explicitly override that check.
Imaging features outside the scope
MessageFoundry routes and transforms imaging metadata. It does not process pixels or replace an image archive.
Use a PACS or vendor-neutral archive for query/retrieve, worklists, and pixel rendering.
- Serving a Modality Worklist (MWL) or Modality Performed Procedure Step (MPPS) is out of scope.
- Query/Retrieve operations C-FIND, C-MOVE, and C-GET are not provided.
- DICOMweb supports store/send only. QIDO-RS and WADO-RS query/retrieve operations are not provided.
- An inbound STOW-RS receiver needs the inbound HTTP listener, which is on the backlog.
- Processing covers headers and Structured Reports only, with no pixel data or
numpy. This excludes the decompression-bomb attack surface.
Stored delivery and access controls for imaging
Commit before success
The SCP stores the raw object before returning Success. If it crashes before committing, the sender retries. Delivery is at-least-once; storing again uses SOPInstanceUID to avoid duplicates.
Retry temporary failures
The engine retries temporary failures, such as resource shortages or transport errors, with backoff. Permanent failures include rejected contexts, unencodable datasets, and authorization refusals. These go to dead letters so a bad object does not block later deliveries.
Protect stored and logged data
The engine treats DICOM objects as protected health information: it encrypts stored objects and checks outbound destinations against an allowlist. It never logs objects at INFO or above. Logs and errors contain routing identifiers (SOP/AE/peer), without datasets or pixel data.
DIMSE destinations require an entry in [egress].allowed_tcp; DICOMweb destinations require one in [egress].allowed_http. The engine checks both allowlists at load, reload, and startup.
DICOM vs. Mirth & Corepoint
Compare DICOM transports, mapping tools, and DICOMweb support below.
| Capability | Mirth | Corepoint "DICOM Gear" | MessageFoundry |
|---|---|---|---|
| C-STORE SCP (receive) | Yes | Yes | Yes |
| C-STORE SCU (send) | Yes | Yes | Yes |
| C-ECHO | Yes | Yes | Yes |
| SR / header → HL7 v2 transform | Transport only | Yes — GUI mapper | Yes — code-first Handler |
| DICOMweb STOW-RS send | No | No | Yes |
| MWL / Query-Retrieve / pixel data | No | Partial | No — out of scope |
Connector tests use pynetdicom loopback connections; DICOMweb framing tests use mocked HTTP. Testing has not yet covered a specific vendor PACS. Before cutover, validate real feeds against your partner’s SOP classes, transfer syntaxes, and AE titles.
Route imaging like any other interface
Configure a DICOM source or destination alongside MLLP and REST connections. Test the interface before deployment.
Frequently asked questions
Does MessageFoundry support DICOM?
Yes. It receives with C-STORE SCP, sends with C-STORE SCU over DIMSE, and supports C-ECHO. It also sends through DICOMweb STOW-RS over HTTP. HL7 v2 and FHIR run in the same engine.
Can MessageFoundry route imaging alongside HL7?
Yes. One Python configuration can route HL7 v2, FHIR, and DICOM. They share the engine’s stored delivery, retries, and patient-data controls.
How does MessageFoundry map imaging data to HL7 v2?
Write Structured Report mappings to HL7 v2 in Python. Keep them in version control, review changes, and test them with the other interface code.