HL7 vs FHIR: What's the Difference and When Do You Need Both?
Founder & CEO
15+ years building healthcare technology. Founder & CEO of Nirmitee.io, whose teams deliver EHR integrations, FHIR and HL7 platforms, ABDM and NHCX connectivity, and clinical AI for health systems and healthtech companies.

HL7 and FHIR both come from the same standards body, HL7 International, and the difference between HL7 and FHIR is how they move data: HL7 v2 pushes pipe-delimited event messages between systems, while FHIR exposes data as JSON or XML resources through web APIs. Use HL7 v2 for event feeds between hospital systems and FHIR for apps and outside access, and plan to run both, since HL7 itself expects its standards to exist in parallel "for quite some time".
Updated October 2026
| Question | HL7 v2 | FHIR |
|---|---|---|
| What is it? | Event messaging standard, dating back to 1989 | Resource and API standard, first published in 2014 |
| Who publishes it? | HL7 International | HL7 International |
| What does the data look like? | Pipe-delimited segments such as PID and PV1. An XML encoding also exists | Resources such as Patient and Encounter, in JSON or XML |
| How does it travel? | Usually MLLP over a TCP connection, sent to one agreed endpoint | Usually HTTPS, through a REST API |
| How does data flow? | The source pushes a message when an event happens | A client asks for what it needs. Subscriptions and messaging can push |
| Can you change one piece alone? | No. Segments can't be handled independently | Yes. Each resource can be maintained on its own |
| What about changes? | Can send only the data that changed | Works on full snapshots by default |
| How is it extended? | Z-segments, whose meaning the sender has to explain | Extensions with a URI, which don't collide between systems |
| How is it secured? | Not by MLLP itself. Sites add a VPN or TLS | Not by FHIR itself. HL7 recommends TLS, OAuth and SMART |
| Where does it fit best? | ADT, lab results, orders and other feeds between internal systems | Patient-facing apps, mobile apps, third-party access, population health |
| Is it named in US rules? | Not in the two API rules covered below | Yes: ONC API certification and the CMS payer APIs, both on R4 4.0.1 |
If you already know you need a build, our HL7 integration services team handles feeds and interface engines, and our FHIR integration services team handles APIs and apps. The rest of this guide helps you decide for yourself.
Part of our complete guide to HL7 explained.
Is HL7 the same as FHIR?
No, but FHIR is an HL7 standard, so "HL7 vs FHIR" is really a comparison of FHIR with HL7's older standards. People usually mean HL7 v2 when they say "HL7", because v2 is the version hospital interfaces commonly use.
The name can refer to four different things:
| Name | What it is | How it compares with FHIR |
|---|---|---|
| HL7 International | The organization that publishes all of these standards | It publishes FHIR too |
| HL7 v2 | Event messages between systems | HL7 v2 segments roughly correspond to FHIR resources, and FHIR can also do event messaging |
| HL7 v3 | XML messages built on a shared model called the RIM | FHIR has one Patient resource where v3 models are broad and abstract. Migrating means mapping specific messages |
| CDA | Clinical documents, such as a discharge summary, from the v3 family | FHIR documents wrap resources in a Composition. HL7 says mapping all of CDA to FHIR is impossible, while mapping the Consolidated CDA templates is possible |
FHIR stands for Fast Healthcare Interoperability Resources, and in healthcare it is the standard that US API rules name. HL7 keeps several FHIR releases available. R5 from March 2023 is the current published version on HL7's version history as we read it in October 2026, while US rules cite R4 4.0.1. For the wider set of standards, see our guide to healthcare interoperability standards. Claims and other X12 traffic are a separate subject, covered in X12 vs HL7.
What does the same admission look like in each standard?
An HL7 v2 admission is one message with several segments, pushed when the event happens, while FHIR holds the same facts in separate Patient and Encounter resources that a client can read. Both examples below are illustrative and use made-up data.
HL7 v2, an ADT^A01 admit message:
MSH|^~\&|REG|HOSP_A|ENGINE|HOSP_A|20261030093000||ADT^A01^ADT_A01|MSG00001|P|2.5.1
EVN||20261030092900
PID|1||12345^^^HOSP_A^MR||TEST^PATIENT||19800101|F
PV1|1|I|4WEST^401^A FHIR R4, the visit as an Encounter resource, returned by GET [base]/Encounter/example:
{
"resourceType": "Encounter",
"id": "example",
"status": "in-progress",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "IMP"
},
"subject": { "reference": "Patient/12345" },
"period": { "start": "2026-10-30T09:29:00Z" }
} Reading the two side by side shows the practical gap. The HL7 v2 receiver must parse positions and know this site's local conventions. The FHIR client gets named fields, but it only sees the admission if it asks at the right time or the server supports a subscription. That is why push vs pull is a useful first test and an incomplete one: HL7 v2 is good at telling you something just happened, and FHIR is good at answering a question about a record.
When should you use HL7 v2, FHIR or both?
Choose per data flow: use HL7 v2 where a feed already exists and internal systems react to events, use FHIR where an app or outside party reads data or a rule requires an API, and use both when the data only exists in a feed but the reader expects an API. Most of the decision comes down to what the source system can do today.
- Use HL7 v2 for core clinical workflows such as ADT, lab results and pharmacy orders, for high-volume traffic between established systems, and for legacy systems that can't easily be changed.
- Use FHIR for patient-facing applications and portals, mobile health apps, third-party integrations, population health and analytics platforms, and any API a regulation requires.
- Use both when a new app needs data that only appears in a feed. An integration layer takes HL7 v2 in, stores or translates it, and serves FHIR out.
Confirm the FHIR route on the site you are connecting to. A server can pass its checks and still leave out a field you need, so read its CapabilityStatement and test on real records in a safe environment.
Do US rules require FHIR instead of HL7 v2?
US rules require FHIR for specific APIs, and the two below don't tell a hospital to switch off its HL7 v2 interfaces. So a mandate for a patient or payer API usually adds FHIR beside the feeds you already run.
| Rule | Who it applies to | What it names | Date |
|---|---|---|---|
| 45 CFR 170.215, the API standards behind ONC certification and the 21st Century Cures Act | Health IT developers certifying their API | FHIR R4 4.0.1, US Core 6.1.0, SMART App Launch 2.0.0, Bulk Data 1.0.0 | US Core 3.1.1 and SMART 1.0.0 ended January 1, 2026 |
| CMS-0057-F | Medicare Advantage, Medicaid and CHIP programs and plans, and QHP issuers on the federal exchanges | FHIR APIs for patient access, provider access, payer-to-payer and prior authorization | APIs generally by January 1, 2027. Exact dates vary by payer type |
The rules were read in October 2026. Check them again before you plan around a date, and take legal advice on how they apply to you.
How do you run HL7 v2 and FHIR together?
Run them together with a translation layer: an interface engine such as Mirth Connect receives HL7 v2, maps it, and a FHIR server or facade serves the result through an API. The usual difficulty is the mapping, because HL7's own comparison says mappings "will generally need to be done on an implementation by implementation basis".
HL7 publishes a v2-to-FHIR implementation guide, version 1.0.0 at trial-use status, which gives you a starting point for messages, segments and data types. You will still need local decisions in these places:
- Z-segments, whose meaning only the sender knows.
- Partial updates, because HL7 v2 can send only what changed and a FHIR update normally replaces the whole resource.
- Workflow data, since a single ORC segment can spread across more than one FHIR resource, such as MedicationRequest and Task.
- Identifiers and local codes, which differ from site to site.
For migration, move one interface at a time and leave stable feeds alone unless a new need justifies the work. Start with new apps and required APIs, translate the feeds those apps depend on, and replace an HL7 v2 interface only when its consumer can use FHIR and its source exposes the same data. A big-bang replacement takes on the most risk for the least return. Our HL7 v2 to FHIR migration guide walks through the steps.
Is FHIR cheaper than HL7 v2?
Neither standard is cheaper in every case, because the cost depends on the systems at both ends more than on the format.
| Cost driver | HL7 v2 | FHIR |
|---|---|---|
| Skills | Interface analysts and engine experience | Web developers, plus FHIR profiles and OAuth |
| Site differences | Local conventions and Z-segments per interface | Vendor profiles, extensions and gaps per server |
| Infrastructure | Interface engine, VPN or TLS, monitoring | FHIR server or vendor API, authorization server, monitoring |
| Vendor charges | Ask each EHR vendor for its interface fees | Ask about API access, app review and client activation |
A health system can reduce interface costs and improve reliability with a few plain habits: keep one interface engine rather than point-to-point links, reuse a canonical mapping, monitor message failures and queue depth, and test each change against a copy of real message shapes. If you are comparing SaaS platforms that normalize disparate HL7 feeds into FHIR R4 for mobile apps, ask what the pricing model counts (connections, message volume or records) and how each platform handles data normalization and FHIR compliance for your own feeds. For interface price ranges with their stated basis, see our Mirth Connect interface cost matrix.
What do HL7 vs FHIR comparisons often get wrong?
Many comparisons describe HL7 as XML-only, FHIR as pull-only, or FHIR as secure on its own, and all three are wrong. These are the corrections we would make:
- "HL7 only supports XML." HL7 v2 normally uses vertical-bar delimiters, and its XML encoding is the alternative. HL7 v3 and CDA are the XML ones.
- "FHIR is pull-only." FHIR also defines messaging, documents and services, and Subscriptions that push notifications.
- "FHIR is secure by design." HL7 states that FHIR "is not a security protocol". Your TLS, OAuth, access rules and audit logs still have to be built and configured.
- "HL7 v2 is being retired." HL7 says it will keep maintaining existing standards for as long as its members need them, and it says the pace of any move to FHIR is uncertain.
- "FHIR means every system is the same." Vendors publish different profiles and extensions, so a working connection to one EHR doesn't guarantee the next.
Where we fit, and where we don't
Nirmitee is a healthcare engineering services firm that builds on both standards, with 350+ Mirth Connect interfaces on the HL7 side. On the FHIR side, our SMART on FHIR app has run against the Epic and Oracle Health developer sandboxes, and our open-source headless EHR passed 47 of 47 ONC (g)(10) SMART App Launch Standalone Patient App tests on 27 October 2026, which covers that SMART group only and is not full (g)(10) certification. We are ISO 27001:2022 certified and we sign BAAs.
We are a poor fit if you want a self-serve product you can sign up for today. If you need one read-only app against one EHR, the vendor's own documentation may be all you need.
Not sure which standard fits a data flow? Book a 15-minute architecture review and bring the source system, the reader and the data you need. We will tell you whether it calls for HL7 v2, FHIR or both.
Ready to scale?
Talk to our healthcare engineering team about building, integrating, and shipping faster.
Frequently Asked Questions
What is the difference between HL7 and FHIR?
Is FHIR the same as HL7?
Do healthcare organizations need both HL7 and FHIR?
Does FHIR replace HL7 v2?
When should you use HL7 v2 versus FHIR?
How do you implement a hybrid HL7-FHIR architecture?
How much does FHIR implementation cost compared to HL7 v2?
What is the difference between HL7 v2, v3, CDA and FHIR?


