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
#> • Generating a age and sex matched cohorts
#> Starting matching
#> ℹ Creating copy of target cohort.
#> • 2 cohorts 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
#> • Index matched cohort table
#> ℹ adding demographics columns
#> ℹ adding tableIntersectCount 1/1
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> • Getting age density
#> • 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)
# }