Skip to content
HealthTech.Development

HL7 v2 Integration

HL7 Integration Services

HL7 integration services design, build and operate message interfaces based on HL7 version 2, the pipe-delimited standard that most hospitals still use to send admissions, orders, results and scheduling events between systems. We build the listeners, transformations and monitoring around those messages so your product can consume them reliably, and optionally translate them into FHIR.

HL7 v2 is old, but it is not going away. Lab systems, radiology, ADT feeds and billing continue to depend on it because it is already wired into hospital operations. A modern product usually has to speak it.

The tricky part is that v2 is a loose standard. Two senders can both be correct and still produce messages that need different handling. We treat each interface as a contract with a specific sender and test it against that sender's actual samples.

  • ADT, ORM, ORU, SIU
  • MLLP and secure transport
  • Interface engine builds
  • v2 to FHIR mapping

01

Why HL7 v2 interfaces go wrong in production

The standard defines segments and fields, but sites customize them. A PID-3 patient identifier list may carry several identifiers with different assigning authorities. A PV1-3 location may mean different things at different hospitals. Z-segments appear where local needs were not covered.

Failures are also operational. A silent queue backup, a stuck connection or an unacknowledged message can go unnoticed for hours unless someone is watching.

  • Z-segments and local field use make "standard" messages differ by sender.
  • Message ordering and duplicates: updates, merges and cancels can arrive out of sequence.
  • Character encoding, escape sequences and long free-text OBX values break naive parsers.
  • Acknowledgment handling: a wrong ACK or NACK policy can lose or duplicate data.

02

HL7 v2 interface work we take on

ADT feeds

Admit, discharge and transfer events such as ADT^A01 (admit), A03 (discharge), A04 (register), A08 (update patient information) and A40 (merge patient). We handle merges, cancellations such as A11 and A13, and out-of-order delivery.

Orders and results

ORM and OML order messages and ORU^R01 observation results. We parse OBR order headers and OBX result segments, handle value types such as numeric, coded and free text, and preserve units, reference ranges and result status.

Scheduling and documents

SIU scheduling messages for appointments and MDM document notifications for transcribed or scanned notes, mapped into your product's appointment and document models.

Interface specification and testing

A written interface spec per sender, a library of sanitized sample messages, and automated tests that replay them through the transformation. See also our EHR/EMR integration services.

v2 to FHIR translation

Mappings from v2 segments to FHIR R4 resources, for example PID to Patient, PV1 to Encounter, OBX to Observation. We build on the HL7 v2-to-FHIR implementation guide as a starting point and adapt to local usage. See FHIR integration services.

03

Architecture for an HL7 v2 interface layer

A typical inbound path: the sender connects to your listener, usually over MLLP (the Minimal Lower Layer Protocol, which wraps each message in start and end block characters) inside a VPN or over a TLS-wrapped channel. The listener persists the raw message, returns an ACK, and hands the message to a queue. A transformation step then parses MSH, PID, PV1 and the rest, maps them, and writes to your store.

MLLP itself provides no encryption or authentication. That is why site-to-site VPN, mutual TLS tunnels or a TLS-enabled listener are standard practice, and why we do not recommend exposing a plain MLLP port to the internet.

  • Engine or custom: Mirth/NextGen Connect, Rhapsody, Iguana and similar tools give you channels, routing, retry and monitoring. A small number of feeds may be fine with a library such as HAPI HL7v2 and custom code.
  • Header handling: MSH-9 message type and trigger event, MSH-10 control ID for idempotency, MSH-7 timestamp and MSH-12 version drive routing and dedup.
  • ACK policy: application accept (AA) only after durable persistence; application error (AE) or reject (AR) with meaningful ERR content otherwise.
  • Persistence: raw message store with retention policy, so any message can be replayed.
  • Dead-letter queue: failures are isolated and visible instead of blocking the channel.

04

Security considerations for HL7 interfaces

