Skip to main content

ADT Integration

Under construction — coming soon

The ADT integration is still under construction and will be released soon.

Please check the release roadmap for the latest release plans and updates.

ADT stands for Admission, Discharge, and Transfer. The Corsano ADT integration receives patient lifecycle events from your hospital information system or electronic health record (EHR), keeping patient accounts and department assignments in Corsano aligned with your hospital workflow.

Your system sends HL7 v2 messages to Corsano, and Corsano returns an acknowledgement after processing each message.

For the underlying messaging standard, see the official HL7 Version 2 documentation.

How to connect​

Contact Corsano developer support to arrange the receiver hostname, TCP port, network access, and the mapping of your hospital's department identifiers to Corsano departments.

SettingValue
ProtocolHL7 v2.5 or v2.5.1 over MLLP (Minimal Lower Layer Protocol), using TCP
Connection directionYour hospital system or interface engine connects to the Corsano receiver
EndpointDeployment-specific hostname and port supplied by Corsano
AuthenticationCorsano API key in MSH-8 on every message
ResponseOne MLLP-framed application ACK per processable message
Default maximum message size1 MiB (1,048,576 bytes), configurable per deployment

The current receiver uses plain TCP and does not terminate TLS itself. Arrange protected network connectivity with Corsano before sending credentials or patient data.

Configure your sender​

  1. Configure an outbound MLLP connection to the hostname and port supplied by Corsano.

  2. Use standard HL7 delimiters: | for fields and ^~\& for encoding characters.

  3. Separate segments with a carriage return (CR, byte 0x0D), not a newline.

  4. Frame each message with a leading VT byte (0x0B) and trailing FS CR bytes (0x1C 0x0D):

    <VT>MSH|...<CR>PID|...<CR>PV1|...<CR><FS><CR>

    These labels represent control bytes, not literal text.

  5. Wait for the application ACK before sending the next message. Multiple messages may use the same connection; the current receiver processes one connection at a time. Reconnect if an idle connection is closed.

Authentication and authorization​

Use the account owner's Corsano API key, available from the settings page as described in Using researcher API Key. The owner must have an active API-enabled subscription and permission to access the relevant patients and departments.

Place the raw key in the HL7 Security field (MSH-8) on every message. Do not add a Bearer prefix to this field. No separate login message, JWT, or owner UUID is required from your sender.

For example, the header below places YOUR_API_KEY between the message timestamp (MSH-7) and message type (MSH-9):

MSH|^~\&|HOSPITAL|FACILITY|CORSANO|USERS_API|20261123120000+0100|YOUR_API_KEY|ADT^A01^ADT_A01|adt-example-001|T|2.5.1||||||UNICODE UTF-8

For every supported, valid message, Corsano:

  1. Validates the key and resolves its current owner through the Integration API.
  2. Checks the owner's active API-enabled subscription.
  3. Performs patient and department operations using that owner's permissions.

Authentication is checked again for each message, including messages sent over an existing connection. Removed or rotated keys are rechecked on the next message. A valid key does not grant access to patients or departments outside the owner's permissions.

Supported messages​

The following ADT events are currently supported:

EventMSH-9Behavior in Corsano
A01 — Admit patientADT^A01^ADT_A01Creates a patient account if no patient mapping exists, or reuses the existing account. Assigns the patient to the supplied department, updates supplied demographics, and establishes or verifies the health profile's external patient identifier.
A02 — Transfer patientADT^A02^ADT_A02Moves an existing, assigned patient to the supplied destination department. Preserves bracelet pairing. A transfer to the current department is rejected as a processing error.
A03 — Discharge patientADT^A03^ADT_A03Removes the patient's current department assignment and membership, releases the bracelet, and retains the patient account and discharge history.
A08 — Update patient informationADT^A08^ADT_A01Updates supplied first name, last name, and country for an existing patient. Does not create a patient or change department assignment or bracelet pairing.
A13 — Cancel dischargeADT^A13^ADT_A01Restores an existing patient's assignment to the department supplied in the message, subject to ownership and discharge-history checks. Does not re-pair the bracelet.

Other events, including A11, A12, and A45, and non-ADT messages are not currently supported and receive an AR acknowledgement when the header can be read.

Required fields and patient matching​

FieldRequirement
MSH-7 — Message timestampUse YYYYMMDDHHMMSS with a UTC offset, for example 20261123120000+0100. Timestamps without an offset require an agreed timezone configured on the receiver.
MSH-8 — SecurityThe API key described above.
MSH-9 — Message typeOne of the supported message types above.
MSH-10 — Message control IDA correlation identifier of 1–199 letters, digits, underscores, periods, or hyphens. Returned in the ACK's MSA-2.
MSH-11 — Processing IDP, T, or D. This field does not select an environment; use the agreed test endpoint and test credentials for testing.
MSH-12 — Version2.5 or 2.5.1.
MSH-18 — Character setUNICODE UTF-8, ASCII (also the default when omitted), or ISO-8859-15 (ISO-8859-15 or 8859/15).
PID-3 — Patient identifier listExactly one identifier must have assigning authority PK and identifier type PK: PATIENT-001^^^PK^PK. This is the external patient identifier used for matching within the owner's scope.
PV1-3.1 — Assigned patient locationYour mapped department's external identifier. Required for A01, A02, and A13. For A02, supply the destination department here.

Each message must contain exactly one MSH and one PID segment, and at most one PV1 segment. A03 and A08 do not require PV1. A02, A03, A08, and A13 require an existing patient mapping.

For A01 and A08, the currently applied demographic fields are PID-5.1 (last name), PID-5.2 (first name), and PID-11.6 (country). Only the first name and address repetitions are used. Empty fields leave existing values unchanged; explicit HL7 null values ("") are not supported for mapped fields. PID-13 contact email is not used as an account email.

Example admission message​

This example uses synthetic patient data. Replace the API key, patient identifier, department identifier, and timestamp with values for your agreed test environment. Displayed line breaks must be sent as CR bytes, and the message must be wrapped in the MLLP frame described above.

MSH|^~\&|HOSPITAL|FACILITY|CORSANO|USERS_API|20261123120000+0100|YOUR_API_KEY|ADT^A01^ADT_A01|adt-example-001|T|2.5.1||||||UNICODE UTF-8
PID|1||PATIENT-001^^^PK^PK||Example^Alice
PV1|1|I|WARD-01

Acknowledgements​

Corsano uses application acknowledgements. Leave MSH-15 and MSH-16 empty, or use NE and AL respectively. Enhanced acknowledgement modes are not supported.

MSA-1Meaning
AA — Application acceptAll required processing steps completed successfully.
AR — Application rejectUnsupported event, invalid message, or denied authentication.
AE — Application errorProcessing failed or a required dependency was unavailable.

The ACK's MSA-2 contains your original MSH-10, allowing your sender to correlate the response. For the example admission, a successful ACK includes:

MSA|AA|adt-example-001|Message accepted

Malformed framing or an unreadable header can close the connection without an ACK. The receiver does not provide message deduplication, automatic retries, or rollback of partially completed operations. After an AE or a lost ACK, reconcile the patient's state with Corsano before replaying the message; a failed or missing ACK does not guarantee that no changes were made.