<?xml version="1.0" encoding="UTF-8"?>

<CodeSystem xmlns="http://hl7.org/fhir">
  <id value="operation-outcome-issue-detail"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: CodeSystem operation-outcome-issue-detail</b></p><a name="operation-outcome-issue-detail"> </a><a name="hcoperation-outcome-issue-detail"> </a><p>This case-sensitive code system <code>http://fhir.tiro.health/CodeSystem/operation-outcome-issue-detail</code> defines the following codes:</p><table class="codes"><tr><td style="white-space:nowrap"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td></tr><tr><td style="white-space:nowrap">VALIDATE_PATIENT_SUCCESS<a name="operation-outcome-issue-detail-VALIDATE_PATIENT_SUCCESS"> </a></td><td>Patient validation successful</td><td>Returned as an information/success issue when a Patient validation operation succeeds.</td></tr><tr><td style="white-space:nowrap">VALIDATE_TASK_SUCCESS<a name="operation-outcome-issue-detail-VALIDATE_TASK_SUCCESS"> </a></td><td>Task validation successful</td><td>Returned as an information/success issue when a Task validation operation succeeds.</td></tr><tr><td style="white-space:nowrap">VALIDATE_TEMPLATE_FAILURE<a name="operation-outcome-issue-detail-VALIDATE_TEMPLATE_FAILURE"> </a></td><td>Template validation failed</td><td>The template failed validation; check for empty blocks or groups.</td></tr><tr><td style="white-space:nowrap">VALIDATE_RESOURCE_FAILURE<a name="operation-outcome-issue-detail-VALIDATE_RESOURCE_FAILURE"> </a></td><td>Resource validation failed</td><td>The submitted resource failed validation; check for empty blocks or groups. Returned on 422 validation errors.</td></tr><tr><td style="white-space:nowrap">TEMPLATE_NOT_ACTIVE<a name="operation-outcome-issue-detail-TEMPLATE_NOT_ACTIVE"> </a></td><td>Template not active or does not exist</td><td>The referenced questionnaire template (canonical, optionally version-pinned) is not active — it was retired or superseded by a newer version, or does not exist. Returned as a 400 by Task/$initialize. Prefer a version-independent canonical.</td></tr><tr><td style="white-space:nowrap">TEMPLATE_EXPERIMENTAL_VERSION_REQUIRED<a name="operation-outcome-issue-detail-TEMPLATE_EXPERIMENTAL_VERSION_REQUIRED"> </a></td><td>Experimental template requires an explicit version</td><td>The referenced template is experimental and requires an explicit version in the canonical reference (e.g. `...|1.2.0`). Returned as a 400 by Task/$initialize.</td></tr><tr><td style="white-space:nowrap">INITIAL_RESPONSE_PATIENT_MISMATCH<a name="operation-outcome-issue-detail-INITIAL_RESPONSE_PATIENT_MISMATCH"> </a></td><td>Initial-response Patient mismatch</td><td>The supplied initial-response QuestionnaireResponse references a different Patient than the Task. Returned as a 400 by Task/$initialize.</td></tr><tr><td style="white-space:nowrap">INITIAL_RESPONSE_CANONICAL_MISMATCH<a name="operation-outcome-issue-detail-INITIAL_RESPONSE_CANONICAL_MISMATCH"> </a></td><td>Initial-response canonical mismatch</td><td>The supplied initial-response QuestionnaireResponse is based on a different questionnaire canonical than the Task. Returned as a 400 by Task/$initialize.</td></tr></table></div>
  </text>
  <url value="http://fhir.tiro.health/CodeSystem/operation-outcome-issue-detail"/>
  <version value="0.1.0"/>
  <name value="OperationOutcomeIssueDetail"/>
  <title value="Operation Outcome Issue Detail"/>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2026-06-09T06:13:55+00:00"/>
  <publisher value="Tiro.health"/>
  <contact>
    <name value="Tiro.health"/>
    <telecom>
      <system value="url"/>
      <value value="http://tiro.health"/>
    </telecom>
  </contact>
  <description value="Tiro.health detail codes carried in `OperationOutcome.issue.details.coding`. They give a stable, machine-readable classification of an issue beyond the standard FHIR issue-type (`OperationOutcome.issue.code`). Consumers should branch on these codes rather than on the free-text `issue.details.text`. Documentation: https://docs.tiro.health/fhir/errors"/>
  <caseSensitive value="true"/>
  <content value="complete"/>
  <count value="8"/>
  <concept>
    <code value="VALIDATE_PATIENT_SUCCESS"/>
    <display value="Patient validation successful"/>
    <definition value="Returned as an information/success issue when a Patient validation operation succeeds."/>
  </concept>
  <concept>
    <code value="VALIDATE_TASK_SUCCESS"/>
    <display value="Task validation successful"/>
    <definition value="Returned as an information/success issue when a Task validation operation succeeds."/>
  </concept>
  <concept>
    <code value="VALIDATE_TEMPLATE_FAILURE"/>
    <display value="Template validation failed"/>
    <definition value="The template failed validation; check for empty blocks or groups."/>
  </concept>
  <concept>
    <code value="VALIDATE_RESOURCE_FAILURE"/>
    <display value="Resource validation failed"/>
    <definition value="The submitted resource failed validation; check for empty blocks or groups. Returned on 422 validation errors."/>
  </concept>
  <concept>
    <code value="TEMPLATE_NOT_ACTIVE"/>
    <display value="Template not active or does not exist"/>
    <definition value="The referenced questionnaire template (canonical, optionally version-pinned) is not active — it was retired or superseded by a newer version, or does not exist. Returned as a 400 by Task/$initialize. Prefer a version-independent canonical."/>
  </concept>
  <concept>
    <code value="TEMPLATE_EXPERIMENTAL_VERSION_REQUIRED"/>
    <display value="Experimental template requires an explicit version"/>
    <definition value="The referenced template is experimental and requires an explicit version in the canonical reference (e.g. `...|1.2.0`). Returned as a 400 by Task/$initialize."/>
  </concept>
  <concept>
    <code value="INITIAL_RESPONSE_PATIENT_MISMATCH"/>
    <display value="Initial-response Patient mismatch"/>
    <definition value="The supplied initial-response QuestionnaireResponse references a different Patient than the Task. Returned as a 400 by Task/$initialize."/>
  </concept>
  <concept>
    <code value="INITIAL_RESPONSE_CANONICAL_MISMATCH"/>
    <display value="Initial-response canonical mismatch"/>
    <definition value="The supplied initial-response QuestionnaireResponse is based on a different questionnaire canonical than the Task. Returned as a 400 by Task/$initialize."/>
  </concept>
</CodeSystem>