execute: Execute OHDSI LEGEND study

View source: R/Main.R

executeR Documentation

Execute OHDSI LEGEND study

Description

Execute OHDSI LEGEND study

Usage

execute(
  connectionDetails,
  cdmDatabaseSchema,
  vocabularyDatabaseSchema = cdmDatabaseSchema,
  oracleTempSchema,
  cohortDatabaseSchema,
  outputFolder,
  indicationId = "class",
  tablePrefix = "legendt2dm",
  databaseId = "Unknown",
  databaseName = "Unknown",
  databaseDescription = "Unknown",
  minCohortSize = 1000,
  minCellCount = 5,
  imputeExposureLengthWhenMissing = FALSE,
  studyEndDate = "",
  createExposureCohorts = TRUE,
  createOutcomeCohorts = TRUE,
  createPairedExposureSummary = TRUE,
  fetchAllDataFromServer = TRUE,
  synthesizePositiveControls = FALSE,
  generateAllCohortMethodDataObjects = TRUE,
  runCohortMethod = TRUE,
  runSections = c(1:7),
  computeCovariateBalance = TRUE,
  exportToCsv = TRUE,
  exportSettings = createExportSettings(),
  filterExposureCohorts = NULL,
  filterOutcomeCohorts = NULL,
  maxCores = 4
)

Arguments

connectionDetails

An object of type connectionDetails as created using the createConnectionDetails function in the DatabaseConnector package.

cdmDatabaseSchema

Schema name where your patient-level data in OMOP CDM format resides. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

vocabularyDatabaseSchema

Schema name where your vocabulary tables in OMOP CDM format resides. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

oracleTempSchema

Should be used in Oracle to specify a schema where the user has write priviliges for storing temporary tables.

cohortDatabaseSchema

Schema name where intermediate data can be stored. You will need to have write priviliges in this schema. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

outputFolder

Name of local folder to place results; make sure to use forward slashes (/). Do not use a folder on a network drive since this greatly impacts performance.

indicationId

A string denoting the indicationId.

tablePrefix

A prefix to be used for all table names created for this study.

databaseId

A short string for identifying the database (e.g. 'Synpuf').

databaseName

The full name of the database (e.g. 'Medicare Claims Synthetic Public Use Files (SynPUFs)').

databaseDescription

A short description (several sentences) of the database.

minCellCount

The minimum cell count for fields contains person counts or fractions when exporting to CSV.

imputeExposureLengthWhenMissing

For OptumEHR: impute length of drug exposures when the length is missing?

studyEndDate

Optional study end date for EHRs

createExposureCohorts

Create the tables with the exposure cohorts?

createOutcomeCohorts

Create the tables with the outcome cohorts?

createPairedExposureSummary

Create local fils with paired exposure summary?

fetchAllDataFromServer

Fetch all relevant data from the server?

synthesizePositiveControls

Inject signals to create synthetic controls?

generateAllCohortMethodDataObjects

Create the cohortMethodData objects from the fetched data and injected signals?

runCohortMethod

Run the CohortMethod package to produce the outcome models?

runSections

Run specific sections through CohortMethod

computeCovariateBalance

Report covariate balance statistics across comparisons?

exportToCsv

Export all results to CSV files?

exportSettings

Settings to optionalize restuls export; see 'createExportSettings()'.

filterExposureCohorts

Optional subset of exposure cohorts to use; NULL implies all.

filterOutcomeCohorts

Options subset of outcome cohorts to use; NULL implies all.

maxCores

How many parallel cores should be used? If more cores are made available this can speed up the analyses.

Details

This function executes the OHDSI LEGEND study.


ohdsi-studies/LegendT2dm documentation built on July 4, 2025, 8:25 p.m.