{
  "resourceType": "StructureDefinition",
  "id": "t17-bundle-search-obl",
  "url": "http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-search-obl",
  "name": "T17BundleSearchObl",
  "title": "T17 Bundle Search Obl",
  "status": "draft",
  "description": "תשובת הקופה עבור סטאטוס התחייבות שנשלח מביה\"ח. אם הבאנדל שמוחזר הוא לא ריק (entry > 0), חייב להיות בו לפחות Coverage אחד ולפחות מסמך אחד. יתכנו גם יותר.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "patternCode": "searchset"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "open",
          "ordered": false
        },
        "comment": "אם הבאנדל שמוחזר הוא לא ריק (entry > 0), חייב להיות בו לפחות Coverage אחד ולפחות מסמך אחד. יתכנו גם יותר."
      },
      {
        "id": "Bundle.entry:obligation",
        "path": "Bundle.entry",
        "sliceName": "obligation",
        "min": 0,
        "max": "1",
        "constraint": [
          {
            "key": "bundle-https",
            "severity": "error",
            "human": "Must start with either 'http://' or 'https://'",
            "expression": "fullUrl.startsWith('http://') or fullUrl.startsWith('https://')",
            "source": "http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-search-obl"
          }
        ]
      },
      {
        "id": "Bundle.entry:obligation.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:obligation.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Coverage",
            "profile": [
              "http://ig.fhir-il-community.org/T17/StructureDefinition/t17-obligation"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:obligation.search",
        "path": "Bundle.entry.search",
        "min": 1
      },
      {
        "id": "Bundle.entry:obligation.search.mode",
        "path": "Bundle.entry.search.mode",
        "min": 1,
        "fixedCode": "match"
      },
      {
        "id": "Bundle.entry:obligation-doc",
        "path": "Bundle.entry",
        "sliceName": "obligation-doc",
        "min": 0,
        "max": "*",
        "constraint": [
          {
            "key": "bundle-https",
            "severity": "error",
            "human": "Must start with either 'http://' or 'https://'",
            "expression": "fullUrl.startsWith('http://') or fullUrl.startsWith('https://')",
            "source": "http://ig.fhir-il-community.org/T17/StructureDefinition/t17-bundle-search-obl"
          }
        ]
      },
      {
        "id": "Bundle.entry:obligation-doc.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:obligation-doc.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "DocumentReference",
            "profile": [
              "http://ig.fhir-il-community.org/T17/StructureDefinition/t17-obligation-doc"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:obligation-doc.search",
        "path": "Bundle.entry.search",
        "min": 1
      },
      {
        "id": "Bundle.entry:obligation-doc.search.mode",
        "path": "Bundle.entry.search.mode",
        "min": 1,
        "fixedCode": "include"
      }
    ]
  }
}