Adapter: DICOM
Send DICOM objects to a PACS or other storage SCP (C-STORE), with C-ECHO to test the connection.
Purpose
Send DICOM images and other objects to a PACS, a VNA or any other storage SCP. A send step is a C-STORE SCU: it sends the object a dicom trigger received (its object reference), or a DICOM Part 10 file given as base64 in data. echo (and Test connection) is a C-ECHO. It is the counterpart of the Mirth DICOM Sender, and the Mirth importer maps that connector to it.
Auth
- DICOM identifies both ends by AE title:
callingAeTitleis MedHook's (defaultMEDHOOK) andcalledAeTitleis the peer's. The peer must know MedHook's AE title, host and port. - An AE title is not authentication: it is a name either side can claim. Many PACS accept an association only from AE titles they know, which catches misconfiguration but does not prove who is calling. To protect the link, use TLS (with a client certificate when the peer asks for one) or keep the peer on a private network or a site-to-site VPN.
- Optional user identity negotiation (a user name, or a user name and passcode) in
credentials, for peers that require it. - DICOM TLS with
tlsEnabled: TLS 1.2 or later, the peer verified against the system CAs or your own CA (tlsCaPem,tlsCaMode), and an optional client certificate for peers that require mutual TLS.
How a send works
- The object is read back from where the trigger stored it (the engine's DICOM store volume, or the trigger's S3 profile). The reference is signed by the engine and names its workspace, the trigger that received the object, and when it expires. A reference that was altered or made up, comes from another workspace, was issued to another trigger than the one that started this run (a webhook body naming
object, say), or is pastDICOM_STORE_RETENTION_DAYS(30 by default; 365 days when retention is 0) is refused and nothing is sent. The object's size and SHA-256 are checked against the reference. - A Deflated object (transfer syntax
1.2.840.10008.1.2.1.99) is inflated by MedHook, at most toDICOM_MAX_OBJECT_BYTES(128 MiB by default), and sent as Explicit VR Little Endian; deflate is lossless. One that inflates past the cap is refused, so a small object cannot expand into gigabytes inside the engine. - One association per send: MedHook proposes the object's SOP class and transfer syntax, sends the C-STORE, and releases the association.
- A success status (
0x0000) or a warning (0xB000to0xBFFF) completes the step; a warning is in the result aswarning. An Out of Resources status (0xA700to0xA7FF), a timeout or a dropped connection is retried by the step's error handling. Any other failure status, a refused association (check both AE titles) or a bad reference fails the step without a retry.
Settings
Auth is no selector; the secret settings below are the credentials. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
host | string | Yes | No | The peer's host name or address. | |
port | number | No | 104 | No | The peer's DICOM port (104, or 11112 above 1024). |
calledAeTitle | string | Yes | No | The peer's AE title. | |
callingAeTitle | string | No | MEDHOOK | No | MedHook's AE title, as the peer knows it. |
timeout | number | No | 30000 | No | Milliseconds for the connection, association and each response. |
credentials | object | No | User identity negotiation (PS3.7 D.3.3.7), for peers that require a user name and passcode. | ||
credentials.username | string | No | No | ||
credentials.password | string | No | Yes | ||
tlsEnabled | boolean | No | false | No | Connect over TLS (DICOM TLS, PS3.15 B.1). |
tlsCaPem | string | No | Yes | PEM CA certificate(s) to verify the server against. See tlsCaMode. | |
tlsCaMode | enum: replace, add | No | No | Trust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem. | |
tlsClientCertPem | string | No | Yes | PEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem. | |
tlsClientKeyPem | string | No | Yes | PEM private key for the client certificate (encrypted at rest). | |
tlsMinVersion | enum: TLSv1.2, TLSv1.3 | No | No | Lowest TLS version to accept (default TLSv1.2). |
Actions
A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
send | C-STORE one object: the dicom trigger's object reference, or Part 10 bytes as base64. | object?, data? | object, data |
echo | C-ECHO the peer (verification). | None | None |
Minimal example
The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.
{
"name": "DICOM (example)",
"adapterType": "dicom",
"config": {
"host": "example-host",
"calledAeTitle": "PACS"
}
}Limits
- C-STORE and C-ECHO only: no query/retrieve (C-FIND, C-MOVE, C-GET), worklist or storage commitment.
- The object is sent in the transfer syntax it was received in (a Deflated one as Explicit VR Little Endian); MedHook does not otherwise transcode. A peer that does not accept that transfer syntax refuses the presentation context.
- TLS is optional, as in Mirth: with
tlsEnabledoff, objects (images and patient data) cross the network in clear text, so saving, validating or testing such a profile returns a warning. Use TLS, or keep the peer on a private network or a site-to-site VPN. - PKCS#12 client bundles are not supported here; use the PEM certificate and key.
- The host must pass the SSRF rules: a private or loopback address needs an entry in
SSRF_ALLOWLIST(see Environment variables). The connection always goes to the address that was checked, so a second DNS answer cannot redirect it. With TLS the certificate is still verified against the host name inhost, which is also sent as SNI. - Errors name the DIMSE status and fixed text, never the object's content.