Computes Proportion of Days Covered (PDC) and Medication Possession Ratio (MPR) over a study window using DuckDB interval unions.
Usage
compute_adherence_pdc(
con,
cohort_table = "cohort",
concept_set = NULL,
lookback_days = 180,
lookahead_days = 0,
offset_anchor = c("visit_start_date", "visit_end_date", "index_date"),
anchor = NULL,
drug_exposure_table = "drug_exposure",
person_id_col = NULL,
index_date_col = NULL,
end_date_col = NULL
)Arguments
- con
Active DuckDB connection.
- cohort_table
Cohort table name.
- concept_set
Sequence of target drug_concept_ids.
- lookback_days
Lookback window in days (default 180).
- lookahead_days
Lookahead window in days (default 0).
- offset_anchor
Milestone date to anchor to ('visit_start_date' | 'visit_end_date' | 'index_date').
- anchor
Alias for offset_anchor.
- drug_exposure_table
OMOP drug_exposure table name.
- person_id_col, index_date_col, end_date_col
Custom column names.
