HL7 vs FHIR: which one connects you to the EMR?
HL7 is not a rival to FHIR. HL7 International is the standards organization, and FHIR is one of its standards, alongside HL7 Version 2 and CDA. The practical choice is between HL7 v2 message feeds, which push events from a site's systems, and FHIR APIs, which your application calls on demand.
Most products that connect to hospitals and EMRs end up using both.
Key takeaways
- "HL7 vs FHIR" really means HL7 v2 messaging versus HL7 FHIR APIs.
- HL7 v2 sends event messages between systems. Each site configures its own interface.
- FHIR exposes resources over a RESTful API. Certified EHRs must offer a standardized FHIR API under 45 CFR 170.315(g)(10).
- The (g)(10) requirements cover responding to data requests and searches. Write-back is not part of them.
- Scheduling and write-back usually depend on what each EHR vendor chooses to expose.
What is HL7?
HL7 International describes itself as "a not-for-profit, ANSI-accredited standards developing organization." It was founded in 1987.
The name refers to the seventh layer of the ISO OSI communications model, the application layer.
HL7 publishes several families of standards. Three matter most for EMR integration:
- HL7 Version 2 (v2): event messaging between clinical systems.
- CDA and C-CDA: structured clinical documents. CDA is a "document markup standard" for exchanging clinical documents. C-CDA is the US library of CDA templates for clinical notes.
- FHIR: resources exchanged mainly through a RESTful API.
HL7 v2: event messages between systems
HL7 calls v2 "the workhorse of electronic data exchange in the clinical domain." Its product brief states that 95% of US healthcare organizations use HL7 V2.x.
A v2 message is delimited text made of segments. The first segment, MSH, declares the field separator and encoding characters. In practice that produces lines like MSH|^~\&|SndApp|..., which is why v2 is often called pipe-delimited. HL7's own v2-to-FHIR test messages use this form.
FHIR's comparison page says v2 messages communicate information and "invoke particular behavior (patient transfers, lab orders, etc.)"
The message types a healthtech team meets most often include:
| Message | What it carries |
|---|---|
| ADT (e.g. ADT^A01) | Admissions, transfers, visit and patient updates |
| SIU (e.g. SIU^S12) | Scheduling notifications |
| ORM (ORM^O01) | General orders |
| ORU (ORU^R01) | Unsolicited observation results, such as lab results |
| MDM (MDM^T02) | Document status change notification and content |
Every type in this table appears in HL7's v2-to-FHIR message maps.
Transport and interface engines
FHIR's messaging page names "MLLP (HL7 minimal lower layer protocol)" as one transfer mechanism. File transfer and HTTP are listed alongside it. Confirm which one each site uses before you build.
In BitLab's experience, hospitals usually route v2 traffic through an interface engine. The engine receives, filters, transforms and forwards messages, so your interface is often configured there rather than in the EHR itself.
Every site is configured separately
The FHIR comparison page calls variation of implementation one of the biggest v2 interoperability challenges. Even similar sites can place the same data element in different fields.
Its conclusion: v2-to-FHIR mappings "will generally need to be done on an implementation by implementation basis." v2 also allows Z-segments for local extensions, whose meaning is "opaque without prior manual explanation by the sender."
Plan for a specification, a mapping and a test cycle per site. Do not assume a second hospital's ADT feed matches the first.
FHIR: resources over a RESTful API
FHIR is "a standard for exchanging healthcare information electronically." Its building block is the resource: Patient, Encounter, Observation, MedicationRequest and so on.
The FHIR spec describes itself as a "'RESTful' specification." Each resource type has a defined set of interactions, including read, search, create, update and delete. Servers "SHALL provide a Capability Statement" listing which interactions and resources they support.
FHIR is not REST-only. Its v2 comparison notes FHIR also supports documents, messaging and other service models.
R4 and the US profiles
R4 (version 4.0.1) is the base version US regulation adopts. The current FHIR version is 5.0.0, but US Core, SMART App Launch and Bulk Data all publish on R4.
US Core "defines the minimum constraints on the FHIR resources" for US use. Its current published version is STU 9.
SMART App Launch describes OAuth 2.0-based patterns for client applications "to authorize, authenticate, and integrate with FHIR-based data systems." It covers apps launched from inside the EHR and standalone apps.
Bulk Data Access defines how an authorized client requests a large export from a FHIR server. Servers must support Newline Delimited JSON output.
The (g)(10) requirement for certified EHRs
ONC certification criterion 45 CFR 170.315(g)(10) is titled "Standardized API for patient and population services." A certified Health IT Module must:
- Respond to requests for a single patient's data using FHIR and US Core.
- Respond to requests for multiple patients' data as a group, using Bulk Data.
- Support the matching search operations.
- Let an application register with its authorization server.
- Support SMART-based authorization, including refresh tokens of at least three months for qualifying apps.
- Publish API documentation "via a publicly accessible hyperlink without any preconditions."
The current eCFR text of 170.215 lists FHIR R4.0.1, US Core 6.1.0, SMART App Launch 2.0.0 and Bulk Data v1.0.0. ONC's Standards Version Advancement Process lets developers voluntarily certify to newer approved versions. The eCFR also flags an amendment published 28 October 2026, so check the live text before quoting versions in a contract.
Note what (g)(10) asks for: responding to requests and searches. It does not require create or update support.
HL7 v2 vs FHIR: comparison
| HL7 v2 | FHIR (as used by US EHRs) | |
|---|---|---|
| Transport | Messages over MLLP, files or other transfer mechanisms | HTTPS RESTful API; bulk export as NDJSON files |
| Data model | Segments and fields, with Z-segments for local data | Resources with profiles (US Core) and extensions |
| Who turns it on | The site's IT or interface team, per interface | The EHR vendor's API program and app registration; the site often authorizes access |
| Typical use | Real-time event feeds: ADT, results, orders, scheduling | On-demand reads, patient-facing apps, population exports |
| Write support | Messages can trigger actions, if the receiver accepts them | Defined in the spec; actual support varies by server and is declared in its CapabilityStatement |
| Cost and gating | Set per site and per vendor; interface work is usually scoped per connection | Read access is a certification requirement; write and non-(g)(10) scopes depend on vendor terms |
When to use which
Use v2 for events. If you need to know the moment a patient is admitted, a result is filed or an appointment is booked, a v2 feed pushes it to you.
Use FHIR for on-demand reads. When a user opens a patient in your product, a FHIR read or search returns the current data. On certified EHRs, US Core reads are the surface (g)(10) requires every vendor to support.
Use Bulk Data for population work. Analytics, quality programs and panel backfills need group exports, not thousands of single reads.
Expect write-back and scheduling to be vendor-specific. The FHIR spec defines create and update, but (g)(10) does not require them. Booking an appointment or filing a note back into the chart usually means a vendor's own API, a vendor-specific FHIR extension or a v2 inbound interface.
Check vendor documentation before designing around write access. BitLab's EMR integration hub has per-vendor API guides, including Epic.
How HL7 v2 and FHIR coexist
They are not sequential generations where one retires the other. FHIR "can and will also be used in partnership with existing widely used standards," according to its own overview.
A common production shape:
- A v2 ADT or SIU feed tells your system that something changed.
- Your system calls the FHIR API for the current, structured record.
- Writes go through whichever channel the vendor supports for that workflow.
HL7's v2-to-FHIR mapping guide is a starting point for normalizing feeds into FHIR resources.
BitLab runs EMR integrations in production on athenahealth, ModMed, EZDERM and eMedicalPractice. Each one combines more than one channel. Before go-live, define failure and reconciliation tests for every channel; our FHIR acceptance test guide covers that. If an integration has stalled between these choices, see integration stall.
FAQ
HL7 vs FHIR: what is the difference?
HL7 is the organization; FHIR is one of its standards. When people compare them, they usually mean HL7 v2 event messaging versus FHIR's resource-based RESTful API.
What is HL7?
Health Level Seven International is a not-for-profit, ANSI-accredited standards developing organization founded in 1987. It publishes HL7 v2, CDA and FHIR, among others.
What is FHIR?
FHIR (Fast Healthcare Interoperability Resources) is an HL7 standard for exchanging healthcare information electronically. It models data as resources and is usually accessed through a RESTful API.
What is the difference between HL7 v2 and FHIR?
HL7 v2 pushes delimited event messages between systems, configured site by site. FHIR exposes structured resources that an application reads, searches and sometimes writes on demand.
What do HL7 integration services include?
Typically: scoping which events and data you need, building each site's v2 interface and mapping, registering FHIR applications, testing failure and reconciliation paths, and monitoring feeds in production. See our EMR integration hub for vendor-specific guides.
Sources
- HL7 International: About HL7
- HL7: Version 2 Product Suite
- HL7: CDA Release 2
- HL7: C-CDA product brief
- HL7 FHIR R4: Overview
- HL7 FHIR R4: RESTful API
- HL7 FHIR R4: Messaging
- HL7 FHIR R4: Comparison with HL7 v2
- HL7 Version 2 to FHIR: Message Maps
- HL7 Version 2 to FHIR: Test Message Conversions
- HL7 US Core Implementation Guide
- HL7 SMART App Launch Implementation Guide
- HL7 Bulk Data Access: Export
- eCFR: 45 CFR 170.315 Certification criteria
- eCFR: 45 CFR 170.215 API standards
- ASTP/ONC: § 170.315(g)(10) Certification Companion Guide
The audit is free. Another quarter of guessing is not.
Book the Free 48-Hour Audit