Arguments
- drugTable
Table in the cdm that must contain drug_concept_id
Value
It adds route to the current table
Examples
# \donttest{
library(DrugUtilisation)
library(dplyr)
cdm <- mockDrugUtilisation()
cdm[["drug_exposure"]] |>
addRoute()
#> Warning: `addRoute()` was deprecated in DrugUtilisation 0.7.0.
#> # Source: SQL [?? x 24]
#> # Database: DuckDB v1.1.3 [unknown@Linux 6.8.0-1017-azure:R 4.4.2/:memory:]
#> drug_exposure_id person_id drug_concept_id drug_exposure_start_date
#> <int> <int> <int> <date>
#> 1 26 10 43135274 2007-06-26
#> 2 24 9 2905077 2008-10-03
#> 3 20 6 1503328 2014-02-20
#> 4 7 3 1516980 2005-07-04
#> 5 10 4 1125360 2014-03-06
#> 6 13 4 1539463 2013-09-30
#> 7 27 10 1539462 2011-01-05
#> 8 17 6 43135274 2013-12-26
#> 9 11 4 2905077 2014-02-04
#> 10 3 1 1503328 2020-06-10
#> # ℹ more rows
#> # ℹ 20 more variables: drug_exposure_end_date <date>,
#> # drug_type_concept_id <int>, quantity <dbl>,
#> # drug_exposure_start_datetime <date>, drug_exposure_end_datetime <date>,
#> # verbatim_end_date <date>, stop_reason <chr>, refills <int>,
#> # days_supply <int>, sig <chr>, route_concept_id <int>, lot_number <chr>,
#> # provider_id <int>, visit_occurrence_id <int>, visit_detail_id <int>, …
# }