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

<CodeSystem xmlns="http://hl7.org/fhir">
  <id value="sdhr-participation-reason"/>
  <meta>
    <versionId value="1"/>
  </meta>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: CodeSystem sdhr-participation-reason</b></p><a name="sdhr-participation-reason"> </a><a name="hcsdhr-participation-reason"> </a><div style="display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%"><p style="margin-bottom: 0px">version: 1</p></div><p>This  code system <code>https://fhir-ig.digital.health.nz/sdhr/CodeSystem/sdhr-participation-reason</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-record-withheld<a name="sdhr-participation-reason-sdhr-record-withheld"> </a></td><td>Record withheld</td><td>Record withheld from the service for privacy or confidentiality reasons.</td></tr><tr><td style="white-space:nowrap">sdhr-record-released<a name="sdhr-participation-reason-sdhr-record-released"> </a></td><td>Record released</td><td>Record that was previously withheld has been released (is no longer confidential or restricted) to the service by the patient.</td></tr><tr><td style="white-space:nowrap">sdhr-facility-opt-out<a name="sdhr-participation-reason-sdhr-facility-opt-out"> </a></td><td>Facility opt out</td><td>Patient has opted out of participation entirely at the facility. This means that no records will be shared from that facility.</td></tr><tr><td style="white-space:nowrap">sdhr-facility-opt-in<a name="sdhr-participation-reason-sdhr-facility-opt-in"> </a></td><td>Facility opt in</td><td>Patient has opted in to participation at the facility. This means that records will be shared from that facility.</td></tr><tr><td style="white-space:nowrap">sdhr-hnz-opt-out<a name="sdhr-participation-reason-sdhr-hnz-opt-out"> </a></td><td>HNZ opt out</td><td>Patient has opted out of participation entirely with Health NZ. This means that no records will be shared from any facility.</td></tr><tr><td style="white-space:nowrap">sdhr-hnz-opt-in<a name="sdhr-participation-reason-sdhr-hnz-opt-in"> </a></td><td>HNZ opt in</td><td>Patient has opted in to participation with Health NZ. This means that records will be shared from all facilities.</td></tr></table></div>
  </text>
  <url value="https://fhir-ig.digital.health.nz/sdhr/CodeSystem/sdhr-participation-reason"/>
  <version value="1.0.1"/>
  <name value="SDHRParticipationReason"/>
  <title value="SDHR Participation Reason Codes"/>
  <status value="draft"/>
  <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 the reasons for a patient to participate in the Shared Digital Health Record service."/>
  <content value="complete"/>
  <count value="6"/>
  <concept>
    <code value="sdhr-record-withheld"/>
    <display value="Record withheld"/>
    <definition value="Record withheld from the service for privacy or confidentiality reasons."/>
  </concept>
  <concept>
    <code value="sdhr-record-released"/>
    <display value="Record released"/>
    <definition value="Record that was previously withheld has been released (is no longer confidential or restricted) to the service by the patient."/>
  </concept>
  <concept>
    <code value="sdhr-facility-opt-out"/>
    <display value="Facility opt out"/>
    <definition value="Patient has opted out of participation entirely at the facility. This means that no records will be shared from that facility."/>
  </concept>
  <concept>
    <code value="sdhr-facility-opt-in"/>
    <display value="Facility opt in"/>
    <definition value="Patient has opted in to participation at the facility. This means that records will be shared from that facility."/>
  </concept>
  <concept>
    <code value="sdhr-hnz-opt-out"/>
    <display value="HNZ opt out"/>
    <definition value="Patient has opted out of participation entirely with Health NZ. This means that no records will be shared from any facility."/>
  </concept>
  <concept>
    <code value="sdhr-hnz-opt-in"/>
    <display value="HNZ opt in"/>
    <definition value="Patient has opted in to participation with Health NZ. This means that records will be shared from all facilities."/>
  </concept>
</CodeSystem>