<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://digit.org/fhir/StructureDefinition/DIGITHCMInventoryItem" />
  <version value="1.0.3" />
  <name value="DIGITHCMInventoryItem" />
  <title value="HCM InventoryItem" />
  <status value="active" />
  <experimental value="false" />
  <date value="2025-08-10" />
  <publisher value="DIGIT HCM" />
  <description value="InventoryItem profile for DIGIT HCM supply-chain interoperability. Uses value discrimination on nameType.code and has no unsliced name.* constraints." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="InventoryItem" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/InventoryItem" />
  <derivation value="constraint" />
  <differential>
    <element id="InventoryItem.identifier">
      <path value="InventoryItem.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="3" />
    </element>
    <element id="InventoryItem.identifier:ProductID">
      <path value="InventoryItem.identifier" />
      <sliceName value="ProductID" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="InventoryItem.identifier:ProductID.system">
      <path value="InventoryItem.identifier.system" />
      <min value="1" />
      <fixedUri value="http://digit.org/fhir/productID" />
    </element>
    <element id="InventoryItem.identifier:ProductID.value">
      <path value="InventoryItem.identifier.value" />
      <min value="1" />
    </element>
    <element id="InventoryItem.identifier:productVariant">
      <path value="InventoryItem.identifier" />
      <sliceName value="productVariant" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="InventoryItem.identifier:productVariant.system">
      <path value="InventoryItem.identifier.system" />
      <min value="1" />
      <fixedUri value="http://digit.org/fhir/productVariant-identifier" />
    </element>
    <element id="InventoryItem.identifier:productVariant.value">
      <path value="InventoryItem.identifier.value" />
      <min value="1" />
    </element>
    <element id="InventoryItem.identifier:productVariantSku">
      <path value="InventoryItem.identifier" />
      <sliceName value="productVariantSku" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="InventoryItem.identifier:productVariantSku.system">
      <path value="InventoryItem.identifier.system" />
      <min value="1" />
      <fixedUri value="http://digit.org/fhir/productVariantSku-identifier" />
    </element>
    <element id="InventoryItem.identifier:productVariantSku.value">
      <path value="InventoryItem.identifier.value" />
      <min value="1" />
    </element>
    <element id="InventoryItem.status">
      <path value="InventoryItem.status" />
      <fixedCode value="active" />
    </element>
    <element id="InventoryItem.category.coding.system">
      <path value="InventoryItem.category.coding.system" />
      <fixedUri value="http://digit.org/fhir/CodeSystem/ProductVariant-Producttype" />
    </element>
    <element id="InventoryItem.name">
      <path value="InventoryItem.name" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="nameType.code" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="2" />
    </element>
    <element id="InventoryItem.name:tradename">
      <path value="InventoryItem.name" />
      <sliceName value="tradename" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="InventoryItem.name:tradename.nameType.system">
      <path value="InventoryItem.name.nameType.system" />
      <fixedUri value="http://hl7.org/fhir/inventoryitem-nametype" />
    </element>
    <element id="InventoryItem.name:tradename.nameType.code">
      <path value="InventoryItem.name.nameType.code" />
      <fixedCode value="trade-name" />
    </element>
    <element id="InventoryItem.name:tradename.language">
      <path value="InventoryItem.name.language" />
      <fixedCode value="en-US" />
    </element>
    <element id="InventoryItem.name:commonName">
      <path value="InventoryItem.name" />
      <sliceName value="commonName" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="InventoryItem.name:commonName.nameType.system">
      <path value="InventoryItem.name.nameType.system" />
      <fixedUri value="http://hl7.org/fhir/inventoryitem-nametype" />
    </element>
    <element id="InventoryItem.name:commonName.nameType.code">
      <path value="InventoryItem.name.nameType.code" />
      <fixedCode value="alias" />
    </element>
    <element id="InventoryItem.responsibleOrganization.role.coding.system">
      <path value="InventoryItem.responsibleOrganization.role.coding.system" />
      <fixedUri value="http://digit.org/fhir/CodeSystem/responsibleOrganization-role" />
    </element>
    <element id="InventoryItem.responsibleOrganization.role.coding.code">
      <path value="InventoryItem.responsibleOrganization.role.coding.code" />
      <fixedCode value="manufacturer" />
    </element>
    <element id="InventoryItem.association.associationType.coding.system">
      <path value="InventoryItem.association.associationType.coding.system" />
      <min value="1" />
      <fixedUri value="https://digit.org/CodeSystem/ProductAssociationType" />
    </element>
    <element id="InventoryItem.association.associationType.coding.code">
      <path value="InventoryItem.association.associationType.coding.code" />
      <min value="1" />
    </element>
    <element id="InventoryItem.association.relatedItem">
      <path value="InventoryItem.association.relatedItem" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://digit.org/fhir/StructureDefinition/DIGITHCMInventoryItem" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/InventoryItem" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceDefinition" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionProduct" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct" />
      </type>
    </element>
    <element id="InventoryItem.instance.identifier.type.coding.system">
      <path value="InventoryItem.instance.identifier.type.coding.system" />
      <min value="1" />
    </element>
    <element id="InventoryItem.instance.identifier.type.coding.code">
      <path value="InventoryItem.instance.identifier.type.coding.code" />
      <min value="1" />
    </element>
    <element id="InventoryItem.instance.location">
      <path value="InventoryItem.instance.location" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://digit.org/fhir/StructureDefinition/DIGITHCMFacilityLocation" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
        <targetProfile value="https://digit.org/fhir/StructureDefinition/DIGITHCMBoundary" />
      </type>
    </element>
  </differential>
</StructureDefinition>