Description
Shift supplied half-open record episodes and remove explicitly supplied overlap credit.
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.
Shift supplied half-open record episodes and remove explicitly supplied overlap credit.
When to use this tool
Use Exposure Episode Offset Credit 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 startDay, endDay, suppliedOffsetDays, creditedOverlapDays. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read shiftedStart, shiftedEnd, creditedDays. Use the output convention below.
Require endDay>=startDay and integer creditedOverlapDays between zero and endDay-startDay. Add suppliedOffsetDays to both endpoints and return creditedDays=endDay-startDay-creditedOverlapDays.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| startDay | Start Day | Required. Safe integer. |
| endDay | End Day | Required. Safe integer. |
| suppliedOffsetDays | Supplied Offset Days | Required. Safe integer. |
| creditedOverlapDays | Credited Overlap Days | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| shiftedStart | Shifted Start | Required. Safe integer. |
| shiftedEnd | Shifted End | Required. Safe integer. |
| creditedDays | Endpoint difference minus credited overlap, without an inclusive-day addition. | Required. Safe integer. |
{
"input": {
"startDay": 10,
"endDay": 30,
"suppliedOffsetDays": 2,
"creditedOverlapDays": 5
},
"output": {
"shiftedStart": 12,
"shiftedEnd": 32,
"creditedDays": 15
}
} Limitations and assumptions
- The duration is an endpoint difference without an inclusive-day addition. Shifting the episode does not change creditedDays or verify an exposure episode's biological or study eligibility meaning.
- 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
- Refill Gap Day Closure Policy
Count supplied administrative refill-gap day endpoints without inferring medication use or adherence.
- Dispensing Source Period Gap
Return daysFromStart and daysToEnd as UTC day differences, and sourceCoversDate with an inclusive start and end controlled by endInclusive.