The PhenotypeR package helps us to assess the research-readiness of a set of cohorts we have defined. This assessment includes:
You can install PhenotypeR from GitHub:
# install.packages("remotes")
::install_github("ohdsi/PhenotypeR") remotes
library(omopgenerics)
library(CDMConnector)
library(PhenotypeR)
library(CohortConstructor)
library(dplyr)
<- DBI::dbConnect(duckdb::duckdb(dbdir = CDMConnector::eunomia_dir()))
con <- CDMConnector::cdm_from_con(con = con,
cdm cdm_schema = "main",
write_schema = "main")
$gibleed <- conceptCohort(cdm = cdm,
cdmconceptSet = list(gibleed = 192671L),
name = "gibleed")
<- cdm$gibleed |>
result phenotypeDiagnostics()
summary(result)
#> A summarised_result object with 18179 rows, 49 different result_id, 1 different
#> cdm names, and 24 settings.
#> CDM names: Synthea synthetic health database.
#> Settings: package_name, package_version, result_type, timing, table_name,
#> cohort_definition_id, cdm_version, vocabulary_version,
#> analysis_outcome_washout, analysis_repeated_events, analysis_interval,
#> analysis_complete_database_intervals, denominator_age_group, denominator_sex,
#> denominator_days_prior_observation, denominator_start_date,
#> denominator_end_date, denominator_target_cohort_name, …, type, and analysis.
Once we have our results we can quickly view them in an interactive application. This shiny app will be saved in a new directory and can be further customised.
shinyDiagnostics(result = result)