← ReferenceResource

What is an OperationOutcome?

An OperationOutcome is the standard FHIR way to communicate the result of an operation — especially errors, warnings, and hints. A server returns an OperationOutcome when a request fails, when validation finds issues, or when a $operation produces no resource result.

OperationOutcome — validation error

{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "required",
      "diagnostics": "Patient.identifier: minimum 1 required",
      "expression": ["Patient.identifier"]
    },
    {
      "severity": "warning",
      "code": "best-practice",
      "diagnostics": "dom-6: A resource should have narrative",
      "expression": ["Patient"]
    }
  ]
}

Severity levels

SeverityHTTP statusMeaning
fatal4xx/5xxProcessing stopped completely
error4xxRequest failed, resource rejected
warning200/201Request succeeded but there are concerns
information200/201Advisory — no action required

Common issue codes

  • required — required element missing
  • value — element value is invalid
  • not-found — referenced resource does not exist
  • too-many — cardinality exceeded
  • best-practice — best-practice recommendation not followed (always a warning)
  • code-invalid — code not found in required value set