addDataSource adds a data source to the datasource.json file used by AchillesWeb.

addDataSource(jsonFolderPath, dataSourcesFilePath, dataSourceName)

Arguments

jsonFolderPath

Folder path of the Json files generated by exportToJson.

dataSourcesFilePath

The full file path where datasource file will be saved.

dataSourceName

The human readable name of the new data source

Value

none

Details

Used to update the datasources file with the reference to a specified datasource. This makes the new datasource findable for OHDSI tools. If the datasources file exists, the data source will be added to the file. If the datasources file does not exist, a new file wil be initialized with the specified data source.

Examples

if (FALSE) {
jsonFolderPath <- "your/output/path"
dataSourcesFilePath <- "/path/to/datasources.json"
dataSourceName <- "My New CDM"
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server",
                                                                server = "yourserver")
exportToJson(connectionDetails,
             cdmDatabaseSchema = "cdm5",
             resultsDatabaseSchema = "results",
             outputPath = jsonFolderPath)
addDataSource(jsonFolderPath, dataSourcesFilePath, dataSourceName)
}