R/StrategusModuleFunctions.R
execute.RdExecutes Self-Controlled Cohort analyses within the OHDSI Strategus framework using the provided analysis specifications and settings.
execute(
connectionDetails,
executionSettings,
analysisSpecifications,
databaseId,
exportFolder
)An object containing the details required to connect to the database.
A list of settings for execution, including database schemas and cohort table names.
A list containing analysis settings, exposure-outcome pairs, and compute thread count.
A string identifier for the target database.
Path to the folder where results and exports will be written.
No return value. Results are written to the specified export folder as a side effect.
This function validates the input specifications, extracts unique exposure and outcome cohort IDs, identifies negative control pairs, and iterates over each analysis setting to run the Self-Controlled Cohort analysis. Results are exported to the specified folder. Diagnostic settings are handled per-analysis, and warnings are issued if no negative controls are found.
if (FALSE) { # \dontrun{
execute(
connectionDetails = connectionDetails,
executionSettings = list(
databaseSchema = "main",
cohortTable = "cohort",
cdmDatabaseSchema = "main"
),
analysisSpecifications = moduleSpec,
databaseId = "MyDatabase",
exportFolder = "./strategus_results"
)
} # }