<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="il-core-device-dispense" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="draft" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="0" />
  </extension>
  <url value="http://fhir.health.gov.il/StructureDefinition/il-core-device-dispense" />
  <version value="0.21.0" />
  <name value="ILCoreDeviceDispense" />
  <title value="ILCore DeviceDispense Profile" />
  <status value="draft" />
  <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 ILCoreSupplyDelivery profile of SupplyDelivery Resource." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="SupplyDelivery" />
  <baseDefinition value="http://fhir.health.gov.il/StructureDefinition/il-core-supply-delivery" />
  <derivation value="constraint" />
  <differential>
    <element id="SupplyDelivery">
      <path value="SupplyDelivery" />
      <short value="ILCore Device Dispense Profile" />
      <definition value="Israel Core proposed constraints and extensions on the Device Dispense resource profile." />
    </element>
    <element id="SupplyDelivery.extension">
      <path value="SupplyDelivery.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="SupplyDelivery.extension:whenHandedOver">
      <path value="SupplyDelivery.extension" />
      <sliceName value="whenHandedOver" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.health.gov.il/StructureDefinition/ext-device-dispense-when-handed-over" />
      </type>
    </element>
    <element id="SupplyDelivery.basedOn.extension:alternate-reference">
      <path value="SupplyDelivery.basedOn.extension" />
      <sliceName value="alternate-reference" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/alternate-reference" />
      </type>
    </element>
    <element id="SupplyDelivery.basedOn.extension:alternate-reference.value[x]">
      <path value="SupplyDelivery.basedOn.extension.value[x]" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-device-request" />
      </type>
    </element>
    <element id="SupplyDelivery.type.coding.system">
      <path value="SupplyDelivery.type.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/supply-item-type" />
    </element>
    <element id="SupplyDelivery.type.coding.code">
      <path value="SupplyDelivery.type.coding.code" />
      <patternCode value="device" />
    </element>
    <element id="SupplyDelivery.suppliedItem.item[x]">
      <path value="SupplyDelivery.suppliedItem.item[x]" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/il-core-device-type" />
      </binding>
    </element>
    <element id="SupplyDelivery.suppliedItem.item[x]:itemReference">
      <path value="SupplyDelivery.suppliedItem.item[x]" />
      <sliceName value="itemReference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-device" />
      </type>
    </element>
    <element id="SupplyDelivery.receiver.extension:alternate-reference">
      <path value="SupplyDelivery.receiver.extension" />
      <sliceName value="alternate-reference" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/alternate-reference" />
      </type>
    </element>
    <element id="SupplyDelivery.receiver.extension:alternate-reference.value[x]">
      <path value="SupplyDelivery.receiver.extension.value[x]" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-patient" />
      </type>
    </element>
  </differential>
</StructureDefinition>