Key takeaway
HL7 integration means exchanging HL7 version 2 messages, such as ADT, ORM, ORU and SIU, between clinical systems, typically over MLLP through an interface engine. Each site customizes v2 messages, so a reliable interface depends on a site-specific specification, careful parsing, acknowledgment handling and monitoring.
Last reviewed November 17, 2026
Why HL7 v2 is still central
HL7 v2 is an event-driven messaging standard. When a patient is admitted, an order is placed or a result is finalized, the source system sends a message to every subscribed system. Unlike FHIR, which is pulled on demand, v2 is pushed in near real time.
Most hospitals route v2 traffic through an interface engine that filters, transforms and delivers messages. Your application usually connects to that engine rather than to the EHR directly, and the hospital's interface analysts control what you receive.
Versions 2.3 through 2.5.1 are the most common in practice, and nearly every site adds Z-segments or repurposes fields. We expect variation and build for it.
Typical HL7 use cases
Patient census and registration
Consume ADT messages to know when patients are admitted, transferred, discharged or registered, and keep demographics in sync.
Orders to ancillary systems
Receive ORM^O01 orders for labs, imaging or specialty services and send status updates back.
Results delivery
Send or receive ORU^R01 results, including structured values, reference ranges and abnormal flags.
Scheduling sync
Use SIU^S12 and related events to mirror appointments for reminders, intake or capacity planning.
Documents and transcription
Exchange MDM messages carrying clinical documents or document status notifications.
Charge capture
Send DFT^P03 financial transactions so services delivered in your application reach the billing system.
Technical approach to HL7 interfaces
Standards and specifications
We start from the health system's interface specification, not the base standard alone. For each message type we document trigger events, required segments, field usage, repeating groups, Z-segments and the expected acknowledgment mode.
Transport and authentication
HL7 v2 is usually carried over MLLP on TCP, which has no built-in encryption or authentication. We wrap it in TLS with mutual certificate authentication where the engine supports it, or run it over a site-to-site VPN, and restrict connections by source address.
- Mutual TLS or IPsec VPN for transport
- Network allow-listing at both ends
- Separate credentials and endpoints for test and production
Parsing and data mapping
We parse messages with a tolerant parser, map segments such as PID, PV1, OBR, OBX and SCH into your data model, and keep the raw message for traceability under defined retention rules. Patient identity uses the site's MRN and assigning authority, never name matching alone.
Acknowledgments and error handling
We return ACKs only after a message is durably stored, use AE or AR codes with meaningful error text, and route unparseable messages to a review queue instead of dropping them. Ordering matters: an A08 update arriving before the A04 registration needs defined handling.
Testing with sandboxes and test feeds
We build test harnesses that replay de-identified or synthetic sample messages, then run joint testing with the hospital's interface team in their test environment. Cutover plans include message volume checks and a rollback path.
Supported HL7 v2 message types
| Message type | Purpose |
|---|---|
| ADT^A01 | Admit or visit notification for inpatients |
| ADT^A03 | Discharge or end of visit |
| ADT^A04 | Register an outpatient or emergency patient |
| ADT^A08 | Update patient information |
| ORM^O01 | General order message (newer sites may use OML or OMG) |
| ORU^R01 | Unsolicited observation results such as lab values |
| SIU^S12 | New appointment booking notification (S13 to S15 for changes and cancellations) |
| MDM^T02 / T04 | Original document or document status change with content |
| DFT^P03 | Post detail financial transaction for charges |
Security considerations for HL7 feeds
An ADT feed sends ePHI about every patient matching its filter, whether or not your product needs them. Data minimization starts with asking the interface team to filter at the engine, not after the data reaches you.
HIPAA requirement
What the rules themselves require
- Transmission security for ePHI in transit, assessed and documented (45 CFR 164.312(e))
- Audit controls covering who and what accessed interface data (164.312(b))
- Integrity protections against improper alteration (164.312(c)), an addressable specification
- Access control on interface servers, queues and message stores (164.312(a))
Recommended practice
Widely accepted security practice
- Mutual TLS or VPN rather than plaintext MLLP across any untrusted network
- Encrypting message archives at rest with managed keys
- Masking PHI in engine dashboards and alerts
- Defined retention and purge rules for raw messages
Architecture decision
Depends on your product and risk analysis
- Whether to run your own interface engine or rely on the hospital's
- Storing raw messages versus parsed data only
- Converting v2 to FHIR internally for downstream consumers
Your organization's responsibility
Policies and operations software cannot do
- BAAs between the hospital, your organization and any hosting or engine vendor
- Interface change control and approval of message filters
- Monitoring responsibilities and on-call agreements between both teams
- Including interfaces in the organization's risk analysis and contingency plan
Access and onboarding process
- 1
Scope the feeds
Agree which message types, trigger events, facilities and patient populations your application needs, and which it does not.
- 2
Obtain the specification
The health system's interface team provides site specs and sample messages. Access to these depends on their contract and approval process.
- 3
Establish connectivity
Set up VPN or mutual TLS, IP allow-lists and test endpoints, coordinated with the client's network and security teams.
- 4
Build and unit test
Implement parsing, mapping and acknowledgments, then replay sample messages through automated tests.
- 5
Joint testing and go-live
Run integrated tests with the client, validate edge cases, then cut over with both teams monitoring volumes and errors.
Integration architecture options
| Option | When it fits | Trade-offs |
|---|---|---|
| Point-to-point MLLP listener | One site, a small number of message types | Simple; harder to scale across sites and to monitor centrally |
| Interface engine (Mirth Connect, Rhapsody, Iguana) | Multiple sites or feeds, transformation needed | Mature routing, replay and alerting; requires licensing review and engine skills |
| Integration platform (iPaaS) | You want managed connectivity across many customers | Less infrastructure to run; another BAA and vendor dependency |
| FHIR facade over v2 | Downstream services prefer FHIR resources | Clean internal API; mapping v2 to FHIR is lossy without careful design |
Timeline and cost factors
As a rough planning range, a single inbound ADT feed can be ready for joint testing in 3 to 6 weeks, while a bidirectional orders and results interface often takes 2 to 4 months. These ranges are indicative and scope-dependent, not quotes.
- Number of message types and directions
- Degree of site customization and Z-segments
- Connectivity setup and the client's security review
- Interface engine licensing and hosting
- Availability of the client's interface analysts for testing
How we work on HL7 projects
We write a short interface control document for each feed that both teams sign off. It records message types, mappings, acknowledgment rules, error handling and contacts, so nothing depends on one person's memory.
After go-live we provide dashboards for message throughput and errors that show counts and identifiers, not clinical content.
Frequently Asked Questions
What is an HL7 interface engine?
An interface engine is middleware that receives, transforms, routes and monitors healthcare messages. Products such as Mirth Connect, Rhapsody and Iguana are common. Engines let teams change mappings and routing without changing application code.
Is MLLP secure enough for PHI?
MLLP itself has no encryption or authentication. It should be run inside TLS, preferably with mutual certificates, or over a VPN, and the decision should be documented in your risk analysis as part of HIPAA transmission security.
Why do two hospitals send different HL7 messages for the same event?
HL7 v2 is flexible by design, and each organization configures fields, code sets and custom Z-segments differently. That is why every interface needs a site-specific specification and test messages.
Should we use HL7 v2 or FHIR?
Use v2 when you need real-time event notifications that the site already publishes, such as admissions or results. Use FHIR when you need on-demand queries or patient-authorized access. Many products use both.
What are ACK messages?
An acknowledgment tells the sender whether a message was accepted (AA), rejected because of an error (AE) or rejected outright (AR). Correct ACK handling prevents silent data loss and duplicate processing.
Can you work with our existing interface team?
Yes. We expect the health system's analysts to own their engine and specifications. We build the application side, supply test messages and documentation, and join testing and cutover.