HL7 v2 Messaging in Practice

Results — ORU and the OBX Observation Segment

  • 5 min
  • 4 steps
  • 2 questions
  • 2 hands-on
  • Lesson 4 of 10 in HL7 v2 Messaging in Practice

In this lesson

  1. How a result message is shaped
  2. The OBX segment, field by field
  3. One request, many observations
  4. What comes next
OBX Observation

How a result message is shaped

When the filler finishes the work an order requested, it reports back with an ORU^R01 — the Unsolicited Observation Result message 1. The structure mirrors the order it answers, but turned inside out: instead of asking for a test, the message now delivers what was measured.

An ORU^R01 nests three layers. At the top is the patient (PID), establishing who the results belong to. Beneath the patient comes one or more OBR segments — the same Observation Request that drove the order, now echoed back so the placer can match each result to its request. And beneath each OBR come the OBX segments: the individual observations themselves. One OBR can carry many OBX lines, which is exactly how a single order for a metabolic panel returns a dozen separate analyte values under one request 2.

So the spine of an ORU reads top to bottom as: PID → OBR (the request being answered) → OBX, OBX, OBX … (each observation). The OBR says what was ordered; each OBX says one thing that was found.

The OBX segment, field by field

OBX is where the actual data lives, and a handful of its fields carry almost all the meaning. The two that matter most are OBX-3 and OBX-5: together they are “what was measured and its value.”

  • OBX-2 — Value Type. Declares how to interpret the value that follows. Common codes include NM (numeric), ST (short string text), TX (free text), SN (structured numeric, for values like <5 or 1:32 ratios), and CE/CWE (a coded value drawn from a vocabulary). A receiver reads OBX-2 first so it knows whether OBX-5 holds a number, a sentence, or a code 1.
  • OBX-3 — Observation Identifier. A coded concept naming what was measured. It is typically carried as a CWE triplet — code, display text, and coding system — and in laboratory results the code is very often a LOINC code identifying the specific test (for example, glucose in serum) 2.
  • OBX-5 — Observation Value. The value itself, interpreted according to OBX-2. If OBX-2 is NM, this is a number; if CWE, it is a coded answer such as a finding.
  • OBX-4 — Observation Sub-ID. A grouping key. When several OBX lines belong together — repeats of the same measurement, or components of one structured observation — OBX-4 distinguishes and links them so they are not confused with unrelated results.
  • OBX-11 — Observation Result Status. The lifecycle of this one value: P preliminary, F final, C corrected (a previously released value being amended). This status lets a downstream system know whether a result is safe to rely on or still subject to change 1.

The pairing of OBX-3 and OBX-5 is the heart of the segment. OBX-3 answers “which observation is this?” and OBX-5 answers “and what was its value?” Every other field exists to qualify that pair: how to read it (OBX-2), how it groups (OBX-4), and how trustworthy it is (OBX-11).

Match up

Match each OBX field to what it carries.

This exercise needs JavaScript.

One request, many observations

Because a single OBR can head a run of OBX lines, a panel maps cleanly onto the structure: one request, many analytes. The example below shows a basic result message — a patient header, one observation request, and two observations beneath it, one numeric and one coded.

MSH|^~\&|LAB|HOSP|EHR|HOSP|20260601090000||ORU^R01|MSG00021|P|2.5.1
PID|1||100482^^^HOSP^MR||DOE^JANE||19850714|F
OBR|1|PL-7781|FL-9920|2345-7^Glucose^LN|||20260601083000
OBX|1|NM|2345-7^Glucose^LN||96||||||F
OBX|2|CWE|600-7^Urine culture^LN||264868006^No growth^SCT||||||F

Read the two OBX lines through the fields above. The first declares OBX-2 as NM, names glucose in OBX-3, carries 96 as its value in OBX-5, and is final (F) in OBX-11. The second uses CWE because its result is a coded finding rather than a number, so OBX-5 holds a coded answer (“No growth,” here a SNOMED CT concept) instead of a bare value. Coded answers like this typically come from SNOMED CT, even when the observation identifier in OBX-3 is a LOINC code. Both share the same OBR, illustrating how one request gathers several distinct observations under it 2.

Work it out

In OBX|1|NM|2345-7^Glucose^LN||96||||||F, which OBX field number holds the F?

This exercise needs JavaScript.

What comes next

The example above shows raw values, but a value alone is rarely the whole story. A glucose of 96 only becomes meaningful once you know its units, the reference range it is compared against, and whether it is flagged as high or low. Those refinements — OBX-6 units, OBX-7 reference ranges, and OBX-8 abnormal flags — are how an observation becomes clinically interpretable, and they are the subject of the next lesson. For now, the essential takeaway is structural: an ORU delivers observations as OBX segments nested under the OBR that requested them, and within each OBX, the identifier and the value together say what was measured and what was found.

Lesson complete

Nice work.

1day streak
0/1today's goal
–correct

Teach it back

In two sentences, explain Results — ORU and the OBX Observation Segment to a friend who missed it.

Up next · 4 min

Units, Reference Ranges, and Abnormal Flags in OBX

Two labs report the same test value for the same patient. One flags it high and the other normal. How can both be right?

Next lesson

Related lessons

Among the stars
Sources for this lesson
  1. 1
    HL7 Standards — Section 1d: Version 2 (V2). HL7 International. verifiedThe HL7 Version 2 messaging standard, first released October 1987 and the most widely implemented healthcare messaging standard worldwide.

    Also cited in Value Sets, Bindings, and the CWE Data Type, Optionality, Cardinality, and Loose Conformance, The v2 Version Lineage (2.1 to 2.9) and Backward Compatibility and 14 more.

  2. 2