getChronographData: Get the data for chronographs from the server.

View source: R/Chronograph.R

getChronographDataR Documentation

Get the data for chronographs from the server.

Description

Get the data for creating chronographs from the server.

Usage

getChronographData(
  connectionDetails,
  cdmDatabaseSchema,
  oracleTempSchema = NULL,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  cdmVersion = "5",
  exposureIds = c(),
  outcomeIds = c(),
  exposureOutcomePairs = NULL,
  exposureDatabaseSchema = cdmDatabaseSchema,
  exposureTable = "drug_era",
  outcomeDatabaseSchema = cdmDatabaseSchema,
  outcomeTable = "condition_era",
  shrinkage = 0.5,
  icPercentile = 0.025
)

Arguments

connectionDetails

An R object of type ConnectionDetails created using the function createConnectionDetails in the DatabaseConnector package.

cdmDatabaseSchema

Name of database schema that contains OMOP CDM and vocabulary.

oracleTempSchema

DEPRECATED: use 'tempEmulationSchema' instead.

tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

cdmVersion

Define the OMOP CDM version used: currently supports "5".

exposureIds

A vector of IDs identifying the exposures to include when computing the expected count. If the expsosure table is the drug_era table, these IDs correspond to ingredient concept IDs. If the exposure table has the format of the cohort table, these IDs correspond to the cohort definition IDs. If left empty, all records in the exposure table will be used.

outcomeIds

A vector of IDs identifying the outcomes to include when computing the expected count.. If the outcome table is the drug_era table, these IDs correspond to condition concept IDs. If the outcomes table has the format of the cohort table, these IDs correspond to the cohort definition IDs. If left empty, all records in the outcome table will be used.

exposureOutcomePairs

A data frame with at least two columns:

  • "exposureId" containing the drug_concept_ID or cohort_concept_id of the exposure variable

  • "outcomeId" containing the condition_concept_ID or cohort_concept_id of the outcome variable

. If left empty, all possible combinations of exposures and outcomes will be computed.

exposureDatabaseSchema

The name of the database schema that is the location where the exposure data is available. If exposureTable = DRUG_ERA, exposureSchema is not used by assumed to be cdmSchema. Requires read permissions to this database.

exposureTable

The tablename that contains the exposure cohorts. If exposureTable <> DRUG_ERA, then expectation is exposureTable has format of COHORT table: COHORT_DEFINITION_ID, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE.

outcomeDatabaseSchema

The name of the database schema that is the location where the data used to define the outcome cohorts is available. If exposureTable = CONDITION_ERA, exposureSchema is not used by assumed to be cdmSchema. Requires read permissions to this database.

outcomeTable

The tablename that contains the outcome cohorts. If outcomeTable <> CONDITION_OCCURRENCE, then expectation is outcomeTable has format of COHORT table: COHORT_DEFINITION_ID, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE.

shrinkage

Shrinkage used in IRR calculations, required >0 to deal with 0 case counts, but larger number means more shrinkage. default is 0.5

icPercentile

The lower bound of the credibility interval for the IC values (IClow). default is 0.025,

Value

An data frame with observed and expected outcome counts in periods relative to the exposure initiation date, for each outcome and exposure.


OHDSI/IcTemporalPatternDiscovery documentation built on Sept. 7, 2024, 8:24 a.m.