This R package is designed to support the management of multiple CDM sources in Atlas. CDM sources can be removed, prepared for release, and released using this package.
oldCdmSources <- list(
buildCdmSource(sourceKey = "TestDb_V123", sourceName = "Test Database v123", dbms = "redshift", cdmDatabaseSchema = "cdm",
resultsDatabaseSchema = "ohdsi_results", vocabDatabaseSchema = "cdm", priority = 1,
connectionString = "jdbc:redshift://some-redshift-cluster:5439/testdb_v123?user=some-user&password=some-password")
)
## if not using encrypted credentials in WebAPI
newCdmSources <- list(
buildCdmSource(sourceKey = "TestDb_V456", sourceName = "Test Database v456", dbms = "redshift", cdmDatabaseSchema = "cdm",
resultsDatabaseSchema = "ohdsi_results", vocabDatabaseSchema = "cdm", priority = 1,
connectionString = "jdbc:redshift://some-redshift-cluster:5439/testdb_v456?user=some-user&password=some-password")
)
## if using encrypted credentials in WebAPI
newCdmSources <- list(
buildCdmSource(sourceKey = "TestDb_V456", sourceName = "Test Database v456", dbms = "redshift", cdmDatabaseSchema = "cdm",
resultsDatabaseSchema = "ohdsi_results", vocabDatabaseSchema = "cdm", priority = 1,
connectionString = "jdbc:redshift://some-redshift-cluster:5439/testdb_v456"),
user = some-user, password = some-password
)
## remove old version of a CDM data source
removeCdmSources(repoConnectionDetails = repoConnectionDetails, cdmSources = oldCdmSources, sqlOnly = TRUE)
## prepare new CDM data source by ensuring all necessary tables are available
createOhdsiResultsTables(cdmSources = newCdmSources, sqlOnly = TRUE)
## add new CDM data source
insertCdmSources(repoConnectionDetails = repoConnectionDetails, cdmSources = newCdmSources, sourceIdx = TRUE,
daimonIdx = TRUE, sqlOnly = TRUE)
## refresh WebAPI / Atlas sources
refreshAtlasSources(baseUrl = "http://api.ohdsi.org:80/WebAPI")
CdmAtlasCutover is an R package
Requires R.
CdmAtlasCutover depends on the OHDSI DatabaseConnector and SqlRender packages as well as the StringR and HTTR packages from CRAN.
Use the following commands in R to install the DatabaseConnector package:
r
install.packages("devtools")
devtools::install_github("OHDSI/CdmAtlasCutover")
CdmAtlasCutover is licensed under Apache License 2.0.
CdmAtlasCutover is being developed in RStudio.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.