<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="t17-bundle-res" />
  <url value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-res" />
  <name value="T17BundleRes" />
  <title value="T17 Bundle Res" />
  <status value="draft" />
  <description value="מארז של ישויות הנכללות במענה להתחייבות, אחת או יותר" />
  <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.type">
      <path value="Bundle.type" />
      <patternCode value="collection" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resource" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Bundle.entry:response">
      <path value="Bundle.entry" />
      <sliceName value="response" />
      <min value="1" />
      <max value="1" />
      <constraint>
        <key value="bundle-https" />
        <severity value="error" />
        <human value="Must start with either 'http://' or 'https://'" />
        <expression value="fullUrl.startsWith('http://') or fullUrl.startsWith('https://')" />
        <source value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-res" />
      </constraint>
    </element>
    <element id="Bundle.entry:response.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <min value="1" />
    </element>
    <element id="Bundle.entry:response.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="CoverageEligibilityResponse" />
        <profile value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-response" />
      </type>
    </element>
    <element id="Bundle.entry:obligation">
      <path value="Bundle.entry" />
      <sliceName value="obligation" />
      <min value="0" />
      <max value="*" />
      <constraint>
        <key value="bundle-https" />
        <severity value="error" />
        <human value="Must start with either 'http://' or 'https://'" />
        <expression value="fullUrl.startsWith('http://') or fullUrl.startsWith('https://')" />
        <source value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-res" />
      </constraint>
    </element>
    <element id="Bundle.entry:obligation.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <min value="1" />
    </element>
    <element id="Bundle.entry:obligation.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="Coverage" />
        <profile value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-obligation" />
      </type>
    </element>
    <element id="Bundle.entry:obl-doc">
      <path value="Bundle.entry" />
      <sliceName value="obl-doc" />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="Bundle.entry:obl-doc.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="DocumentReference" />
        <profile value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-obligation-doc" />
      </type>
    </element>
  </differential>
</StructureDefinition>