Skip to content

Main content

Observation Window Stockpile Offset Tool

Apply a supplied stockpile-day scenario and observation censor boundary without inferring adherence or prescribing.

Loading tool…

Description

Apply a supplied stockpile-day scenario and observation censor boundary without inferring adherence or prescribing.

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.

Apply a supplied stockpile-day scenario and observation censor boundary without inferring adherence or prescribing.

When to use this tool

Use Observation Window Stockpile Offset 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 nominalEndDay, suppliedCarriedDays, observationEndDay, countStockpile. 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 adjustedEnd, observedEnd, beyondObservation. Use the output convention below.

For nonnegative integer suppliedCarriedDays return adjustedEnd=nominalEndDay plus carried days only if countStockpile, observedEnd=min(observationEndDay,adjustedEnd), and beyondObservation=max(0,adjustedEnd-observationEndDay).1

Input fieldMeaning and unitsAccepted input
nominalEndDayNominal End DayRequired. Safe integer.
suppliedCarriedDaysSupplied Carried DaysRequired. Safe integer; minimum 0.
observationEndDayObservation End DayRequired. Safe integer.
countStockpileCount StockpileRequired. Boolean.
Output fieldInterpretationReturned shape
adjustedEndAdjusted EndRequired. Safe integer.
observedEndObserved EndRequired. Safe integer.
beyondObservationBeyond ObservationRequired. Safe integer.
json
{
  "input": {
    "nominalEndDay": 100,
    "suppliedCarriedDays": 20,
    "observationEndDay": 110,
    "countStockpile": true
  },
  "output": {
    "adjustedEnd": 120,
    "observedEnd": 110,
    "beyondObservation": 10
  }
}

Limitations and assumptions

  • Only an end coordinate is clipped; there is no observation-start check or reconstructed possession episode. Carried supply is assumed, not verified as consumed medication.
  • 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/observation-window-stockpile-offset — tool.io

Similar or alternative tools