{
  "resourceType": "StructureDefinition",
  "id": "featureconsent",
  "url": "http://fhir.xt.dev/StructureDefinition/FeatureConsent",
  "version": "3.1.0",
  "name": "FeatureConsent",
  "status": "active",
  "experimental": false,
  "date": "2025-03-05T09:28:47.6874166+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This consent resource represents the user's agreement to a specific set of privacy rules and terms of service.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "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"
      },
      {
        "id": "Consent.meta.tag",
        "path": "Consent.meta.tag",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            },
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.meta.tag:policyTag",
        "path": "Consent.meta.tag",
        "sliceName": "policyTag",
        "short": "Policy Tag",
        "definition": "Tag that mirrors the policyURI to allow searching by policy."
      },
      {
        "id": "Consent.meta.tag:policyTag.system",
        "path": "Consent.meta.tag.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "Consent.meta.tag:policyTag.code",
        "path": "Consent.meta.tag.code",
        "min": 1
      },
      {
        "id": "Consent.extension",
        "path": "Consent.extension",
        "min": 1
      },
      {
        "id": "Consent.extension:linkedFeature",
        "path": "Consent.extension",
        "sliceName": "linkedFeature",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/LinkedFeature"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Consent.extension:linkedFeature.value[x]",
        "path": "Consent.extension.value[x]",
        "min": 1
      },
      {
        "id": "Consent.scope.coding.system",
        "path": "Consent.scope.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/consentscope"
      },
      {
        "id": "Consent.scope.coding.version",
        "path": "Consent.scope.coding.version",
        "max": "0"
      },
      {
        "id": "Consent.scope.coding.code",
        "path": "Consent.scope.coding.code",
        "min": 1,
        "fixedCode": "patient-privacy"
      },
      {
        "id": "Consent.scope.coding.userSelected",
        "path": "Consent.scope.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Consent.scope.text",
        "path": "Consent.scope.text",
        "max": "0"
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "max": "1"
      },
      {
        "id": "Consent.category.coding",
        "path": "Consent.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.category.coding.system",
        "path": "Consent.category.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/ConsentCategory"
      },
      {
        "id": "Consent.category.coding.version",
        "path": "Consent.category.coding.version",
        "max": "0"
      },
      {
        "id": "Consent.category.coding.code",
        "path": "Consent.category.coding.code",
        "min": 1,
        "fixedCode": "feature"
      },
      {
        "id": "Consent.category.coding.userSelected",
        "path": "Consent.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Consent.category.text",
        "path": "Consent.category.text",
        "max": "0"
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "definition": "The consent is only created after the user account has been created succesfully. This may not be the exact time that the user has checked the box agreeing to the privacy rules at the start of account creation.",
        "min": 1
      },
      {
        "id": "Consent.performer",
        "path": "Consent.performer",
        "min": 1
      },
      {
        "id": "Consent.performer.reference",
        "path": "Consent.performer.reference",
        "max": "0"
      },
      {
        "id": "Consent.performer.type",
        "path": "Consent.performer.type",
        "max": "0"
      },
      {
        "id": "Consent.performer.identifier",
        "path": "Consent.performer.identifier",
        "min": 1
      },
      {
        "id": "Consent.performer.identifier.use",
        "path": "Consent.performer.identifier.use",
        "max": "0"
      },
      {
        "id": "Consent.performer.identifier.type",
        "path": "Consent.performer.identifier.type",
        "max": "0"
      },
      {
        "id": "Consent.performer.identifier.system",
        "path": "Consent.performer.identifier.system",
        "min": 1
      },
      {
        "id": "Consent.performer.identifier.value",
        "path": "Consent.performer.identifier.value",
        "short": "consenting user's userID",
        "definition": "The consenting user's userID is used as a logical reference, to enable searching FeatureConsents by user. The userID must exist as a userID of a UserAccount.",
        "min": 1
      },
      {
        "id": "Consent.performer.identifier.period",
        "path": "Consent.performer.identifier.period",
        "max": "0"
      },
      {
        "id": "Consent.performer.identifier.assigner",
        "path": "Consent.performer.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Consent.performer.display",
        "path": "Consent.performer.display",
        "max": "0"
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.policy.authority",
        "path": "Consent.policy.authority",
        "max": "0"
      },
      {
        "id": "Consent.policy.uri",
        "path": "Consent.policy.uri",
        "min": 1
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "max": "0"
      },
      {
        "id": "Consent.verification",
        "path": "Consent.verification",
        "max": "0"
      },
      {
        "id": "Consent.provision",
        "path": "Consent.provision",
        "max": "0"
      }
    ]
  }
}