Clinical9 min read

HL7 FHIR Integration for Clinical Labs: The 2026 Guide

Marcus Wei
Product Lead · Published · Updated

How clinical labs connect a LIMS to EHRs with HL7 v2 and FHIR in 2026: orders, results, LOINC coding, ABDM in India, consent, and a vendor checklist.

A FHIR-ready LIMS exchanges lab orders and results with EHRs, hospital systems and patient apps using HL7 FHIR resources over REST APIs, while still handling the HL7 v2 messages that most hospital interfaces send today. This 2026 guide explains how HL7 v2 and FHIR differ, which lab workflows each one serves, what India's ABDM and US interoperability rules mean for labs, and how to evaluate a LIMS for both.

If you are new to lab software, start with what a LIMS is and what it does, then come back to the integration layer.

HL7 v2 vs FHIR: what is the difference?

HL7 v2 is an event-driven messaging standard that sends pipe-delimited text messages between systems, while FHIR (Fast Healthcare Interoperability Resources) models health data as discrete resources that systems read and write through RESTful APIs in JSON or XML. Both are published by HL7 International, and both are in active use in clinical labs.

HL7 v2 messages a lab uses

HL7 v2 has been the backbone of lab interfaces for decades. A typical lab interface uses a small set of message types:

  • ORM^O01 (general order message), common in older v2.3 and v2.4 interfaces
  • OML^O21 (laboratory order message), used in later v2 versions for lab-specific orders
  • ORU^R01 (unsolicited observation result), the standard way to send results back
  • ACK (acknowledgment), confirming that a message was received and accepted

Inside each message, segments carry the data: MSH for the header, PID for the patient, ORC and OBR for the order, OBX for each result value, and SPM for specimen details in later versions. Messages usually travel over MLLP on a TCP connection inside a hospital network or VPN.

Almost every HIS, EHR and middleware product supports v2, but two sites on "HL7 2.5" often fill the same fields differently, so every interface needs its own mapping and testing.

FHIR resources for lab workflows

FHIR breaks the same information into resources that can be created, read, updated and searched individually. Most production implementations, including national implementation guides, are built on FHIR R4. These are the core resources for a lab:

ResourceWhat it holdsLab example
PatientDemographics and identifiersName, date of birth, hospital MRN
ServiceRequestThe test orderA physician orders a lipid panel
SpecimenThe collected sampleSerum tube, collection time, container
ObservationOne result valueLDL cholesterol with units and reference range
DiagnosticReportThe signed report that groups resultsLipid panel report with status "final"

Supporting resources such as Practitioner, Organization, Encounter and Task fill in who ordered, where, and what work is pending. A Bundle packages several resources together, for example a DiagnosticReport with all its Observations.

Why both still matter in 2026

Clinical labs need both because their partners use both. Hospital and EHR interfaces built over the last twenty years still run on v2. New national programs, patient apps and cloud EHRs expose FHIR APIs instead.

Instruments are a third layer: analyzers usually talk ASTM or HL7 v2 to the LIMS or to middleware. Our guide to instrument integration best practices covers that side in detail.

Common lab integration flows

Most lab integrations fall into four flows. The partner on the other end usually decides which standard each one uses.

FlowHL7 v2FHIR
Order in from EHR or HISORM or OML messageServiceRequest, Patient, Specimen
Result out to EHR or HISORU^R01 with OBX segmentsDiagnosticReport with Observations
Patient or physician accessRarely usedRead access through an API or portal
Referral to a reference labORM/OML out, ORU backServiceRequest out, DiagnosticReport back

Order in

An electronic order removes manual re-registration at the collection desk. The LIMS receives the order, matches or creates the patient, attaches the correct test panel and prints barcode labels. The key design question is what happens when an order arrives for a test code the lab does not recognise: it should land in an exception queue, not disappear.

Result out

Results should leave the LIMS only after validation and authorization. Each result needs a status (preliminary, final, corrected), units, reference range and abnormal flags. Corrected results must be sent as corrections that the receiving system can link to the original, not as new unrelated reports.

India: ABDM and FHIR-based health records

India's Ayushman Bharat Digital Mission (ABDM), run by the National Health Authority, uses FHIR as the basis for exchanging digital health records. Health records shared through ABDM are structured as FHIR documents that follow implementation guides published by NRCeS, the National Resource Centre for EHR Standards, which include profiles for records such as diagnostic reports.

At a high level, ABDM gives patients an ABHA (Ayushman Bharat Health Account) identifier and registers health facilities and professionals. Records move between a provider and the patient's chosen app only after the patient gives consent through a consent manager.

For an Indian diagnostic lab, this has practical consequences:

  • Results need to be stored as structured data, not only as PDF reports
  • Patient identifiers, including ABHA where the patient provides it, must be captured cleanly at registration
  • Consent and the record of what was shared must be traceable

ABDM specifications and onboarding steps change over time, so check the current ABDM and NRCeS documentation before you plan a project. For the wider picture of software choices for Indian labs, see our page on LIMS software in India.

United States: interoperability rules in brief

In the US, federal interoperability and information-blocking rules that followed the 21st Century Cures Act push certified health IT toward standardized FHIR APIs. The US Core Data for Interoperability (USCDI), the baseline data set those rules reference, includes laboratory data.

