<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://digen.nublar.de/fhir/StructureDefinition/DigenBundesmedikationsplanList" />
  <name value="DigenBundesmedikationsplanList" />
  <status value="draft" />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="List" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/List" />
  <derivation value="constraint" />
  <differential>
    <element id="List.id">
      <path value="List.id" />
      <max value="0" />
    </element>
    <element id="List.meta.tag">
      <path value="List.meta.tag" />
      <max value="0" />
    </element>
    <element id="List.implicitRules">
      <path value="List.implicitRules" />
      <max value="0" />
    </element>
    <element id="List.contained">
      <path value="List.contained" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="List.contained:BMPPresentableMedicationStatements">
      <path value="List.contained" />
      <sliceName value="BMPPresentableMedicationStatements" />
      <short value="BMP Medikationseinträge" />
      <min value="1" />
      <type>
        <code value="Resource" />
        <profile value="http://digen.nublar.de/fhir/StructureDefinition/DigenBMPPresentableMedicationStatement" />
      </type>
    </element>
    <element id="List.contained:informationSourcePractitionerResource">
      <path value="List.contained" />
      <sliceName value="informationSourcePractitionerResource" />
      <short value="Ausgedruckt von" />
      <comment value="The practitioner (or organization in some cases) that printed out the medication plan for the patient. This must be included inline, as we do not always know the LANR." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Resource" />
        <profile value="http://digen.nublar.de/fhir/StructureDefinition/DigenBmpPractitioner" />
      </type>
    </element>
    <element id="List.identifier">
      <path value="List.identifier" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="List.identifier.id">
      <path value="List.identifier.id" />
      <max value="0" />
    </element>
    <element id="List.identifier.use">
      <path value="List.identifier.use" />
      <max value="0" />
    </element>
    <element id="List.identifier.type">
      <path value="List.identifier.type" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.id">
      <path value="List.identifier.type.id" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.coding">
      <path value="List.identifier.type.coding" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.coding.id">
      <path value="List.identifier.type.coding.id" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.coding.system">
      <path value="List.identifier.type.coding.system" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.coding.version">
      <path value="List.identifier.type.coding.version" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.coding.code">
      <path value="List.identifier.type.coding.code" />
      <definition value="Contains the unique identifier of the Bundesmedikationsplan (BMP), read from Barcode MP.U." />
      <max value="0" />
    </element>
    <element id="List.identifier.type.coding.userSelected">
      <path value="List.identifier.type.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="List.identifier.type.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="List.identifier.type.text" />
      <max value="0" />
    </element>
    <element id="List.identifier.system">
      <path value="List.identifier.system" />
      <min value="1" />
      <fixedUri value="http://tools.ietf.org/html/rfc4122" />
    </element>
    <element id="List.identifier.value">
      <path value="List.identifier.value" />
      <short value="BMP unique ID" />
      <definition value="Contains the unique identifier of the Bundesmedikationsplan (BMP), read from Barcode MP.U." />
      <min value="1" />
    </element>
    <element id="List.identifier.period">
      <path value="List.identifier.period" />
      <max value="0" />
    </element>
    <element id="List.identifier.assigner">
      <path value="List.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="List.status">
      <path value="List.status" />
      <fixedCode value="current" />
    </element>
    <element id="List.mode">
      <path value="List.mode" />
      <fixedCode value="snapshot" />
    </element>
    <element id="List.title">
      <path value="List.title" />
      <max value="0" />
    </element>
    <element id="List.code">
      <path value="List.code" />
      <min value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://hl7.org/fhir/list-example-use-codes" />
          <code value="medications" />
          <display value="medications" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="List.code.id">
      <path value="List.code.id" />
      <max value="0" />
    </element>
    <element id="List.code.coding.id">
      <path value="List.code.coding.id" />
      <max value="0" />
    </element>
    <element id="List.code.coding.version">
      <path value="List.code.coding.version" />
      <max value="0" />
    </element>
    <element id="List.code.coding.userSelected">
      <path value="List.code.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="List.code.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="List.code.text" />
      <max value="0" />
    </element>
    <element id="List.subject">
      <path value="List.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="List.subject.id">
      <path value="List.subject.id" />
      <max value="0" />
    </element>
    <element id="List.subject.reference">
      <path value="List.subject.reference" />
      <min value="1" />
    </element>
    <element id="List.subject.identifier">
      <path value="List.subject.identifier" />
      <max value="0" />
    </element>
    <element id="List.subject.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="List.subject.display" />
      <max value="0" />
    </element>
    <element id="List.encounter">
      <path value="List.encounter" />
      <max value="0" />
    </element>
    <element id="List.date">
      <path value="List.date" />
      <short value="Ausdrucksdatum des BMP" />
      <definition value="The date that the list was prepared, i.e. the date when the medication plan was printed, read from Barcode: MP.A.t." />
    </element>
    <element id="List.source">
      <path value="List.source" />
      <short value="Ausdruckender Arzt/Apotheke" />
      <definition value="The doctor/pharmacy that printed the medication plan (Bundesmedikationsplan, BMP), read from Barcode: MP.A.*" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://digen.nublar.de/fhir/StructureDefinition/DigenBmpPractitioner" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="List.source.id">
      <path value="List.source.id" />
      <max value="0" />
    </element>
    <element id="List.source.reference">
      <path value="List.source.reference" />
      <min value="1" />
    </element>
    <element id="List.source.identifier">
      <path value="List.source.identifier" />
      <max value="0" />
    </element>
    <element id="List.source.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="List.source.display" />
      <max value="0" />
    </element>
    <element id="List.orderedBy">
      <path value="List.orderedBy" />
      <max value="0" />
    </element>
    <element id="List.note">
      <path value="List.note" />
      <max value="0" />
    </element>
    <element id="List.entry">
      <path value="List.entry" />
      <short value="Medikationseinträge des BMP" />
      <definition value="Entries in this list are the several medications statements (PZN), that are part of the medican plan (Bundesmedikationsplan, BMP)." />
      <min value="1" />
    </element>
    <element id="List.entry.id">
      <path value="List.entry.id" />
      <max value="0" />
    </element>
    <element id="List.entry.flag">
      <path value="List.entry.flag" />
      <short value="Dosierschemaübernahme" />
      <definition value="The flag defines per entry (PZN) if the dosing scheme is to be used to from the medical plan and thus overrides a possibly already existing dosing scheme." />
      <min value="1" />
    </element>
    <element id="List.entry.flag.id">
      <path value="List.entry.flag.id" />
      <max value="0" />
    </element>
    <element id="List.entry.flag.coding">
      <path value="List.entry.flag.coding" />
      <short value="Dosierschemaübernahme" />
      <definition value="Defines if a dosing scheme from the BMP (Bundesmedikationsplan) overrides a previously existing dosing scheme." />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <description value="DosingScheme" />
        <valueSetUri value="http://digen.nublar.de/fhir/CodeSystem/1.2.276.0.76.3.1.321.1.1.5.10" />
      </binding>
    </element>
    <element id="List.entry.flag.coding.id">
      <path value="List.entry.flag.coding.id" />
      <max value="0" />
    </element>
    <element id="List.entry.flag.coding.system">
      <path value="List.entry.flag.coding.system" />
      <min value="1" />
    </element>
    <element id="List.entry.flag.coding.version">
      <path value="List.entry.flag.coding.version" />
      <max value="0" />
    </element>
    <element id="List.entry.flag.coding.code">
      <path value="List.entry.flag.coding.code" />
      <short value="Dosierschemaübernahme" />
      <definition value="If true, the dosing scheme from the medication plan (BMP) is used to overwrite an existing dosing scheme." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="dosingScheme" />
        <valueSetUri value="http://digen.nublar.de/fhir/CodeSystem/1.2.276.0.76.3.1.321.1.1.5.10" />
      </binding>
    </element>
    <element id="List.entry.flag.coding.userSelected">
      <path value="List.entry.flag.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="List.entry.flag.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="List.entry.flag.text" />
      <max value="0" />
    </element>
    <element id="List.entry.deleted">
      <path value="List.entry.deleted" />
      <max value="0" />
    </element>
    <element id="List.entry.date">
      <path value="List.entry.date" />
      <max value="0" />
    </element>
    <element id="List.entry.item">
      <path value="List.entry.item" />
      <short value="BMP Medikationseinträge" />
      <definition value="A reference to the actual medication plan (Bundesmedikationsplan, BMP), from which the medication entries are read." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://digen.nublar.de/fhir/StructureDefinition/DigenBMPPresentableMedicationStatement" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="List.entry.item.id">
      <path value="List.entry.item.id" />
      <max value="0" />
    </element>
    <element id="List.entry.item.identifier">
      <path value="List.entry.item.identifier" />
      <max value="0" />
    </element>
    <element id="List.entry.item.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="List.entry.item.display" />
      <max value="0" />
    </element>
    <element id="List.emptyReason">
      <path value="List.emptyReason" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>