<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="England-Consent-National-Proxy" />
  <url value="https://fhir.nhs.uk/England/StructureDefinition/England-Consent-National-Proxy" />
  <version value="0.3.0" />
  <name value="EnglandConsentNationalProxy" />
  <title value="England Consent National Proxy" />
  <status value="draft" />
  <date value="2025-10-31" />
  <publisher value="NHS England" />
  <contact>
    <name value="NHS England" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="This profile constrains the FHIR Consent resource for the NHS England National Proxy use case. It supports representation of proxy access, linking the proxy's Patient and RelatedPerson records, and capturing authorisation details including the approving clinician (via PractitionerRole) and accountable organisation (via ODS code)." />
  <purpose value="This documents requirement for NHS England National Proxy" />
  <copyright value="Copyright © 2025+ HL7 UK Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Consent" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" />
  <derivation value="constraint" />
  <differential>
    <element id="Consent.status">
      <path value="Consent.status" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Consent.scope">
      <path value="Consent.scope" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <min value="1" />
      <max value="*" />
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient" />
      </type>
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.performer">
      <path value="Consent.performer" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
      <max value="*" />
    </element>
    <element id="Consent.performer:proxyPatient">
      <path value="Consent.performer" />
      <sliceName value="proxyPatient" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient" />
      </type>
    </element>
    <element id="Consent.performer:proxyRelatedPerson">
      <path value="Consent.performer" />
      <sliceName value="proxyRelatedPerson" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson" />
      </type>
    </element>
    <element id="Consent.performer:authorisingClinician">
      <path value="Consent.performer" />
      <sliceName value="authorisingClinician" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole" />
      </type>
    </element>
    <element id="Consent.performer:authorisingOrganisation">
      <path value="Consent.performer" />
      <sliceName value="authorisingOrganisation" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Consent.source[x]">
      <path value="Consent.source[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.source[x]:sourceReference">
      <path value="Consent.source[x]" />
      <sliceName value="sourceReference" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse" />
      </type>
    </element>
    <element id="Consent.provision">
      <path value="Consent.provision" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.provision.actor">
      <path value="Consent.provision.actor" />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="Consent.provision.actor.reference">
      <path value="Consent.provision.actor.reference" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson" />
      </type>
    </element>
    <element id="Consent.provision.actor.reference.type">
      <path value="Consent.provision.actor.reference.type" />
      <min value="0" />
      <max value="1" />
    </element>
  </differential>
</StructureDefinition>