Learn R Programming

OmopSketch (version 0.3.2)

summariseClinicalRecords: Summarise an omop table from a cdm object. You will obtain information related to the number of records, number of subjects, whether the records are in observation, number of present domains and number of present concepts.

Description

Summarise an omop table from a cdm object. You will obtain information related to the number of records, number of subjects, whether the records are in observation, number of present domains and number of present concepts.

Usage

summariseClinicalRecords(
  cdm,
  omopTableName,
  recordsPerPerson = c("mean", "sd", "median", "q25", "q75", "min", "max"),
  inObservation = TRUE,
  standardConcept = TRUE,
  sourceVocabulary = TRUE,
  domainId = TRUE,
  typeConcept = TRUE,
  sex = FALSE,
  ageGroup = NULL,
  dateRange = NULL
)

Value

A summarised_result object.

Arguments

cdm

A cdm_reference object.

omopTableName

A character vector of the names of the tables to summarise in the cdm object.

recordsPerPerson

Generates summary statistics for the number of records per person. Set to NULL if no summary statistics are required.

inObservation

Boolean variable. Whether to include the percentage of records in observation.

standardConcept

Boolean variable. Whether to summarise standard concept information.

sourceVocabulary

Boolean variable. Whether to summarise source vocabulary information.

domainId

Boolean variable. Whether to summarise domain id of standard concept id information.

typeConcept

Boolean variable. Whether to summarise type concept id field information.

sex

Boolean variable. Whether to stratify by sex (TRUE) or not (FALSE).

ageGroup

A list of age groups to stratify results by.

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.

Examples

Run this code
# \donttest{
cdm <- mockOmopSketch()

summarisedResult <- summariseClinicalRecords(
  cdm = cdm,
  omopTableName = "condition_occurrence",
  recordsPerPerson = c("mean", "sd"),
  inObservation = TRUE,
  standardConcept = TRUE,
  sourceVocabulary = TRUE,
  domainId = TRUE,
  typeConcept = TRUE
)

summarisedResult

PatientProfiles::mockDisconnect(cdm = cdm)
# }

Run the code above in your browser using DataLab