# HL7 v2 vs FHIR: integrating Indian hospital systems

> HL7 v2 vs FHIR for Indian hospitals: how ADT, ORM and ORU messages work, where FHIR R4 fits, and integration patterns that link HMIS, LIS and EMR.

By Vestcodes team. Published 2026-11-29. Source: https://www.vestcodes.com/insights/hl7-v2-vs-fhir-indian-hospitals

## Key takeaways

- HL7 v2 and FHIR are not rivals in a hospital. v2 carries event feeds between inside systems, and FHIR R4 carries resources over APIs and ABDM exchange.
- India's national EHR standards list HL7 v2.8.2 for message exchange, while ABDM's published implementation guide is built on FHIR R4.
- ADT announces patient and visit events, ORM or its newer order messages carry orders, and ORU^R01 carries results. Together they cover most HMIS to LIS traffic.
- A v2-to-FHIR conversion is a design task, not a table lookup. HL7 itself says mappings vary by implementation.
- Put an integration engine in the middle, keep patient identity and terminology mapping in one place, and test with synthetic messages before touching a live feed.

A modern Indian hospital runs several systems that have to agree on who the patient is: an HMIS for registration and billing, a LIS for the lab, an EMR for clinical notes, and often a RIS or PACS for imaging. HL7 v2 and FHIR are the two standards that get asked about when these systems must talk. This article compares HL7 v2 vs FHIR for Indian hospitals, explains the three v2 messages you will meet first (ADT, ORM and ORU), and sets out integration patterns that work in practice.

## Two standards, two jobs

