{
  "resourceType": "StructureDefinition",
  "id": "il-core-observation",
  "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-observation",
  "version": "0.21.0",
  "name": "ILCoreObservation",
  "title": "ILCore Observation Profile",
  "status": "active",
  "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 Observation Resource",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "ILCore Observation Profile",
        "definition": "Israel Core proposed constraints and extensions on the Observation resource profile."
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-identifier"
            ]
          }
        ]
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-care-plan",
              "http://fhir.health.gov.il/StructureDefinition/il-core-device-request",
              "http://fhir.health.gov.il/StructureDefinition/il-core-immunization-recommendation",
              "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-service-request"
            ]
          }
        ]
      },
      {
        "id": "Observation.partOf",
        "path": "Observation.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-medication-administration",
              "http://fhir.health.gov.il/StructureDefinition/il-core-medication-dispense",
              "http://fhir.health.gov.il/StructureDefinition/il-core-procedure",
              "http://fhir.health.gov.il/StructureDefinition/il-core-immunization",
              "http://fhir.health.gov.il/StructureDefinition/il-core-imaging-study",
              "http://fhir.health.gov.il/StructureDefinition/il-core-medication-statement"
            ]
          }
        ]
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "mustSupport": true
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-observation-code"
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-group",
              "http://fhir.health.gov.il/StructureDefinition/il-core-device",
              "http://fhir.health.gov.il/StructureDefinition/il-core-location"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-encounter"
            ]
          }
        ]
      },
      {
        "id": "Observation.performer",
        "path": "Observation.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-care-team",
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person"
            ]
          }
        ]
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.value[x]",
        "sliceName": "valueQuantity",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "constraint": [
          {
            "key": "il-obs-ucum",
            "severity": "warning",
            "human": "SHOULD use UCUM for coded quantity units",
            "expression": "system.empty() or system = 'http://unitsofmeasure.org'",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept",
        "path": "Observation.value[x]",
        "sliceName": "valueCodeableConcept",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "il-obs-value-cc",
            "severity": "warning",
            "human": "SHOULD use SNOMED-CT or LOINC Answers for coded results",
            "expression": "coding.where(system='http://snomed.info/sct' and code.exists()).exists() or coding.where(system='http://loinc.org' and code.startsWith('LA')).exists()",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ],
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-observation-value"
        }
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "constraint": [
          {
            "key": "il-obs-not-performed",
            "severity": "error",
            "human": "dataAbsentReason - if an IL-Core 'not-performed-reason' code is supplied, the HL7 code (http://terminology.hl7.org/CodeSystem/data-absent-reason) 'not performed' MUST be supplied as well",
            "expression": "coding.where(system='http://fhir.health.gov.il/cs/il-core-not-performed-reason').exists() implies coding.where(system='http://terminology.hl7.org/CodeSystem/data-absent-reason' and code='not-performed').exists()",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.dataAbsentReason.coding",
        "path": "Observation.dataAbsentReason.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.dataAbsentReason.coding:not-performed-reason",
        "path": "Observation.dataAbsentReason.coding",
        "sliceName": "not-performed-reason",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.dataAbsentReason.coding:not-performed-reason.system",
        "path": "Observation.dataAbsentReason.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.health.gov.il/cs/il-core-not-performed-reason"
      },
      {
        "id": "Observation.dataAbsentReason.coding:not-performed-reason.code",
        "path": "Observation.dataAbsentReason.coding.code",
        "min": 1
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "BodySite"
            }
          ],
          "strength": "preferred",
          "description": "Codes describing anatomical locations. May include laterality.",
          "valueSet": "http://hl7.org/fhir/ValueSet/body-site"
        }
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationMethod"
            }
          ],
          "strength": "preferred",
          "description": "Methods for simple observations.",
          "valueSet": "http://hl7.org/fhir/ValueSet/observation-methods"
        }
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-specimen"
            ]
          }
        ]
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-device",
              "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
            ]
          }
        ]
      },
      {
        "id": "Observation.referenceRange.low",
        "path": "Observation.referenceRange.low",
        "constraint": [
          {
            "key": "il-obs-ucum",
            "severity": "warning",
            "human": "SHOULD use UCUM for coded quantity units",
            "expression": "system.empty() or system = 'http://unitsofmeasure.org'",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.referenceRange.high",
        "path": "Observation.referenceRange.high",
        "constraint": [
          {
            "key": "il-obs-ucum",
            "severity": "warning",
            "human": "SHOULD use UCUM for coded quantity units",
            "expression": "system.empty() or system = 'http://unitsofmeasure.org'",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.referenceRange.age.low.system",
        "path": "Observation.referenceRange.age.low.system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.referenceRange.age.low.code",
        "path": "Observation.referenceRange.age.low.code",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/age-units"
        }
      },
      {
        "id": "Observation.referenceRange.age.high.system",
        "path": "Observation.referenceRange.age.high.system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.referenceRange.age.high.code",
        "path": "Observation.referenceRange.age.high.code",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/age-units"
        }
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-observation",
              "http://fhir.health.gov.il/StructureDefinition/il-core-questionnaire-response",
              "http://hl7.org/fhir/StructureDefinition/MolecularSequence"
            ]
          }
        ]
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-document-reference",
              "http://fhir.health.gov.il/StructureDefinition/il-core-imaging-study",
              "http://fhir.health.gov.il/StructureDefinition/il-core-media",
              "http://fhir.health.gov.il/StructureDefinition/il-core-questionnaire-response",
              "http://fhir.health.gov.il/StructureDefinition/il-core-observation",
              "http://fhir.health.gov.il/StructureDefinition/il-core-molecular-sequence"
            ]
          }
        ]
      },
      {
        "id": "Observation.component.code",
        "path": "Observation.component.code",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-observation-code"
        }
      },
      {
        "id": "Observation.component.value[x]",
        "path": "Observation.component.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Observation.component.value[x]:valueQuantity",
        "path": "Observation.component.value[x]",
        "sliceName": "valueQuantity",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "constraint": [
          {
            "key": "il-obs-ucum",
            "severity": "warning",
            "human": "SHOULD use UCUM for coded quantity units",
            "expression": "system.empty() or system = 'http://unitsofmeasure.org'",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueCodeableConcept",
        "path": "Observation.component.value[x]",
        "sliceName": "valueCodeableConcept",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "il-obs-value-cc",
            "severity": "warning",
            "human": "SHOULD use SNOMED-CT or LOINC Answers for coded results",
            "expression": "coding.where(system='http://snomed.info/sct' and code.exists()).exists() or coding.where(system='http://loinc.org' and code.startsWith('LA')).exists()",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ],
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-observation-value"
        }
      },
      {
        "id": "Observation.component.referenceRange",
        "path": "Observation.component.referenceRange",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "Observation.component.referenceRange.low",
        "path": "Observation.component.referenceRange.low",
        "constraint": [
          {
            "key": "il-obs-ucum",
            "severity": "warning",
            "human": "SHOULD use UCUM for coded quantity units",
            "expression": "system.empty() or system = 'http://unitsofmeasure.org'",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.component.referenceRange.high",
        "path": "Observation.component.referenceRange.high",
        "constraint": [
          {
            "key": "il-obs-ucum",
            "severity": "warning",
            "human": "SHOULD use UCUM for coded quantity units",
            "expression": "system.empty() or system = 'http://unitsofmeasure.org'",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-observation"
          }
        ]
      },
      {
        "id": "Observation.component.referenceRange.age.low",
        "path": "Observation.component.referenceRange.age.low",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/age-units"
        }
      },
      {
        "id": "Observation.component.referenceRange.age.high",
        "path": "Observation.component.referenceRange.age.high",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/age-units"
        }
      }
    ]
  }
}