{
  "resourceType": "StructureDefinition",
  "id": "GEM-ERP-PR-CloseOperationInputBundle",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Foundation.Other"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "not-classified"
    }
  ],
  "url": "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_CloseOperationInputBundle",
  "version": "1.2",
  "name": "GEM_ERP_PR_CloseOperationInputBundle",
  "title": "Document Bundle for multiple MedicationDispenses on $close Operation",
  "status": "draft",
  "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.type",
        "path": "Bundle.type",
        "fixedCode": "collection"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "closed"
        },
        "min": 1
      },
      {
        "id": "Bundle.entry:DispensedMedications",
        "path": "Bundle.entry",
        "sliceName": "DispensedMedications",
        "min": 1,
        "max": "*"
      },
      {
        "id": "Bundle.entry:DispensedMedications.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "MedicationDispense"
          }
        ]
      }
    ]
  }
}