<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="GEM-ERP-PR-CloseOperationInputBundle" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Foundation.Other" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="not-classified" />
  </extension>
  <url value="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_CloseOperationInputBundle" />
  <version value="1.2" />
  <name value="GEM_ERP_PR_CloseOperationInputBundle" />
  <title value="Document Bundle for multiple MedicationDispenses on $close Operation" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="cda" />
    <uri value="http://hl7.org/v3/cda" />
    <name value="CDA (R2)" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Bundle" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Bundle" />
  <derivation value="constraint" />
  <differential>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <fixedCode value="collection" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resource" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Bundle.entry:DispensedMedications">
      <path value="Bundle.entry" />
      <sliceName value="DispensedMedications" />
      <min value="1" />
      <max value="*" />
    </element>
    <element id="Bundle.entry:DispensedMedications.resource">
      <path value="Bundle.entry.resource" />
      <type>
        <code value="MedicationDispense" />
      </type>
    </element>
  </differential>
</StructureDefinition>