{
  "resourceType": "StructureDefinition",
  "id": "il-core-care-plan",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "draft"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 0
    }
  ],
  "url": "http://fhir.health.gov.il/StructureDefinition/il-core-care-plan",
  "version": "0.21.0",
  "name": "ILCoreCarePlan",
  "title": "ILCore CarePlan 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 CarePlan Resource",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "CarePlan",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CarePlan",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CarePlan",
        "path": "CarePlan",
        "short": "ILCore CarePlan Profile",
        "definition": "Israel Core proposed constraints and extensions on the CarePlan resource profile."
      },
      {
        "id": "CarePlan.identifier",
        "path": "CarePlan.identifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-identifier"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.instantiatesCanonical",
        "path": "CarePlan.instantiatesCanonical",
        "type": [
          {
            "code": "canonical",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-plan-definition",
              "http://fhir.health.gov.il/StructureDefinition/il-core-questionnaire",
              "http://fhir.health.gov.il/StructureDefinition/il-core-measure",
              "http://fhir.health.gov.il/StructureDefinition/il-core-activity-definition",
              "http://hl7.org/fhir/StructureDefinition/OperationDefinition"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.basedOn",
        "path": "CarePlan.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-plan"
            ],
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy",
                "valueBoolean": true
              }
            ]
          }
        ]
      },
      {
        "id": "CarePlan.replaces",
        "path": "CarePlan.replaces",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-plan"
            ],
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy",
                "valueBoolean": true
              }
            ]
          }
        ]
      },
      {
        "id": "CarePlan.partOf",
        "path": "CarePlan.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-plan"
            ],
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy",
                "valueBoolean": true
              }
            ]
          }
        ]
      },
      {
        "id": "CarePlan.subject",
        "path": "CarePlan.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-group"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.encounter",
        "path": "CarePlan.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-encounter"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role",
              "http://fhir.health.gov.il/StructureDefinition/il-core-device",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person",
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization",
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-team"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.contributor",
        "path": "CarePlan.contributor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role",
              "http://fhir.health.gov.il/StructureDefinition/il-core-device",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person",
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization",
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-team"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.careTeam",
        "path": "CarePlan.careTeam",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-team"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.addresses",
        "path": "CarePlan.addresses",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-condition"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.goal",
        "path": "CarePlan.goal",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-goal"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.reference",
        "path": "CarePlan.activity.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Appointment",
              "http://fhir.health.gov.il/StructureDefinition/il-core-communication-request",
              "http://fhir.health.gov.il/StructureDefinition/il-core-device-request",
              "http://fhir.health.gov.il/StructureDefinition/il-core-medication-request",
              "http://fhir.health.gov.il/StructureDefinition/il-core-nutrition-order",
              "http://fhir.health.gov.il/StructureDefinition/il-core-task",
              "http://fhir.health.gov.il/StructureDefinition/il-core-service-request",
              "http://hl7.org/fhir/StructureDefinition/VisionPrescription",
              "http://hl7.org/fhir/StructureDefinition/RequestGroup"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.instantiatesCanonical",
        "path": "CarePlan.activity.detail.instantiatesCanonical",
        "type": [
          {
            "code": "canonical",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-plan-definition",
              "http://fhir.health.gov.il/StructureDefinition/il-core-questionnaire",
              "http://fhir.health.gov.il/StructureDefinition/il-core-measure",
              "http://fhir.health.gov.il/StructureDefinition/il-core-activity-definition",
              "http://hl7.org/fhir/StructureDefinition/OperationDefinition"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.reasonReference",
        "path": "CarePlan.activity.detail.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-condition",
              "http://fhir.health.gov.il/StructureDefinition/il-core-observation",
              "http://fhir.health.gov.il/StructureDefinition/il-core-diagnostic-report",
              "http://fhir.health.gov.il/StructureDefinition/il-core-document-reference"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.goal",
        "path": "CarePlan.activity.detail.goal",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-goal"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.location",
        "path": "CarePlan.activity.detail.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-location"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.performer",
        "path": "CarePlan.activity.detail.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role",
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person",
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-team",
              "http://fhir.health.gov.il/StructureDefinition/il-core-healthcare-service",
              "http://fhir.health.gov.il/StructureDefinition/il-core-device"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.product[x]",
        "path": "CarePlan.activity.detail.product[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "CarePlan.activity.detail.product[x]:productReference",
        "path": "CarePlan.activity.detail.product[x]",
        "sliceName": "productReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-medication",
              "http://fhir.health.gov.il/StructureDefinition/il-core-substance"
            ]
          }
        ]
      }
    ]
  }
}