Create the Common Data Model Results Cohort Tables
Source:R/create_cohort_tables.R
create_cohort_tables.Rd
This function creates the Common Data Model Cohort tables, than can be used to define cohorts based on criteria using standard concepts. An example cohort has been created to select patients receiving mechanical ventilation.
Details
This function requires a configured config.yaml
file created using
amstel::create_config()
. It will use the connection configuration
specified in the cdm
section to create the cohort tables.
In addition, the CDM schema needs to be populated
with CDM data and vocabulary tables.
Examples
create_cdm_tables()
#> Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead.
#> Skipping install of 'CommonDataModel' from a github remote, the SHA1 (3b84ef61) has not changed since last install.
#> Use `force = TRUE` to force installation
#> Connecting using PostgreSQL driver
#> Executing SQL took 0.00399 secs
#> Creating CDM data tables...
#> Connecting using PostgreSQL driver
#> Executing SQL took 0.0402 secs
#> Creating CDM vocabulary tables...
#> Connecting using PostgreSQL driver
#> Executing SQL took 0.0246 secs
create_vocabulary_tables()
#> Creating CDM vocabulary tables...
#> Connecting using PostgreSQL driver
#> Executing SQL took 0.0205 secs
create_cohort_tables()
#> Creating Cohort tables...
#> Connecting using PostgreSQL driver
#> Executing SQL took 0.0917 secs