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

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="SDHRParticipationStatusOperation"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition SDHRParticipationStatusOperation</b></p><a name="SDHRParticipationStatusOperation"> </a><a name="hcSDHRParticipationStatusOperation"> </a><p>URL: [base]/$participation-status</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>patient</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a></td><td/><td><div><p>Reference must be an NHI Patient URL with format https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZZZ1111 or ZZZ11AA</p>
</div></td></tr><tr><td>OUT</td><td>hnzParticipationIndicator</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#boolean">boolean</a></td><td/><td><div><p>Indicates global participation. Returns true when no global participation preference has been recorded.</p>
</div></td></tr></table></div>
  </text>
  <url value="https://fhir-ig.digital.health.nz/sdhr/OperationDefinition/SDHRParticipationStatusOperation"/>
  <version value="1.1.6"/>
  <name value="ParticipationStatus"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2026-10-20T03:14:47+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 operation allows Shared Electronic Health Record (SEHR) systems to retrieve a patient's Shared Digital Health Record participation status.&#xA;&#xA;To make a request to this operation the API Consumer must POST a `Parameters` payload to the operation URL (e.g. `POST https://api.sdhr.digital.health.nz/s2s/$participation-status`).&#xA;&#xA;For an example request payload, see:&#xA;- [Parameters resource for participation status request](./Parameters-ParametersParticipationStatusRequest.html) : This example shows the `Parameters` resource to POST to this operation.&#xA;&#xA;For example response payloads for this operation see:&#xA;- [Parameters resource for participation status response - not participating](./Parameters-ParametersParticipationStatusNotParticipatingResponse.html) : This example shows the `Parameters` resource returned when the patient is not participating in the Shared Digital Health Record service.&#xA;- [Parameters resource for participation status response - participating](./Parameters-ParametersParticipationStatusParticipatingResponse.html) : This example shows the `Parameters` resource returned when the patient is participating in the Shared Digital Health Record service.&#xA;- [OperationOutcome for invalid patient reference](./OperationOutcome-OperationOutcomeParticipationStatusInvalidPatient.html) : This example shows the `OperationOutcome` returned when the `patient` reference does not match the required NHI Patient URL format.&#xA;&#xA;The operation is expected to be called by a healthcare provider on behalf of the patient, and the patient must be identified by their NHI.&#xA;This operation requires the SMART on FHIR scope `https://fhir-ig.digital.health.nz/sdhr/OperationDefinition/SDHRParticipationStatusOperation`.&#xA;The operation returns a `Parameters` resource containing only `hnzParticipationIndicator`. A patient with no recorded global participation preference is considered to be participating and returns `true`.&#xA;If the `patient` reference is invalid, the operation returns a `400` response with an `OperationOutcome` carrying the `sdhr-invalid-patient` outcome code."/>
  <code value="participation-status"/>
  <system value="true"/>
  <type value="false"/>
  <instance value="false"/>
  <parameter>
    <name value="patient"/>
    <use value="in"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="Reference must be an NHI Patient URL with format https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZZZ1111 or ZZZ11AA"/>
    <type value="Reference"/>
  </parameter>
  <parameter>
    <name value="hnzParticipationIndicator"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="Indicates global participation. Returns true when no global participation preference has been recorded."/>
    <type value="boolean"/>
  </parameter>
</OperationDefinition>