Skip to content

Main content

Drug Study Index Date Offset

Calculate signed calendar days from an explicit drug-study index date to an observation date.

Loading tool…

Description

Measure signed days from a drug study's supplied index date.

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.

Measure signed days from a drug study's supplied index date.

When to use this tool

Use Drug Study Index Date Offset when you already have indexDate, observationDate and need to measure signed days from a drug study's supplied index date.

How to use the tool and how it works

  1. Enter indexDate, observationDate. 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 signedCalendarDays. Use the output convention below.

Parse real UTC dates; return observationDate-indexDate in calendar days.1

Input fieldMeaning and unitsAccepted input
indexDateIndex DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
observationDateObservation DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
Output fieldInterpretationReturned shape
signedCalendarDaysSigned Calendar DaysRequired. Finite number.
json
{
  "input": {
    "indexDate": "2026-10-28",
    "observationDate": "2026-11-01"
  },
  "output": {
    "signedCalendarDays": 4
  }
}

Limitations and assumptions

  • A negative offset is retained; no valid study index, exposure assignment, treatment or causal interpretation is selected.
  • 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-index-date-offset — tool.io

Similar or alternative tools