HL7 & FHIR Validation Errors
Paste an error you are seeing into search, land here. Every page below documents one concrete validation error our engine emits: what it means, why it happens, and how to fix it, with a realistic broken example and the corrected version. The errors are grouped by the standard they come from.
HL7v2 errors
Structural, segment, field, datatype, and cross-field errors raised when validating HL7 version 2.x pipe-delimited messages.
- 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
- Invalid Message Type and Trigger Event Combination
- Field Value Is Not a Valid Code in the HL7 Table
- Value Is Not a Valid HL7v2 Datetime (DTM)
- Value Is Not a Valid HL7v2 Numeric (NM)
- OBX-5 Value Does Not Match the Type in OBX-2
- Field Value Exceeds the Maximum Length
- Non-Standard Z-Segment Detected
- Date of Birth Is in the Future
FHIR errors
Errors from base FHIR R4 validation and from conformance against profiles such as US Core and IPS: missing elements, bad codes, reference shape, and value-set bindings.
- resourceType Is Required
- Unknown FHIR R4 Resource Type
- Required Element Is Missing for This Resource
- gender Must Be male, female, other, or unknown
- birthDate Must Be YYYY, YYYY-MM, or YYYY-MM-DD
- instant Must Include a Timezone
- Resource id Has an Invalid Format
- subject Must Be a Reference Object, Not a String
- Reference Should Be Type/id, urn:uuid, or an Absolute URL
- Observation status Has an Invalid Code
- Encounter status Has an Invalid Code
- Bundle type Has an Invalid Code
- Element Must Be Present but Is Missing (Profile Conformance)
- US Core Requires at Least One Identifier on Patient
- US Core Requires Observation.effective[x]
- Value Is Not in the Required Value Set
- Reference Points to the Wrong Resource Type
- Element Uses the Wrong Coding System
- Element Has Too Few or Too Many Entries (Cardinality)
FHIRPath errors
Parse and evaluation errors from FHIRPath expressions: unexpected tokens, unterminated strings, unknown functions, and bad arguments.
Validate your own message
Rather than match an error by eye, paste your message or resource into the relevant tool and get every issue at once, with the exact location and a suggested fix.
40 documented errors and counting.