Skip to content

Main content

Dialysis Inventory Container Fill Gap Tool

Calculate dialysis inventory container fill gap from explicit caller-supplied inputs.

Loading tool…

Description

Add deliveredVolumes to openingVolume, then subtract withdrawal.

An inventory balance adds incoming amounts and subtracts outgoing amounts on one common basis. Signed residuals can reveal inconsistencies without identifying their cause.

Add deliveredVolumes to openingVolume, then subtract withdrawal.

When to use this tool

Use Dialysis Inventory Container Fill Gap when you need to reconcile supplied amounts within a defined accounting window.

How to use the tool and how it works

  1. Enter containerCapacity, deliveredVolumes, openingVolume, withdrawal. 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 availableVolume, endingVolume, freeCapacity, overflow. Use the output convention below.

Add deliveredVolumes to openingVolume, then subtract withdrawal. Return availableVolume, endingVolume, signed freeCapacity, and zero-floored overflow above containerCapacity.1

Input fieldMeaning and unitsAccepted input
containerCapacityContainer CapacityRequired. Finite number; minimum 0.
deliveredVolumesDelivered VolumesRequired. Array of finite number; maximum items 256.
openingVolumeOpening VolumeRequired. Finite number; minimum 0.
withdrawalWithdrawalRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
availableVolumeAvailable VolumeRequired. Finite number.
endingVolumeEnding VolumeRequired. Finite number.
freeCapacityFree CapacityRequired. Finite number.
overflowOverflowRequired. Finite number.
json
{
  "input": {
    "containerCapacity": 100,
    "deliveredVolumes": [
      20,
      30
    ],
    "openingVolume": 40,
    "withdrawal": 10
  },
  "output": {
    "availableVolume": 90,
    "endingVolume": 80,
    "freeCapacity": 20,
    "overflow": 0
  }
}

Limitations and assumptions

  • Withdrawal cannot exceed available volume; a negative freeCapacity is diagnostic rather than rejected, and mixing or sterility is not assessed.
  • 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

Compare against independent measurements and reconcile omitted flows, measurement errors, and timing differences.

References

  1. Calculation and input contract: nephrology/dialysis-inventory-container-fill-gap — tool.io

Similar or alternative tools