<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="t17-bundle-search-obl" />
  <url value="http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-search-obl" />
  <name value="T17BundleSearchObl" />
  <title value="T17 Bundle Search Obl" />
  <status value="draft" />
  <description value="תשובת הקופה עבור סטאטוס התחייבות שנשלח מביה&quot;ח. אם הבאנדל שמוחזר הוא לא ריק (entry &gt; 0), חייב להיות בו לפחות Coverage אחד ולפחות מסמך אחד. יתכנו גם יותר." />
  <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="searchset" />
    </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>
      <comment value="אם הבאנדל שמוחזר הוא לא ריק (entry &gt; 0), חייב להיות בו לפחות Coverage אחד ולפחות מסמך אחד. יתכנו גם יותר." />
    </element>
    <element id="Bundle.entry:obligation">
      <path value="Bundle.entry" />
      <sliceName value="obligation" />
      <min value="0" />
      <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-search-obl" />
      </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:obligation.search">
      <path value="Bundle.entry.search" />
      <min value="1" />
    </element>
    <element id="Bundle.entry:obligation.search.mode">
      <path value="Bundle.entry.search.mode" />
      <min value="1" />
      <fixedCode value="match" />
    </element>
    <element id="Bundle.entry:obligation-doc">
      <path value="Bundle.entry" />
      <sliceName value="obligation-doc" />
      <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-search-obl" />
      </constraint>
    </element>
    <element id="Bundle.entry:obligation-doc.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <min value="1" />
    </element>
    <element id="Bundle.entry:obligation-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>
    <element id="Bundle.entry:obligation-doc.search">
      <path value="Bundle.entry.search" />
      <min value="1" />
    </element>
    <element id="Bundle.entry:obligation-doc.search.mode">
      <path value="Bundle.entry.search.mode" />
      <min value="1" />
      <fixedCode value="include" />
    </element>
  </differential>
</StructureDefinition>