{
  "resourceType": "StructureDefinition",
  "id": "KBV-PR-KSVPSYCH-Bundle",
  "url": "https://fhir.kbv.de/StructureDefinition/KBV_PR_KSVPSYCH_Bundle",
  "version": "1.0",
  "name": "KBV_PR_KSVPSYCH_Bundle",
  "status": "draft",
  "date": "2026-06-16",
  "publisher": "Kassenärztliche Bundesvereinigung (KBV)",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.id",
        "path": "Bundle.id",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.meta",
        "path": "Bundle.meta",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.meta.versionId",
        "path": "Bundle.meta.versionId",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.meta.lastUpdated",
        "path": "Bundle.meta.lastUpdated",
        "mustSupport": true
      },
      {
        "id": "Bundle.meta.source",
        "path": "Bundle.meta.source",
        "max": "0"
      },
      {
        "id": "Bundle.meta.profile",
        "path": "Bundle.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://fhir.kbv.de/StructureDefinition/KBV_PR_KSVPSYCH_Bundle|1.0",
        "mustSupport": true
      },
      {
        "id": "Bundle.meta.security",
        "path": "Bundle.meta.security",
        "max": "0"
      },
      {
        "id": "Bundle.meta.tag",
        "path": "Bundle.meta.tag",
        "max": "0"
      },
      {
        "id": "Bundle.implicitRules",
        "path": "Bundle.implicitRules",
        "max": "0"
      },
      {
        "id": "Bundle.language",
        "path": "Bundle.language",
        "max": "0"
      },
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.identifier.use",
        "path": "Bundle.identifier.use",
        "max": "0"
      },
      {
        "id": "Bundle.identifier.type",
        "path": "Bundle.identifier.type",
        "max": "0"
      },
      {
        "id": "Bundle.identifier.system",
        "path": "Bundle.identifier.system",
        "definition": "Festlegung damit eine UUID kommt",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986",
        "mustSupport": true
      },
      {
        "id": "Bundle.identifier.value",
        "path": "Bundle.identifier.value",
        "definition": "Eindeutige UUID",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.identifier.period",
        "path": "Bundle.identifier.period",
        "max": "0"
      },
      {
        "id": "Bundle.identifier.assigner",
        "path": "Bundle.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "document",
        "mustSupport": true
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "definition": "DateTime wann das Dokument technisch erstellt wurde. Fachlich bildet das Ausstellungsdatum das entscheidende Datum ab.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.total",
        "path": "Bundle.total",
        "max": "0"
      },
      {
        "id": "Bundle.link",
        "path": "Bundle.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "resource.meta.profile"
            }
          ],
          "description": "Slicing by profile",
          "rules": "closed"
        },
        "min": 6,
        "max": "11",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.extension",
        "path": "Bundle.entry.extension",
        "max": "0"
      },
      {
        "id": "Bundle.entry.modifierExtension",
        "path": "Bundle.entry.modifierExtension",
        "max": "0"
      },
      {
        "id": "Bundle.entry.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentenInformation",
        "path": "Bundle.entry",
        "sliceName": "DocumentenInformation",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:DocumentenInformation.extension",
        "path": "Bundle.entry.extension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentenInformation.modifierExtension",
        "path": "Bundle.entry.modifierExtension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentenInformation.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentenInformation.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:DocumentenInformation.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Composition",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_KSVPSYCH_Composition|1.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:DocumentenInformation.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentenInformation.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentenInformation.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Custodian",
        "path": "Bundle.entry",
        "sliceName": "Custodian",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Custodian.extension",
        "path": "Bundle.entry.extension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Custodian.modifierExtension",
        "path": "Bundle.entry.modifierExtension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Custodian.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Custodian.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Custodian.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_PTV_Psychotherapy_Institution|1.0"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:Custodian.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Custodian.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Custodian.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner",
        "path": "Bundle.entry",
        "sliceName": "NotifyingPractitioner",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.extension",
        "path": "Bundle.entry.extension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.modifierExtension",
        "path": "Bundle.entry.modifierExtension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Practitioner|1.3"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:NotifyingPractitioner.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Condition",
        "path": "Bundle.entry",
        "sliceName": "Condition",
        "min": 1,
        "max": "5",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Condition.extension",
        "path": "Bundle.entry.extension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Condition.modifierExtension",
        "path": "Bundle.entry.modifierExtension",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Condition.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Condition.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Condition.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_PTV_Condition_ICD|1.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Condition.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Condition.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Condition.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Patient",
        "path": "Bundle.entry",
        "sliceName": "Patient",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Patient|1.3.1"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Coverage",
        "path": "Bundle.entry",
        "sliceName": "Coverage",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Coverage.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Coverage.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Coverage|1.3"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Coverage.resource.meta",
        "path": "Bundle.entry.resource.meta"
      },
      {
        "id": "Bundle.entry:Coverage.resource.meta.profile",
        "path": "Bundle.entry.resource.meta.profile",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      }
    ]
  }
}