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