Description
Compute capacity of unoccupied slots using positive unitsPerSlot and subtract looseUnits within that capacity.
Pharmacy inventory distinguishes physical stock, reservations, holds, lots, package units, and expiry records. A stock calculation describes supplied records and cannot establish that a medicine is suitable or authorized for use.
Compute capacity of unoccupied slots using positive unitsPerSlot and subtract looseUnits within that capacity.
When to use this tool
Use Pharmacy Robot Bin Fill Capacity when you need one explicit pharmacy stock-accounting component.
How to use the tool and how it works
- Enter binSlots, unitsPerSlot, occupiedSlots, looseUnits, incoming. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read freeCapacity, fits, overflow. Inspect fits before interpreting the associated values.
Compute capacity of unoccupied slots using positive unitsPerSlot and subtract looseUnits within that capacity. Compare incoming units inclusively and return any overflow.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| binSlots | Bin Slots | Required. Safe integer; minimum 0. |
| unitsPerSlot | Units Per Slot | Required. Safe integer; minimum 1. |
| occupiedSlots | Occupied Slots | Required. Safe integer; minimum 0. |
| looseUnits | Loose Units | Required. Safe integer; minimum 0. |
| incoming | Incoming | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| freeCapacity | Free Capacity | Required. Safe integer. |
| fits | Fits | Required. Boolean. |
| overflow | Overflow | Required. Safe integer. |
{
"input": {
"binSlots": 10,
"unitsPerSlot": 5,
"occupiedSlots": 6,
"looseUnits": 3,
"incoming": 20
},
"output": {
"freeCapacity": 17,
"fits": false,
"overflow": 3
}
} Limitations and assumptions
- All inputs are integer counts; this is an ideal capacity ledger without product compatibility, physical bin geometry, robot behavior, or medication safety validation.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Reconcile verified inventory and product records within the pharmacy's controlled workflow before purchasing, releasing, or dispensing stock.
References
Similar or alternative tools
- Pharmacy Tote Picklist Line Count Budget
Deduplicate pickedIds and requestedIds literally.
- Medicine Pack Content Remainder
Divide nonnegative integer totalUnits by positive unitsPerPack using exact integer arithmetic.