<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="il-core-organization" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="1" />
  </extension>
  <url value="http://fhir.health.gov.il/StructureDefinition/il-core-organization" />
  <version value="0.21.0" />
  <name value="ILCoreOrganization" />
  <title value="ILCore Organization Profile" />
  <status value="active" />
  <date value="2026-03-23" />
  <publisher value="Israel Core Team" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="tal.primak@moh.gov.il" />
    </telecom>
  </contact>
  <description value="Israel Core proposed constraints and extensions on the Organization Resource" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Organization" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Organization" />
  <derivation value="constraint" />
  <differential>
    <element id="Organization">
      <path value="Organization" />
      <short value="ILCore Organization Profile" />
      <definition value="The Organization Profile is based upon the core FHIR Organization Resource" />
      <constraint>
        <key value="il-organization-identifier" />
        <severity value="error" />
        <human value="If not sub-organization (i.e - partOf), there SHALL be an identifier" />
        <expression value="partOf.empty() implies identifier.exists()" />
        <source value="http://fhir.health.gov.il/StructureDefinition/il-core-organization" />
      </constraint>
    </element>
    <element id="Organization.identifier">
      <path value="Organization.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.health.gov.il/StructureDefinition/il-core-identifier" />
      </type>
    </element>
    <element id="Organization.identifier.system">
      <path value="Organization.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier.value">
      <path value="Organization.identifier.value" />
      <short value="The value that is unique within the system." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:moh-inst-symbol">
      <path value="Organization.identifier" />
      <sliceName value="moh-inst-symbol" />
      <short value="MoH institute symbol number" />
      <definition value="Institute symbol number as issued by Israeli Ministry of Health (MoH). MoH portal - https://institutions.health.gov.il/Institutions" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:moh-inst-symbol.system">
      <path value="Organization.identifier.system" />
      <definition value="Institute symbol number as issued by Israeli Ministry of Health (MoH). MoH portal - https://institutions.health.gov.il/Institutions" />
      <fixedUri value="http://institutions.health.gov.il/Institutions" />
    </element>
    <element id="Organization.identifier:moh-inst-symbol.value">
      <path value="Organization.identifier.value" />
      <short value="An MoH institute license number" />
    </element>
    <element id="Organization.identifier:legal-entity">
      <path value="Organization.identifier" />
      <sliceName value="legal-entity" />
      <short value="Israeli legal entity identifier (Hebrew -  ח.פ., מספר עמותה וכו)" />
      <definition value="Unique identifier (9 digit unchangeable number) issued by Israeli legal authorities for Leagl entities of any organization, such as goverment institutes, ottoman assoc., non-profit organizations, private companies" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:legal-entity.system">
      <path value="Organization.identifier.system" />
      <definition value="Unique identifier (9 digit unchangeable number) issued by Israeli legal authorities for Leagl entities of any organization, such as goverment institutes, ottoman assoc., non-profit organizations, private companies" />
      <fixedUri value="http://fhir.health.gov.il/identifier/legal-entity" />
    </element>
    <element id="Organization.identifier:legal-entity.value">
      <path value="Organization.identifier.value" />
      <short value="Israeli legal entity Identifier" />
      <constraint>
        <key value="nine-digits-chk" />
        <severity value="error" />
        <human value="All legal entities must have a 9 digit identifier" />
        <expression value="matches('^[0-9]{9}')" />
        <source value="http://fhir.health.gov.il/StructureDefinition/il-core-organization" />
      </constraint>
    </element>
    <element id="Organization.identifier:moe-inst">
      <path value="Organization.identifier" />
      <sliceName value="moe-inst" />
      <short value="MoE institute symbol" />
      <definition value="Institute symbol as issued by Israeli Ministry of Education (MoE). MoE portal - https://apps.education.gov.il/imsnet/itur.aspx" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
    </element>
    <element id="Organization.identifier:moe-inst.system">
      <path value="Organization.identifier.system" />
      <definition value="Institute symbol as issued by Israeli Ministry of Education (MoE). MoE portal - https://apps.education.gov.il/imsnet/itur.aspx" />
      <fixedUri value="http://fhir.health.gov.il/identifier/moe-institute-symbol" />
    </element>
    <element id="Organization.identifier:moe-inst.value">
      <path value="Organization.identifier.value" />
      <short value="An MoE institute symbol" />
    </element>
    <element id="Organization.identifier:moh-hospital-department">
      <path value="Organization.identifier" />
      <sliceName value="moh-hospital-department" />
      <short value="MoH hospital department" />
      <definition value="An institute (hospital) department identifier consisting of five alphanumeric cahracters, a hyphen (&quot;-&quot;) and five alphanumeric cahracters once again" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="false" />
    </element>
    <element id="Organization.identifier:moh-hospital-department.system">
      <path value="Organization.identifier.system" />
      <definition value="An institute (hospital) department identifier consisting of five alphanumeric cahracters, a hyphen (&quot;-&quot;) and five alphanumeric cahracters once again" />
      <fixedUri value="http://fhir.health.gov.il/identifier/moh-hospital-department" />
    </element>
    <element id="Organization.identifier:moh-hospital-department.value">
      <path value="Organization.identifier.value" />
      <short value="An MoH hospital depratment symbol" />
      <constraint>
        <key value="il-organization-hosp-dept" />
        <severity value="error" />
        <human value="Hospital department number must follow the following structure: five (5) alphanumeric characters, a hyphen (&quot;-&quot;) and five (5) more alphanumeric characters" />
        <expression value="matches('^[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}$')" />
        <source value="http://fhir.health.gov.il/StructureDefinition/il-core-organization" />
      </constraint>
    </element>
    <element id="Organization.identifier:paying-entity-moh">
      <path value="Organization.identifier" />
      <sliceName value="paying-entity-moh" />
      <short value="MoH Paying Entity Identifier" />
      <definition value="paying entity codes that may be used as organization and organization units identifier" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:paying-entity-moh.system">
      <path value="Organization.identifier.system" />
      <definition value="An institute (hospital) department identifier consisting of five alphanumeric cahracters, a hyphen (&quot;-&quot;) and five alphanumeric cahracters once again" />
      <fixedUri value="http://fhir.health.gov.il/cs/paying-entity-moh" />
    </element>
    <element id="Organization.identifier:paying-entity-moh.value">
      <path value="Organization.identifier.value" />
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/organization-paying-entity-moh-identifier" />
      </binding>
    </element>
    <element id="Organization.active">
      <path value="Organization.active" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.type">
      <path value="Organization.type" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <binding>
        <strength value="example" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/organization-type" />
      </binding>
    </element>
    <element id="Organization.type:moh-institute-type">
      <path value="Organization.type" />
      <sliceName value="moh-institute-type" />
      <min value="0" />
      <max value="1" />
      <example>
        <label value="Valid Example" />
        <valueCodeableConcept>
          <coding>
            <system value="http://fhir.health.gov.il/cs/institution-type-moh" />
            <code value="76" />
            <display value="משרדי ממשלה" />
          </coding>
        </valueCodeableConcept>
      </example>
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/institution-type-moh" />
      </binding>
    </element>
    <element id="Organization.type:moh-department-type">
      <path value="Organization.type" />
      <sliceName value="moh-department-type" />
      <min value="0" />
      <max value="1" />
      <example>
        <label value="Valid Example" />
        <valueCodeableConcept>
          <coding>
            <system value="http://fhir.health.gov.il/cs/department-type-moh" />
            <code value="10000" />
            <display value="אשפוז - פנימית" />
          </coding>
        </valueCodeableConcept>
      </example>
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/department-type-moh" />
      </binding>
    </element>
    <element id="Organization.type:il-community-unit-type">
      <path value="Organization.type" />
      <sliceName value="il-community-unit-type" />
      <min value="0" />
      <max value="1" />
      <example>
        <label value="Valid Example" />
        <valueCodeableConcept>
          <coding>
            <system value="http://fhir.health.gov.il/cs/il-core-community-unit-type" />
            <code value="101" />
            <display value="מעבדה" />
          </coding>
        </valueCodeableConcept>
      </example>
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/il-core-community-unit-type" />
      </binding>
    </element>
    <element id="Organization.name">
      <path value="Organization.name" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom">
      <path value="Organization.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom.system">
      <path value="Organization.telecom.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom.value">
      <path value="Organization.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom.use">
      <path value="Organization.telecom.use" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address">
      <path value="Organization.address" />
      <type>
        <code value="Address" />
        <profile value="http://fhir.health.gov.il/StructureDefinition/il-core-address" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Organization.partOf">
      <path value="Organization.partOf" />
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy">
          <valueBoolean value="true" />
        </extension>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-organization" />
      </type>
    </element>
  </differential>
</StructureDefinition>