HL7 vs FHIR: What an HL7 Integration Actually Involves

HL7 integration means connecting new software to a hospital's systems through HL7 standards: usually HL7 v2 messages that push events such as admissions and lab results, and increasingly FHIR APIs that let an app ask for data when it needs it. You rarely choose one; you choose per data flow, and most projects end up running both.

This guide is for the hospital IT lead or health-tech product team scoping an EHR integration. It explains how the two standards differ in practice, which one each kind of data flow needs, what the project contains beyond the code, and which EHR systems you are likely to meet.

Key takeaways

  • 90% of US health information exchange organisations routinely received HL7 v2 admission, discharge and transfer (ADT) messages in 2023, while only about one in five exchanged data through FHIR APIs (ASTP Data Brief 75).
  • US certified EHRs must offer a standard FHIR R4 API with US Core and SMART App Launch under 45 CFR 170.315(g)(10), and US Core 6.1.0 became the required version by 31 December 2025 (ASTP/ONC).
  • Epic held 43.7% of the US acute care hospital EHR market in 2025, Oracle Health 21.9% and MEDITECH 14.7% (KLAS, via Fierce Healthcare).
  • India's ABDM exchanges records as FHIR R4 documents defined by NRCeS, currently implementation guide version 6.5.0 (NRCeS).

What is the difference between HL7 and FHIR?

HL7 v2 sends a message whenever something happens in the hospital; FHIR exposes the record as web resources that software can query, create or update on demand. Both come from the same standards body, HL7 International, but they were designed for different jobs.

HL7 v2 is a text format in which each line is a segment (patient identity in PID, the visit in PV1, a result in OBX) and fields are separated by the pipe character. The message type sits in the header's MSH-9 field, for example ADT^A01 for an admission or ORU^R01 for a lab result (HL7 Terminology). Messages travel over a TCP connection wrapped in MLLP framing, usually inside the hospital network or over a VPN.

FHIR (Fast Healthcare Interoperability Resources) breaks the record into resources, such as Patient, Encounter, Observation and MedicationRequest, each with its own URL. An app reads them with ordinary HTTPS requests and gets JSON back, and an authorisation server decides what that app may see.

HL7 v2 FHIR R4
Model Event messages pushed to a receiver Resources fetched or written on request
Format Pipe-delimited segments JSON or XML over REST
Transport TCP with MLLP, usually through an interface engine HTTPS with OAuth 2.0 (SMART)
Typical use ADT feeds, orders, lab and radiology results, documents Apps, patient access, population exports, national exchange
Where you find it Nearly every hospital system built in the last 30 years Certified US EHRs, newer products, ABDM in India
Main pain Every hospital customises segments and codes Each EHR supports a different subset of resources
Who sets it up The hospital's interface team The EHR vendor's app or developer programme

The difference that matters most to a project is direction. An HL7 v2 feed tells you something changed without being asked. A FHIR API answers when you ask, and knows nothing about who should be told.

Is FHIR replacing HL7 v2?

Not yet, and not soon inside hospitals. FHIR is winning new ground, apps and national exchange, while HL7 v2 keeps carrying the event traffic it already carries.

The US numbers show both trends. By 2022, ONC counted two of every three non-federal acute care hospitals offering patients app access through a FHIR API, a rise of 12 percentage points on 2021 (ONC). Yet among health information exchanges, more than 80% still send and receive HL7 v2 messages of some kind, against roughly a fifth using FHIR APIs (ASTP).

Regulation keeps HL7 v2 in place too. The CMS hospital Condition of Participation at 42 CFR 482.24(d) requires electronic notifications when a patient is admitted, discharged or transferred, applying from 1 May 2021, and it leaves the standard open (CMS). In practice those notifications mostly go out as HL7 v2 ADT messages, because the feeds already existed.

FHIR does have an event mechanism, Subscriptions, but support varies by EHR and version. Plan on HL7 v2 for anything that must arrive the moment it happens unless the specific EHR you are connecting to proves otherwise in its test system.

Which standard does each data flow need?

Decide flow by flow: events that must reach you go over HL7 v2, data an app pulls when a user opens it goes over FHIR, and bulk history goes over FHIR Bulk Data or a one-off extract. No competitor guide we found frames it this way, but it is how the scope of a real integration is written.

