addDataSource: addDataSource

View source: R/addDataSource.R

addDataSourceR Documentation

addDataSource

Description

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

Usage

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

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.

Value

none

Examples

## Not run: 
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)

## End(Not run)

quinterpriest/Achilles documentation built on April 20, 2022, 12:47 a.m.