Skip to content
Reference

Adapter: DICOM

Send DICOM objects to a PACS or other storage SCP (C-STORE), with C-ECHO to test the connection.

On this page

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: callingAeTitle is MedHook's (default MEDHOOK) and calledAeTitle is 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

  1. 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 past DICOM_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.
  2. A Deflated object (transfer syntax 1.2.840.10008.1.2.1.99) is inflated by MedHook, at most to DICOM_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.
  3. One association per send: MedHook proposes the object's SOP class and transfer syntax, sends the C-STORE, and releases the association.
  4. A success status (0x0000) or a warning (0xB000 to 0xBFFF) completes the step; a warning is in the result as warning. An Out of Resources status (0xA700 to 0xA7FF), 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.

SettingTypeRequiredDefaultSecretDescription
hoststringYesNoThe peer's host name or address.
portnumberNo104NoThe peer's DICOM port (104, or 11112 above 1024).
calledAeTitlestringYesNoThe peer's AE title.
callingAeTitlestringNoMEDHOOKNoMedHook's AE title, as the peer knows it.
timeoutnumberNo30000NoMilliseconds for the connection, association and each response.
credentialsobjectNoUser identity negotiation (PS3.7 D.3.3.7), for peers that require a user name and passcode.
credentials.usernamestringNoNo
credentials.passwordstringNoYes
tlsEnabledbooleanNofalseNoConnect over TLS (DICOM TLS, PS3.15 B.1).
tlsCaPemstringNoYesPEM CA certificate(s) to verify the server against. See tlsCaMode.
tlsCaModeenum: replace, addNoNoTrust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem.
tlsClientCertPemstringNoYesPEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem.
tlsClientKeyPemstringNoYesPEM private key for the client certificate (encrypted at rest).
tlsMinVersionenum: TLSv1.2, TLSv1.3NoNoLowest 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.

ActionWhat it doesStep parametersKeys a message may supply
sendC-STORE one object: the dicom trigger's object reference, or Part 10 bytes as base64.object?, data?object, data
echoC-ECHO the peer (verification).NoneNone

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.

json
{
  "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 tlsEnabled off, 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 in host, which is also sent as SNI.
  • Errors name the DIMSE status and fixed text, never the object's content.

Reference