HL7 integration
HL7 v2.5.1 message types, MLLP vs HTTP, security, and how data maps into Xenrad.
Xenrad accepts HL7 v2.5.1 messages to update patient and clinical data for a site. The same data is also available over FHIR after it is stored. Choose transport based on your facility’s capabilities:
- MLLP — long-lived TCP from your engine to a listening port; no HTTP headers.
- HTTP —
POSTa raw HL7 message to the HL7 HTTP host with anX-API-Keyheader.
Standard
- Version: v2.5.1 for MLLP and for
POST /v2/ingest - Character encoding — follow your engine’s default; the parser expects standard HL7 segment terminators and MLLP framing when using MLLP.
Message types and triggers (supported)
| Message | Trigger | Purpose (typical) |
|---|---|---|
| ADT^A01 | Admit or similar | Create/update patient visit context; map ADT to demographics. |
| ADT^A04 | Register / outpatient registration | Update demographics. |
| ADT^A08 | Update patient information | Update demographics. |
| ADT^A40 | Merge patient | Merge behavior: handled by the service to align identifiers for the site. |
| ORU^R01 | Observation result | Inbound observations and related content mapped into patient observations. |
Other message types are rejected with a processing error.
Transport A — MLLP (TCP)
MLLP listener — connect your interface engine to hl7.integrations.xenrad.io:3000 (TCP, not HTTPS). DNS and reachability checks are on Endpoints reference.
Framing: messages are wrapped in MLLP block bytes (start of block, end of block) as is conventional for v2.
Security model (no API key on the wire):
- The sender must be listed on an integration client with protocol
hl7-mllpin its protocols list. - The remote IP of the connection must pass allowed IPs (single IP, CIDR, or
*if your policy allows "any source"). - Optional MSH filters: if the client has HL7 sender application and/or HL7 sender facility set, the inbound
MSH-3andMSH-4must match. Leave both empty on the key to skip that check.
A successful process returns an ACK frame with an AA accept; on validation or mapping failure you should see AE with a diagnostic in the MSA segment text.
When to use MLLP: your hospital interface engine already speaks v2 MLLP to downstream systems; you add a new route to Xenrad’s listener.
Transport B — HTTP
Request:
HL7 HTTP host — https://hl7.integrations.xenrad.io (POST https://hl7.integrations.xenrad.io/v2/ingest, POST https://hl7.integrations.xenrad.io/v3/ingest). See also Endpoints reference for MLLP and DICOM TCP endpoints.
POST /v2/ingeston the HL7 HTTP host.- Header:
X-API-Key: <api_key> - Body: raw HL7 v2.5.1 message as text (pipe-delimited segments with standard
\rterminators—the same payload you would place inside MLLP, without MLLP wrapper bytes).
On success the service returns JSON with success: true, the detected message_type, and a rendered ACK string in ack.
For HL7 v3 XML payloads, use POST /v3/ingest on the same host with Content-Type: application/xml.
Interactive reference: /api/documentation on the HL7 host (OpenAPI at /api/documentation/openapi.json).
When to use HTTP: you already centralize on HTTPS, mutual TLS, or API gateways, or your cloud bridge prefers REST-style posting.
Field mapping (conceptual, ADT / PID)
The service reads PID to resolve patient and demographics for the site carried by the authorized client (MLLP) or API key (HTTP):
- Identifier from
PID-3(first component / CX parsing as implemented). - Name from
PID-5components. - Date of birth from
PID-7(yyyyMMddpattern). - Gender and address and phone from common PID fields (standard positions).
For exact segment requirements when troubleshooting, compare your outbound message to a known-good sample in your test environment. If PID is missing required identifiers, the service responds with a clear error.
ORU^R01
Observation messages are ingested to patient-linked observation content for the same site. Use ORU for structured results your deployment maps; unsupported OBX or missing patient keys surface as errors in ACK/HTTP response.
Relationship to FHIR and the web app
- FHIR can read the updated Patient and other resources on the FHIR host.
- The worklist and viewer are driven by DICOM; HL7 does not by itself import images. Use imaging pipelines for DICOM; use HL7 for patient/clinical data.
Operational checklist
- Integration client with protocols including
hl7-mllpand correct allowed IPs (MLLP), or an active site API key for HTTP. - MSH sending app/facility match your registration if you set them.
- For HTTP,
X-API-Keyis active and belongs to the target site.
Related
- FHIR — read back persisted data.
- MPPS — modality procedure-step sessions.
- API keys — creating and revoking keys.
- Endpoints reference — MLLP and HTTP hosts.