<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ncdhc-bundle-document" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Foundation.Other" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="not-classified" />
  </extension>
  <url value="http://build.fhir.org/ig/hl7au/au-fhir-childhealth/StructureDefinition/ncdhc-bundle-document" />
  <version value="current" />
  <name value="NCDHCBundleDocument" />
  <title value="NCDHC FHIR Document Base" />
  <status value="active" />
  <description value="NCDHC FHIR document profile using Bundle resource" />
  <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="true" />
  <type value="Bundle" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Bundle" />
  <derivation value="constraint" />
  <differential>
    <element id="Bundle.identifier">
      <path value="Bundle.identifier" />
      <short value="Document Identifier" />
      <min value="1" />
    </element>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <fixedCode value="document" />
    </element>
    <element id="Bundle.timestamp">
      <path value="Bundle.timestamp" />
      <short value="Document creation time" />
      <min value="1" />
    </element>
    <element id="Bundle.total">
      <path value="Bundle.total" />
      <max value="0" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="fullUrl" />
        </discriminator>
        <discriminator>
          <type value="type" />
          <path value="resource" />
        </discriminator>
        <description value="Slice based on the resource type and fullurl" />
        <rules value="open" />
      </slicing>
      <short value="Document must have atleast one entry" />
      <min value="1" />
    </element>
    <element id="Bundle.entry.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <min value="1" />
    </element>
    <element id="Bundle.entry.resource">
      <path value="Bundle.entry.resource" />
      <short value="Other resource entries in the document." />
      <min value="1" />
    </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>
    <element id="Bundle.entry:compositionEntry">
      <path value="Bundle.entry" />
      <sliceName value="compositionEntry" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Bundle.entry:compositionEntry.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <min value="1" />
    </element>
    <element id="Bundle.entry:compositionEntry.resource">
      <path value="Bundle.entry.resource" />
      <short value="Composition should be the first resource in the Bundle document" />
      <min value="1" />
      <type>
        <code value="Composition" />
        <profile value="http://build.fhir.org/ig/hl7au/au-fhir-childhealth/StructureDefinition/ncdhc-composition-clinical-document-base" />
      </type>
    </element>
    <element id="Bundle.entry:compositionEntry.search">
      <path value="Bundle.entry.search" />
      <max value="0" />
    </element>
    <element id="Bundle.entry:compositionEntry.request">
      <path value="Bundle.entry.request" />
      <max value="0" />
    </element>
    <element id="Bundle.entry:compositionEntry.response">
      <path value="Bundle.entry.response" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>