OBX-5 Value Does Not Match the Type in OBX-2
OBX-2 declares the data type of the observation value (NM, ST, CE, and so on) and OBX-5 carries the value. This cross-field rule fires when the value does not conform to the declared type.
HL7v2 · Error
The error
OBX-5 value must match the type declared in OBX-2Why it happens
Declaring NM in OBX-2 but sending text in OBX-5 (or vice versa), or copying OBX-2 from a template without updating it to match the actual result.
How to fix it
Make OBX-2 and OBX-5 agree. If the result is numeric, set OBX-2 to NM and send a bare number. If it is free text, set OBX-2 to ST or TX. For coded results use CE or CWE with a proper code^display^system triplet.
Example
The snippet below triggers the error:
OBX|1|NM|2345-7^Glucose^LN||Positive|||||FThe corrected version:
OBX|1|ST|2345-7^Glucose^LN||Positive|||||FFrequently asked questions
Which OBX-2 type should I use?
Use NM for plain numbers, ST/TX for text, CE or CWE for coded values, SN for structured numerics like ranges, and DT/TM/TS for date and time results. OBX-5 must match whatever you put in OBX-2.
Related
- Open the HL7v2 Validator
- All validation errors
- Message Does Not Begin With an MSH Segment
- MSH-1 Field Separator Must Be Exactly One Character
- MSH-2 Encoding Characters Must Be Exactly 4 Characters
- Delimiter Characters Are Not Unique
- Required Segment Is Missing
- Required Field Is Missing or Empty
- Segment Appears More Times Than Allowed
- Segment Is Not Defined in This HL7v2 Version