
Compare characteristics of cohort matched to database population
matchedDiagnostics.Rd
A summary of the cohort that is matched to the original cohort that has been given by the user. Such summary contains basic cohort summary including number of visits within one year prior of the cohort_start_date, as well as a large scale charactersitics using the following domians of OMOP CDM:
* condition_occurrence * visit_occurrence * measurement * procedure_occurrence * observation * drug_exposure
Examples
# \donttest{
library(PhenotypeR)
cdm <- mockPhenotypeR()
result <- matchedDiagnostics(cdm$my_cohort)
#> • Sampling cohorts
#> Returning entry cohort as the size of the cohorts to be sampled is equal or
#> smaller than `n`.
#> • Generating an age and sex matched cohort for cohort_1
#> Starting matching
#> ℹ Creating copy of target cohort.
#> • 1 cohort to be matched.
#> ℹ Creating controls cohorts.
#> ℹ Excluding cases from controls
#> • Matching by gender_concept_id and year_of_birth
#> • Removing controls that were not in observation at index date
#> • Excluding target records whose pair is not in observation
#> • Adjusting ratio
#> Binding cohorts
#> ✔ Done
#> ℹ adding demographics columns
#> ℹ adding tableIntersectCount 1/1
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> • Getting age density
#> ℹ The following estimates will be computed:
#> • age: density
#> → Start summary of data, at 2025-02-19 09:29:22.947339
#> ✔ Summary finished, at 2025-02-19 09:29:23.275349
#> • Running large scale characterisation
#> ℹ Summarising large scale characteristics
#>
#> - getting characteristics from table condition_occurrence (1 of 6)
#> - getting characteristics from table visit_occurrence (2 of 6)
#> - getting characteristics from table measurement (3 of 6)
#> - getting characteristics from table procedure_occurrence (4 of 6)
#> - getting characteristics from table observation (5 of 6)
#> - getting characteristics from table drug_exposure (6 of 6)
#> • Sampling cohorts
#> Returning entry cohort as the size of the cohorts to be sampled is equal or
#> smaller than `n`.
#> • Generating an age and sex matched cohort for cohort_2
#> Starting matching
#> ℹ Creating copy of target cohort.
#> • 1 cohort to be matched.
#> ℹ Creating controls cohorts.
#> ℹ Excluding cases from controls
#> • Matching by gender_concept_id and year_of_birth
#> • Removing controls that were not in observation at index date
#> • Excluding target records whose pair is not in observation
#> • Adjusting ratio
#> Binding cohorts
#> ✔ Done
#> ℹ adding demographics columns
#> ℹ adding tableIntersectCount 1/1
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> • Getting age density
#> ℹ The following estimates will be computed:
#> • age: density
#> → Start summary of data, at 2025-02-19 09:30:14.093887
#> ✔ Summary finished, at 2025-02-19 09:30:14.417948
#> • Running large scale characterisation
#> ℹ Summarising large scale characteristics
#>
#> - getting characteristics from table condition_occurrence (1 of 6)
#> - getting characteristics from table visit_occurrence (2 of 6)
#> - getting characteristics from table measurement (3 of 6)
#> - getting characteristics from table procedure_occurrence (4 of 6)
#> - getting characteristics from table observation (5 of 6)
#> - getting characteristics from table drug_exposure (6 of 6)
CDMConnector::cdmDisconnect(cdm = cdm)
# }