{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Consent_Advance_Directive_Living_Will",
  "version": "1.0.0",
  "name": "KBV_PR_MIO_PS_Consent_Advance_Directive_Living_Will",
  "status": "draft",
  "publisher": "Kassenärztliche Bundesvereinigung (KBV)",
  "description": "Mit diesem Profil kann eine Patientenverfügung abgebildet werden.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "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
      },
      {
        "id": "Consent.meta.versionId",
        "path": "Consent.meta.versionId",
        "max": "0"
      },
      {
        "id": "Consent.meta.lastUpdated",
        "path": "Consent.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "Consent.meta.source",
        "path": "Consent.meta.source",
        "max": "0"
      },
      {
        "id": "Consent.meta.profile",
        "path": "Consent.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Consent_Advance_Directive_Living_Will|1.0.0"
      },
      {
        "id": "Consent.meta.security",
        "path": "Consent.meta.security",
        "max": "0"
      },
      {
        "id": "Consent.meta.tag",
        "path": "Consent.meta.tag",
        "max": "0"
      },
      {
        "id": "Consent.implicitRules",
        "path": "Consent.implicitRules",
        "max": "0"
      },
      {
        "id": "Consent.language",
        "path": "Consent.language",
        "max": "0"
      },
      {
        "id": "Consent.contained",
        "path": "Consent.contained",
        "max": "0"
      },
      {
        "id": "Consent.extension",
        "path": "Consent.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.extension:beschreibungAblageort",
        "path": "Consent.extension",
        "sliceName": "beschreibungAblageort",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_EX_MIO_PS_Consent_Description_File_Location"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.extension:beschreibungAblageort.value[x]",
        "path": "Consent.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "Consent.extension:beschreibungAblageort.value[x]:valueString",
        "path": "Consent.extension.value[x]",
        "sliceName": "valueString",
        "mustSupport": true
      },
      {
        "id": "Consent.extension:zurBenutzungBerechtigteBehandelndePerson",
        "path": "Consent.extension",
        "sliceName": "zurBenutzungBerechtigteBehandelndePerson",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_EX_MIO_PS_Consent_To_Use_Practitioner"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.identifier",
        "path": "Consent.identifier",
        "max": "0"
      },
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "fixedCode": "active"
      },
      {
        "id": "Consent.scope",
        "path": "Consent.scope",
        "mustSupport": true
      },
      {
        "id": "Consent.scope.coding",
        "path": "Consent.scope.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.scope.coding.system",
        "path": "Consent.scope.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Consent.scope.coding.version",
        "path": "Consent.scope.coding.version",
        "min": 1,
        "fixedString": "http://snomed.info/sct/900000000000207008/version/20210131"
      },
      {
        "id": "Consent.scope.coding.code",
        "path": "Consent.scope.coding.code",
        "min": 1,
        "fixedCode": "371538006"
      },
      {
        "id": "Consent.scope.coding.display",
        "path": "Consent.scope.coding.display",
        "min": 1,
        "patternString": "Advance directive report (record artifact)"
      },
      {
        "id": "Consent.scope.coding.display.extension",
        "path": "Consent.scope.coding.display.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.scope.coding.display.extension:anzeigenameScope",
        "path": "Consent.scope.coding.display.extension",
        "sliceName": "anzeigenameScope",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.scope.coding.display.extension:anzeigenameScope.extension",
        "path": "Consent.scope.coding.display.extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.scope.coding.display.extension:anzeigenameScope.extension:content",
        "path": "Consent.scope.coding.display.extension.extension",
        "sliceName": "content",
        "mustSupport": true
      },
      {
        "id": "Consent.scope.coding.display.extension:anzeigenameScope.extension:content.value[x]",
        "path": "Consent.scope.coding.display.extension.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "mustSupport": true
      },
      {
        "id": "Consent.scope.coding.display.extension:anzeigenameScope.extension:content.value[x]:valueString",
        "path": "Consent.scope.coding.display.extension.extension.valueString",
        "sliceName": "valueString",
        "min": 1,
        "fixedString": "Patientenverfügung",
        "mustSupport": true
      },
      {
        "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",
        "definition": "Verfügungskategorie",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.category.coding",
        "path": "Consent.category.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.category.coding.system",
        "path": "Consent.category.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/consentcategorycodes"
      },
      {
        "id": "Consent.category.coding.version",
        "path": "Consent.category.coding.version",
        "min": 1,
        "fixedString": "4.0.1"
      },
      {
        "id": "Consent.category.coding.code",
        "path": "Consent.category.coding.code",
        "min": 1,
        "fixedCode": "hcd"
      },
      {
        "id": "Consent.category.coding.display",
        "path": "Consent.category.coding.display",
        "min": 1,
        "fixedString": "Health Care Directive"
      },
      {
        "id": "Consent.category.coding.userSelected",
        "path": "Consent.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Consent.category.text",
        "path": "Consent.category.text",
        "max": "0"
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Patient|1.0.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.patient.reference",
        "path": "Consent.patient.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.patient.type",
        "path": "Consent.patient.type",
        "max": "0"
      },
      {
        "id": "Consent.patient.identifier",
        "path": "Consent.patient.identifier",
        "max": "0"
      },
      {
        "id": "Consent.patient.display",
        "path": "Consent.patient.display",
        "max": "0"
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "mustSupport": true
      },
      {
        "id": "Consent.performer",
        "path": "Consent.performer",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Patient|1.0.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.performer.reference",
        "path": "Consent.performer.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.performer.type",
        "path": "Consent.performer.type",
        "max": "0"
      },
      {
        "id": "Consent.performer.identifier",
        "path": "Consent.performer.identifier",
        "max": "0"
      },
      {
        "id": "Consent.performer.display",
        "path": "Consent.performer.display",
        "max": "0"
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "max": "0"
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "definition": "Beschreibung Ablageort der Verfügung",
        "max": "0",
        "type": [
          {
            "code": "Reference"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "definition": "Referenz auf Rechtstext",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.policy.extension",
        "path": "Consent.policy.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Consent.policy.extension:data-absent-reason",
        "path": "Consent.policy.extension",
        "sliceName": "data-absent-reason",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ]
      },
      {
        "id": "Consent.policy.extension:data-absent-reason.value[x]",
        "path": "Consent.policy.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.policy.extension:data-absent-reason.value[x]:valueCode",
        "path": "Consent.policy.extension.value[x]",
        "sliceName": "valueCode",
        "fixedCode": "unknown"
      },
      {
        "id": "Consent.policy.authority",
        "path": "Consent.policy.authority",
        "max": "0"
      },
      {
        "id": "Consent.policy.uri",
        "path": "Consent.policy.uri",
        "max": "0",
        "mustSupport": true
      },
      {
        "id": "Consent.verification",
        "path": "Consent.verification",
        "max": "0"
      },
      {
        "id": "Consent.provision",
        "path": "Consent.provision",
        "max": "0"
      }
    ]
  }
}