<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://electronichealth.se/fhir/StructureDefinition/NLLPrescriptionBundle" />
  <version value="1.0.1" />
  <name value="NLLPrescriptionBundle" />
  <status value="active" />
  <date value="2024-04-10" />
  <publisher value="Swedish eHealth Agency" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="EHM" />
    <name value="E-hälsomyndigheten concept" />
  </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" />
      <short value="transaction | transaction-response" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://electronichealth.se/fhir/ValueSet/transaction-bundle-types" />
      </binding>
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <short value="URI for resource, UUID" />
      <definition value="The National Medication List uses fullUrl in the form of the urn:uuid of the resource.&#xD;&#xA;The fullUrl element SHALL have a value except that: &#xA;* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle)&#xA;* Results from operations might involve resources that are not identified." />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="Resource" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLMedicationRequest" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.search">
      <path value="Bundle.entry.search" />
      <max value="0" />
    </element>
    <element id="Bundle.entry.request">
      <path value="Bundle.entry.request" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.request.extension">
      <path value="Bundle.entry.request.extension" />
      <min value="1" />
    </element>
    <element id="Bundle.entry.request.extension:nllProvenanceDetails">
      <path value="Bundle.entry.request.extension" />
      <sliceName value="nllProvenanceDetails" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLProvenanceDetails" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Bundle.entry.request.extension:nllProvenanceDetails.extension">
      <path value="Bundle.entry.request.extension.extension" />
      <min value="2" />
    </element>
    <element id="Bundle.entry.request.extension:nllProvenanceDetails.extension:reason">
      <path value="Bundle.entry.request.extension.extension" />
      <sliceName value="reason" />
      <comment value="-" />
      <min value="1" />
    </element>
    <element id="Bundle.entry.request.extension:nllProvenanceDetails.extension:activity">
      <path value="Bundle.entry.request.extension.extension" />
      <sliceName value="activity" />
      <comment value="-" />
    </element>
    <element id="Bundle.entry.request.method">
      <path value="Bundle.entry.request.method" />
      <short value="POST | PUT" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://electronichealth.se/fhir/ValueSet/transaction-operations" />
      </binding>
    </element>
    <element id="Bundle.entry.request.url">
      <path value="Bundle.entry.request.url" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.response">
      <path value="Bundle.entry.response" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.response.status">
      <path value="Bundle.entry.response.status" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.response.location">
      <path value="Bundle.entry.response.location" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.response.outcome">
      <path value="Bundle.entry.response.outcome" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>