Skip to content

Main content

Exposure Episode Offset Credit Tool

Shift supplied half-open record episodes and remove explicitly supplied overlap credit.

Loading tool…

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

  1. Enter startDay, endDay, suppliedOffsetDays, creditedOverlapDays. 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 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 fieldMeaning and unitsAccepted input
startDayStart DayRequired. Safe integer.
endDayEnd DayRequired. Safe integer.
suppliedOffsetDaysSupplied Offset DaysRequired. Safe integer.
creditedOverlapDaysCredited Overlap DaysRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
shiftedStartShifted StartRequired. Safe integer.
shiftedEndShifted EndRequired. Safe integer.
creditedDaysEndpoint difference minus credited overlap, without an inclusive-day addition.Required. Safe integer.
json
{
  "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

  1. Calculation and input contract: pharmacoepidemiology/exposure-episode-offset-credit — tool.io

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.