Field Value Is Not a Valid Code in the HL7 Table
The field is bound to an HL7-defined table (for example PID-8 Administrative Sex to Table 0001), and the supplied value is not one of the table codes.
HL7v2 · Error
The error
value is not a valid code in HL7 TableWhy it happens
Sending a display label instead of a code (Male instead of M), a lowercase or differently-cased code, or a local code that was never mapped to the standard HL7 table value.
How to fix it
Replace the value with a valid code from the bound table. For PID-8 sex, use M, F, O, U, A, or N. Map any local codes to the standard table before sending.
Example
The snippet below triggers the error:
PID|1||12345^^^H^MR||DOE^JOHN||19800101|MaleThe corrected version:
PID|1||12345^^^H^MR||DOE^JOHN||19800101|MFrequently asked questions
Where do these table codes come from?
HL7 publishes value tables (for example Table 0001 Administrative Sex) per version. Fields are bound to a table, and only the codes defined there are valid. The validator reports the table number and the allowed codes.
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