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

<CodeSystem xmlns="http://hl7.org/fhir">
  <id value="sdhr-outcome-codes"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: CodeSystem sdhr-outcome-codes</b></p><a name="sdhr-outcome-codes"> </a><a name="hcsdhr-outcome-codes"> </a><p>This case-sensitive code system <code>https://fhir-ig.digital.health.nz/sdhr/CodeSystem/sdhr-outcome-codes</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">sdhr-records-withheld-at-source<a name="sdhr-outcome-codes-sdhr-records-withheld-at-source"> </a></td><td>Records withheld at source</td><td>This code is used when the patient has records that are withheld from the Shared Digital Health Record service at source, for example, a GP practice or hospital.</td></tr><tr><td style="white-space:nowrap">sdhr-participation-status-denied<a name="sdhr-outcome-codes-sdhr-participation-status-denied"> </a></td><td>SDHR Participation Status Denied</td><td>This code is used when the patient has opted out of participating in the Shared Digital Health Record service.</td></tr><tr><td style="white-space:nowrap">sdhr-participation-status-denied-facility<a name="sdhr-outcome-codes-sdhr-participation-status-denied-facility"> </a></td><td>SDHR Participation Status Denied at Facility</td><td>This code is used when the patient has opted out of participating in the Shared Digital Health Record service at a specific facility.</td></tr><tr><td style="white-space:nowrap">sdhr-invalid-patient<a name="sdhr-outcome-codes-sdhr-invalid-patient"> </a></td><td>SDHR Invalid Patient</td><td>This code is used when the patient parameter is invalid for the Shared Digital Health Record service operation. Please ensure the patient is correctly specified and matches the required NHI Patient URL format.</td></tr><tr><td style="white-space:nowrap">sdhr-parameter-missing<a name="sdhr-outcome-codes-sdhr-parameter-missing"> </a></td><td>SDHR Required parameter missing</td><td>This code is used when a required parameter is missing in the request, such as the reasonCode parameter.</td></tr><tr><td style="white-space:nowrap">sdhr-parameter-invalid<a name="sdhr-outcome-codes-sdhr-parameter-invalid"> </a></td><td>SDHR parameter invalid</td><td>This code is used when a parameter is invalid in the request.</td></tr><tr><td style="white-space:nowrap">sdhr-participation-status-invalid<a name="sdhr-outcome-codes-sdhr-participation-status-invalid"> </a></td><td>SDHR Participation Status Invalid</td><td/></tr><tr><td style="white-space:nowrap">sdhr-operation-success<a name="sdhr-outcome-codes-sdhr-operation-success"> </a></td><td>SDHR Operation Success</td><td>This code is used when the operation was successful, such as when a patient's participation status was successfully recorded.</td></tr><tr><td style="white-space:nowrap">sdhr-participation-status-unknown<a name="sdhr-outcome-codes-sdhr-participation-status-unknown"> </a></td><td>SDHR Participation Status Unknown</td><td>This code is used when the Shared Digital Health Record service has no record of participation preferences for this patient. Please use the $participate operation to indicate the patient's participation preferences.</td></tr><tr><td style="white-space:nowrap">sdhr-facility-locked<a name="sdhr-outcome-codes-sdhr-facility-locked"> </a></td><td>SDHR Facility Locked</td><td>This code is used when a facility has been temporarily locked due to a background load process</td></tr><tr><td style="white-space:nowrap">sdhr-patient-locked<a name="sdhr-outcome-codes-sdhr-patient-locked"> </a></td><td>SDHR Patient Locked</td><td>This code is used when a patient has been temporarily locked due to a background load process</td></tr><tr><td style="white-space:nowrap">sdhr-facility-unknown<a name="sdhr-outcome-codes-sdhr-facility-unknown"> </a></td><td>SDHR Facility Unknown</td><td>This code is used when a facility has not been onboarded to SDHR</td></tr></table></div>
  </text>
  <url value="https://fhir-ig.digital.health.nz/sdhr/CodeSystem/sdhr-outcome-codes"/>
  <version value="1.0.1"/>
  <name value="SDHROutcomeCodes"/>
  <title value="SDHR Specific Outcome Codes"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2026-06-05T02:07:34+00:00"/>
  <publisher value="Health New Zealand"/>
  <contact>
    <name value="Health New Zealand"/>
    <telecom>
      <system value="url"/>
      <value value="https://github.com/tewhatuora"/>
    </telecom>
  </contact>
  <contact>
    <name value="HNZ Integration Team"/>
    <telecom>
      <system value="email"/>
      <value value="integration@tewhatuora.govt.nz"/>
      <use value="work"/>
    </telecom>
  </contact>
  <description value="This code system defines standard OperationOucome codes used throughout this Implementation Guide for New Zealand Shared Digital Health Records"/>
  <purpose value="The codes defined in this CodeSystem are used by the Shared Digital Health Record service to indicate the outcome of&#xA;operations.&#xA;&#xA;These codes will be used in various `OperationOutcome` resources to provide feedback on the outcome of a request.&#xA;&#xA;See [SDHR Participate Operation](https://fhir-ig.digital.health.nz/sdhr/OperationDefinition/SDHRParticipateOperation) for more example information on the use of these codes.&#xA;"/>
  <caseSensitive value="true"/>
  <content value="complete"/>
  <count value="12"/>
  <concept>
    <code value="sdhr-records-withheld-at-source"/>
    <display value="Records withheld at source"/>
    <definition value="This code is used when the patient has records that are withheld from the Shared Digital Health Record service at source, for example, a GP practice or hospital."/>
  </concept>
  <concept>
    <code value="sdhr-participation-status-denied"/>
    <display value="SDHR Participation Status Denied"/>
    <definition value="This code is used when the patient has opted out of participating in the Shared Digital Health Record service."/>
  </concept>
  <concept>
    <code value="sdhr-participation-status-denied-facility"/>
    <display value="SDHR Participation Status Denied at Facility"/>
    <definition value="This code is used when the patient has opted out of participating in the Shared Digital Health Record service at a specific facility."/>
  </concept>
  <concept>
    <code value="sdhr-invalid-patient"/>
    <display value="SDHR Invalid Patient"/>
    <definition value="This code is used when the patient parameter is invalid for the Shared Digital Health Record service operation. Please ensure the patient is correctly specified and matches the required NHI Patient URL format."/>
  </concept>
  <concept>
    <code value="sdhr-parameter-missing"/>
    <display value="SDHR Required parameter missing"/>
    <definition value="This code is used when a required parameter is missing in the request, such as the reasonCode parameter."/>
  </concept>
  <concept>
    <code value="sdhr-parameter-invalid"/>
    <display value="SDHR parameter invalid"/>
    <definition value="This code is used when a parameter is invalid in the request."/>
  </concept>
  <concept>
    <code value="sdhr-participation-status-invalid"/>
    <display value="SDHR Participation Status Invalid"/>
  </concept>
  <concept>
    <code value="sdhr-operation-success"/>
    <display value="SDHR Operation Success"/>
    <definition value="This code is used when the operation was successful, such as when a patient's participation status was successfully recorded."/>
  </concept>
  <concept>
    <code value="sdhr-participation-status-unknown"/>
    <display value="SDHR Participation Status Unknown"/>
    <definition value="This code is used when the Shared Digital Health Record service has no record of participation preferences for this patient. Please use the $participate operation to indicate the patient's participation preferences."/>
  </concept>
  <concept>
    <code value="sdhr-facility-locked"/>
    <display value="SDHR Facility Locked"/>
    <definition value="This code is used when a facility has been temporarily locked due to a background load process"/>
  </concept>
  <concept>
    <code value="sdhr-patient-locked"/>
    <display value="SDHR Patient Locked"/>
    <definition value="This code is used when a patient has been temporarily locked due to a background load process"/>
  </concept>
  <concept>
    <code value="sdhr-facility-unknown"/>
    <display value="SDHR Facility Unknown"/>
    <definition value="This code is used when a facility has not been onboarded to SDHR"/>
  </concept>
</CodeSystem>