{
  "resourceType": "StructureDefinition",
  "id": "il-core-episode-of-care",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1
    }
  ],
  "url": "http://fhir.health.gov.il/StructureDefinition/il-core-episode-of-care",
  "version": "0.21.0",
  "name": "ILCoreEpisodeOfCare",
  "title": "ILCore EpisodeOfCare Profile",
  "status": "draft",
  "date": "2026-03-23",
  "publisher": "Israel Core Team",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "tal.primak@moh.gov.il"
        }
      ]
    }
  ],
  "description": "Israel Core proposed constraints and extensions on the EpisodeOfCare Resource",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "EpisodeOfCare",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "EpisodeOfCare",
        "path": "EpisodeOfCare",
        "short": "ILCore EpisodeOfCare Profile",
        "definition": "Israel Core proposed constraints and extensions on the EpisodeOfCare resource profile."
      },
      {
        "id": "EpisodeOfCare.identifier",
        "path": "EpisodeOfCare.identifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-identifier"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.type",
        "path": "EpisodeOfCare.type",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "definition": "Type/classification of the episode of care.",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-episode-of-care-type-and-service-type"
        }
      },
      {
        "id": "EpisodeOfCare.type:recurring-daily-hospitalization",
        "path": "EpisodeOfCare.type",
        "sliceName": "recurring-daily-hospitalization",
        "min": 0,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://fhir.health.gov.il/cs/il-core-episode-of-care-type",
              "code": "recurring-daily-hospitalization"
            }
          ]
        }
      },
      {
        "id": "EpisodeOfCare.type:serviceType",
        "path": "EpisodeOfCare.type",
        "sliceName": "serviceType",
        "short": "Service type for the episode of care",
        "definition": "Service type/specialty context for the episode, analogous to Encounter.serviceType.",
        "min": 0,
        "max": "*",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-service-type"
        }
      },
      {
        "id": "EpisodeOfCare.diagnosis.condition",
        "path": "EpisodeOfCare.diagnosis.condition",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-condition"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.diagnosis.role",
        "path": "EpisodeOfCare.diagnosis.role",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-diagnosis-role"
        }
      },
      {
        "id": "EpisodeOfCare.patient",
        "path": "EpisodeOfCare.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.managingOrganization",
        "path": "EpisodeOfCare.managingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.referralRequest",
        "path": "EpisodeOfCare.referralRequest",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-service-request"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.careManager",
        "path": "EpisodeOfCare.careManager",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.team",
        "path": "EpisodeOfCare.team",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-team"
            ]
          }
        ]
      }
    ]
  }
}