<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://digit.org/fhir/StructureDefinition/HCMInventoryReport" />
  <name value="HCMInventoryReport" />
  <status value="active" />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="InventoryReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/InventoryReport" />
  <derivation value="constraint" />
  <differential>
    <element id="InventoryReport.identifier">
      <path value="InventoryReport.identifier" />
      <min value="1" />
    </element>
    <element id="InventoryReport.identifier.system">
      <path value="InventoryReport.identifier.system" />
      <min value="1" />
    </element>
    <element id="InventoryReport.identifier.value">
      <path value="InventoryReport.identifier.value" />
      <min value="1" />
    </element>
    <element id="InventoryReport.status">
      <path value="InventoryReport.status" />
      <fixedCode value="active" />
    </element>
    <element id="InventoryReport.countType">
      <path value="InventoryReport.countType" />
      <fixedCode value="snapshot" />
    </element>
    <element id="InventoryReport.inventoryListing.location">
      <path value="InventoryReport.inventoryListing.location" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://digit.org/fhir/StructureDefinition/DIGITHCMFacilityLocation" />
      </type>
    </element>
    <element id="InventoryReport.inventoryListing.location.identifier.system">
      <path value="InventoryReport.inventoryListing.location.identifier.system" />
      <fixedUri value="http://digit.org/fhir/facilityid" />
    </element>
    <element id="InventoryReport.inventoryListing.item.quantity.code">
      <path value="InventoryReport.inventoryListing.item.quantity.code" />
      <binding>
        <strength value="example" />
        <valueSet value="https://digit.org/fhir/ValueSet/Units" />
      </binding>
    </element>
    <element id="InventoryReport.inventoryListing.item.item">
      <path value="InventoryReport.inventoryListing.item.item" />
      <type>
        <code value="CodeableReference" />
        <targetProfile value="https://digit.org/fhir/StructureDefinition/HCMInventoryItem" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionProduct" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/InventoryItem" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct" />
      </type>
    </element>
    <element id="InventoryReport.inventoryListing.item.item.reference">
      <path value="InventoryReport.inventoryListing.item.item.reference" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://digit.org/fhir/StructureDefinition/HCMInventoryItem" />
      </type>
    </element>
    <element id="InventoryReport.inventoryListing.item.item.reference.identifier.system">
      <path value="InventoryReport.inventoryListing.item.item.reference.identifier.system" />
      <fixedUri value="http://digit.org/fhir/productVariant-identifier" />
    </element>
  </differential>
</StructureDefinition>