Description
Count supplied administrative refill-gap day endpoints without inferring medication use or adherence.
Drug-utilization research often reconstructs exposure from dispensing dates, supplied coverage windows, coding systems, and eligibility records. Day counts depend on endpoint and stockpiling policies. Observed records, assumed exposure, and actual medication consumption are different quantities.
Count supplied administrative refill-gap day endpoints without inferring medication use or adherence.
When to use this tool
Use Refill Gap Day Closure Policy when you need this explicit exposure-record, date-window, reporting-base, or evidence-support calculation.
How to use the tool and how it works
- Enter previousLastDay, nextFirstDay, countPreviousLast, countNextFirst. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gapDays, overlaps. Inspect overlaps before interpreting the associated values.
Return gapDays=max(0,nextFirstDay-previousLastDay-1 plus one for each enabled countPreviousLast and countNextFirst flag). Set overlaps when nextFirstDay<=previousLastDay.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| previousLastDay | Previous Last Day | Required. Safe integer. |
| nextFirstDay | Next First Day | Required. Safe integer. |
| countPreviousLast | Include the previous covered endpoint in this gap-count convention. | Required. Boolean. |
| countNextFirst | Include the next first endpoint in this gap-count convention. | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gapDays | Gap Days | Required. Safe integer. |
| overlaps | Overlaps | Required. Boolean. |
{
"input": {
"previousLastDay": 10,
"nextFirstDay": 15,
"countPreviousLast": false,
"countNextFirst": false
},
"output": {
"gapDays": 4,
"overlaps": false
}
} Limitations and assumptions
- Integer day coordinates and endpoint policy are supplied. A zero gap can coexist with overlap; dispensing records do not by themselves establish medication consumption or clinical adherence.
- 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. Signed zero is exported as zero.
Alternative or Complementary methods
Choose a documented exposure and eligibility definition for the study before combining records. Verify the coding version, observation windows, endpoint convention, and the evidence for assumptions about carried supply.
References
Similar or alternative tools
- Drug Exposure Gap Allowance
Audit supplied administrative exposure-record gaps under explicit day-end/allowance conventions without inferring medicine use.
- Dispensing Gap Reference Day
Audit deidentified record coverage with an explicit grace interval; no adherence or treatment recommendation.