Skip to contents

`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.

Value

A summary of the cohort intersection informations.

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)
# }