Insert a set of cohort definitions into package
insertCohortDefinitionSetInPackage( fileName = "inst/settings/CohortsToCreate.csv", baseUrl, jsonFolder = "inst/cohorts", sqlFolder = "inst/sql/sql_server", rFileName = "R/CreateCohorts.R", insertTableSql = TRUE, insertCohortCreationR = TRUE, generateStats = FALSE, packageName )
Name of a CSV file specifying the cohorts to insert. See details for the expected file format.
The base URL for the WebApi instance, for example: "http://server.org:80/WebAPI".
Path to the folder where the JSON representations will be saved.
Path to the folder where the SQL representations will be saved.
Name of R file to generate when
insertCohortCreationR = TRUE.
Should the SQL for creating the cohort table be inserted into the package as well? This file will be called CreateCohortTable.sql.
Insert R code that will create the cohort table and instantiate the
cohorts? This will create a file called R/CreateCohorts.R containing
a function called
Should cohort inclusion rule statistics be created?
The name of the package (only needed when inserting the R code as well).
The CSV file should have at least the following fields:
The cohort ID in ATLAS.
The cohort ID that will be used when instantiating the cohort (can be different from atlasId).
The name to be used for the cohort. This name will be used to generate file names, so please use letters and numbers only (no spaces).