For a lab, the effect is indirect but real: hospitals and practices increasingly expect lab results that map cleanly into their certified EHR and can be shared with patients on request. CLIA continues to govern lab testing and result reporting, and HIPAA governs how protected health information is used and disclosed. The clinical labs page describes how LabPi supports CLIA, CAP and HIPAA programs.

Terminology: LOINC, SNOMED CT and UCUM

HL7 v2 and FHIR define how data moves; terminologies define what it means. Without shared codes, a receiving system cannot tell that your "HB" and another lab's "Hgb" are the same test.

TerminologyUsed forExample
LOINCIdentifying the test or observationHemoglobin in blood
SNOMED CTSpecimen types, organisms, coded findingsSerum specimen, organism identified in culture
UCUMUnits of measuremg/dL, mmol/L, U/L

LOINC is maintained by the Regenstrief Institute and is the expected code for lab observations in most national guides. SNOMED CT covers clinical concepts such as specimen types and qualitative results. UCUM gives units a machine-readable form, which matters when a receiving system graphs results over time.

A practical approach is to add standard code columns to your test master and keep your local codes alongside them. Map the high-volume tests first, then work down the menu. Our LIMS glossary explains many of these terms in plain language.

FHIR APIs are commonly protected with OAuth 2.0, often through the SMART on FHIR profile, which lets an app request only the data scopes it needs.

Controls to expect around any lab integration:

  • Encryption in transit for every interface, including VPN or TLS for v2 feeds
  • Role-based access, with MFA for portal users and SSO for staff where possible
  • An audit trail of who viewed, changed, released or sent each result
  • Recorded patient consent where the law or program requires it, such as ABDM sharing
  • Data minimisation: send only the fields the receiving system needs

In India, the Digital Personal Data Protection Act, 2023 sets duties for handling personal data; in the US, HIPAA applies to covered entities and their business associates. LabPi's security and compliance page describes the platform controls and what stays with the lab.

Checklist for evaluating a FHIR-ready LIMS

Use these questions in vendor demos. Ask to see each one working, not only listed on a slide.

QuestionWhy it matters
Which HL7 v2 message types and versions are supported?Most hospital interfaces still use v2
Which FHIR version and resources are supported?Partners will specify R4 resources and profiles
Can it receive orders and send results in both standards?You will likely run both for years
How are unknown test codes and patients handled?Silent failures cause missed results
Can the test master hold LOINC, SNOMED CT and UCUM codes?Structured data is required for national exchange
How are corrected results sent?Receivers must link corrections to originals
Is there a documented REST API and test sandbox?Integration work needs a safe environment
How are API clients authenticated and audited?Every disclosure must be traceable
How is patient consent captured and enforced?ABDM and portal access depend on it
Can the lab monitor message queues and errors itself?Waiting on the vendor delays results

For the broader buying process, see the guide to choosing a LIMS.

How LabPi fits

LabPi's clinical configuration supports HL7 and FHIR for orders and results, with safeguards for clinical data. Analyzer results arrive through ASTM and HL7 feeds from chemistry, hematology, immunoassay and molecular platforms, as described under lab automation and instrument connectivity.

Before release, results pass through reference ranges, delta checks, autoverification rules and supervisor review, and critical values require documented notification. Authorized reports go out through doctor and patient portals with consent controls and MFA, or by email, SMS and WhatsApp.

For other systems, the enterprise platform and API offers an OpenAPI-documented REST API, webhooks and a sandbox environment for development, with SSO and MFA at the tenant level and a time-stamped audit trail of changes. Ask in a demo to see the specific message types, FHIR resources and code mappings your partners require.

Key takeaways

  • HL7 v2 (ORM/OML orders, ORU results) still runs most hospital and EHR lab interfaces.
  • FHIR models lab data as ServiceRequest, Specimen, Observation, DiagnosticReport and Patient resources over REST.
  • India's ABDM exchanges health records as FHIR documents based on NRCeS implementation guides, with patient consent.
  • LOINC, SNOMED CT and UCUM give results a shared meaning across systems.
  • Evaluate a LIMS on working demos of both standards, code mapping, consent and audit trails.

If you are planning an EHR, hospital or ABDM integration and want to see how orders and results move through LabPi, book a demo and bring your partner's interface specification. We will walk through your flows and show where each one sits in the platform.

Frequently asked questions

What is the difference between HL7 v2 and FHIR for labs?

HL7 v2 sends pipe-delimited messages such as ORM or OML for orders and ORU for results over a direct connection. FHIR models the same data as resources like ServiceRequest, Observation and DiagnosticReport that systems exchange through REST APIs in JSON or XML. Most labs need both because hospital interfaces still use v2 while new programs and apps use FHIR.

Which FHIR resources does a clinical lab need?

The core resources are Patient, ServiceRequest for the order, Specimen for the collected sample, Observation for each result value, and DiagnosticReport for the signed report that groups the results. Practitioner, Organization and Bundle are commonly used alongside them.

Does ABDM use FHIR?

Yes. India's Ayushman Bharat Digital Mission exchanges health records as FHIR documents that follow implementation guides published by NRCeS, and records are shared only with the patient's consent. Labs should check the current ABDM and NRCeS documentation before starting an integration project.

Why do lab results need LOINC codes?

LOINC gives each test a standard identifier, so a receiving EHR or health record app can recognise that results from different labs describe the same measurement. Without it, results cannot be reliably compared, graphed or shared across systems.

Ready to modernize your lab?

See how LabPi can transform your workflow in 30 minutes.

Book a Free Demo