Skip to main content
The HL7 Receiver accepts ADT (Admit, Discharge, Transfer) messages over an MLLP (Minimum Lower Layer Protocol) TCP connection. The service listens for inbound HL7 v2.4 messages, processes them, and returns an acknowledgment on the same connection.

Connection

MLLP {{host}}:{{port}}

Authentication

CredentialTypeRequiredDescription
Network AccessIPYesAuthorised network access.

Message format

The message must be framed using the MLLP protocol. The receiver also accepts messages with missing start or end blocks.
ComponentRequiredDescription
Start BlockNoMLLP start-of-message marker. Recommended for standard compliance.
HL7 ContentYesA valid HL7 v2.4 message with pipe-delimited segments.
End BlockNoMLLP end-of-message marker. Recommended for standard compliance.

Message segments

The receiver processes the following HL7 segments from each inbound message.
SegmentDescription
Message HeaderIdentifies sending and receiving applications, message type, and version.
EventDescribes the event (e.g. admission, discharge).
Patient IdentityPatient demographics: name, DOB, gender, address.
Patient VisitVisit details: location, attending doctor, admission/discharge times.
Visit AdditionalSupplementary visit information (e.g. expected discharge date).
Next of KinEmergency contacts and relationship to patient.
InsuranceInsurance plan and policy information.

Response

The receiver returns an HL7 acknowledgment (ACK) over the same TCP connection. The ACK always indicates acceptance to avoid retry loops from the sending system.
MSH|...|ACK|{Control ID}|P|2.4
MSA|AA|{Control ID}
The receiver always returns an accept acknowledgment. Processing failures are tracked internally and do not produce a negative ACK to the sender.

Error handling

ConditionAcknowledgment SentInternal Status
Message processed successfullyAcceptProcessed
Invalid or missing clinic serviceAcceptClinic Rejected
Invalid patient identifier formatAcceptPartial
Malformed or unparseable messageAcceptFailed
Message decode failureAcceptFailed
Empty or zero-length messageAcceptHealth Check
For authentication credentials and access setup, contact the medWrite team.

Next steps

HL7 Phases

ADT event types: A01, A02, A03, A04, A08, A11–A13.

Get Approved Outputs

Retrieve approved letters via API.