
Summarise concept counts in patient-level data
Source:R/summariseConceptSetCounts.R
summariseConceptSetCounts.RdOnly concepts recorded during observation period are counted.
Usage
summariseConceptSetCounts(
cdm,
conceptSet,
countBy = c("record", "person"),
concept = TRUE,
interval = "overall",
sex = FALSE,
ageGroup = NULL,
dateRange = NULL
)Arguments
- cdm
A
cdm_referenceobject. Use CDMConnector to create a reference to a database or omock to create a reference to synthetic data.- conceptSet
List of concept IDs to summarise.
- countBy
Either "record" for record-level counts or "person" for person-level counts
- concept
TRUE or FALSE. If TRUE code use will be summarised by concept.
- interval
Time interval to stratify by. It can either be "years", "quarters", "months" or "overall".
- 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. You can give them specific names, e.g.
ageGroup = list(children = c(0, 17), adult = c(18, Inf)).- dateRange
A vector of two dates defining the desired study period. Only the
start_datecolumn of the OMOP table is checked to ensure it falls within this range. IfdateRangeisNULL, no restriction is applied.