Refills Until Next Fill Calculator
Actual supply ledger and recorded next fill date discrepancy, no refill authorization, controlled substance eligibility, route/frequency changes or guarantee of fill.
Description
Inventory coverage and the time until a next fill are separate quantities that can be compared on a calendar.
Inventory coverage and the time until a next fill are separate quantities that can be compared on a calendar.1
This tool reports days until the supplied date, nominal inventory coverage and the signed difference between them.
When to use Refills Until Next Fill Calculator
This tool reports days until the supplied date, nominal inventory coverage and the signed difference between them.
How to use Refills Until Next Fill Calculator and how it works
- Prepare current quantity units, clinician prescribed units per day, inventory as of date, next recorded fill date, using the input definitions and matching units below.
- Enter the required fields and run Refills Until Next Fill Calculator.
- Read result.recordedDaysUntilNextFill, result.conditionalAvailableSupplyDays, result.signedSupplyMinusDaysToNextFill using the units, signs and ordering explained below.
- Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| actualCurrentQuantityUnits | Recorded available inventory in the same quantity unit used by the daily directions. | number | Required; nonnegative; finite; other constraints below |
| callerClinicianPrescribedUnitsPerDay | Caller Clinician Prescribed Units Per Day. Use the units and matching context stated in the calculation below. | number | Required; strictly positive; finite; other constraints below |
| actualInventoryAsOfDate | Real Gregorian YYYY-MM-DD date of the inventory snapshot. | string | Required; other constraints below |
| callerNextRecordedFillDate | Real Gregorian YYYY-MM-DD next-fill date, on or after the snapshot date. | string | Required; other constraints below |
Validate real Gregorian dates in YYYY-MM-DD form, years 0001–9999, and calculate whole calendar days from the as-of date to the next-fill date. Reject a next-fill date before the as-of date. Divide nonnegative inventory quantity by positive independently ordered units per day. Return days until fill, available supply days and available-minus-until signed margin. A negative margin records a nominal gap; fill authorization is not evaluated.
until=daysBetween(asOf,nextFill); available=quantity/unitsPerDay; margin=available-until Apply the input ordering, units and branch conditions stated above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Object containing the calculated or selected fields below. | object |
| result.recordedDaysUntilNextFill | Whole calendar days from inventory date to the supplied next-fill date. | number |
| result.conditionalAvailableSupplyDays | Nominal inventory quantity divided by established daily use, in days. | number |
| result.signedSupplyMinusDaysToNextFill | Available days minus days until fill; a negative value records a nominal gap. | number |
{
"input": {
"actualCurrentQuantityUnits": 10,
"callerClinicianPrescribedUnitsPerDay": 2,
"actualInventoryAsOfDate": "2026-01-01",
"callerNextRecordedFillDate": "2026-01-07"
},
"output": {
"result": {
"recordedDaysUntilNextFill": 6,
"conditionalAvailableSupplyDays": 5,
"signedSupplyMinusDaysToNextFill": -1
}
}
} Limitations and assumptions
Patient context, drug formulation, route, sampling time, assay units and applicable clinician-verified protocol must be independently established. The output supplies no dosing, titration, switching or administration instruction.
The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.
All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.
Alternative or Complementary methods
Use Tablet Days Supply Split Calculator for a complementary operation: Splitting a tablet changes the number of available pieces, which affects an inventory's nominal days of supply.
Use Days Supply From Quantity Directions Calculator for a complementary operation: Nominal days of supply divide the dispensed quantity by independently prescribed daily use in the same units.
References
-
Refills Until Next Fill Calculator — tool.io
Similar or alternative tools
- Tablet Days Supply Split Calculator
Splitting a tablet changes the number of available pieces, which affects an inventory's nominal days of supply.
- Days Supply From Quantity Directions Calculator
Nominal days of supply divide the dispensed quantity by independently prescribed daily use in the same units.