generateConceptCohortSet {CDMConnector} | R Documentation |
Generate a new cohort set from one or more concept sets. Each concept set will result in one cohort and represent the time during which the concept was observed for each subject/person. Concept sets can be passed to this function as:
A named list of numeric vectors, one vector per concept set
A named list of Capr concept sets
Clinical observation records will be looked up in the respective domain tables using the vocabulary in the CDM. If a required domain table does not exist in the cdm object a warning will be given. Concepts that are not in the vocabulary or in the data will be silently ignored. If end dates are missing or do not exist, as in the case of the procedure and observation domains, the the start date will be used as the end date.
generateConceptCohortSet(
cdm,
conceptSet = NULL,
name = "cohort",
limit = "first",
requiredObservation = c(0, 0),
end = "observation_period_end_date",
overwrite = FALSE
)
generate_concept_cohort_set(
cdm,
concept_set = NULL,
name = "cohort",
limit = "first",
required_observation = c(0, 0),
end = "observation_period_end_date",
overwrite = FALSE
)
cdm |
A cdm reference object created by |
conceptSet , concept_set |
A named list of numeric vectors or Capr concept sets |
name |
The name of the new generated cohort table as a character string |
limit |
Include "first" (default) or "all" occurrences of events in the cohort
|
requiredObservation , required_observation |
A numeric vector of length 2 that specifies the number of days of required observation time prior to index and post index for an event to be included in the cohort. |
end |
How should the
|
overwrite |
Should the cohort table be overwritten if it already exists? TRUE or FALSE (default) |
A cdm reference object with the new generated cohort set table added