Data flow Usually HL7 v2 Usually FHIR Why
Patient registered, admitted, moved, discharged ADT^A04, A01, A02, A03 Encounter (read) Downstream systems need the event as it happens
Orders to lab or radiology ORM^O01 or OML^O21 ServiceRequest Lab and radiology systems are mostly v2
Results back to the record ORU^R01 Observation, DiagnosticReport Same reason, in reverse
Notes and documents into the record MDM^T02 DocumentReference Depends on what the EHR accepts for writes
App opened from the clinician's screen — SMART App Launch + resources Needs patient and user context at launch
Patient-facing app or portal — Patient access API (US Core) Required of US certified EHRs
Analytics or population export — Bulk Data ($export) Pulls whole groups at once
India: sharing records with consent — ABDM FHIR documents via the gateway National standard is FHIR R4

Two flows deserve a warning. Orders and results usually involve a third system, the lab or radiology information system, with its own vendor, its own test environment and its own idea of what an OBX segment holds. And writing anything into the record is the step EHRs restrict most, which our guide to connecting an AI scribe to an existing EMR covers in detail for clinical notes.

Which standard each data flow uses in an HL7 integration: events on HL7 v2, app reads on FHIR, bulk history on FHIR Bulk Data

What does an HL7 integration project actually involve?

An HL7 integration is mostly agreement and testing; writing the mapping is the shorter part. Expect seven steps, and expect the hospital's and the vendor's calendars to set the pace.

  1. Scope the flows. List each message or resource, its direction, its trigger and what the receiving system does with it. One line per flow becomes the test plan later.
  2. Get the specification. Every hospital's HL7 v2 is a local dialect: which optional segments are filled, which code tables are used, which Z-segments were invented locally. Ask for the interface specification and a set of real, de-identified sample messages.
  3. Agree the connection. For HL7 v2, that means an interface engine (Mirth Connect, Rhapsody, InterSystems and others), IP addresses, ports and usually a site-to-site VPN. For FHIR, it means app registration, client credentials, scopes and the vendor's sandbox.
  4. Build the mapping. Translate fields, codes and identifiers between the two systems, and decide what happens to a message that arrives for a patient the receiver has never seen.
  5. Handle failure. Acknowledgements (ACK and NACK), retries, a queue for rejected messages and an alert when a feed goes quiet. A feed that silently stops is the most common production incident.
  6. Test with the hospital. Unit tests against sample messages, then end-to-end tests in the hospital's test system with real workflows: admit, transfer, cancel the transfer, merge two patient records. The cancellations and merges are where mappings break.
  7. Go live and watch. Run in parallel where possible, compare counts daily, and keep the hospital's interface analyst on the call for the first week.

How long it takes depends on the waiting more than the work. Integrator write-ups put the build of a basic HL7 v2 interface at two to six weeks (Idea Usher), but report that getting the vendor's specification can take two to eight weeks and access to a test environment four to twelve (Nirmitee). Those are one firm's estimates, not a benchmark; the point is that steps 2, 3 and 6 belong on the plan from the first day.

Licensing is the other number to ask about early. NextGen says commercial Mirth Connect is sold as a flat yearly licence for each server, with no charge per interface (NextGen). Not every engine or EHR vendor prices that way, so ask each one how interfaces are billed: the list of flows from step 1 may also be your cost model.

What are the top EHR systems an integration usually meets?

In US hospitals, Epic, Oracle Health (formerly Cerner) and MEDITECH cover about four in five acute care hospitals between them. KLAS's market share report for 2025 put Epic at 43.7% of hospitals and 56.9% of beds, Oracle Health at 21.9%, MEDITECH at 14.7%, TruBridge at 7.6% and Altera Digital Health at 2.9% (Fierce Healthcare).

EHR US acute care hospital share, 2025 (KLAS) What to expect from an integration
Epic 43.7% Mature HL7 v2 interfaces run by the hospital; FHIR R4 APIs and app registration through Epic's developer programme
Oracle Health 21.9% HL7 v2 through the hospital's interface team; FHIR R4 APIs through Oracle's developer programme
MEDITECH 14.7% HL7 v2 widely used; FHIR R4 API as part of US certification
TruBridge 7.6% Certified FHIR API; HL7 v2 for feeds
Altera Digital Health 2.9% Certified FHIR API; HL7 v2 for feeds

Outpatient practices are a different list. Definitive Healthcare's installed-base data from October 2025 ranks Epic first at 19.5% of ambulatory installs, then eClinicalWorks at 11.9% and athenahealth at 6.9% (Definitive Healthcare). That counts installations, not hospitals, so it does not compare directly with the KLAS figures.

The FHIR column above is the regulatory floor, not a promise. Each EHR supports a different set of resources and write operations, so check what the specific version at your hospital exposes before you design around it.

For India, we found no public, sourced vendor-level market share for hospital information systems; market reports cover market size, not who leads. What we can say is that the systems an integration meets in India range from large international EHRs at a few hospital chains to locally built hospital information systems, many of which offer neither HL7 v2 nor FHIR.

