On this page
If you work in healthcare IT, “HL7” and “FHIR” come up constantly — often as if they were competitors. They aren’t. FHIR is itself an HL7 standard; HL7 v2, CDA and FHIR are different generations and styles of the same mission: letting healthcare systems exchange data reliably. This guide explains what each standard is, when to use it, and how an integration engine such as Mirth Connect ties them together in the real world.
Revised on 31 October 2026, it adds a version-status table, the US and Indian rules that pin those versions, a v2-to-FHIR mapping, the options after Mirth Connect’s licence change, a worked lab example, common mistakes and an interface checklist.
The healthcare interoperability landscape
A single hospital might run an EHR, a laboratory information system (LIS), radiology (RIS/PACS), pharmacy, billing and a dozen departmental applications — often from different vendors. None of them speaks the others’ internal language. Interoperability standards are the shared vocabulary that lets them exchange orders, results, admissions and documents without custom point-to-point code for every pair of systems.
Smaller providers have the same problem at a smaller scale. A diagnostic lab has analysers that speak instrument protocols, referring hospitals that want HL7 v2, patients who want a report on their phone, and, in India, a national health stack that expects FHIR. The standard you use depends on which of those conversations you are having.
HL7 v2: the workhorse
HL7 version 2 is the most widely deployed healthcare messaging standard. It uses compact, delimited text messages (segments separated by carriage returns, fields by the pipe | character, components by the caret ^) triggered by real-world events:
- ADT — admit, discharge, transfer and patient-update events
- ORM / OML / OMG — orders (ORM in older versions; OML for lab orders and OMG for general clinical orders in later v2 releases)
- ORU — observation results, such as lab results returning to the EHR
- SIU — scheduling; MDM — medical documents; DFT — financial transactions and charges
Messages usually travel over TCP using the MLLP framing protocol, inside a VPN or TLS tunnel, and each one is acknowledged with an ACK. HL7 v2 is battle-tested and everywhere — but it is loosely specified and highly customisable (Z-segments, optional fields), so real-world messages vary between vendors and even between sites running the same product. That variability is exactly why an integration engine and experienced mapping are essential.
Here is an illustrative lab result, an ORU^R01 carrying one haemoglobin value. The patient and identifiers are invented.
MSH|^~\&|LIS|CITYLAB|EHR|GENHOSP|20261031093000||ORU^R01|MSG00042|P|2.5.1— header: sender, receiver, time, message type, control ID, versionPID|1||MRN12345^^^GENHOSP^MR||SAMPLE^PATIENT||19850214|F— the patient, with the hospital’s medical record numberOBR|1|ORD778|ACC5521|58410-2^CBC panel^LN|||20261031071500— the order: placer and filler numbers, the test (a LOINC code) and collection timeOBX|1|NM|718-7^Hemoglobin^LN||13.2|g/dL|12.0-15.5|N|||F— one result: numeric value, units, reference range, normal flag, final status
The receiver answers with an ACK whose MSA segment carries AA (accepted), AE (error) or AR (rejected) and echoes MSG00042. A sender that does not wait for that ACK, or does not retry on a timeout, will lose results without anyone noticing.
HL7 v3 and C-CDA
HL7 v3 introduced a rigorous, model-driven XML approach but saw limited adoption for messaging. Its most successful descendant is the Clinical Document Architecture, and in the US specifically C-CDA (Consolidated CDA) — the XML document format used for care summaries, referrals and discharge documents, and for exchange through Health Information Exchanges (HIEs). If you’re sharing documents across organisations, you’re very likely dealing with C-CDA.
FHIR: the modern API standard
FHIR (Fast Healthcare Interoperability Resources) is the current direction of travel. Instead of event-triggered messages, FHIR models healthcare concepts as resources — Patient, Observation, Encounter, MedicationRequest — exposed through a RESTful web API using JSON or XML. FHIR R4 is the release most production systems implement today, and it is the foundation of US regulatory interoperability under the 21st Century Cures Act through the US Core implementation guide and the USCDI data set. Outside the US, national programmes build on it too — India’s Ayushman Bharat Digital Mission (ABDM), for example, uses FHIR R4-based profiles for health records.
FHIR adds modern building blocks older standards lacked: SMART on FHIR for OAuth 2.0-secured app launch and access to EHR data, Bulk FHIR ($export) for population-level extracts, and CDS Hooks for decision support inside the clinician’s workflow. FHIR can also be used for messaging and documents, but its REST API is where most adoption is.
FHIR versions and the rules that pin them (October 2026)
Version questions come up in every FHIR project. The status below was checked against HL7’s published version lists on 31 October 2026.
| Specification | Status as of October 2026 | What it means for a new project |
|---|---|---|
| FHIR R4 (4.0.1) | Published October 2019; the first release with normative content | Build here. US Core and the ABDM guide both sit on R4. |
| FHIR R4B (4.3.0) | Published May 2022 as an interim release | Rarely targeted by production APIs. |
| FHIR R5 (5.0.0) | Published March 2023 | Useful for specific features; few regulated APIs require it. |
| FHIR R6 | Not yet published. Second full ballot (6.0.0-ballot5) dated July 2026 | Track it, prototype against it, but don’t ship production on a ballot. |
| US Core | 6.1.0 is the HTI-1 baseline for USCDI v3; newer releases up to 9.0.0 (May 2026) exist, all on R4 | Certified US EHR APIs support 6.1.0 at minimum; check what your partner EHR offers. |
| SMART App Launch | 2.0.0 is the version required in the ONC programme from 2026; 2.2.0 (2024) is the latest | Build for SMART v2 scopes and PKCE, not v1. |
| Bulk Data Access | STU 3 (3.0.0) published December 2025; STU 4 in ballot | Use $export for population extracts instead of paging through searches. |
| HL7 Version 2 to FHIR guide | STU 1 (1.0.0) published October 2025 | A starting point for segment-to-resource mapping. |
Sources: HL7’s package lists for FHIR core, US Core, SMART App Launch, Bulk Data and v2-to-FHIR.
US rules. Under ASTP/ONC’s HTI-1 final rule, USCDI v3 became the baseline in the Certification Program on 1 January 2026, with certified FHIR APIs moving to US Core 6.1.0 and SMART App Launch 2.0.0. ONC has since released USCDI v3.1, reflecting enforcement discretion on some v3 data elements, and on 26 October 2026 it released the HTI-5 final rule, which removes and revises certification criteria to steer the programme further towards FHIR APIs, with effective dates staggered into 2027 and beyond. The December 2025 proposal would have adopted USCDI v3.1; read the final text for the version and dates that bind your product before you plan certification work.
India: ABDM and the NRCeS FHIR profiles
In India, the National Resource Centre for EHR Standards (NRCeS) publishes the FHIR Implementation Guide for ABDM, built on FHIR R4; version 6.5.0 is the current published release as of October 2026. It defines document-style records, each a FHIR Bundle with a Composition first: DiagnosticReportRecord for lab and radiology reports, OPConsultRecord, PrescriptionRecord, DischargeSummaryRecord, ImmunizationRecord, WellnessRecord, HealthDocumentRecord and an InvoiceRecord for billing (see the profile list).
In ABDM terms a lab or hospital is a health information provider (HIP). Records linked to a patient’s ABHA are shared with a health information user only after the patient consents through ABDM’s consent flow. That consent is an ABDM mechanism; your duties under the DPDP Act sit alongside it, and our DPDP compliance checklist covers those.
The practical lesson: an Indian provider that already sends HL7 v2 to hospitals still needs a FHIR R4 output to take part in ABDM. The two run side by side.
HL7 vs FHIR: when to use which
- Use HL7 v2 for real-time, event-driven feeds between clinical systems inside and between facilities — it’s what labs, EHRs, analysers’ middleware and ancillary systems already speak.
- Use C-CDA for document-level exchange, especially with HIEs and for transitions of care.
- Use FHIR for modern APIs, patient- and provider-facing apps, analytics extracts, payer and patient-access APIs, and anywhere Cures Act / US Core conformance is required.
In practice most organisations run all of them at once — new FHIR APIs on top of an estate that still moves large volumes of HL7 v2 messages every day. The question is rarely “HL7 or FHIR?” but “where does each one belong, and what translates between them?”
| Scenario | Standard to use | Why |
|---|---|---|
| Admissions feed from a hospital system to the lab or radiology | HL7 v2 ADT over MLLP | Every vendor supports it; it is real time |
| Lab orders and results between EHR and LIS | HL7 v2 OML/ORM and ORU | Universal vendor support; FHIR order workflows are less mature in most EHRs |
| Analyser to LIS | ASTM or HL7, depending on the instrument | That is what the instruments and their middleware speak |
| Patient or clinician app reading EHR data | FHIR REST with SMART on FHIR | OAuth scopes, JSON, and required of certified US EHRs |
| Population extract for analytics or a payer | Bulk FHIR $export | Built for large asynchronous extracts |
| Discharge summary or referral to a US HIE | C-CDA, or FHIR documents where the HIE accepts them | Most HIEs still run on documents |
| Lab report to a patient’s ABHA-linked record in India | FHIR R4 DiagnosticReportRecord bundle | What the ABDM guide defines |
| US claims and eligibility checks | X12 EDI (837, 270/271) | The adopted HIPAA transaction standards |
Mapping HL7 v2 to FHIR
Most FHIR projects start with v2 data. HL7’s v2-to-FHIR guide gives a reference mapping; the shape is roughly this:
| HL7 v2 segment | FHIR R4 resource | Watch for |
|---|---|---|
| MSH | MessageHeader, Bundle, Provenance | Keep the control ID for tracing and duplicate detection |
| PID | Patient | Multiple identifiers with different assigning authorities |
| PV1 | Encounter | Visit numbers that are reused or missing in outpatient flows |
| ORC / OBR | ServiceRequest, DiagnosticReport | Placer versus filler order numbers; amended reports |
| OBX | Observation | Value types, units (UCUM), reference ranges as text |
| SPM | Specimen | Often absent in older feeds |
| NTE | Annotation on the related resource | Free-text comments that carry clinical meaning |
| Z-segments | Extensions, or dropped by agreement | Undocumented fields that someone downstream depends on |
The mapping table is the easy part. The work is in terminology (local test codes to LOINC), units, corrected results and patient identity. Budget for that first.
Where the integration engine comes in
That translation is the job of an integration engine. Mirth Connect is the best-known example: for years it was open source, and from version 4.6 NextGen Healthcare made it a commercially licensed product, while the community continues the last open-source codebase as the Open Integration Engine. Commercial engines such as Rhapsody and InterSystems products fill the same role.
An engine receives messages in one format, validates and transforms them, applies routing and filtering, and delivers them reliably — with queuing, error handling, alerting and reprocessing. A single engine can accept an inbound HL7 v2 ORU, map it to a FHIR Observation and post it to an EHR’s FHIR API, while also sending a C-CDA to an HIE. It’s the translation layer that makes a mixed-standard estate behave like one system.
NextGen announced the licence change on 19 March 2025 and named 4.5.2 as the last open-source release. The Open Integration Engine is licensed under the Mozilla Public License 2.0 and has shipped its own releases through 2026. If you run open-source Mirth today, these are the realistic options:
| Option | Good fit | Watch out for |
|---|---|---|
| Stay on your current open-source version | A short holding position while you decide | No further open-source releases from NextGen, so Java and library updates are on you |
| License Mirth Connect 4.6 or later | Organisations that want a vendor contract and support | Licence cost and terms; budget it like any commercial engine |
| Move to Open Integration Engine | Teams that want to stay open source and keep the Mirth way of building channels | Community support only unless you contract it; test every channel and extension before cutover |
| Another commercial engine | Large estates that want a single vendor for many interfaces | Channels have to be rebuilt; plan a phased migration |
| Custom code | One or two simple FHIR APIs with no v2 traffic | You rebuild queuing, retries, replay and monitoring that an engine already has |
We are not neutral on custom code: for anything beyond a couple of APIs, an engine is cheaper over its life. Where custom services make sense, such as a FHIR facade in front of a legacy database, we build them in Node.js or Python alongside the engine rather than instead of it.
Lab software is a good example of all of this in one place: our own PathLab Software interfaces with analysers over HL7 and ASTM before results are validated and reported.
Worked example: one lab result, three destinations
Illustrative only, not client work. A mid-sized diagnostic lab in India serves walk-in patients and two referring hospitals. One blood sample creates three outputs:
- At accession the sample gets a barcode tied to the order.
- The analyser reads the barcode, asks the LIS for the tests and returns results over ASTM or HL7.
- A pathologist reviews flagged values and validates the report.
- For the referring hospital, the engine builds an ORU^R01, maps the lab’s test codes to the hospital’s, and sends it over MLLP inside a VPN, retrying until it receives an AA acknowledgement.
- For a patient who has linked an ABHA and given consent, the same report goes out as a FHIR R4
DiagnosticReportRecordbundle following the NRCeS profiles. - The patient receives the signed PDF on WhatsApp.
PathLab Software handles barcode accession, analyser interfacing over HL7 and ASTM, doctor validation, ABDM integration and WhatsApp report delivery; it is a multi-tenant PHP 8.3 application on MariaDB. The hospital feed in step 4 is the classic engine job. For the messaging side, see WhatsApp Business API development.
The same pattern runs in the other direction for clinics. Radiatus OneHealth hosts unmodified certified OpenEMR plus modules, and OpenEMR’s own FHIR documentation describes an R4 API with SMART on FHIR and bulk export. Lab results then arrive through an HL7 v2 interface, while apps read the record over FHIR. Our OpenEMR services cover that setup.
Getting it right
The standards are only half the battle; the other half is the messy reality of:
- Vendor-specific variations and Z-segments that need per-interface mapping
- Code systems — local lab codes versus LOINC, SNOMED CT and ICD — and the terminology mapping between them
- Patient identity matching across systems with different identifiers
- Character encodings, time zones and date formats
- Secure transport (MLLP over VPN or TLS, HTTPS with OAuth for FHIR) and audit logging of every message containing PHI — see our guide to HIPAA-aligned workloads on AWS
- Monitoring, alerting and a reprocessing procedure for when (not if) a downstream system is unavailable
This is where experience pays for itself — a well-designed channel is reliable and maintainable for years, while a rushed one becomes a 2am support call.
Common mistakes
- Building from the spec, not from real messages. Ask for a week of de-identified production samples before writing a mapping.
- Ignoring ACK handling. Without waits, timeouts and retries, messages disappear quietly.
- No duplicate detection. Retries without idempotency create duplicate results in the chart.
- Leaving terminology to the end. Local-to-LOINC mapping needs a clinical owner and takes longer than the code.
- Matching patients on name and date of birth alone. Use identifiers, and route uncertain matches to a work queue.
- Starting a regulated product on R5 or an R6 ballot when partners and regulators expect R4.
- Broad SMART scopes such as all-resource read access when the app needs two resource types.
- Keeping PHI in the engine’s message store forever. Set retention, encrypt the store and restrict who can browse it.
- Upgrading Mirth without checking the licence. Version 4.6 and later need a commercial agreement.
Interface specification checklist
Agree these with the other side before any build starts. They also drive cost and timeline more than the choice of standard does; vendor test-environment access is often the critical path.
- Message types and trigger events, with real sample messages
- Standard version and profile: v2 version, or FHIR release plus implementation guide and version
- Transport, endpoints, VPN or TLS details and authentication
- Field-level mapping, including Z-segments and extensions
- Code-system mapping tables, with a named owner for each
- Patient identifiers and the matching rule
- Acknowledgement, error, retry and duplicate rules
- Expected volumes and peak rates
- PHI handling in the engine: retention, encryption, access
- Alert thresholds and who is paged
- Test scripts, sign-off criteria, cutover and rollback plan
Before go-live, have the FHIR endpoints and the engine’s admin interface security-tested; VAPT services cover APIs as well as web apps. For the sector view, see healthcare.
HL7 and FHIR aren’t rivals — they’re layers of the same interoperability story. The winning move is a clean integration architecture that speaks all of them.
Radiatus builds and supports healthcare interfaces across HL7 v2, FHIR, C-CDA and X12 EDI — through HL7, FHIR & EDI integration, Mirth Connect development and support, FHIR & SMART on FHIR, interface engine support and HIE integration. Talk to an integration engineer about your interoperability roadmap.
HL7 vs FHIR FAQ
Is FHIR replacing HL7 v2?
Not any time soon. New APIs, apps and national programmes use FHIR, but most clinical systems still exchange orders, results and admissions over HL7 v2. Expect to run both for years, with an engine translating between them.
Which FHIR version should we build on in 2026?
FHIR R4 (4.0.1). US Core and India’s ABDM guide are both built on it, and it is what partner EHRs expose. Use R5 only for a specific feature a partner supports, and treat R6 as something to prototype against.
Has FHIR R6 been released?
Not as of 31 October 2026. HL7 ran a second full R6 ballot in July 2026, and many resources are expected to become normative when it is published, but there is no final release yet.
Is Mirth Connect still free?
Not for new versions. From 4.6, Mirth Connect needs a commercial licence from NextGen Healthcare, and 4.5.2 was the last open-source release. The Open Integration Engine continues that code as an open-source fork under the Mozilla Public License 2.0.
Does ABDM use HL7 v2 or FHIR?
FHIR. NRCeS publishes the FHIR Implementation Guide for ABDM on FHIR R4, with document bundles such as DiagnosticReportRecord for lab reports. HL7 v2 may still be used inside a hospital, but records shared through ABDM use these FHIR profiles.
Which US Core version do certified US EHRs support?
Under HTI-1, certified FHIR APIs support US Core 6.1.0 for USCDI v3 from 2026. The HTI-5 final rule released on 26 October 2026 revises the certification programme again, so check its text for any change that affects your product.
Want help putting this into practice?
Talk to a senior engineer about your specific situation — no sales script.






Compliance-first delivery