Health data standards

HL7 v2 messages explained: ADT and ORU, segments MSH, PID, OBR and OBX

HL7 v2 is still how most hospital systems talk to each other. How a v2 message is built (segments, fields, the pipe and caret delimiters), what ADT A01/A03/A04/A08 and ORU R01 messages carry, an annotated example of a lab result, and how they map to FHIR.

by Published 2 min read

Short answer: HL7 version 2 is a messaging standard from the late 1980s that most hospital systems still use internally. A message is plain text: one segment per line (MSH, PID, OBR, OBX…), fields separated by |, components by ^. ADT messages carry admissions, discharges and patient updates; ORU messages carry results, such as lab values.

Common message types

  • ADT^A01 admit, ADT^A03 discharge, ADT^A04 register an outpatient, ADT^A08 update patient information.
  • ORU^R01 unsolicited observation result (labs, vital signs).
  • ORM/OML orders, SIU scheduling, MDM documents.

Each message starts with MSH (header: sending and receiving systems, message type, time, version). The encoding characters ^~\& define the component, repetition, escape and sub-component separators.

An ORU^R01 lab result, annotated

MSH|^~\&|LAB|HOSP|EHR|HOSP|202610200815||ORU^R01|MSG0001|P|2.5.1
PID|1||123456^^^HOSP^MR||Example^Anna||19800101|F
OBR|1||LAB998|4548-4^Hemoglobin A1c/Hemoglobin.total in Blood^LN|||202610200800
OBX|1|NM|4548-4^Hemoglobin A1c/Hemoglobin.total in Blood^LN||5.6|%|4.0-5.6|N|||F
  • PID: the patient (identifier, name, birth date, sex).
  • OBR: the order or test.
  • OBX: one result: value type NM (numeric), code with LN for LOINC, value, unit, reference range, abnormal flag, result status F (final).

In FHIR, each OBX becomes an Observation, the OBR a DiagnosticReport, the PID a Patient.

In Anpheros

Anpheros Platform's lab connector accepts HL7 v2 ORU^R01, CSV and JSON and turns each result into FHIR Observations in one request. See the lab connector guide and, for developers, HL7 v2 to FHIR mapping.

Sources

Frequently asked questions

What is an ADT message?

An HL7 v2 message about a patient's admission, discharge, transfer or registration, such as ADT^A01 for an admission.

What is an ORU^R01 message?

An HL7 v2 message carrying results, typically lab values in OBX segments.

What do the ^~& characters mean?

They are the encoding characters: component (^), repetition (~), escape () and sub-component (&) separators.

Is HL7 v2 being replaced by FHIR?

Gradually and partly. v2 remains common inside hospitals; FHIR is used for APIs and new integrations, and many systems run both.

Anpheros Platform

Try it free in the sandbox

Your first FHIR call in 5 minutes. An HL7 FHIR R4 API with the patient's consent built in: try it in the sandbox, then connect your own app or clinic system.

Free · 30 synthetic patients · no card

This guide is for information and does not replace medical advice. For decisions about your health, talk to your doctor. In an emergency, call your local emergency number (112 in Europe).
Written by
The Anpheros team

Anpheros builds a medical record that the patient controls and can share with any clinic, on an HL7 FHIR R4 platform, based in the EU. These guides help you understand and organise your health; they do not replace your doctor.

About Anpheros →
Anpheros

The more you log, the clearer your record

Your health history in one place, under your control.

Symptom diaryPatterns show over time
Emergency cardQR in your phone's Wallet
All your resultsLabs and reports together
You decideWho sees what, and for how long
Create your free account

Free · Works in your browser · No card