HL7 v2 messages carry PHI in clear text by design, so the transport and storage controls matter.

  • Required by law for covered entities and business associates: transmission security and access controls as part of the HIPAA Security Rule, applied through a documented risk analysis.
  • Recommended practice: VPN or mutual TLS for every site, IP allow-lists, no public MLLP ports, encrypted raw-message storage, least-privilege access to the engine's admin console.
  • Logging: channel logs should store message IDs and metadata, not full message bodies, unless a controlled debug mode is on.
  • Test data: use synthetic or properly de-identified messages. We never ask for live PHI.

05

Message types, versions and systems we connect

Common HL7 v2 messages and what they carry
MessagePurposeKey segments
ADT^A01, A03, A04, A08Admit, discharge, register, update patientMSH, EVN, PID, PV1
ORM^O01 / OMLOrders for labs, radiology, proceduresMSH, PID, PV1, ORC, OBR
ORU^R01Observation resultsMSH, PID, OBR, OBX
SIU^S12 to S15Appointment scheduling eventsMSH, SCH, PID, RGS, AIS
MDM^T02Document notificationsMSH, PID, TXA, OBX

06

How we deliver HL7 integration projects

  • Interface inventory: which feeds, which senders, which versions (commonly 2.3 to 2.5.1), which volumes.
  • Specification: field-level mapping from sample messages, with decisions on unknown Z-segments and identifier handling.
  • Build in the engine: channels with transformers, filters and error queues, version-controlled and exported as code.
  • Test with sender samples: positive, negative and edge cases including merges, cancels and malformed messages.
  • Parallel run: compare outputs against the existing process before cutover.
  • Operate: alerts on queue depth, error rates and silence (no messages in an expected window).

07

HL7 v2 integration use cases

  • Starting and stopping remote monitoring enrollment from ADT admit and discharge events.
  • Receiving lab or imaging results as ORU messages into a care coordination tool.
  • Sending orders from a specialty app to a hospital's order-entry system.
  • Syncing appointments from a scheduling system to a patient engagement platform.
  • Replacing a fragile in-house parser with a monitored engine channel.

08

HL7 integration cost and timeline factors

Effort scales with the number of interfaces and the quality of sender documentation. These are planning ranges, not quotes.

Planning estimates for HL7 integration work
Scope tierTypical timelineMain cost drivers
One inbound feed (e.g. ADT) to your system3 to 6 weeksSender variation, merges, test cycles
Bidirectional orders and results2 to 4 monthsOrder lifecycle, result status handling, vendor coordination
Multi-site interface hub with FHIR output4 to 8 monthsNumber of senders, engine licensing choice, monitoring

Frequently asked questions

What is MLLP?

MLLP is the Minimal Lower Layer Protocol, a simple framing scheme for sending HL7 v2 messages over TCP by wrapping each message in start and end block characters. It has no built-in encryption or authentication, so it is normally run inside a VPN or TLS tunnel.

Which interface engine should we use?

It depends on volume, budget, team skills and what the customer already runs. Mirth/NextGen Connect, Rhapsody and Iguana are common examples. We build channel logic in a documented way so it can be ported if needed. We have no partnership with any engine vendor.

Can HL7 v2 be replaced by FHIR?

Not completely for now. FHIR APIs are growing, but many hospital event feeds, lab interfaces and order flows still depend on v2. Most products need both, with v2 for events and FHIR for structured reads.

Do you handle HL7 v3 or CDA?

We work with CDA and C-CDA documents for clinical document exchange, and we can translate them. HL7 v3 messaging is rare in US practice today, so we treat it as case-by-case.

How do you avoid losing messages?

We persist the raw message before acknowledging, use idempotent processing keyed on the control ID, isolate failures in a dead-letter queue and alert on queue depth and unusual silence. Replay from the raw store covers recovery.

Sources and further reading

This page is general information, not legal or regulatory advice. Requirements depend on your product, data and organization; consult qualified counsel for your situation.

Discuss Your HealthTech Project

Share where your product is today and where it needs to go. We'll respond with clarifying questions, a suggested approach and the next practical step.