Skip to contents

A thin stateful front-end over extract_medication_classes(): RxNorm / ATC concept_ancestor roll-up (strategy = "standard"), a local NDC / CUI crosswalk ("source"), or both, framed in time with window = "pre_admission", "inpatient" or "discharge". Mirror of omop_etl.MedicationExtractor.

Usage

medication_extractor(
  con,
  medication_specs,
  strategy = "standard",
  crosswalk = NULL
)

Arguments

con

DuckDB DBI connection.

medication_specs

See extract_medication_classes().

strategy, crosswalk

See extract_medication_classes(). Default strategy "standard".

Value

A list with functions extract(cohort_table, window = NULL, ...) and extract_all_windows(cohort_table, ...) (one data frame with <class>__<window> flag columns).