Summarise cohort intersection information
Source:R/summariseCohortIntersect.R
summariseCohortIntersect.Rd
`r lifecycle::badge("deprecated")`
Usage
summariseCohortIntersect(cohort, cohortIntersect, strata = list())
Arguments
- cohort
A cohort in the cdm.
- cohortIntersect
The settings for cohort intersection settings.
- strata
Stratification list.
Examples
# \donttest{
library(PatientProfiles)
cdm <- mockPatientProfiles()
summariseCohortIntersect(
cohort = cdm$cohort1,
cohortIntersect = list(
"Medications in the prior year" = list(
targetCohortTable = "cohort2", value = "flag", window = c(-365, -1)
)
)
)
#> ℹ adding cohort intersect columns for table: cohort2
#> ℹ summarising data
#> ℹ The following estimates will be computed:
#> • flag_variable_00041_variable_00040: count, percentage
#> • flag_variable_00042_variable_00040: count, percentage
#> → Start summary of data, at 2024-05-11 12:04:21.972101
#> ✔ Summary finished, at 2024-05-11 12:04:22.448703
#> ✔ summariseCharacteristics finished!
#> # A tibble: 4 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 2 PP_MOCK cohort_name cohort_1 overall overall
#> 2 2 PP_MOCK cohort_name cohort_1 overall overall
#> 3 2 PP_MOCK cohort_name cohort_1 overall overall
#> 4 2 PP_MOCK cohort_name cohort_1 overall overall
#> # ℹ 7 more variables: variable_name <chr>, variable_level <chr>,
#> # estimate_name <chr>, estimate_type <chr>, estimate_value <chr>,
#> # additional_name <chr>, additional_level <chr>
CDMConnector::cdmDisconnect(cdm = cdm)
# }