The OBX segment carries one observation — one lab analyte, one vital sign, one document line, one discrete result. Its design is a small self-describing record: OBX-2 (value type) tells you how to read OBX-5 (the value), OBX-3 says what was observed (usually a LOINC code), OBX-6 gives units, OBX-7 the reference range, OBX-8 the abnormal flag, and OBX-11 the status. Multiple OBX segments stack under one OBR to form a full result report.
Purpose
OBX carries a single observation and describes how to interpret it. OBX-2 declares the data type of the value in OBX-5, OBX-3 identifies what was observed, and OBX-11 reports the result status. Stacked OBX segments under an OBR make up a complete report.
Used in
OBX appears wherever discrete results or observations are reported: ORU (lab and clinical results — its primary home), ORM/OML (order-associated observations), MDM (document content), VXU (immunization observations), REF (referrals), and DFT. See ORU, ORM, MDM, and VXU.
Field-by-field reference
Source: official HL7 v2-to-FHIR IG. R = required (cardinality min ≥ 1). Repeat = field may repeat. Length pending authoritative v2.5.1 data.
| Seq | Name | Data Type | Length | Req | Repeat | Table # | Description |
|---|---|---|---|---|---|---|---|
| OBX-1 | Set ID – OBX | SI | — | O | — | — | Sequence number within the OBR group (1, 2, ...). |
| OBX-2 | Value Type | ID | — | O | — | HL70125 | Type of OBX-5: NM, ST, CWE, TX, SN, DT, ED, etc. Controls how OBX-5 is read. |
| OBX-3 | Observation Identifier | CWE | — | R | — | — | What was observed — usually a LOINC code, e.g. 718-7^Hemoglobin^LN. |
| OBX-4 | Observation Sub-ID | OG | — | O | — | — | Distinguishes repeated OBX with the same OBX-3; groups related results. |
| OBX-5 | Observation Value | varies | — | O | Y | — | The value. Its data type is whatever OBX-2 declares. |
| OBX-6 | Units | CWE | — | O | — | — | Units of measure (prefer UCUM), e.g. g/dL. |
| OBX-7 | References Range | ST | — | O | — | — | Normal or reference range as text, e.g. 13.0-17.0. |
| OBX-8 | Interpretation Codes | CWE | — | O | Y | HL70078 | Abnormal flags: N, H, L, HH, LL, A, etc. |
| OBX-9 | Probability | NM | — | O | — | — | Probability of an interpretation. |
| OBX-10 | Nature of Abnormal Test | ID | — | O | Y | HL70080 | Nature of the abnormal test. |
| OBX-11 | Observation Result Status | ID | — | R | — | HL70085 | F final, P preliminary, C corrected, X cannot obtain, etc. |
| OBX-12 | Effective Date of Reference Range | DTM | — | O | — | — | When the reference range applies. |
| OBX-13 | User Defined Access Checks | ST | — | O | — | — | Site-specific. |
| OBX-14 | Date/Time of the Observation | DTM | — | O | — | — | When the observation was made. |
| OBX-15 | Producer's ID | CWE | — | O | — | — | Producing lab or section. |
| OBX-16 | Responsible Observer | XCN | — | O | Y | — | Person who performed or verified. |
| OBX-17 | Observation Method | CWE | — | O | Y | — | Method or instrument used. |
| OBX-18 | Equipment Instance Identifier | EI | — | O | Y | — | Device or instrument identifier. |
| OBX-19 | Date/Time of the Analysis | DTM | — | O | — | — | When analysis ran. |
| OBX-20 | Observation Site | CWE | — | O | Y | — | Body site. |
| OBX-21 | Observation Instance Identifier | EI | — | O | — | — | Unique id for this observation instance. |
| OBX-22 | Mood Code | CNE | — | O | — | HL70725 | Mood (rarely used). |
| OBX-23 | Performing Organization Name | XON | — | O | — | — | Performing org. |
| OBX-24 | Performing Organization Address | XAD | — | O | — | — | Performing org address. |
| OBX-25 | Performing Organization Medical Director | XCN | — | O | — | — | Medical director. |
| OBX-26 | Patient Results Release Category | ID | — | O | — | HL70909 | Release category. |
| OBX-27 | Root Cause | CWE | — | O | — | — | Root cause (corrections). |
| OBX-28 | Local Process Control | CWE | — | O | Y | — | Local process control. |
| OBX-29 | Observation Type | ID | — | O | — | HL70936 | Observation category. |
| OBX-30 | Observation Sub-Type | ID | — | O | — | HL70937 | Observation sub-type. |
| OBX-31 | Action Code | ID | — | O | — | HL70206 | Add, update, or delete action. |
| OBX-32 | Observation Value Absent Reason | CWE | — | O | Y | — | Why a value is absent. |
| OBX-33 | Observation Related Specimen Identifier | EIP | — | O | Y | — | Related specimen. |
Most-used fields
OBX-2 Value Type is the switch. NM numeric, ST/TX text, CWE/CE coded, SN structured numeric (e.g. >^100), DT/TM/TS dates, ED encapsulated data (e.g. a PDF). You must read OBX-2 before OBX-5, because OBX-5's data type changes per row.
OBX-3 Observation Identifier is the what. It is usually LOINC: 718-7^Hemoglobin^LN. The third component is the coding system (LN is LOINC).
OBX-5 Observation Value is the result itself; it repeats for multi-part values. OBX-11 Result Status — P preliminary versus F final versus C corrected — drives whether a result should display, alert, or supersede a prior one.
Version differences (2.3 to 2.8.2)
- 2.3/2.3.1: OBX-3 and OBX-6 used data type
CE; coded fields wereCE. - 2.5+: coded fields migrate from
CEtoCWE; OBX gains fields through OBX-17/18. - 2.7: OBX extended to OBX-25 (performing-org details).
- 2.8 / 2.8.2: OBX extended to OBX-33 (observation type and sub-type, action code, value-absent reason, related specimen). Older receivers ignore trailing fields.
- Across versions, interpret OBX-2 against the version —
CEversusCWEparsing differs.
Common mistakes
- Parsing OBX-5 with a fixed data type instead of branching on OBX-2.
- Treating a
P(preliminary) result as final and not replacing it when theF/Carrives. - Ignoring OBX-4 (Sub-ID) and collapsing grouped or repeating observations into one.
- Assuming units are UCUM — many feeds send free-text units in OBX-6.
Examples
Minimal valid OBX (numeric result):
OBX|1|NM|718-7^Hemoglobin^LN||13.5|g/dL|13.0-17.0|N|||F
Fully-populated OBX (with method, observer, datetime):
OBX|1|NM|718-7^Hemoglobin^LN^^^^2.74||13.5|g/dL^gram per deciliter^UCUM|13.0-17.0|N|||F|||20260609130000|LAB01|SMITH^ANNA^^^^DR|Automated count^^L
Annotated breakdown of the minimal example:
OBX ← segment ID
1 ← OBX-1 Set ID
NM ← OBX-2 Value Type (numeric) — tells us how to read OBX-5
718-7^Hemoglobin^LN ← OBX-3 Observation Identifier (LOINC code^name^system)
← OBX-4 empty (Sub-ID)
13.5 ← OBX-5 Observation Value (read as a number per OBX-2)
g/dL ← OBX-6 Units
13.0-17.0 ← OBX-7 Reference Range
N ← OBX-8 Interpretation (Normal)
← OBX-9, OBX-10 empty
F ← OBX-11 Result Status (Final)
In-context inside an ORU^R01 (CBC result, multiple OBX under one OBR):
MSH|^~&|LAB|HOSP_B|EHR|HOSP_A|20260609131500||ORU^R01^ORU_R01|CTRL-9931|P|2.5.1
PID|1||123456^^^HOSP^MR||DOE^JOHN^A||19800101|M
OBR|1||ORD123|CBC^Complete Blood Count^L|||20260609130000
OBX|1|NM|718-7^Hemoglobin^LN||13.5|g/dL|13.0-17.0|N|||F
OBX|2|NM|4544-3^Hematocrit^LN||40.1|%|38.0-50.0|N|||F
OBX|3|NM|6690-2^WBC^LN||11.8|10*3/uL|4.0-11.0|H|||F
In-context inside an MDM^T02 (document with embedded text OBX):
MSH|^~&|DOCMGR|HOSP_A|EHR|HOSP_A|20260609140000||MDM^T02^MDM_T02|DOC-5521|P|2.5.1
PID|1||123456^^^HOSP^MR||DOE^JOHN^A||19800101|M
TXA|1|CN^Consultation Note|TX||||20260609135500
OBX|1|TX|11488-4^Consultation Note^LN||Patient presents with...|||||F
FHIR mapping
Target resources: Observation (primary), and DocumentReference when carrying document content. Official ConceptMaps: ConceptMap-segment-obx-to-observation (JSON) and ConceptMap-segment-obx-to-documentreference.
| OBX field | FHIR target |
|---|---|
| OBX-3 Observation Identifier | Observation.code |
| OBX-4 Observation Sub-ID | Observation.partOf / hasMember / derivedFrom |
| OBX-5 Observation Value | Observation.value[x] (type depends on OBX-2) |
| OBX-6 Units | Observation.valueQuantity (with OBX-5 when numeric) |
| OBX-7 References Range | Observation.referenceRange.text |
| OBX-8 Interpretation Codes | Observation.interpretation |
| OBX-11 Result Status | Observation.status |
| OBX-14 Date/Time of Observation | Observation.effectiveDateTime |
| OBX-15/23 Producer / Performing Org | Observation.performer (Organization) |
| OBX-16 Responsible Observer | Observation.performer (PractitionerRole) |
| OBX-17 Observation Method | Observation.method |
| OBX-18 Equipment Instance Id | Observation.device |
| OBX-20 Observation Site | Observation.bodySite |
| OBX-21 Observation Instance Id | Observation.identifier |
| OBX-29 Observation Type | Observation.category |
| OBX-33 Related Specimen | Observation.specimen |
OBX-5 is conditional: its FHIR target (valueQuantity, valueString, valueCodeableConcept, valueRange, valuePeriod, valueAttachment, and so on) is chosen entirely from OBX-2. Not mapped: OBX-1, OBX-9, OBX-12, OBX-13, OBX-22, OBX-26, OBX-27, OBX-28, OBX-31, OBX-32.
Engine considerations
- Branch on OBX-2 before reading OBX-5. A numeric parser pointed at an
ED(PDF) value or anSN(>^100) value will throw or silently corrupt data. - Required in practice: OBX-3 and OBX-11 are required; most lab interfaces also require OBX-2, OBX-5, and OBX-14.
- Status transitions: honor OBX-11 — a later
C(corrected) must supersede an earlierF/Pfor the same OBX-3 and OBX-4, not append a duplicate. - Escape pitfalls: text values (
TX/FT) frequently contain|,^,&, and newlines; these must be escaped (F,S,T,.br) or they shatter the segment.
How Vorro parses and produces OBX
Vorro reads OBX-2 to select the value decoder for OBX-5, preserving repetitions and structured (SN) and encapsulated (ED) values without lossy coercion. Grouped results are kept together by OBX-4 Sub-ID, and status logic uses OBX-11 so corrected results replace rather than duplicate prior values — producing clean Observation.value[x] and Observation.status on the FHIR side.
Related pages
- OBR — the order/observation request that groups OBX segments.
- ORC — the common order segment that precedes OBR.
- ORU messages — the result message where OBX lives.
Sources
- HL7 v2-to-FHIR IG — segment maps index
- HL7 v2-to-FHIR IG — OBX to Observation ConceptMap
- HL7 Version 2.5.1 product brief
