Skip to content

Main content

Medication Package Remaining Unit Balance Tool

Calculate medication package remaining unit balance from explicit caller-supplied inputs.

Loading tool…

Description

Reconcile package units with returns and reservations.

Pharmacy administration distinguishes medicine and document identifiers, service records, stock balances and payment conventions from decisions about care. Literal labels and supplied status flags help reconcile records, while medicine identity, appropriate treatment and actual availability require independent verification.

Reconcile package units with returns and reservations.

When to use this tool

Use Medication Package Remaining Unit Balance when reconciling the stated pharmacy record, inventory, timing or financial convention.

How to use the tool and how it works

  1. Enter opening, dispensed, returned, discarded, 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 physical, available, netDispensed. Use the output convention below.

Reconcile package units with returns and reservations. Require nonnegative whole inputs and opening-dispensed+returned-discarded >= 0; physical is that balance, available subtracts reserved, netDispensed = dispensed-returned.1

Input fieldMeaning and unitsAccepted input
openingOpeningRequired. Safe integer; minimum 0.
dispensedDispensedRequired. Safe integer; minimum 0.
returnedReturnedRequired. Safe integer; minimum 0.
discardedDiscardedRequired. Safe integer; minimum 0.
reservedReservedRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
physicalPhysicalRequired. Safe integer.
availableAvailableRequired. Safe integer.
netDispensedNet DispensedRequired. Safe integer.
json
{
  "input": {
    "opening": 100,
    "dispensed": 40,
    "returned": 5,
    "discarded": 2,
    "reserved": 10
  },
  "output": {
    "physical": 63,
    "available": 53,
    "netDispensed": 35
  }
}

Limitations and assumptions

  • Available and net dispensed may be negative; returned units are bookkeeping assertions rather than proof of safe reuse or actual consumption.
  • 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

Inspect verified medicine and service records and the applicable professional procedures; use appropriate clinical systems and qualified professional judgment for care or supply decisions.

References

  1. Calculation and input contract: clinical-pharmacy/medication-package-remaining-unit-balance — tool.io

Similar or alternative tools