Skip to contents

[Deprecated]

Usage

addRoute(drugTable)

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.2.1 [unknown@Linux 6.8.0-1021-azure:R 4.4.3/:memory:]
#>    drug_exposure_id person_id drug_concept_id drug_exposure_start_date
#>               <int>     <int>           <int> <date>                  
#>  1               40        10        43135274 2019-05-29              
#>  2               39         9         2905077 1999-01-18              
#>  3               38         9         1516978 1996-08-11              
#>  4               37         9         1503328 2001-04-05              
#>  5               33         8         1516980 2004-09-13              
#>  6               43        10         1125360 2019-05-12              
#>  7               25         6         1539463 2021-10-27              
#>  8               41        10         1539462 2020-06-22              
#>  9               24         6        43135274 2021-11-05              
#> 10               17         4         2905077 2014-08-05              
#> # ℹ 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>, …
# }