Stratified prevalence comparison across OMOP CDM datasets.
Syrona derives stratified prevalence tables from the condition, procedure, and drug records in OMOP CDM databases, computes log2 prevalence ratios between paired datasets, and synthesizes them via random-effects meta-analysis at multiple aggregation levels.
Pick the scenario that matches you - each links to the relevant vignette.
Install from CRAN. The demo data ships inside the package, so no clone is needed:
install.packages("syrona")
library(syrona)
dir <- file.path(tempdir(), "demo")
file.copy(system.file("extdata", "demo", package = "syrona"), tempdir(), recursive = TRUE)
options(syrona.data_dir = dir)
compare_all("demo_population", "demo_selected")
run_app(data_dir = dir)
Install the package and follow the end-to-end walkthrough:
install.packages("syrona")
Then read vignette("a04_walkthrough", package = "syrona")
which takes you from "I have a remote OMOP CDM" to "the dashboard is
showing my comparison" with verification at every step.
Install the package, point at your data directory, launch:
install.packages("syrona")
library(syrona)
options(syrona.data_dir = "/path/to/your/syrona/data")
run_app()
Your data directory must contain sources/ (extracted datasets) and
optionally comparisons/ (pre-computed comparison results).
The latest version from GitHub:
# install.packages("remotes")
# remotes::install_github("HealthInformaticsUT/Syrona")
install.packages("syrona", repos = c('https://healthinformaticsut.r-universe.dev', 'https://cloud.r-project.org'))
If this fails with HTTP error 401 / Bad credentials, an expired
GITHUB_PAT in your .Renviron is being sent to GitHub. The repository is
public and needs no token: run usethis::edit_r_environ(), delete the
GITHUB_PAT=... line, save, and restart R.
library(syrona)
# 1. Connect to an OMOP CDM database
db <- syrona_connect("path/to/omop.duckdb") # local DuckDB
# or
db <- syrona_connect_pg(host = "localhost", ...) # PostgreSQL via SSH tunnel
# 2. Extract stratified prevalence tables
extract_all("Dataset_A", db = db)
extract_all("Dataset_B", db = db)
syrona_disconnect(db)
# 3. Compare
compare_all("Dataset_A", "Dataset_B")
# 4. Explore in the dashboard
run_app()
Extract (Phase 1) - query an OMOP CDM via CDMConnector + dplyr to produce prevalence by concept x year x sex x age group, concept metadata, chapter assignments, and SNOMED attributes. k-anonymity suppression applied automatically.
Compare (Phase 2) - pair two datasets, match strata, compute log2 prevalence ratios with confidence intervals.
Meta-analyze (Phase 3) - synthesize per-stratum estimates via random-effects meta-analysis (Paule-Mandel tau) across years, age groups, and sexes.
Extract subpopulations using standard OHDSI cohort tables:
# Create a care-site cohort
create_caresite_cohort(con, care_site_id = 101, cohort_id = 1,
cohort_schema = "results", cdm_schema = "cdm")
# Extract only that cohort
extract_all("Hospital_A", db = db, cohort_id = 1, cohort_schema = "results")