Skip to content

Main content

Drug Code Vintage Gap Tool

Compare supplied deidentified vocabulary vintage years without resolving a drug code.

Loading tool…

Description

Compare supplied deidentified vocabulary vintage years without resolving a drug code.

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.

Compare supplied deidentified vocabulary vintage years without resolving a drug code.

When to use this tool

Use Drug Code Vintage Gap 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 recordYear, vocabularyYear. 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 gap. Use the output convention below.

Compute gap=recordYear-vocabularyYear using exact integer subtraction before converting the result to a numeric output.1

Input fieldMeaning and unitsAccepted input
recordYearRecord YearRequired. Safe integer.
vocabularyYearVocabulary YearRequired. Safe integer.
Output fieldInterpretationReturned shape
gapExact integer year difference exported numerically if safely representable.Required. Safe integer.
json
{
  "input": {
    "recordYear": 2024,
    "vocabularyYear": 2020
  },
  "output": {
    "gap": 4
  }
}

Limitations and assumptions

  • Years are signed integer coordinates, not verified publication dates. A year gap does not validate drug-code mapping, vocabulary currency, or study comparability; an out-of-range numeric result is rejected.
  • 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/drug-code-vintage-gap — tool.io

Similar or alternative tools