<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-interaction-bundle-patientchart" />
  <meta>
    <versionId value="3" />
    <lastUpdated value="2022-07-05T13:52:47.8934768+00:00" />
  </meta>
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-interaction-bundle" />
  <name value="InteractionBundlePatientChart" />
  <title value="Interaction Bundle Patient Chart" />
  <status value="draft" />
  <date value="2021-03-01T20:11:25.7831223+00:00" />
  <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">
      <path value="Bundle" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.id">
      <path value="Bundle.id" />
      <comment value="Usage Note: It should be omitted when creating a new message and will be assigned by the THX for each destination.&#xD;&#xA;&#xD;&#xA;The only time that a resource does not have an id is when it is being submitted to the server using a create operation." />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta">
      <path value="Bundle.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.lastUpdated">
      <path value="Bundle.meta.lastUpdated" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.source">
      <path value="Bundle.meta.source" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.profile">
      <path value="Bundle.meta.profile" />
      <comment value="Usage Rule:  This will be used by the TELUS Central Switch capability tracking service to confirm that the sender has passed conformance to this profile.&#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.&#xD;&#xA;&#xD;&#xA;Usage Note: This is used by the validator to determine the version drives the IG pack to be used.  Example:  |2.0 is necessary to determine the version." />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://telus.com/fhir/StructureDefinition/profile-interaction-bundle-patientchart|3.0" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag">
      <path value="Bundle.meta.tag" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://telus.com/fhir/ValueSet/telus-version" />
      </binding>
    </element>
    <element id="Bundle.meta.tag.system">
      <path value="Bundle.meta.tag.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag.code">
      <path value="Bundle.meta.tag.code" />
      <comment value="Conformance Rule: Vendors must ignore this value. The version may be a more current version of the message standard and This must be accepted in order to be backwards compatible." />
      <min value="1" />
      <fixedCode value="eServices3.0" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.extension">
      <path value="Bundle.meta.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Bundle.meta.extension:OriginalBundleVersion">
      <path value="Bundle.meta.extension" />
      <sliceName value="OriginalBundleVersion" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-bundle-original-version" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <fixedCode value="document" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.timestamp">
      <path value="Bundle.timestamp" />
      <comment value="For many bundles, the timestamp is equal to meta.lastUpdated, because they are not stored (e.g. search results). When a bundle is placed in a persistent store, .meta.lastUpdated will be usually be changed by the server. When the bundle is a message, a middleware agent altering the message (even if not stored) SHOULD update .meta.lastUpdated. .timestamp is used to track the original time of the Bundle, and SHOULD be populated.&#xA;&#xA;Usage Note:&#xA;&#xA;* document : the date the document was created. Note: the composition may predate the document, or be associated with multiple documents. The date of the composition - the authoring time - may be earlier than the document assembly time&#xA;* message : the date that the content of the message was assembled. This date is not changed by middleware engines unless they add additional data that changes the meaning of the time of the message&#xA;* history : the date that the history was assembled. This time would be used as the _since time to ask for subsequent updates&#xA;* searchset : the time that the search set was assembled. Note that different pages MAY have different timestamps but need not. Having different timestamps does not imply that subsequent pages will represent or include changes made since the initial query&#xA;* transaction | transaction-response | batch | batch-response | collection : no particular assigned meaning&#xA;&#xA;The timestamp value should be greater than the lastUpdated and other timestamps in the resources in the bundle, and it should be equal or earlier than the .meta.lastUpdated on the Bundle itself." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <comment value="???? Add an invariant, --&gt; first must be a &quot;http://telus.com/fhir/StructureDefinition/profile-composition&quot; profile on composition.   Important for validaiton otherwise we will not enforce the root composition." />
      <min value="4" />
      <condition value="bdl-5" />
      <condition value="bdl-1" />
      <condition value="bdl-2" />
      <condition value="bdl-3" />
      <condition value="bdl-4" />
      <condition value="bdl-7" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.link">
      <path value="Bundle.entry.link" />
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Bundle#Bundle.link" />
    </element>
    <element id="Bundle.entry.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <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" />
      <max value="0" />
    </element>
    <element id="Bundle.entry.response">
      <path value="Bundle.entry.response" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>