HL7 v2 OBX-2 (Value Type): Format, Values, and Testing Notes
OBX-2 is a two-character code, but it decides everything about how the field right after it should be read — treat a coded result like a number, or a narrative report like a discrete value, and the data comes out wrong without any parsing error to catch it.
OBX-2 is the second field of the HL7 v2 OBX segment — a coded value type that tells a receiving system how to interpret the data format of OBX-5, the actual observation value.
Valid code values
Example
NM in OBX-2 tells the parser that the OBX-5 value (4.2) should be read as a plain number. Synthetic result — not a real patient.
Where this trips people up
A lot of test suites are built entirely from numeric lab results, so every OBX-5 parsing rule ends up hardcoded around NM. When a CE result (a coded impression), a TX result (a pathology narrative), or an SN result (a titer reported as ">1:320") shows up in production, the same parsing logic either throws on non-numeric input or silently truncates it — and because OBX-2 was never checked first, the failure looks like a data-quality problem rather than the type-handling bug it actually is.