Skip to content

Main content

Hospital Pharmacy Cold Chain Record Gap Tool

Audit logger observation gaps without inferring temperature compliance.

Loading tool…

Description

Return adjacent gaps, indexes whose gap strictly exceeds the maximum, and longestGap or zero for one record.

Pharmacy traceability and monitoring records contain versions, time gaps, release flags, and ledger entries. Consistent metadata is useful evidence but does not establish product stability, correct preparation, or authorized release.

Return adjacent gaps, indexes whose gap strictly exceeds the maximum, and longestGap or zero for one record.

When to use this tool

Use Hospital Pharmacy Cold Chain Record Gap when you need a narrow pharmacy-record consistency check.

How to use the tool and how it works

  1. Enter times, maximumGap. 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 gaps, exceededIndices, longestGap. Use the output convention below.

Require a nonempty strictly increasing times array and nonnegative maximumGap. Return adjacent gaps, indexes whose gap strictly exceeds the maximum, and longestGap or zero for one record.1

Input fieldMeaning and unitsAccepted input
timesTimesRequired. Array of finite number; maximum items 256.
maximumGapMaximum GapRequired. Finite number.
Output fieldInterpretationReturned shape
gapsGapsRequired. Array of finite number; maximum items 256.
exceededIndicesZero-based indexes of left endpoints whose next-record gap exceeds maximumGap.Required. Array of safe integer; maximum items 256.
longestGapLongest GapRequired. Finite number.
json
{
  "input": {
    "times": [
      0,
      5,
      20,
      25
    ],
    "maximumGap": 10
  },
  "output": {
    "gaps": [
      5,
      15,
      5
    ],
    "exceededIndices": [
      1
    ],
    "longestGap": 15
  }
}

Limitations and assumptions

  • Indexes refer to the left endpoint of each gap; time units match the supplied limit. Sampling continuity does not establish temperatures stayed acceptable or products retained stability.
  • 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

Review the complete quality and traceability record through the responsible pharmacy process before acting on a discrepancy.

References

  1. Calculation and input contract: hospital-pharmacy/hospital-pharmacy-cold-chain-record-gap — tool.io

Similar or alternative tools