<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-bundle-document" />
  <meta>
    <versionId value="1" />
    <lastUpdated value="2022-07-05T13:47:06.4753118+00:00" />
  </meta>
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-bundle-document" />
  <name value="DocumentBundle" />
  <title value="Document Bundle For Patient Chart" />
  <status value="draft" />
  <date value="2021-03-01T20:08:51.0359467+00:00" />
  <description value="This profile is used for bundles of type document" />
  <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" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta">
      <path value="Bundle.meta" />
      <comment value="***&#xD;&#xA;add extension for original version and reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.source">
      <path value="Bundle.meta.source" />
      <comment value="Conformance Rule:   This must be supplied when known which is the vast majority of times&#xD;&#xA;&#xD;&#xA;In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. &#xA;&#xA;This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL." />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.profile">
      <path value="Bundle.meta.profile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://telus.com/fhir/patientChart/StructureDefinition/profile-bundle-document" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag">
      <path value="Bundle.meta.tag" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag:Version">
      <path value="Bundle.meta.tag" />
      <sliceName value="Version" />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="example" />
        <valueSet value="http://telus.com/fhir/ValueSet/telus-version" />
      </binding>
    </element>
    <element id="Bundle.meta.tag:Version.system">
      <path value="Bundle.meta.tag.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.meta.tag:Version.code">
      <path value="Bundle.meta.tag.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.identifier">
      <path value="Bundle.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <comment value="Usage Rule:  This profile is only used for documents, where the first entry must be a composition&#xD;&#xA;REVIEW - MAY COLLAPSE INTO A SINGLE BUNDLE PROFILE&#xD;&#xA;&#xD;&#xA;It's possible to use a bundle for other purposes (e.g. a document can be accepted as a transaction). This is primarily defined so that there can be specific rules for some of the bundle types." />
      <fixedCode value="document" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <min value="1" />
      <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" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry.resource">
      <path value="Bundle.entry.resource" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>