<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-Bundle" />
  <url value="http://pharmacyeclaims.ca/FHIR/v1.0/R4/StructureDefinition/profile-Bundle" />
  <name value="Bundle" />
  <title value="eClaims Bundle" />
  <status value="draft" />
  <description value="R4 version of Pharmacy eClaims Bundle" />
  <purpose value="R4 version of Pharmacy eClaims Bundle" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Bundle" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Bundle" />
  <derivation value="constraint" />
  <differential>
    <element id="Bundle.meta">
      <path value="Bundle.meta" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.profile">
      <path value="Bundle.meta.profile" />
      <comment value="Usage Note:   This will specify the bundle profile and will be used for conformance.   This should be a fixed value of  http://pharmacyeclaims.ca/FHIR/v1.0/R4/StructureDefinition/profile-Bundle&#xD;&#xA;&#xD;&#xA;It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag">
      <path value="Bundle.meta.tag" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag.version">
      <path value="Bundle.meta.tag.version" />
      <comment value="Usage Note:   This will specify the version of the Pharmacy Standard being used, eg &quot;1.0.0&quot;&#xD;&#xA;&#xD;&#xA;Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <fixedCode value="message" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.timestamp">
      <path value="Bundle.timestamp" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.total">
      <path value="Bundle.total" />
      <comment value="Usage Note:   This is used for Daily Totals and Details query message in the response&#xD;&#xA;&#xD;&#xA;Only used if the bundle is a search result set. The total does not include resources such as OperationOutcome and included resources, only the total number of matching resources." />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.link">
      <path value="Bundle.link" />
      <comment value="Usage:   If paging is implemented, the response may include a link&#xD;&#xA;Both Bundle.link and Bundle.entry.link are defined to support providing additional context when Bundles are used (e.g. [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS)). &#xA;&#xA;Bundle.entry.link corresponds to links found in the HTTP header if the resource in the entry was [read](http.html#read) directly.&#xA;&#xA;This specification defines some specific uses of Bundle.link for [searching](search.html#conformance) and [paging](http.html#paging), but no specific uses for Bundle.entry.link, and no defined function in a transaction - the meaning is implementation specific." />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <comment value="Usage Notes:   As these are messages, the first bundle entry will be a request or response MessageHeader resource." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.resource">
      <path value="Bundle.entry.resource" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.response">
      <path value="Bundle.entry.response" />
      <comment value="Conformance Rule:   Must be present for response bundles" />
      <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.outcome">
      <path value="Bundle.entry.response.outcome" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>