**HL7 v2** is HL7's first information exchange standard. HL7's [comparison with FHIR](https://hl7.org/fhir/R4/comparison-v2.html) calls it one of its most widely adopted and notes how prominent it is in in-patient settings worldwide. Messages are built from segments, sent when an event happens, and usually travel between systems on the same network.

**FHIR** (Fast Healthcare Interoperability Resources) models health data as resources such as Patient, Encounter, Observation and DiagnosticReport, with a REST API. The current widely used release is [R4, version 4.0.1](https://hl7.org/fhir/R4/), described by HL7 as mixed normative and trial-use content.

Two Indian reference points show where each sits:

- India's national [EHR Standards](https://www.nrces.in/standards/ehr-standards-for-india), kept on the NRCeS site, list ANSI/HL7 V2.8.2-2015 for event and message exchange.
- The [FHIR Implementation Guide for ABDM](https://nrces.in/ndhm/fhir/r4/) is built on FHIR R4. The version on the page at the time of writing is 6.5.0, dated 8 May 2025, and a newer 7.0.0 preview is also published. See [the NRCeS FHIR implementation guide](/insights/nrces-fhir-implementation-guide) for how to read it.

So a hospital often has v2 on the inside and FHIR on the edge facing ABDM, patient apps and partners.

## HL7 v2 in five minutes

A v2 message is plain text. Each line is a segment, named by three letters, with fields split by a pipe. The first segment, MSH, is the header, and its MSH-9 field names the message type and trigger event, such as ADT^A01 or ORU^R01. Over a network, v2 usually rides on MLLP, a thin framing in which the message is wrapped between a start byte (0x0B) and an end byte (0x1C) followed by a carriage return (0x0D), as in HL7's [MLLP transport specification](https://www.hl7.org/documentcenter/private/standards/v3/edition_web/infrastructure/transport/transport_mllp.html). The receiver answers with an ACK message.

### ADT: patient administration

ADT messages tell other systems what happened to a patient's registration or visit. From the [v2.5 patient administration chapter](https://www.hl7.eu/HL7v2x/v25/std25/ch03.html):

- **A01** admit or visit notification: the stay begins, with the patient assigned a bed.
- **A03** discharge or end of visit.
- **A04** register a patient who is not admitted, such as an emergency visitor.
- **A08** update patient information, for example a changed address or name.

The structure of an admit message is MSH, EVN (event), PID (patient identification) and PV1 (patient visit), with optional segments for next of kin and others. In an Indian hospital, the HMIS is usually the source of ADT, and the LIS, EMR and RIS are the receivers that need the patient and visit before they can accept an order.

### ORM: orders

ORM^O01 is the classic general order message. It deserves a caution: the [v2.5 ordering chapter](https://www.hl7.eu/HL7v2x/v25/std25/ch04.html) marks it as left for backward compatibility only and recommends the OMG, OML, OMD, OMS, OMN, OMI and OMP triggers for new work. Many hospital interfaces still run ORM, so the practical rule is to ask which message the system at the other end actually supports. A lab order from HMIS to LIS commonly goes as an order message with ORC (order control) and OBR (observation request) segments.

### ORU: results

ORU^R01 is the unsolicited observation message. The [v2.5 observation reporting chapter](https://www.hl7.eu/HL7v2x/v25/std25/ch07.html) describes it as the message for sending results such as lab values to other systems. It carries PID, optionally PV1 and ORC, then an OBR as the report header, and one OBX per result. Here is a synthetic example, with invented data, of a haemoglobin result:

```text
MSH|^~\&|LIS|HOSPITAL_A|HMIS|HOSPITAL_A|20261129101500+0530||ORU^R01^ORU_R01|MSG00042|P|2.5
PID|1||UHID10045^^^HOSPITAL_A^MR||Test^Patient||19900101|F
OBR|1|ORD123|LAB456|718-7^Hemoglobin^LN
OBX|1|NM|718-7^Hemoglobin^LN||11.2|g/dL|12.0-15.5|L|||F
```

Read it top to bottom: who sent it, which patient, which order and which test, then the value, unit, reference range, an abnormal flag and a final status. Coded tests in a result should use a terminology both sides share, and India's EHR Standards name LOINC for tests and observations and SNOMED CT as the primary clinical terminology.

## How FHIR R4 does the same work

FHIR replaces the pipe-delimited message with resources and a REST API. HL7's [RESTful API page](https://hl7.org/fhir/R4/http.html) defines the core interactions your integration will use:

- **read:** fetch one resource by its ID
- **search:** query a resource type with parameters, which returns a Bundle of type searchset
- **create and update:** POST and PUT, with a 201 Created response and a Location header on create
- **transaction and batch:** one POST of a Bundle; a transaction succeeds or fails as a whole, and a batch treats entries separately

```text
GET  [base]/Patient/12345
GET  [base]/Observation?patient=12345&code=718-7
POST [base]/Observation
POST [base]   (a Bundle of type transaction)
```

Payloads are JSON (`application/fhir+json`) or XML. HL7 also defines event-based FHIR messaging, similar to v2, and documents.

A typical map from the v2 messages above to FHIR resources looks like this. Treat it as a starting point:

<table>
	<thead>
		<tr>
			<th>v2 message</th>
			<th>Typical FHIR resources</th>
			<th>Note</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>ADT (A01, A03, A04, A08)</td>
			<td>Patient, Encounter</td>
			<td>Events become create or update of the same resources</td>
		</tr>
		<tr>
			<td>ORM or OMG/OML</td>
			<td>ServiceRequest</td>
			<td>Order status changes update the request</td>
		</tr>
		<tr>
			<td>ORU^R01</td>
			<td>DiagnosticReport, Observation, Specimen</td>
			<td>One OBR maps to a report, each OBX to an observation</td>
		</tr>
	</tbody>
</table>

The ABDM guide includes profiles for Patient, Encounter, ServiceRequest, Observation, Specimen and lab diagnostic reports, among others, plus document types such as DiagnosticReportRecord and DischargeSummaryRecord. HL7's [v2 to FHIR implementation guide](https://build.fhir.org/ig/HL7/v2-to-fhir/) provides concept maps from v2 to R4, and is at trial-use level. HL7's comparison page is candid about the limits: mappings vary by implementation, so they generally have to be done case by case, and unsupported elements need extensions.

## Side by side

<table>
	<thead>
		<tr>
			<th>Question</th>
			<th>HL7 v2</th>
			<th>FHIR R4</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>Shape of data</td>
			<td>Segments in a delimited message</td>
			<td>Resources in JSON or XML</td>
		</tr>
		<tr>
			<td>Typical transport</td>
			<td>MLLP over TCP inside a network</td>
			<td>HTTPS REST API</td>
		</tr>
		<tr>
			<td>Pattern</td>
			<td>Event pushed when something happens</td>
			<td>Request and response, plus messaging and documents</td>
		</tr>
		<tr>
			<td>Extending it</td>
			<td>Z-segments, opaque without a manual</td>
			<td>Extensions with discoverable URIs</td>
		</tr>
		<tr>
			<td>Updates</td>
			<td>Usually full snapshots, or action codes</td>
			<td>Snapshots by default, with a Patch operation</td>
		</tr>
		<tr>
			<td>India context</td>
			<td>Listed in national EHR Standards (v2.8.2)</td>
			<td>Basis of ABDM's implementation guide</td>
		</tr>
	</tbody>
</table>

## Where each still fits

**Keep HL7 v2 when** the HMIS, LIS or an instrument interface already speaks it and works. Rewriting a stable ADT feed to FHIR buys little and adds risk. v2 is also at home for real-time, one-way event feeds inside one hospital network.

**Use FHIR R4 when** you are exposing data to anything outside the building: a patient app, a partner, a state programme or ABDM. FHIR also suits new web and mobile products, where REST and JSON are what developers expect.

**Use both when** the hospital has legacy v2 systems and an ABDM obligation. This is the common case in India, and it is why an integration layer in the middle matters.

## Integration patterns that work

1. **Interface engine as the hub.** Every system connects once to the engine, which routes, transforms and logs. Point-to-point links between HMIS, LIS, EMR and RIS multiply quickly and are hard to change.
2. **A FHIR facade over v2 sources.** The engine receives v2, converts to FHIR resources and serves them through an API. Apps and ABDM adapters talk only to the facade, so the legacy side can change without breaking them.
3. **One master patient identity.** ADT is the natural place to create and update it. Map the hospital's UHID or MRN to the ABHA details described in [ABHA number vs ABHA address](/insights/abha-number-vs-abha-address), and handle merges explicitly. v2 has merge events, and FHIR needs a deliberate approach.
4. **ABDM export from the same record.** Build the FHIR document bundles for health information exchange from the facade rather than a second extract; see [ABDM integration: M1, M2 and M3](/insights/abdm-integration-m1-m2-m3) and [the sandbox to production path](/insights/abdm-sandbox-to-production). Facility and clinician identity ties to [HFR and HPR](/insights/hfr-hpr-registries).
5. **Terminology in one place.** Keep a mapping table from local test and drug codes to LOINC, SNOMED CT or whatever the receiving profile asks for, owned by clinical informatics rather than buried in code.

## Practical traps

- **Local dialects.** Every v2 sender has quirks, from Z-segments to field use that differs from the standard. Collect sample messages from each system before design.
- **Time zones.** A v2 timestamp without an offset is ambiguous. Agree that senders include one, such as +0530 for India.
- **Character sets.** Patient names in Hindi or other scripts need agreed encoding on both sides.
- **Ordering and duplicates.** An update can arrive before the admit, or twice. Make handlers idempotent and keep a dead-letter queue for messages that fail.
- **Acknowledgement discipline.** Do not ACK a message until you have stored it. A false success is worse than a retry.
- **Medical device status.** CDSCO's guidance treats information systems that only store and transfer data as outside the device rules, but adds that extra functions such as real-time monitoring can change that. See [software as a medical device in India](/insights/software-as-medical-device-india).
- **Personal data.** Interface logs hold patient data. Mask them and set retention, as the [DPDP Act and Rules](/insights/dpdp-act-health-apps) expect of security and logging.

## How Vestcodes helps

We build [HMIS, LIS and EMR integration](/services/hmis-lis-emr-integration): interface engines, v2 and FHIR adapters, and test harnesses with synthetic messages. If you have a system that nobody wants to touch, [contact us](/contact) and bring a sample message.

## Sources

- [HL7 FHIR R4 (4.0.1) home page](https://hl7.org/fhir/R4/)
- [HL7 FHIR R4: comparison with HL7 v2](https://hl7.org/fhir/R4/comparison-v2.html)
- [HL7 FHIR R4: RESTful API](https://hl7.org/fhir/R4/http.html)
- [HL7 v2 to FHIR Implementation Guide](https://build.fhir.org/ig/HL7/v2-to-fhir/)
- [HL7 Version 2.5, Chapter 3 Patient Administration (HL7 Europe)](https://www.hl7.eu/HL7v2x/v25/std25/ch03.html)
- [HL7 Version 2.5, Chapter 4 Order Entry (HL7 Europe)](https://www.hl7.eu/HL7v2x/v25/std25/ch04.html)
- [HL7 Version 2.5, Chapter 7 Observation Reporting (HL7 Europe)](https://www.hl7.eu/HL7v2x/v25/std25/ch07.html)
- [HL7 Transport Specification: MLLP, Release 2](https://www.hl7.org/documentcenter/private/standards/v3/edition_web/infrastructure/transport/transport_mllp.html)
- [EHR Standards for India (NRCeS)](https://www.nrces.in/standards/ehr-standards-for-india)
- [FHIR Implementation Guide for ABDM (NRCeS)](https://nrces.in/ndhm/fhir/r4/)

## Frequently asked questions

### Is HL7 v2 still used in Indian hospitals?

Yes. HL7 describes v2 as one of its most widely adopted standards, especially in in-patient settings, and India's EHR Standards list HL7 v2.8.2 for event and message exchange. ABDM's own exchange uses FHIR R4.

### What do ADT, ORM and ORU messages do?

ADT messages announce patient administration events such as admit, discharge, register and update. ORM was the general order message, and ORU^R01 sends observation results such as lab values back to the requesting system.

### Should a new hospital integration use HL7 v2 or FHIR?

It depends on the systems at each end. Use v2 where an existing HMIS, LIS or analyser interface already speaks it. Use FHIR R4 for new APIs, mobile apps and ABDM health record exchange, and expect to run both.

### Does ABDM require HL7 v2?

No. ABDM's published implementation guide from NRCeS is based on FHIR R4. HL7 v2 matters only inside your own hospital interfaces.
