Learn R Programming

OmopSketch (version 0.5.1)

databaseCharacteristics: Summarise Database Characteristics for OMOP CDM

Description

Summarise Database Characteristics for OMOP CDM

Usage

databaseCharacteristics(
  cdm,
  omopTableName = c("person", "observation_period", "visit_occurrence",
    "condition_occurrence", "drug_exposure", "procedure_occurrence", "device_exposure",
    "measurement", "observation", "death"),
  sex = FALSE,
  ageGroup = NULL,
  dateRange = NULL,
  interval = "overall",
  conceptIdCounts = FALSE,
  ...
)

Value

A summarised_result object containing the results of the characterisation.

Arguments

cdm

A cdm_reference object representing the Common Data Model (CDM) reference.

omopTableName

A character vector specifying the OMOP tables from the CDM to include in the analysis. If "person" is present, it will only be used for missing value summarisation.

sex

Logical; whether to stratify results by sex (TRUE) or not (FALSE).

ageGroup

A list of age groups to stratify the results by. Each element represents a specific age range.

dateRange

A vector of two dates defining the desired study period. Only the start_date column of the OMOP table is checked to ensure it falls within this range. If dateRange is NULL, no restriction is applied.

interval

Time interval to stratify by. It can either be "years", "quarters", "months" or "overall".

conceptIdCounts

Logical; whether to summarise concept ID counts (TRUE) or not (FALSE).

...

additional arguments passed to the OmopSketch functions that are used internally.

Examples

Run this code
# \donttest{

cdm <- mockOmopSketch(numberIndividuals = 100)

result <- databaseCharacteristics(cdm = cdm,
omopTableNam = c("drug_exposure", "condition_occurrence"),
sex = TRUE, ageGroup = list(c(0,50), c(51,100)), interval = "years", conceptIdCounts = FALSE)

PatientProfiles::mockDisconnect(cdm)
# }

Run the code above in your browser using DataLab