<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://electronichealth.se/fhir/StructureDefinition/NLLMultiDoseDispMedList" />
  <name value="NLLMultiDoseDispMedList" />
  <status value="draft" />
  <fhirVersion value="4.0.0" />
  <mapping>
    <identity value="EHM" />
    <uri value="http://ehalsomyndigheten.se" />
    <name value="E-hälsomyndigheten concept" />
  </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">
      <path value="List" />
      <short value="Represents a medication list with dose dispensed prescriptions for a patient" />
      <definition value="List resource used to represent a medication list with dose dispensed prescriptions. Sv: underlag för en dospatients samlade förskrivningar" />
      <mapping>
        <identity value="EHM" />
        <map value="Dosunderlag" />
      </mapping>
    </element>
    <element id="List.extension">
      <path value="List.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="List.extension:contentStatus">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension" />
      <sliceName value="contentStatus" />
      <short value="GODKANT | EJ_GODKANT | AVREGISTRERAT" />
      <definition value="Status of the dose dispense medication list (sv: dosunderlag)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/Status" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://electronichealth.se/fhir/ValueSet/content-status-1" />
      </binding>
      <mapping>
        <identity value="EHM" />
        <map value="Dosunderlagsstatus" />
      </mapping>
    </element>
    <element id="List.extension:eventHistory">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension" />
      <sliceName value="eventHistory" />
      <short value="A list of events of interest in the lifecycle" />
      <definition value="A list of events of interest in the lifecycle. Events are provided in the header X-Provenance. The events in this list are read only." />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLMultiDoseEvent" />
      </type>
    </element>
    <element id="List.extension:eventHistory.value[x]">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension.value[x]" />
      <mapping>
        <identity value="EHM" />
        <map value="Händelse" />
      </mapping>
    </element>
    <element id="List.extension:nllProducingPharmacy">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension" />
      <sliceName value="nllProducingPharmacy" />
      <short value="Producing pharmacy (sv: dosproducent)" />
      <definition value="Defines the pharmacy which produces multi dose dispense bags for the patient." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLReceivingPharmacy" />
      </type>
    </element>
    <element id="List.extension:nllProducingPharmacy.value[x]">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension.value[x]" />
      <mapping>
        <identity value="EHM" />
        <map value="Dosproducent" />
      </mapping>
    </element>
    <element id="List.extension:nllUrgentProduction">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension" />
      <sliceName value="nllUrgentProduction" />
      <short value="Indicates if the multi dose dispense production should be urgently considered" />
      <definition value="Indicates if the multi dose dispense production should be urgently considered for this patient. The value is calculated based on changes in the medication request(s). Sv: akut-flagga" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLUrgentProduction" />
      </type>
    </element>
    <element id="List.extension:nllUrgentProduction.value[x]">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.extension.value[x]" />
      <mapping>
        <identity value="EHM" />
        <map value="Akut" />
      </mapping>
    </element>
    <element id="List.code">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.code" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://electronichealth.se/fhir/ValueSet/list-types" />
          <code value="multi-dose-disp-list" />
        </coding>
      </fixedCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="List.subject">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.subject" />
      <short value="The common subject of this resource, the patient" />
      <definition value="The subject of the list, in this case the patient (sv: dospatient) is always the subject." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/StructureDefinition/NLLPatient" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Dospatient" />
        <comment value="Reference to the patient of this dose dispense list" />
      </mapping>
    </element>
    <element id="List.date">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="List.date" />
      <short value="When the related information for the list was last changed" />
      <definition value="When the related information for the list (sv: dosunderlag) was last changed. &#xD;&#xA;Read only." />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Senast ändrad" />
        <comment value="Sv: tidpunkt för när dosunderlaget ändrar status" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>