Skip to main content
Validation answers a deceptively simple question:
“Is this resource acceptable according to FHIR (and the profiles it claims to follow)?”
In practice, validation is layered.

What gets validated

1) Structural correctness

Basic “is this shaped like a FHIR resource?” checks:
  • resourceType is present and known
  • element names and datatypes match the definition
  • required elements and cardinalities are satisfied

2) Profile constraints

If a resource is expected to conform to a profile (or declares one via meta.profile[]), validators can enforce:
  • additional required elements
  • fixed values and patterns
  • slicing rules
  • invariants (FHIRPath constraints)
See Profiles and FHIRPath.

3) Terminology rules

Coded fields (Coding, CodeableConcept, etc.) can be bound to ValueSets. Validation may check the binding strength (required, extensible, …) and whether the codes are permitted. See Terminology.

How validation errors are reported

FHIR uses OperationOutcome. Each problem is an issue with:
  • severity: fatal, error, warning, information
  • code: a standardized category (e.g. structure, value, invariant)
  • diagnostics: human-readable details (often server/tool specific)
  • expression[]: FHIRPath expressions pointing to the element(s) involved (when available)
Tiny example:
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "required",
      "diagnostics": "Patient.name is required",
      "expression": ["Patient.name"]
    }
  ]
}

When validation happens

Common places you’ll see validation:
  • Client-side (form/SDK validation before sending)
  • Server-side on create, update, patch, transaction
  • Explicit validation via the $validate operation (if the server supports it)
If you get unexpected validation failures, confirm you’re using the right FHIR version (R4 vs R5) and the right IG package versions.

Discovering server support

Validation capabilities vary by server. The fastest way to check is the CapabilityStatement (GET /fhir/metadata), which can list supported profiles, terminology capabilities, and operations such as $validate.

Next