Skip to content

Main content

Hospital Pharmacy Quarantined Available Balance Tool

Calculate hospital pharmacy quarantined available balance from explicit caller-supplied inputs.

Loading tool…

Description

Validate quarantine and hold within physical units and their supplied overlap within both.

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.

Validate quarantine and hold within physical units and their supplied overlap within both.

When to use this tool

Use Hospital Pharmacy Quarantined Available Balance when you need one explicit pharmacy stock-accounting component.

How to use the tool and how it works

  1. Enter physical, quarantine, hold, overlappingHold, reserved. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read blockedUnion, available. Use the output convention below.

Validate quarantine and hold within physical units and their supplied overlap within both. Subtract their union and reserved units from physical stock for available.1

Input fieldMeaning and unitsAccepted input
physicalPhysicalRequired. Safe integer; minimum 0.
quarantineQuarantineRequired. Safe integer; minimum 0.
holdHoldRequired. Safe integer; minimum 0.
overlappingHoldOverlapping HoldRequired. Safe integer; minimum 0.
reservedReservedRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
blockedUnionBlocked UnionRequired. Safe integer.
availableAvailableRequired. Safe integer.
json
{
  "input": {
    "physical": 100,
    "quarantine": 20,
    "hold": 15,
    "overlappingHold": 5,
    "reserved": 10
  },
  "output": {
    "blockedUnion": 30,
    "available": 60
  }
}

Limitations and assumptions

  • Reservations may produce negative available stock; overlap is supplied and arithmetic does not establish release eligibility, medication quality, or safe availability.
  • 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

  1. Calculation and input contract: hospital-pharmacy/hospital-pharmacy-quarantined-available-balance — tool.io

Similar or alternative tools

  • Hospital Pharmacy Prepared Issued Gap

    Validate positive prepared count, issued within prepared, returned within issued, and discarded within the resulting held pool.

  • Pharmacy Supply Lead Time Day Cover

    Subtract reserved within onHand for usable stock, divide by positive dailyUse for daysCover, and multiply dailyUse by leadDays+safetyDays for leadDemand and any positive deficit.