How is HL7 integration different in India?

In India the national standard is FHIR, but the hospital's own system often supports neither standard. That changes the order of work.

The Ayushman Bharat Digital Mission (ABDM) defines how health records move between hospitals, labs and patients' health-record apps. Its FHIR R4 profiles are published by NRCeS, with document types such as DischargeSummaryRecord and PrescriptionRecord, and hospitals take the role of health information providers (NRCeS). The records travel through ABDM's gateway with the patient's consent, so a hospital does not need to open its own FHIR API to the world to take part.

The practical consequence is that an Indian hospital integration often has three pieces: build the hospital system's data into FHIR documents for ABDM, connect to labs and devices through whatever they speak (HL7 v2 where the lab system supports it, vendor formats where it does not), and agree a supported API with the hospital system's vendor for anything else. Our post on hospital management software features covers where ABDM fits in the wider system.

What we've seen at DECK IT

DECK IT has built software from Ahmedabad since 2017, including our own hospital management software, so we have worked on both ends of an interface: the system sending the messages and the one receiving them. Our founders also built MedSlay, AI clinical documentation for Indian clinics, which is owned by our sister company Slaya Technologies.

The lesson we would pass on is to ask for sample messages before quoting anything. Two hospitals on the same EHR can send ADT messages that differ in which identifiers they fill and how they record a transfer, and the specification document rarely says so. Real samples show it in an afternoon.

The second is that "do you support FHIR?" is the wrong question. Ask which resources can be read, which can be written, by what kind of app, and in which version. That answer, and not the name of the standard, decides whether a feature is feasible. It is the first thing we establish when we take on HL7 and FHIR integration services for a hospital or a health-tech product.

HL7 integration project timeline: scoping and build are short, vendor specifications, test environments and hospital testing set the pace

Frequently asked questions

What is HL7 integration?

HL7 integration is connecting software to a hospital's systems using HL7 standards. In most hospitals that means HL7 v2 messages carried through an interface engine for admissions, orders and results, and increasingly FHIR APIs for apps. The work is mapping, testing and agreeing the connection with each system's owner.

What is the difference between HL7 and FHIR?

HL7 v2 pushes pipe-delimited event messages to a receiver as things happen; FHIR exposes the record as resources an app reads or writes over HTTPS with JSON. Both come from HL7 International. Most hospital integrations use HL7 v2 for event feeds and FHIR for apps.

Is FHIR replacing HL7 v2?

Not inside hospitals for now. FHIR is growing for apps, patient access and national exchange, but more than 80% of US health information exchanges still send and receive HL7 v2 messages. Plan to support both.

What are the top EHR systems?

In US hospitals, the leaders are Epic (43.7% of acute care hospitals in 2025), Oracle Health (21.9%) and MEDITECH (14.7%), according to KLAS. For outpatient practices, Definitive Healthcare ranks Epic, eClinicalWorks and athenahealth as the top three by installations.

Does Epic use HL7 or FHIR?

Both. Hospitals running Epic use HL7 v2 interfaces for feeds such as admissions, orders and results, and Epic offers FHIR R4 APIs for apps, as US certification requires. Which one you use depends on the data flow and what the hospital's interface team approves.

How long does an HL7 integration take?

Building one basic HL7 v2 interface takes a few weeks; the whole project usually takes months. Getting the specification, a test environment and network access from the hospital and vendor takes longer than the mapping, so start those requests on day one.

Does India use HL7 or FHIR?

India's national standard for exchanging health records is FHIR R4, through ABDM profiles published by NRCeS. Inside hospitals, lab systems and older software often still use HL7 v2, and many local hospital systems use neither standard.

Conclusion

Start an HL7 integration by listing the data flows, not by picking a standard. Mark each flow as an event or a request, ask the hospital for its interface specification and real sample messages, and ask the EHR vendor what its FHIR API can read and write in the version installed. Those three answers set the scope, the cost and the timeline.

If you are planning an integration with a hospital's record system, in India or the US, tell us what you need to connect and we will tell you which route fits and what it will take.

Last updated:

About the author

Written by Gitaben Vaidya, founder of DECK IT — a software company in Ahmedabad, India, with a second office in Newark, Delaware — with 13 years in IT delivery and project management across smart mobility, healthcare and enterprise software projects. Also founder of MedSlay, the AI clinical documentation product owned by our sister company Slaya Technologies, and MMBtu DESK, an AI platform for India’s gas sector. Contact DECK IT

Let’s connect with DECK IT

Let’s connect

Tell us what you want to build or fix. A real person reads every enquiry.

We reply within one working day.