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
- Enter recordYear, vocabularyYear. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| recordYear | Record Year | Required. Safe integer. |
| vocabularyYear | Vocabulary Year | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gap | Exact integer year difference exported numerically if safely representable. | Required. Safe integer. |
{
"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
Similar or alternative tools
- Guideline Source Version Dategap
Compare supplied source-version tokens and resolved day indices without clinical guideline interpretation.
- Public Definition Source Year Offset
Compute offset=definitionYear-referenceYear using exact integer subtraction before conversion to the numeric output.