Skip to content

Analyticsphere/omopDeliveryReport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OMOP Delivery Report Generator

Generates HTML reports from OMOP CDM delivery metrics and data quality results. Part of the Connect for Cancer Prevention EHR data/OMOP pipeline.

Pipeline Position

This package operates downstream in the processing pipeline:

  1. ccc-omop-file-processor - Processes OMOP files, performs vocabulary harmonization, outputs delivery_report.csv
  2. DataQualityDashboard - Runs quality checks (via ccc-omop-analyzer), outputs dqd_results.csv
  3. omopDeliveryReport (this package) - Combines both CSVs into HTML report

Installation

remotes::install_github("Analyticsphere/omopDeliveryReport")

Sample input files and a rendered report are available in inst/ref/.

Usage

library(omopDeliveryReport)

# Local file system
generate_omop_report(
  delivery_report_path = "inst/ref/delivery_report.csv",  # Sample data in package
  dqd_results_path = "inst/ref/dqd_results.csv",          # Sample data in package
  output_path = "~/Desktop/example_omop_report.html"
)

# Files in GCS
generate_omop_report(
  delivery_report_path = "gs://bucket/delivery_report.csv",
  dqd_results_path = "gs://bucket/dqd_results.csv",
  output_path = "gs://bucket/report.html"
)

Input Files

delivery_report.csv

Generated by ccc-omop-file-processor via /generate_delivery_report endpoint.

Contents:

  • Table row counts (initial, invalid, harmonized, final)
  • Vocabulary harmonization statistics
  • Domain migration flows
  • Type concept breakdowns
  • Time series data
  • Reference integrity results

dqd_results.csv

Standard output from OHDSI DataQualityDashboard. Contains check results, failure counts, and check metadata organized by table, field, and check category.

Architecture

Processing Pipeline:

Load CSV → Parse Metrics → Calculate Scores → Build HTML → Write Output

The package combines two CSV files (delivery metrics and DQD results) into a single interactive HTML report. Each R module handles one stage of the processing pipeline. Parsers extract metrics using regex patterns, calculators compute scores, and builders assemble HTML from templates using {{variable}} substitution. Works with both local files and Google Cloud Storage.

Package Structure:

R/
├── generate_report.R     - Main entry point
├── data_loaders.R        - CSV loading & schema validation
├── data_parsers.R        - Metric extraction
├── metrics.R             - Score calculations
├── data_preparation.R    - Data aggregation for display
├── report_builder.R      - HTML and JSON assembly
├── template_renderer.R   - Template variable substitution
├── constants.R           - Package constants
└── utils.R               - File I/O and helper functions

inst/
├── ref/                  - Sample files
├── css/                  - Report styling
├── js/                   - Interactive features
└── templates/
    ├── main.html         - Main report template
    ├── sections/         - Section templates
    └── components/       - Reusable HTML components

About

Generate standalone HTML reports from OMOP pipeline delivery metrics and DataQualityDashboard results

Resources

Stars

Watchers

Forks

Packages

No packages published