Reference·OBX Segment·OBX-1
HL7 v2 Reference

Understanding HL7 v2 OBX-1: Set ID in Practice

Jul 27, 2026 · 4 min read
OBX-2 →

A single ORU message can carry dozens of OBX segments for one order, and OBX-1 is the only field that tells a receiving system what order they belong in — miss that, and a results-review screen can display a panel with the values shuffled.

Quick answer

OBX-1 is the first field of the HL7 v2 OBX segment — a sequence number that identifies the position of a given OBX segment among the repeating OBX segments in a message.

What this field contains

1
First OBX segment for this order or observation batch
2, 3, …
Subsequent OBX segments in the same message, in sequence

Example

Synthetic example Generated by Synthibase
OBX|1|NM|2823-3^Potassium^LN||4.2|mmol/L|3.5-5.1|N|||F|||202607261430

The 1 right after OBX| marks this as the first result segment in the message. Synthetic result — not a real patient.

Where this trips people up

Some parsers assume OBX segments will always arrive in the order they were performed and ignore OBX-1 entirely, appending each result to a list as it is read. That works until a message gets reordered or retransmitted out of sequence by an intermediate interface engine — at which point a lab panel can render with the wrong labels next to the wrong values, and nothing in the message itself flags the mismatch except the Set ID a parser never checked.

How to Test HL7 v2 OBX: A Field-by-Field Breakdown
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Healthcare API Testing Guide: FHIR and X12
Generate multi-segment OBX edge cases automatically
Synthibase can generate result messages with dozens of repeating OBX segments, including out-of-order sequences, so your parser gets tested against the cases that only show up after go-live.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.