FHIR and HL7 v2 solve different healthcare interoperability problems. Hospital systems use HL7 v2 to send event messages to each other. FHIR was built to give web, mobile and cloud applications structured healthcare data through modern APIs.
A team with working HL7 v2 interfaces seldom has to pick one standard. The harder design work is running both safely, so that older clinical workflows can feed newer applications and APIs.
For broader healthcare engineering, see Healthcare & Life Sciences.
FHIR vs HL7: Quick Answer
HL7 International is a standards body, and HL7 v2 and FHIR are two of the standards it publishes (About HL7). A comparison of HL7 vs FHIR is therefore a comparison of HL7 v2 messaging with FHIR.
- HL7 v2 sends a message from one clinical system to another when an event happens, such as an admission, discharge, order or result.
- FHIR organizes healthcare data into reusable resources, such as Patient or Observation, that applications read and write through APIs.
- Many healthcare organizations run both, with an integration layer that translates between them.
The practical difference between HL7 and FHIR shows up in the integration work. A v2 interface waits for messages to arrive. A FHIR client usually asks a server for the data it needs at the moment it needs it.
What Is HL7 v2?
HL7 v2 is a messaging standard with a long history. Hospitals use it to connect their systems, from the lab and imaging to billing, and interface engines route the messages between them. It is event-driven, so when something happens in one system, that system sends a message to the others that need to know.
Message types cover admissions, discharges and transfers, along with orders, results and scheduling. Real interfaces are harder than the base standard suggests, because each site adds its own variations, custom segments and interface-engine logic.
HL7 International describes v2 as one of its most widely adopted standards, prominent in in-patient settings (HL7 v2 and FHIR comparison). Its messages are built from reusable segments. Sites often add their own "Z-segments", and no one else can read those unless the sender documents what they mean.
What Is FHIR?
FHIR, or Fast Healthcare Interoperability Resources, represents healthcare information as standardized resources. Each resource describes one kind of record. Patient, Encounter and Observation hold the person, the visit and the clinical findings, while Medication, Appointment and Practitioner hold the drug, the booking and the clinician.
Most FHIR work runs over RESTful APIs, although the standard supports more than one exchange pattern. FHIR suits an application outside the EHR that needs structured healthcare data, such as a patient-facing mobile app, a cloud analytics service or a partner's system.
HL7 International publishes the FHIR standard. ONC, the federal health IT office, describes FHIR as an API-focused standard for representing and exchanging health information.
The Same Patient in HL7 v2 and FHIR
The two samples below describe one patient. Every name, number and address in them is made up for this example. The v2 sample is an ADT^A01, the admit or visit notification (HL7 v2 message maps). We trimmed it to the MSH and PID segments, although a complete A01 also carries an EVN and a PV1 segment.
MSH|^~\&|EXAMPLE_ADT|EXAMPLE_HOSP|EXAMPLE_APP|EXAMPLE_CLINIC|20261102083000||ADT^A01^ADT_A01|MSG00001|P|2.5.1
PID|1||100001^^^EXAMPLE_HOSP^MR||Doe^Jane^Q||19800101|F|||100 Example St^^Example City^IL^00000^USA||(555)555-0100^PRN^PH|(555)555-0199^WPN^PH
Pipes separate the fields, and carets separate the parts inside a field. MSH-9 names the message type, ADT^A01. PID-3 is the patient identifier list. Here it carries one medical record number, marked by type code MR in its fifth part, which becomes the FHIR identifier.type below. PID-5 holds the name as family name, given name and middle initial. PID-7 is the birth date and PID-8 is the sex code. The home and business phone numbers sit in the last two fields, PID-13 and PID-14.
Here is the same patient as a FHIR R4 Patient resource (Patient, R4):
{
"resourceType": "Patient",
"identifier": [
{
"type": {
"coding": [
{ "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" }
]
},
"system": "http://example.org/fhir/mrn",
"value": "100001"
}
],
"name": [ { "family": "Doe", "given": [ "Jane", "Q" ] } ],
"telecom": [
{ "system": "phone", "value": "(555)555-0100", "use": "home" },
{ "system": "phone", "value": "(555)555-0199", "use": "work" }
],
"gender": "female",
"birthDate": "1980-01-01",
"address": [
{
"line": [ "100 Example St" ],
"city": "Example City",
"state": "IL",
"postalCode": "00000",
"country": "USA"
}
]
}
Every value now sits under a named element, so an application can read birthDate without knowing that it came from field seven. Some values change form on the way. The sex code F becomes female and the birth date gains ISO 8601 dashes. Phone use codes PRN and WPN turn into home and work (PID to Patient map). Each site picks its own identifier system URL, so example.org stands in for it here.
FHIR Releases, and Where HL7 v2 and v3 Stand
HL7 v2 has point releases of its own. A receiver reads the version from MSH-12, which says 2.5.1 in the sample above. HL7 v3 was meant to be the next generation of HL7 messaging. It introduced a shared reference model, but v3 messaging was never adopted as widely as v2 (HL7 v3 comparison).
FHIR has had several releases. These are the ones that matter for planning, from HL7's published versions list, read on November 10, 2026:
- R4 (4.0.1), published October 30, 2019, was the first release with normative content. In the US, the US Core implementation guide is built on FHIR R4.
- R5 (5.0.0), published March 26, 2023, is the current release.
- R6 is in progress. HL7's list shows a ballot build and a snapshot build dated July 17, 2026, and no published R6 as of November 10, 2026.
A team should confirm which version a partner's API supports before designing any mappings. Resources and elements differ between releases, so a mapping written against R5 can fail validation on an R4 server.
FHIR vs HL7 v2: Key Differences
| Area | HL7 v2 | FHIR |
|---|---|---|
| Data model | Segments and fields inside messages | Reusable healthcare resources with defined structures |
| Primary pattern | Event-driven messages | Resource-oriented APIs and other supported exchanges |
| Typical environment | Hospitals, labs, legacy clinical systems, interface engines | Modern applications, portals, mobile, cloud and API ecosystems |
| Customization | Local variations are common | Profiles, implementation guides and extensions |
| Developer experience | Often requires interface-specific knowledge | More familiar to teams working with HTTP, JSON and modern APIs |
| Coexistence | Still widely used | Frequently introduced alongside existing HL7 v2 rather than replacing it immediately |
HL7 vs X12 EDI, and Where CDA Fits
X12 EDI covers the administrative and payment side of healthcare. Under HIPAA, HHS adopted ASC X12 Version 5010 for the electronic transactions that health plans, clearinghouses and providers exchange (CMS adopted standards). Retail pharmacy transactions use NCPDP standards instead. The adopted X12 transactions include these:
- 837 for health claims
- 835 for claim payment and the electronic remittance advice
- 270/271 for eligibility and benefit checks
- 276/277 for claim status
- 278 for prior authorization and referrals
HL7 v2 carries the clinical events inside care delivery, such as an admission or a lab result. A revenue-cycle project usually touches both standards. Each 837 claim has to trace back to the visit that the ADT feed registered. The two messages identify the patient and visit differently, so the billing side has to store the link and keep it current.
CDA and FHIR overlap on clinical documents. CDA, the Clinical Document Architecture, came out of HL7 v3. It defines clinical documents such as discharge summaries and imaging reports, and each CDA document is one XML file. HL7 notes that the eHealth Exchange network in the US supports the exchange of billions of CDA documents each year (CDA product brief). In FHIR, a document is a Bundle of type document that starts with a Composition resource (FHIR documents). A FHIR project that takes over document exchange will still have to read CDA for as long as its partners send it.
When HL7 v2 Is Still the Right Tool
HL7 v2 stays the right choice where clinical systems already exchange events reliably and the vendors support those interfaces well. It also stays where replacing a working interface would add more risk than value.
-
ADT events between hospital systems
-
Laboratory orders and results
-
Radiology and clinical-result workflows
-
Scheduling messages
-
Interfaces mediated through an existing integration engine
When FHIR Is a Better Fit
A new application that reads healthcare data through APIs should start with FHIR. The same holds when a mobile or patient-facing product needs controlled access to records, or when a new service needs a resource-oriented interoperability layer. Typical projects include these:
-
Patient and clinician portals
-
Mobile healthcare applications
-
Telemedicine platforms
-
SMART on FHIR applications, which use OAuth 2.0-based patterns to authorize and connect apps to FHIR data
-
Partner APIs
-
Modern analytics and data-access layers
Our Telemedicine Software Development page shows how EHR, HL7 and FHIR work fits into a virtual-care product.
Using HL7 v2 and FHIR Together
Many organizations operate both standards at the same time. A legacy EHR emits HL7 v2 messages while a new portal or telehealth application consumes FHIR APIs. An interoperability layer sits between the two. It transforms and routes the data, validates and enriches it, and reconciles records that do not agree.
Field mapping is the smaller part of that job. The layer has to carry identifiers, timestamps and provenance across intact, so anyone can see where a record came from. It also has to enforce permissions and handle errors. Operational traceability matters too, because a missing lab result has to be found message by message.
Interface Engine, iPaaS or a Custom Layer
A team can adopt FHIR and keep its interface engine, so the decision that matters is where the translation between v2 and FHIR runs. That layer can also convert vendor APIs, files and internal data models, so a new source joins without changes to every consumer. There are three common set-ups, and each fits a different starting point.
The first option keeps the interface engine and adds a FHIR facade. It fits a health system whose engine already routes ADT, ORM/ORU and SIU feeds well. The engine keeps doing that work while a FHIR server or facade in front of it serves the new applications. Data freshness is the point to watch, because the facade is only as current as the feed behind it. Someone also has to decide which copy of the patient record is the source of truth.
An integration platform as a service (iPaaS) is the second option. It fits when most of the work links SaaS tools for CRM, billing or scheduling. Healthcare messaging is then only a small part of the load. Three checks come before choosing one. The platform has to parse HL7 v2 and handle FHIR. If the platform will handle protected health information from the HL7 feeds, its vendor acts as a business associate. HIPAA covered entities must have written agreements with their business associates (CMS HIPAA adopted standards page), so the vendor has to sign one. Its pricing also has to make sense at your message volume.
A custom translation layer, built and run by the team, makes sense when the mappings carry business rules that a configured tool expresses poorly. It also fits a digital health company whose product depends on feeds from many hospitals. The cost is that your team owns the layer after launch. It runs the monitoring, the retries and every mapping change, so the budget has to cover operations as well as the build.
Our HL7 integration work covers v2 feeds such as ADT, ORM/ORU and SIU, usually through an interface engine. Our FHIR work covers FHIR R4 APIs and SMART on FHIR app launch, plus bulk data export where the EHR offers it. API & Integration Engineering compares iPaaS platforms with custom integration in more detail.
HL7 v2 to FHIR: A Small Mapping Example
HL7 publishes an official guide for this translation, HL7 Version 2 to FHIR. It maps v2 messages, segments, data types and vocabulary to FHIR R4, and it is still a trial-use standard.
Patient demographics, as in the sample above, show how the guide works. In a v2 message, the PID segment creates a Patient resource, and the PD1 segment can add to that same Patient. Fields do not always map one to one. The guide sends both PID-13 (home phone) and PID-14 (business phone) to the single Patient.telecom element.
The guide also marks where its rules stop. When a v2 field repeats more times than the FHIR element allows, the local implementation decides whether to use an extension (mapping guidelines). A required FHIR value with no v2 source is different, because the guide fills it with a fixed assignment. Mapping an OBR segment to ServiceRequest, for example, always sets intent to "order". Local choices such as whether to use an extension belong in the written interface specification, where the next engineer can find them.
Migration Patterns
Introduce FHIR at the Application Edge
In this pattern, everything new that faces patients or partners uses FHIR from the start: portals, mobile apps, partner integrations and other digital-health applications. The legacy systems keep using HL7 v2 internally.
Replace Interfaces Selectively
The first interfaces to rebuild are the ones that cost the most to run, break most often or block a new capability. An all-at-once migration puts every clinical feed at risk at the same moment, and a staged one limits each change to a single feed.
Security, Identity, and Consent Still Matter
HTTPS and JSON alone do not make a FHIR API secure. Each integration still needs identity checks and authorization, with careful control over what data each user or application can access. It also needs audit logging and encryption, secrets management, and consent handling where it applies.
Security-sensitive healthcare integrations may also involve Security & Compliance Engineering.
How to Choose Between HL7 and FHIR
The choice comes from five inputs, taken roughly in this order.
- Systems that must exchange data, and the interfaces each one supports today.
- Workflow needs, whether event-driven messaging, interactive API access, bulk exchange or a mix.
- Identifiers each system uses and who owns each data set, plus the permission, consent and audit rules.
- Failure handling, with queues and retries for messages and with reconciliation and monitoring for records.
- How well the legacy interfaces work. Where reliable ones already support critical clinical workflows, step-by-step modernization carries the least risk.
Frequently Asked Questions
Is HL7 the same as FHIR?
HL7 is not the same as FHIR. HL7 International is the standards organization, and FHIR is one of the standards it publishes. Most comparisons set FHIR against HL7 v2, the older messaging standard from the same body, as the Quick Answer above explains.
What is the difference between FHIR and HL7 v2?
HL7 v2 moves healthcare data as event messages between systems. FHIR models the data as resources that applications reach through APIs and other exchange methods. The comparison table above sets the two side by side.
Is FHIR replacing HL7 v2?
FHIR is taking over new API work, while most interfaces that already run stay on v2. In the US, the US Core guide builds on FHIR R4, and ONC describes FHIR as an API-focused standard. HL7 v2 still carries the event feeds inside hospitals, where replacing a working feed adds clinical risk. New projects should budget for both.
Can HL7 v2 and FHIR be used together?
They are used together in many organizations. Existing HL7 v2 workflows stay in place, FHIR serves the new applications, and an integration layer translates between them.
Is FHIR only a REST API standard?
FHIR is most often used through RESTful APIs. The specification's exchange guidance also covers messaging and documents, as well as subscriptions and custom operations. The right pattern depends on the use case and the implementation guide.
Do we need to replace our interface engine to adopt FHIR?
In most cases the engine stays. It keeps routing and transforming v2 feeds while FHIR is added in front of it. The section on interface engines, iPaaS and custom layers above covers when another set-up fits better.
Planning a Healthcare Integration
The right interoperability approach follows from the systems already in place, the data that must move and the applications that need it. Each option is then weighed against the operational risk of changing clinical interfaces that already work.
Explore Healthcare & Life Sciences for the broader practice, Telemedicine Software Development for virtual-care applications, or API & Integration Engineering for cross-system architecture.