Skip to content

Main content

Service Opening Window Gap Tool

Compare supplied service hours as one half-open interval without a live opening-hours lookup.

Loading tool…

Description

Check a requested time against a half-open service window.

Pharmacy administration separates inventory, document identity, authorization, service timing and financial records from clinical decisions. Matching labels or a positive local predicate can reconcile supplied metadata without authenticating medicine, establishing lawful supply or determining appropriate care.

Check a requested time against a half-open service window.

When to use this tool

Use Service Opening Window Gap when checking the stated pharmacy record, inventory, timing, coverage or cost convention.

How to use the tool and how it works

  1. Enter openingAt, closingAt, requestedAt. 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 fromOpening, untilClosing, open. Inspect open before interpreting the associated values.

Check a requested time against a half-open service window. Require closingAt >= openingAt; fromOpening = requested-opening, untilClosing = closing-requested, open requires opening <= requested < closing.1

Input fieldMeaning and unitsAccepted input
openingAtOpening AtRequired. Finite number.
closingAtClosing AtRequired. Finite number.
requestedAtRequested AtRequired. Finite number.
Output fieldInterpretationReturned shape
fromOpeningFrom OpeningRequired. Finite number.
untilClosingUntil ClosingRequired. Finite number.
openOpenRequired. Boolean.
json
{
  "input": {
    "openingAt": 10,
    "closingAt": 20,
    "requestedAt": 15
  },
  "output": {
    "fromOpening": 5,
    "untilClosing": 5,
    "open": true
  }
}

Limitations and assumptions

  • A zero-length window is never open; actual availability, care urgency and pharmacy operating policies are not established.
  • 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

Use verified medicine/service records and applicable professional procedures; consult a qualified pharmacist or other appropriate professional for clinical, legal or safe-supply decisions.

References

  1. Calculation and input contract: community-pharmacy/service-opening-window-gap — tool.io

Similar or alternative tools