<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="GEM-ERPEU-PR-Consent" />
  <url value="https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_Consent" />
  <version value="1.1.2" />
  <name value="GEM_ERPEU_PR_Consent" />
  <title value="Consent for ePrescriptions" />
  <status value="active" />
  <date value="2026-02-09" />
  <description value="Records the consent of the patient for an operation in the context of ePrescription." />
  <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.meta">
      <path value="Consent.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.meta.profile">
      <path value="Consent.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <description value="Slicing for meta profile" />
        <ordered value="false" />
        <rules value="closed" />
      </slicing>
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.meta.profile:workflowEUProfile">
      <path value="Consent.meta.profile" />
      <sliceName value="workflowEUProfile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_Consent|1.1" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <fixedCode value="active" />
    </element>
    <element id="Consent.scope.coding">
      <path value="Consent.scope.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Consent.scope.coding.system">
      <path value="Consent.scope.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/consentscope" />
    </element>
    <element id="Consent.scope.coding.code">
      <path value="Consent.scope.coding.code" />
      <fixedCode value="patient-privacy" />
    </element>
    <element id="Consent.scope.coding.display">
      <path value="Consent.scope.coding.display" />
      <fixedString value="Privacy Consent" />
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="https://gematik.de/fhir/erp-eu/ValueSet/GEM_ERPEU_VS_ConsentType" />
      </binding>
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <min value="1" />
    </element>
    <element id="Consent.patient.identifier">
      <path value="Consent.patient.identifier" />
      <min value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-kvid-10" />
      </type>
    </element>
    <element id="Consent.patient.identifier.assigner">
      <path value="Consent.patient.identifier.assigner" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.patient.identifier.assigner.identifier">
      <path value="Consent.patient.identifier.assigner.identifier" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-iknr" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.policyRule">
      <path value="Consent.policyRule" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://gematik.de/fhir/erp-eu/ValueSet/GEM_ERPEU_VS_Consent_PolicyRule" />
      </binding>
    </element>
  </differential>
</StructureDefinition>