Skip to content

Main content

Drug Study Person Day Contribution

Count inclusive calendar days in the intersection of explicit observation and study windows.

Loading tool…

Description

Count inclusive person-days inside two supplied calendar intervals.

Medication-study records distinguish supplied coverage intervals, observed person-days, dispensing reversals and source event definitions. Inclusive calendar-day counting differs from continuous elapsed time. Recorded supply and washout flags are study conventions rather than evidence of ingestion, drug clearance, causal effect or suitable treatment.

Count inclusive person-days inside two supplied calendar intervals.

When to use this tool

Use Drug Study Person Day Contribution when you already have observedStartDate, observedEndDate, windowStartDate, windowEndDate and need to count inclusive person-days inside two supplied calendar intervals.

How to use the tool and how it works

  1. Enter observedStartDate, observedEndDate, windowStartDate, windowEndDate. 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 inclusivePersonDays. Use the output convention below.

Parse real UTC dates and require each end>=start; return max(0,min(ends)-max(starts) in days+1).1

Input fieldMeaning and unitsAccepted input
observedStartDateObserved Start DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
observedEndDateObserved End DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
windowStartDateWindow Start DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
windowEndDateWindow End DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
Output fieldInterpretationReturned shape
inclusivePersonDaysInclusive overlap count; a shared endpoint contributes one day.Required. Safe integer.
json
{
  "input": {
    "observedStartDate": "2026-10-28",
    "observedEndDate": "2026-11-05",
    "windowStartDate": "2026-11-01",
    "windowEndDate": "2026-11-30"
  },
  "output": {
    "inclusivePersonDays": 5
  }
}

Limitations and assumptions

  • A shared endpoint contributes one day; this calendar count is not continuous elapsed time, verified exposure or an epidemiological causal estimate.
  • 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.

Alternative or Complementary methods

Construct exposure episodes from a documented study rule and verified dispensing or observation history. Keep inclusive calendar coverage distinct from elapsed time and actual ingestion; evaluate causal questions with a complete study design rather than one interval flag.

References

  1. Calculation and input contract: pharmacoepidemiology/drug-study-person-day-contribution — tool.io

Similar or alternative tools