{
  "resourceType": "StructureDefinition",
  "id": "il-core-patient",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    }
  ],
  "url": "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
  "version": "0.21.0",
  "name": "ILCorePatient",
  "title": "ILCore Patient 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 Patient Resource.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "short": "ILCore Patient profile",
        "definition": "The Patient Profile is based upon the core FHIR Patient Resource"
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:hmo",
        "path": "Patient.extension",
        "sliceName": "hmo",
        "short": "Extension: Israel Core HMO (קופת חולים)",
        "definition": "A code classifying the person's Israeli HMO",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/ext-il-hmo"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:parentName",
        "path": "Patient.extension",
        "sliceName": "parentName",
        "short": "Extension: Administrative Parent Name",
        "definition": "Extension: The name of a person’s parent, recorded for administrative purposes as part of the person’s demographics (e.g to help with identification). This SHOULD NOT be confused with a parent whose details are recorded for contact purposes (Patient.contact) or as a family member (RelatedPerson). Most systems will use the “father’s name” field as the source of data for this extension. NOTE: This extension replaces the old ParentName extension and is the PREFFERED extension",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/ext-administrative-parent-name"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:birthPlace",
        "path": "Patient.extension",
        "sliceName": "birthPlace",
        "short": "Extension: Place of Birth for patient",
        "definition": "Used mainly to record the birth country code",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-birthPlace"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:birthPlace.value[x].country",
        "path": "Patient.extension.value[x].country",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-extended-country-codes"
        }
      },
      {
        "id": "Patient.extension:immigration",
        "path": "Patient.extension",
        "sliceName": "immigration",
        "short": "Extension: Patient Immigration",
        "definition": "Extension: Immigration information for a patient - for the purpose of this extension - immigration is an international movement of a person to a destination country in order to settle as permanent resident",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/ext-patient-immigration"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:birthSex",
        "path": "Patient.extension",
        "sliceName": "birthSex",
        "short": "Extension: Person Recorded Sex Or Gender",
        "definition": "A recorded sex or gender property for the individual",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/individual-recordedSexOrGender"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:birthSex.extension:value",
        "path": "Patient.extension.extension",
        "sliceName": "value"
      },
      {
        "id": "Patient.extension:birthSex.extension:value.value[x]",
        "path": "Patient.extension.extension.value[x]",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender"
        }
      },
      {
        "id": "Patient.extension:birthSex.extension:type",
        "path": "Patient.extension.extension",
        "sliceName": "type"
      },
      {
        "id": "Patient.extension:birthSex.extension:type.value[x]",
        "path": "Patient.extension.extension.value[x]",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "76689-9",
              "system": "http://loinc.org",
              "display": "Sex assigned at birth"
            }
          ]
        }
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-identifier"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "short": "The value that is unique within the system.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:il-id",
        "path": "Patient.identifier",
        "sliceName": "il-id",
        "short": "Israeli National Identifier",
        "definition": "Israeli ID number (9 digit unchangeable number, including leading zeros and includes a control digit), including temporarily identification numbers assigned by Israeli National Insurance",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:il-id.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://fhir.health.gov.il/identifier/il-national-id"
      },
      {
        "id": "Patient.identifier:il-id.value",
        "path": "Patient.identifier.value",
        "short": "An Israeli ID number",
        "example": [
          {
            "label": "Valid Example",
            "valueString": "000000018"
          }
        ],
        "constraint": [
          {
            "key": "il-id-chk",
            "severity": "error",
            "human": "Israeli ID must be 9-digits with a correct check-digit at the end.",
            "expression": "matches('^[0-9]{9}$') and\r\nsubstring(8,1).toInteger()=\r\n(10-((substring(0,1).toInteger() +\r\nsubstring(1,1).toInteger()*2 mod 10 +\r\nsubstring(1,1).toInteger()*2 div 10 +\r\nsubstring(2,1).toInteger() +\r\nsubstring(3,1).toInteger()*2 mod 10 +\r\nsubstring(3,1).toInteger()*2 div 10 +\r\nsubstring(4,1).toInteger() +\r\nsubstring(5,1).toInteger()*2 mod 10 +\r\nsubstring(5,1).toInteger()*2 div 10 +\r\nsubstring(6,1).toInteger() +\r\nsubstring(7,1).toInteger()*2 mod 10 +\r\nsubstring(7,1).toInteger()*2 div 10) mod 10)) mod 10",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-patient"
          }
        ]
      },
      {
        "id": "Patient.identifier:il-id.assigner",
        "path": "Patient.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier:pna-id",
        "path": "Patient.identifier",
        "sliceName": "pna-id",
        "short": "Palestinian National Identifier",
        "definition": "Palestinian ID number",
        "min": 0,
        "max": "1",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:pna-id.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://fhir.health.gov.il/identifier/pna-national-id"
      },
      {
        "id": "Patient.identifier:pna-id.value",
        "path": "Patient.identifier.value",
        "short": "A Palestininan ID number",
        "example": [
          {
            "label": "Valid Example",
            "valueString": "000000018"
          }
        ]
      },
      {
        "id": "Patient.identifier:ppn",
        "path": "Patient.identifier",
        "sliceName": "ppn",
        "short": "Passport Number",
        "definition": "Passport number",
        "min": 0,
        "max": "*",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:ppn.type",
        "path": "Patient.identifier.type",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "PPN",
              "system": "http://terminology.hl7.org/CodeSystem/v2-0203"
            }
          ]
        }
      },
      {
        "id": "Patient.identifier:ppn.system",
        "path": "Patient.identifier.system",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.health.gov.il/ValueSet/passport-uri"
        }
      },
      {
        "id": "Patient.identifier:ppn.value",
        "path": "Patient.identifier.value",
        "short": "Passport Number"
      },
      {
        "id": "Patient.identifier:prisoner-id",
        "path": "Patient.identifier",
        "sliceName": "prisoner-id",
        "short": "Prisoner Number",
        "definition": "Israel Prison Service prisoner number (5-6 digits number). A unique identifier for any prisoner currently serving a prison sentence",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:prisoner-id.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://fhir.health.gov.il/identifier/il-prisoner-number"
      },
      {
        "id": "Patient.identifier:prisoner-id.value",
        "path": "Patient.identifier.value",
        "short": "Prisoner Number",
        "example": [
          {
            "label": "Valid Example",
            "valueString": "123456"
          }
        ],
        "constraint": [
          {
            "key": "il-prison-num",
            "severity": "error",
            "human": "up to 8 digits prisoner number, allowing for hebrew characters",
            "expression": "matches('^[a-zA-Z0-9_אבגדהוזחטי כלמנסעפצקרתשךףץ]{0,8}$')",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-patient"
          }
        ]
      },
      {
        "id": "Patient.identifier:prisoner-id.assigner",
        "path": "Patient.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier:enc-il-id",
        "path": "Patient.identifier",
        "sliceName": "enc-il-id",
        "short": "National Identifier - MoH encrypted",
        "definition": "The person's national identifier after applying MoH's standard primary encryption algorithm",
        "min": 0,
        "max": "*",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:enc-il-id.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://fhir.health.gov.il/identifier/encrypted-id-primary-moh"
      },
      {
        "id": "Patient.identifier:enc-il-id.value",
        "path": "Patient.identifier.value",
        "short": "An encrypted identifier",
        "example": [
          {
            "label": "Valid Example",
            "valueString": "000000018"
          }
        ]
      },
      {
        "id": "Patient.identifier:enc-il-id.assigner",
        "path": "Patient.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier:entry-permit",
        "path": "Patient.identifier",
        "sliceName": "entry-permit",
        "short": "Israeli Temporary entry permit",
        "definition": "Israeli Temporary entry permit number. For cases in which the State of Israel has issued such a document and this is the main form of identifiaction",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:entry-permit.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://fhir.health.gov.il/identifier/il-entry-permit"
      },
      {
        "id": "Patient.identifier:entry-permit.value",
        "path": "Patient.identifier.value",
        "short": "An Israeli Visa Number",
        "example": [
          {
            "label": "Valid Example",
            "valueString": "000000018"
          }
        ]
      },
      {
        "id": "Patient.identifier:entry-permit.assigner",
        "path": "Patient.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier:enc-pna-id",
        "path": "Patient.identifier",
        "sliceName": "enc-pna-id",
        "short": "Palestinian ID number",
        "definition": "Ecoded Palestinian National Identifier",
        "min": 0,
        "max": "1",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:enc-pna-id.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://fhir.health.gov.il/identifier/encrypted-pna-id-primary-moh"
      },
      {
        "id": "Patient.identifier:enc-pna-id.value",
        "path": "Patient.identifier.value",
        "short": "A Palestininan ID number"
      },
      {
        "id": "Patient.identifier:enc-pna-id.assigner",
        "path": "Patient.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "extension('http://hl7.org/fhir/StructureDefinition/language').value"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "constraint": [
          {
            "key": "il-patient-name",
            "severity": "error",
            "human": "Either Patient.name.given and/or Patient.name.family SHALL be present or a Data Absent Reason Extension SHALL be present.",
            "expression": "(family.exists() or given.exists()) or extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()",
            "source": "http://fhir.health.gov.il/StructureDefinition/il-core-patient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.name.extension:dataAbsentReason",
        "path": "Patient.name.extension",
        "sliceName": "dataAbsentReason",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ]
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.name:Hebrew",
        "path": "Patient.name",
        "sliceName": "Hebrew",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.name:Hebrew.extension:dataAbsentReason",
        "path": "Patient.name.extension",
        "sliceName": "dataAbsentReason",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ]
      },
      {
        "id": "Patient.name:Hebrew.extension:language",
        "path": "Patient.name.extension",
        "sliceName": "language",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-language"
            ]
          }
        ]
      },
      {
        "id": "Patient.name:Hebrew.extension:language.value[x]",
        "path": "Patient.name.extension.value[x]",
        "fixedCode": "he"
      },
      {
        "id": "Patient.name:English",
        "path": "Patient.name",
        "sliceName": "English",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.name:English.extension:dataAbsentReason",
        "path": "Patient.name.extension",
        "sliceName": "dataAbsentReason",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ]
      },
      {
        "id": "Patient.name:English.extension:language",
        "path": "Patient.name.extension",
        "sliceName": "language",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-language"
            ]
          }
        ]
      },
      {
        "id": "Patient.name:English.extension:language.value[x]",
        "path": "Patient.name.extension.value[x]",
        "fixedCode": "en"
      },
      {
        "id": "Patient.name:Arabic",
        "path": "Patient.name",
        "sliceName": "Arabic",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.name:Arabic.extension:dataAbsentReason",
        "path": "Patient.name.extension",
        "sliceName": "dataAbsentReason",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ]
      },
      {
        "id": "Patient.name:Arabic.extension:language",
        "path": "Patient.name.extension",
        "sliceName": "language",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-language"
            ]
          }
        ]
      },
      {
        "id": "Patient.name:Arabic.extension:language.value[x]",
        "path": "Patient.name.extension.value[x]",
        "fixedCode": "ar"
      },
      {
        "id": "Patient.telecom.extension:purpose",
        "path": "Patient.telecom.extension",
        "sliceName": "purpose",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/contactpoint-purpose"
            ]
          }
        ]
      },
      {
        "id": "Patient.telecom.extension:purpose.value[x]",
        "path": "Patient.telecom.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-contact-point-purpose"
        }
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.use",
        "path": "Patient.telecom.use",
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-address"
            ]
          }
        ]
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "relationship"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.contact.telecom.extension:purpose",
        "path": "Patient.contact.telecom.extension",
        "sliceName": "purpose",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/contactpoint-purpose"
            ]
          }
        ]
      },
      {
        "id": "Patient.contact.telecom.extension:purpose.value[x]",
        "path": "Patient.contact.telecom.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-contact-point-purpose"
        }
      },
      {
        "id": "Patient.contact.organization",
        "path": "Patient.contact.organization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.contact:parent",
        "path": "Patient.contact",
        "sliceName": "parent",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Patient.contact:parent.relationship",
        "path": "Patient.contact.relationship",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "PRN",
              "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
            }
          ]
        }
      },
      {
        "id": "Patient.contact:parent.telecom.extension:purpose",
        "path": "Patient.contact.telecom.extension",
        "sliceName": "purpose",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/contactpoint-purpose"
            ]
          }
        ]
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role"
            ]
          }
        ]
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.link.other",
        "path": "Patient.link.other",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person"
            ],
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy",
                "valueBoolean": false
              }
            ]
          }
        ]
      }
    ]
  }
}