Laboratory IntegrationGuide
HL7 v2 / MLLP gateway
Implemented HL7 v2 order and result messaging over MLLP through a standalone gateway: framing, ACK semantics and limits.
Status
Limitation
Status today: this interface is implemented in source and exercised only in isolated local tests. Its runtime is disabled, no laboratory installation is approved, and no vendor or product version is certified. It cannot carry Sandbox or Production orders until the release-readiness process in Installation validation & go-live is complete.
Messages
- Supported HL7 versions in profiles: 2.3, 2.3.1, 2.4, 2.5, 2.5.1. The message's MSH version must match the profile exactly.
- Orders: ORM^O01 or OML^O21 with MSH, PID, ORC and OBR segments. An orderable without an approved code mapping is refused before serialization.
- Results: ORU with OBR and OBX. OBR-25 result status must map through the profile to preliminary, final, corrected or amended; unmapped statuses are refused.
- MSH-10 message control ID is required and validated; it is the idempotency key for inbound results.
Framing and transport
- Standard MLLP framing (start block, end block, carriage return) with a bounded maximum frame size; oversized or control-character payloads are refused.
- The gateway is a separate service with no public listener. It connects outbound to the laboratory's MLLP endpoint and accepts only signed, scoped work.
Acknowledgement semantics
- AA (application accept) is the only final acceptance.
- CA (commit accept) is transport-level only. CA without a subsequent AA is recorded as committed but unconfirmed — never as accepted.
- AE, AR, CE and CR are terminal. ACKs for the wrong message control ID, or malformed ACKs, are terminal.
- Once any frame bytes have been written to a socket, the message is never resent automatically; a lost connection after that point is an ambiguous outcome for reconciliation.
Important
A transport ACK means the laboratory system received the message. It is not accessioning, specimen acceptance or clinical acceptance; those arrive as separate lifecycle events.