fetchAllDataFromServer: Fetch all data on the cohorts for analysis

View source: R/CustomCmDataObjectBuilding.R

fetchAllDataFromServerR Documentation

Fetch all data on the cohorts for analysis

Description

Fetch all data on the cohorts for analysis

Usage

fetchAllDataFromServer(
  connectionDetails,
  cdmDatabaseSchema,
  cohortDatabaseSchema,
  oracleTempSchema,
  indicationId = "class",
  tablePrefix = "legendt2dm",
  useSample = FALSE,
  forceNewObjects = FALSE,
  studyEndDate = "",
  outputFolder
)

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'.

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'.

oracleTempSchema

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

indicationId

A string denoting the indicationId.

tablePrefix

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

useSample

Use the sampled cohort table instead of the main cohort table (for PS model feasibility).

forceNewObjects

Force recreation of CohortMethod data objects?

studyEndDate

Optionally specify a study end date

outputFolder

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'.

Details

This function will create covariates and fetch outcomes and person information from the server.


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