Add cdm name
Usage
addCdmName(table, cdm = omopgenerics::cdmReference(table))
Examples
# \donttest{
library(PatientProfiles)
cdm <- mockPatientProfiles()
cdm$cohort1 %>%
addCdmName()
#> # Source: SQL [10 x 5]
#> # Database: DuckDB v0.10.2 [unknown@Linux 6.5.0-1021-azure:R 4.4.0/:memory:]
#> cohort_definition_id subject_id cohort_start_date cohort_end_date cdm_name
#> <int> <int> <date> <date> <chr>
#> 1 3 10 2113-06-05 2113-07-22 PP_MOCK
#> 2 1 6 2017-02-03 2042-11-08 PP_MOCK
#> 3 3 1 2042-11-18 2055-04-10 PP_MOCK
#> 4 1 2 2015-11-28 2023-04-21 PP_MOCK
#> 5 3 3 2067-01-12 2097-11-29 PP_MOCK
#> 6 2 9 1981-02-03 1993-08-13 PP_MOCK
#> 7 1 7 2010-01-23 2039-08-07 PP_MOCK
#> 8 2 8 2085-11-08 2119-12-10 PP_MOCK
#> 9 3 5 1990-04-11 1994-03-18 PP_MOCK
#> 10 3 4 1980-07-05 2003-01-07 PP_MOCK
# }