{
  "resourceType": "StructureDefinition",
  "id": "KBV-PR-AW-Bundle-Sprechstundenbedarf",
  "url": "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Bundle_Sprechstundenbedarf",
  "version": "1.3.0",
  "name": "KBV_PR_AW_Bundle_Sprechstundenbedarf",
  "status": "draft",
  "copyright": "Copyright © [2022], Kassenärztliche Bundesvereinigung (KBV). All rights reserved.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle",
        "path": "Bundle",
        "short": "Bundle_Patientenakte",
        "definition": "Das Bundle transportiert den Sprechstundenbedarf. In dem Element entry wurde nur die erste Ebene der Ressourcen angegeben, d.h. es wurden nur die Ressourcen explizit aufgeführt, die auf andere Ressourcen verweisen und auf die, im Sinne dieses Bundles, selbst nicht referenziert wird. Alle Ressourcen, die von Diesen und ihren Kindern referenziert werden, müssen ebenfalls integriert werden. Folgende Ressourcen sind erlaubt:    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_Composition|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_PracticeSupply|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Betriebsstaette|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Provenienz|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_Medication_FreeText|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_Medication_PZN|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_Medication_Compounding|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_Medication_Ingredient|1.3.0 https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Mitarbeiter|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Behandelnder|1.3.0    https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_BehandelnderFunktion|1.3.0",
        "constraint": [
          {
            "key": "Allowed2",
            "severity": "error",
            "human": "Ressourcen, die nicht mit https://fhir.kbv.de/StructureDefinition/KBV_PR_AW oder https://fhir.kbv.de/StructureDefinition/KBV_PR_Base beginnen dürfen nicht vorhanden sein",
            "expression": "entry.where((resource.meta.profile.startsWith('https://fhir.kbv.de/StructureDefinition/KBV_PR_AW') or resource.meta.profile.startsWith('https://fhir.kbv.de/StructureDefinition/KBV_PR_Base')).not()).count()=0"
          }
        ]
      },
      {
        "id": "Bundle.id",
        "path": "Bundle.id",
        "min": 1
      },
      {
        "id": "Bundle.meta",
        "path": "Bundle.meta",
        "min": 1
      },
      {
        "id": "Bundle.meta.versionId",
        "path": "Bundle.meta.versionId",
        "min": 1
      },
      {
        "id": "Bundle.meta.lastUpdated",
        "path": "Bundle.meta.lastUpdated",
        "min": 1
      },
      {
        "id": "Bundle.meta.profile",
        "path": "Bundle.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Bundle_Sprechstundenbedarf|1.3.0"
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "short": "history",
        "definition": "Der Typ der Ressource wird als history-Bundle definiert.",
        "fixedCode": "history",
        "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": "profile",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.link",
        "path": "Bundle.entry.link",
        "contentReference": "http://hl7.org/fhir/StructureDefinition/Bundle#Bundle.link"
      },
      {
        "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.request",
        "path": "Bundle.entry.request",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.request.method",
        "path": "Bundle.entry.request.method",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.request.url",
        "path": "Bundle.entry.request.url",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.response",
        "path": "Bundle.entry.response",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.response.lastModified",
        "path": "Bundle.entry.response.lastModified",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition",
        "path": "Bundle.entry",
        "sliceName": "Sprechstundenbedarf_Composition",
        "min": 1
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.link",
        "path": "Bundle.entry.link",
        "contentReference": "http://hl7.org/fhir/StructureDefinition/Bundle#Bundle.link"
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_Composition|1.3.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.request",
        "path": "Bundle.entry.request",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.request.method",
        "path": "Bundle.entry.request.method",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.request.url",
        "path": "Bundle.entry.request.url",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.response",
        "path": "Bundle.entry.response",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf_Composition.response.lastModified",
        "path": "Bundle.entry.response.lastModified",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf",
        "path": "Bundle.entry",
        "sliceName": "Sprechstundenbedarf",
        "min": 1
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.link",
        "path": "Bundle.entry.link",
        "contentReference": "http://hl7.org/fhir/StructureDefinition/Bundle#Bundle.link"
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Rezept_PracticeSupply|1.3.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.request",
        "path": "Bundle.entry.request",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.request.method",
        "path": "Bundle.entry.request.method",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.request.url",
        "path": "Bundle.entry.request.url",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.response",
        "path": "Bundle.entry.response",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Sprechstundenbedarf.response.lastModified",
        "path": "Bundle.entry.response.lastModified",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.signature.who",
        "path": "Bundle.signature.who",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Mitarbeiter|1.3.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_BehandelnderFunktion|1.3.0"
            ]
          }
        ]
      },
      {
        "id": "Bundle.signature.who.reference",
        "path": "Bundle.signature.who.reference",
        "min": 1
      },
      {
        "id": "Bundle.signature.who.type",
        "path": "Bundle.signature.who.type",
        "max": "0"
      },
      {
        "id": "Bundle.signature.who.identifier",
        "path": "Bundle.signature.who.identifier",
        "max": "0"
      },
      {
        "id": "Bundle.signature.who.display",
        "path": "Bundle.signature.who.display",
        "max": "0"
      },
      {
        "id": "Bundle.signature.onBehalfOf",
        "path": "Bundle.signature.onBehalfOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Betriebsstaette|1.3.0"
            ]
          }
        ]
      },
      {
        "id": "Bundle.signature.sigFormat",
        "path": "Bundle.signature.sigFormat",
        "min": 1
      },
      {
        "id": "Bundle.signature.data",
        "path": "Bundle.signature.data",
        "min": 1
      }
    ]
  }
}