OBX: Observation result
A blood test comes back as a sheet with one line per measurement: what was measured, the number, the units, the normal range, and a flag if it is out of range. OBX is one of those lines. A panel of ten results is ten OBX segments.
OBX carries exactly one observation: what was measured, what the answer was, what units it is in, and how confident the sender is that the answer is final.
The shape of one line
required empty in this messageevery box is one | apart
Where OBX appears
| Message | Segment order |
|---|---|
| ORU^R01 result | MSH → {PID → {OBR → {OBX → [{NTE}]}}} |
| ADT^A01 admit | MSH → EVN → PID → PV1 → [{OBX}] |
| ORM^O01 order | MSH → PID → {ORC → OBR → [{OBX}]} |
| MDM^T02 document | MSH → EVN → PID → PV1 → TXA → {OBX} |
OBX appears in 68 of the 202 message structures the standard defines.
A whole message
MSH|^~\&|LABSYS|STJOSEPH|EPIC|STJOSEPH|20240314141207||ORU^R01^ORU_R01|LR20240314-88412|P|2.5.1 PID|1||1000345678^^^STJOSEPH^MR||CARTWRIGHT^ELEANOR^MAY^^^^L||19510822|F OBR|1|ORD8842^EPIC|LAB77213^LABSYS|58410-2^CBC PANEL^LN|||20240314103000|||||||||1447312^OKONKWO^ADAEZE^^^^MD||||||20240314141000|||F OBX|1|NM|718-7^HEMOGLOBIN^LN||11.8|g/dL|12.0-15.5|L|||F|||20240314141000 OBX|2|NM|6690-2^LEUKOCYTES^LN||14.2|g/dL|4.0-11.0|H|||F|||20240314141000 OBX|3|ST|33914-3^INTERPRETATION^LN||Mild anaemia with leukocytosis|g/dL|||||F|||20240314141000 NTE|1|L|Specimen slightly haemolysed. Result confirmed on repeat.
Every field
| SEQ | LEN | DT | OPT | RP/# | TBL# | ITEM# | Element name | Cardinality | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OBX-1 | 4 | SI | O | 00569 | Set ID – OBX | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-2 | 2 | ID | C | 0125 | 00570 | Value Type | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | CE | R | 00571 | Observation Identifier | 1..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-4 | 20 | ST | C | 00572 | Observation Sub-ID | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-5 | 9999 | VARIES | C | Y | 00573 | Observation Value | 0..* | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | CE | O | 00574 | Units | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-7 | 60 | ST | O | 00575 | References Range | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-8 | 5 | IS | O | Y | 0078 | 00576 | Abnormal Flags | 0..* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-9 | 5 | NM | O | 00577 | Probability | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-10 | 2 | ID | O | Y | 0080 | 00578 | Nature of Abnormal Test | 0..* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-11 | 1 | ID | R | 0085 | 00579 | Observation Result Status | 1..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | TS | O | 00580 | Effective Date of Reference Range Values | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-13 | 20 | ST | O | 00581 | User Defined Access Checks | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | TS | O | 00582 | Date/Time of the Observation | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | CE | O | 00583 | Producer's Reference | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | XCN | O | Y | 00584 | Responsible Observer | 0..* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | CE | O | Y | 00936 | Observation Method | 0..* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | EI | O | Y | 01479 | Equipment Instance Identifier | 0..* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | TS | O | 01480 | Date/Time of the Analysis | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-20 | VARIES | U | 09999 | Reserved for harmonization with V2.6 | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-21 | VARIES | U | 09999 | Reserved for harmonization with V2.6 | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OBX-22 | VARIES | U | 09999 | Reserved for harmonization with V2.6 | 0..1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | XON | O | N | 02283 | Performing Organization Name | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | XAD | O | N | 02284 | Performing Organization Address | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3002 | XCN | O | N | 02285 | Performing Organization Medical Director | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Open this OBX message in HL7 Studio
Field notes
OBX-1Set ID – OBX
Set ID, numbering the OBX segments within their parent OBR. It restarts at 1 for each OBR, so it is unique within a result group and not within the message. Using it as a key across the whole message collides as soon as a message carries two orders.
Open OBX-1 in HL7 StudioOBX-2Value Type
Value type, and the field that tells you how to read OBX-5. NM is numeric, ST a short string, TX text, CE or CWE a coded value, DT a date, TS a timestamp, SN a structured numeric, ED encapsulated data, RP a reference pointer. Parse OBX-5 according to this field and nothing else. Code that assumes numeric because the field usually is numeric will break on the day a result comes back as `<0.01`, which arrives as an SN and not an NM.
Open OBX-2 in HL7 StudioOBX-3Observation Identifier
Observation identifier, the CE or CWE saying what was measured. LOINC in components 1 to 3 and a local code in components 4 to 6 is the pattern to expect, and both matter: LOINC for interoperability and the local code for reconciling against the sending system. A sender that populates only the local triplet is common and forces a mapping table at the receiver.
Open OBX-3 in HL7 StudioOBX-4Observation Sub-ID
Observation sub-ID, which groups OBX segments that belong together under one identifier. Its main use is the multi-part result: a susceptibility panel where each organism is a sub-group, or an imaging report split across several segments. Ignoring it merges results that were meant to stay separate.
Open OBX-4 in HL7 StudioOBX-5Observation Value
The observation value, and it repeats. For a TX result, one OBX with several repetitions is how a long narrative arrives, and each repetition is a line. Joining them without a separator runs the report together into one paragraph. For an ED value, the content is base64 in component 5 and the MIME type in components 2 and 3.
Open OBX-5 in HL7 StudioOBX-6Units
Units, ideally in UCUM. This field is not optional in any real sense: a haemoglobin of 11.8 means different things in g/dL and g/L, and a receiver that discards units and stores the number has stored a number that cannot be interpreted. Where the sender uses local unit codes, map them before storing.
Open OBX-6 in HL7 StudioOBX-7References Range
References range, as free text and not as structured bounds. `12.0-15.5` is the common form but `<5.0`, `>=60` and `Negative` all occur, and the field is a string in the standard precisely because ranges are not always numeric. Parsing it into a low and high pair works for most rows and has to fail gracefully for the rest.
Open OBX-7 in HL7 StudioOBX-8Abnormal Flags
Abnormal flags, bound to table 0078, and repeating. L and H are low and high, LL and HH are critically low and high, A is abnormal, N is normal, and S, R and I carry susceptibility meanings. The critical values are the ones that drive alerting, so treating LL as merely a variant of L removes the distinction that matters clinically.
Open OBX-8 in HL7 StudioOBX-11Observation Result Status
Observation result status, and the field that governs whether the result can be acted on. P is preliminary, F is final, C is a correction to a previously final result, X means the result cannot be obtained, D means delete the result. A C is not a new result. It replaces one already sent, and a receiver that appends it will show a patient two conflicting values.
Open OBX-11 in HL7 StudioOBX-14Date/Time of the Observation
Date and time of the observation, which is when the specimen was collected or the measurement taken. This is the clinically meaningful time. OBR-22 is when the result was reported and MSH-7 is when the message was built, and the three can differ by days for a culture.
Open OBX-14 in HL7 Studio
Vendor behaviour
What follows describes patterns common to these systems' standard interfaces. Every installation is configured, so confirm against the interface specification for the site you are integrating with.
Epic
Epic sends narrative results as a TX value spread across repetitions of OBX-5 or across several OBX segments sharing an observation sub-ID, depending on how the interface was built. Confirm which form a given feed uses before writing the reassembly, because the two need different code and both look correct on a single sample.
Mapping to FHIR
One OBX becomes one FHIR Observation, and OBX-2 decides which Observation.value[x] to use: NM becomes valueQuantity, ST and TX become valueString, CE and CWE become valueCodeableConcept, SN becomes valueQuantity with a comparator. The parent OBR becomes either a DiagnosticReport that references these Observations or a member Observation with hasMember entries, and which of the two is right depends on whether the OBR represents a report or a panel.
| HL7 v2 | FHIR R4 | Note |
|---|---|---|
| OBX-3 | Observation.code | |
| OBX-5 | Observation.value[x] | the type is chosen by OBX-2 |
| OBX-6 | Observation.valueQuantity.unit and .code | system is UCUM where the code is UCUM |
| OBX-7 | Observation.referenceRange.text | parse to low and high where it is numeric |
| OBX-8 | Observation.interpretation | |
| OBX-11 | Observation.status | F becomes final, P preliminary, C corrected, D entered-in-error |
| OBX-14 | Observation.effectiveDateTime |
Parsing pitfalls
OBX-5 parsed without reading OBX-2
The value type field exists because the value field has no fixed shape. Assuming numeric, or assuming a single line of text, produces a parser that works on the sample data and fails on the first structured numeric or the first encapsulated document.
A corrected result appended instead of replacing
OBX-11 set to C means this value supersedes one already sent for the same observation. Storing it as an additional result leaves the superseded value visible, and a clinician looking at the chart sees two answers with no indication which is current.
Multi-line text joined without separators
A TX result arrives as repetitions of OBX-5 or as several OBX segments, and each represents a line. Concatenating without a line break turns a structured report into a wall of text, and concatenating with the wrong separator can join a heading to the sentence below it.
Units discarded
A number without its unit is not a result. Where the receiving system has a fixed unit per test, convert; discarding the unit is not an option. If the sender uses local unit codes the conversion needs a mapping table, not string matching.
OBX-4 ignored on panelled results
Susceptibility results, differential counts and multi-organism cultures use the observation sub-ID to keep groups apart. Flattening them attributes an antibiotic sensitivity to the wrong organism.
Related
- OBRthe order or report this observation belongs to
- NTEnotes and comments attached to an observation
- ORCthe common order control information above OBR
- SPMthe specimen the observation was made on
Message types carrying OBX
OBX appears in 68 message structures, belonging to 44 message types.