This function supports the legacy way of retrieving a cohort definition set from the file system or in a package. This function supports the legacy way of storing a cohort definition set in a package with a CSV file, JSON files, and SQL files in the `inst` folder.
getCohortDefinitionSet( settingsFileName = "Cohorts.csv", jsonFolder = "cohorts", sqlFolder = "sql/sql_server", cohortFileNameFormat = "%s", cohortFileNameValue = c("cohortId"), subsetJsonFolder = "inst/cohort_subset_definitions/", packageName = NULL, warnOnMissingJson = TRUE, verbose = FALSE )
The name of the CSV file that will hold the cohort information including the cohortId and cohortName
The name of the folder that will hold the JSON representation of the cohort if it is available in the cohortDefinitionSet
The name of the folder that will hold the SQL representation of the cohort.
Defines the format string for naming the cohort JSON and SQL files. The format string follows the standard defined in the base sprintf function.
Defines the columns in the cohortDefinitionSet to use in conjunction with the cohortFileNameFormat parameter.
Defines the folder to store the subset JSON
The name of the package containing the cohort definitions.
Provide a warning if a .JSON file is not found for a cohort in the settings file
When TRUE, extra logging messages are emitted
Returns a cohort set data.frame