databaseDiagnostics: Database diagnostics

View source: R/databaseDiagnostics.R

databaseDiagnosticsR Documentation

Database diagnostics

Description

phenotypeR diagnostics on the cdm object.

Diagnostics include: * Summarise a cdm_reference object, creating a snapshot with the metadata of the cdm_reference object. * Summarise the observation period table getting some overall statistics in a summarised_result object. * Summarise the person table including demographics (sex, race, ethnicity, year of birth) and related statistics.

Usage

databaseDiagnostics(cohort, clinicalTableSample = NULL)

Arguments

cohort

Cohort table in a cdm reference

clinicalTableSample

The number of records to take a random sample for database diagnostics. If 'clinicalTableSample = NULL', no sampling will be performed. If 'clinicalTableSample = 0' clinical table summaries will not be run.

Value

A summarised result

Examples


library(omock)
library(PhenotypeR)
library(CohortConstructor)

cdm <- mockCdmFromDataset(source = "duckdb")

cdm$new_cohort <- conceptCohort(cdm,
                                conceptSet = list("codes" = c(40213201L, 4336464L)),
                                name = "new_cohort")



PhenotypeR documentation built on March 25, 2026, 5:06 p.m.