The OmopSketch package provides fast, automated tools for high-level characterization and exploratory data analysis of OMOP Common Data Model (CDM) databases.
Overview
Before launching an observational study, researchers must understand the shape, size, historical coverage, and data quality of their OMOP database. OmopSketch generates rapid summaries (“sketches”) of database demographics, table volumes, observation periods, and concept usage patterns.
Key Features:
Instant Snapshot: Generates an executive summary of vocabulary versions, patient counts, and table sizes.
Observation Period Dynamics: Evaluates longitudinal coverage, continuous observation trends, and seasonal gaps.
Clinical Table Profiling: Analyzes record density, missingness, and mapping proportions across OMOP clinical domains.
Interactive Shiny Explorer: Launches a self-contained Shiny dashboard for visual exploration of database characteristics.
Installation
# Install from CRANinstall.packages("OmopSketch")# Or development version from GitHub# pak::pkg_install("ohdsi/OmopSketch")
Getting Started
library(OmopSketch)library(CDMConnector)# Connect to databasecon<-DBI::dbConnect(duckdb::duckdb(),eunomiaDir())cdm<-cdmFromCon(con,cdmSchema="main",writeSchema="main")# 1. Summarize database snapshotsnapshot<-summariseOmopSnapshot(cdm)tableOmopSnapshot(snapshot)# 2. Analyze observation period coverageobs_summary<-summariseObservationPeriod(cdm$observation_period)plotObservationPeriod(obs_summary)# 3. Analyze clinical records in condition_occurrencecondition_profile<-summariseClinicalRecords(cdm=cdm,omopTableName="condition_occurrence")
Core API Reference
Database Snapshot & Overview
Function
Description
summariseOmopSnapshot(cdm)
Computes database metadata, vocabulary release, total patient counts, and table row counts.
tableOmopSnapshot(result)
Renders a formatted publication-ready table of the database snapshot.
Observation Period & Temporal Coverage
Function
Description
summariseObservationPeriod(observationPeriod)
Analyzes observation duration, gaps, and records per person.