Description
Compare time since return with a supplied return-to-stock 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.
Compare time since return with a supplied return-to-stock window.
When to use this tool
Use Pharmacy Return To Stockelapsed Window when checking the stated pharmacy record, inventory, timing, coverage or cost convention.
How to use the tool and how it works
- Enter returnTime, receiptTime, nowTime, allowedDuration. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read elapsed, sinceReceipt, remaining, insideWindow. Inspect insideWindow before interpreting the associated values.
Compare time since return with a supplied return-to-stock window. Require receiptTime <= returnTime <= nowTime and allowedDuration >= 0; elapsed = now-return, sinceReceipt = now-receipt, remaining = allowed-elapsed and insideWindow includes equality.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| returnTime | Return Time | Required. Finite number. |
| receiptTime | Receipt Time | Required. Finite number. |
| nowTime | Now Time | Required. Finite number. |
| allowedDuration | Allowed Duration | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| elapsed | nowTime-returnTime; the allowed window starts at return, not receipt. | Required. Finite number. |
| sinceReceipt | Since Receipt | Required. Finite number. |
| remaining | Budget minus use under the stated direction, retaining negative deficits where allowed. | Required. Finite number. |
| insideWindow | Inside Window | Required. Boolean. |
{
"input": {
"returnTime": 100,
"receiptTime": 50,
"nowTime": 110,
"allowedDuration": 15
},
"output": {
"elapsed": 10,
"sinceReceipt": 60,
"remaining": 5,
"insideWindow": true
}
} Limitations and assumptions
- The window starts at return, not receipt; elapsed-time agreement does not establish medicine quality, legal reuse or safe return to stock.
- 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
Similar or alternative tools
- Pharmacy Voucher Expiry Slack
Return voucher expiry slack under an explicit endpoint policy.
- Service Opening Window Gap
Check a requested time against a half-open service window.