Back to blog

June 28, 2026

healthcare-itfhirhl7interoperability

The Basics of Healthcare Interoperability: HL7 & FHIR

A plain-language introduction to how hospitals and software systems share patient data — and the standards that make it possible.


On this page
What is healthcare interoperability?
What is HL7?
A simple HL7 v2 message

The Basics of Healthcare Interoperability: HL7 & FHIR

If you've ever moved to a new city and had to explain your full medical history to a new doctor from scratch, you've felt the problem this post is about.

What is healthcare interoperability?

Healthcare interoperability means that different software systems — a hospital's patient record system, a lab, a pharmacy, a specialist's clinic — can share and understand each other's data.

Without it, a blood test result sitting in one system might never reach your doctor's screen in another. Staff end up faxing documents, retyping data by hand, or making phone calls just to move information that should flow automatically.

Interoperability solves that. It's the difference between systems that can talk to each other and systems that exist in isolation.


What is HL7?

HL7 stands for Health Level 7. It's an organization — and a set of standards — that has been defining how healthcare data should be structured and exchanged since the 1980s.

The most widely used version is HL7 v2, a messaging standard that hospitals have relied on for decades. When a patient is admitted, when a lab order is placed, when a result comes back — HL7 v2 messages carry that information between systems.

A simple HL7 v2 message

HL7 v2 messages look a bit cryptic at first, but the structure is straightforward: each line is a segment, and fields are separated by pipe characters (|).

MSH|^~\&|LAB|HOSPITAL|EHR|CLINIC|20240415120000||ORU^R01|MSG001|P|2.5
PID|1||123456^^^HOSPITAL^MR||Roe^Richard||19900101|M
OBX|1|NM|2345-7^Glucose^LN||5.4|mmol/L|3.9-6.1||||F

In plain English, this message says:

  • MSH — this is a lab result message sent from the LAB system to the EHR system
  • PID — the patient is Richard Roe, born 1990-01-01
  • OBX — the glucose level is 5.4 mmol/L, which is within the normal range (3.9–6.1)

It's compact and efficient, which is exactly why it stuck around — but it's not exactly human-readable.

HL7 v2 system interactions


What is FHIR?

FHIR (pronounced "fire") stands for Fast Healthcare Interoperability Resources. It's a modern standard published by HL7 — same organization, newer approach.

Where HL7 v2 sends flat text messages between systems, FHIR works like a web API. Data is represented as resources (Patient, Observation, Medication, etc.) in standard JSON or XML, and you access them over HTTP — the same way any web app communicates.

A simple FHIR Patient resource

{
  "resourceType": "Patient",
  "id": "123456",
  "name": [
    {
      "family": "Roe",
      "given": ["Richard"]
    }
  ],
  "birthDate": "1990-01-01",
  "gender": "male"
}

This is just JSON. Any developer who has built a web app can read it. That's the point.


A real-world example: a lab test from start to finish

Here's how a blood test might travel through a healthcare system using these standards:

Lab test flow diagram

  1. Doctor orders the test. The EHR (Electronic Health Record) sends an HL7 v2 ORM (Order) message to the lab system.
  2. Lab runs the test. The blood sample is processed.
  3. Lab sends the result back. The lab system sends an HL7 v2 ORU (Observation Result) message to the EHR.
  4. Doctor sees the result. The EHR displays the glucose level, flagged if it's out of range.

In a FHIR-based system, the same flow would happen via REST API calls — the EHR would POST a ServiceRequest resource to order the test, and the lab would POST back an Observation resource with the result.


HL7 v2 vs FHIR: plain language comparison

HL7 v2 FHIR
Format Pipe-delimited text JSON / XML
Style Messages pushed between systems REST API calls
Readability Hard for humans Easy for developers
Age 1980s–present 2014–present
Adoption Everywhere (legacy) Growing fast
Mobile / web friendly No Yes

HL7 v2 vs FHIR comparison

HL7 v2 is like a fax machine — it works, it's everywhere, and hospitals built entire workflows around it. FHIR is like email — it's flexible, developer-friendly, and built for how modern software actually works.


Why FHIR is growing — and why HL7 v2 isn't going away

FHIR is gaining ground for a few key reasons:

  • Developers can build with it quickly. Standard HTTP and JSON means any web or mobile developer can work with healthcare data without learning a specialized format.
  • Regulators are pushing it. In the US, for example, the government now requires certain health systems to expose patient data via FHIR APIs.
  • It powers patient-facing apps. Apple Health and Google Health both use FHIR to let patients access their own records.

But HL7 v2 isn't going anywhere soon. Hospitals have been running it for 30+ years. The cost of replacing deeply embedded infrastructure is enormous, and existing systems work well enough. Most real-world healthcare IT environments run both — FHIR at the edges, talking to new apps and APIs, while HL7 v2 keeps the internal machinery running.


Wrapping up

Healthcare interoperability is about making sure data follows the patient — not the other way around. HL7 v2 laid the groundwork and still powers the backbone of most hospital systems today. FHIR represents where healthcare IT is heading: open, web-native, and built for the modern developer.

If you're working in healthcare software, understanding both isn't optional — it's the foundation.