Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New shiny app #332

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: DataQualityDashboard
Type: Package
Title: Execute and View Data Quality Checks on OMOP CDM Database
Version: 1.3.1
Version: 1.4.0
Date: 2020-02-28
Authors@R: c(
person("Clair", "Blacketer", , "[email protected]", role = c("aut", "cre")),
Expand Down Expand Up @@ -35,5 +35,5 @@ Suggests:
rmarkdown,
shiny,
ggplot2
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Encoding: UTF-8
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export(executeDqChecks)
export(listDqChecks)
export(viewDqDashboard)
export(writeJsonResultsToTable)
export(writeJsonResultsToCsv)
371 changes: 311 additions & 60 deletions R/execution.R

Large diffs are not rendered by default.

47 changes: 41 additions & 6 deletions R/view.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,51 @@
#'
#' @export
viewDqDashboard <- function(jsonPath, launch.browser=NULL, display.mode=NULL, ...) {

ensure_installed("shiny")

Sys.setenv(jsonPath = jsonPath)
appDir <- system.file("shinyApps", package = "DataQualityDashboard")

appDir <- system.file("ResultsV2", package = "DataQualityDashboard")
if(is.null(display.mode)){
display.mode="normal"
display.mode="normal"
}

if(is.null(launch.browser)){
launch.browser=TRUE
launch.browser=TRUE
}

shiny::runApp(appDir = appDir, launch.browser = launch.browser, display.mode = display.mode, ...)
}


# Borrowed from devtools:
# https://github.com/hadley/devtools/blob/ba7a5a4abd8258c52cb156e7b26bb4bf47a79f0b/R/utils.r#L44
is_installed <- function(pkg, version = 0) {
installed_version <-
tryCatch(
utils::packageVersion(pkg),
error = function(e)
NA
)
! is.na(installed_version) && installed_version >= version
}

# Borrowed and adapted from devtools:
# https://github.com/hadley/devtools/blob/ba7a5a4abd8258c52cb156e7b26bb4bf47a79f0b/R/utils.r#L74
ensure_installed <- function(pkg) {
if (!is_installed(pkg)) {
msg <-
paste0(sQuote(pkg), " must be installed for this functionality.")
if (interactive()) {
message(msg, "\nWould you like to install it?")
if (menu(c("Yes", "No")) == 1) {
install.packages(pkg)
} else {
stop(msg, call. = FALSE)
}
} else {
stop(msg, call. = FALSE)
}
}
}
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The goal of the Data Quality Dashboard (DQD) project is to design and develop an
Introduction
============

This package will run a series of data quality checks against an OMOP CDM instance (currently supports v5.3.1 and v5.2.2). It systematically runs the checks, evaluates the checks against some pre-specified threshold, and then communicates what was done in a transparent and easily understandable way.
This package will run a series of data quality checks against an OMOP CDM instance (currently supports v5.4, v5.3.1 and v5.2.2). It systematically runs the checks, evaluates the checks against some pre-specified threshold, and then communicates what was done in a transparent and easily understandable way.

Overview
========
Expand All @@ -33,7 +33,7 @@ Version 1 of the tool includes 20 different check types organized into Kahn cont
After systematically applying the 20 check types to an OMOP CDM version approximately 3,351 individual data quality checks are resolved, run against the database, and evaluated based on a pre-specified threshold. The R package then creates a json object that is read into an RShiny application to view the results.


<img src="https://github.com/OHDSI/DataQualityDashboard/raw/master/extras/dqDashboardScreenshot.png"/>
<img src="https://github.com/OHDSI/DataQualityDashboard/raw/main/extras/dqDashboardScreenshot.png"/>


Features
Expand All @@ -42,6 +42,24 @@ Features
- Analyzes data in the OMOP Common Data Model format for all data checks
- Produces a set of data check results with supplemental investigation assets.

Data Requirements
=================

Prior to execution the DataQualityDashboard package requires that the CDM_SOURCE table is properly populated. The following table is a guide to the expected contents of the CDM_SOURCE table.

cdmFieldName | userGuidance | etlConventions
-- | -- | --
cdm_source_name | The name of the CDM instance. | Descriptive name for the source data.
cdm_source_abbreviation | The abbreviation of the CDM instance. | The abbreviation should consistent for different release from the same source.
cdm_holder | The holder of the CDM instance. | The institution that controls access to the data.  If possible include contact information for who to contact to request access to the data.
source_description | The description of the CDM instance. | Add notes, caveats, special characteristics about the source data that would not be assumed from the general descriptive name.  This description intended to help analysists determine if the data is suitable for the problem they are studying.
source_documentation_reference | Reference to where one can find documentation about the source data. | Can include URL's, file name, source data experts contact information (if they agree to it)
cdm_etl_reference | Reference to where one can find documentation about the source to ETL into OMOP CDM. | Assuming there is a document or files (such as Rabbit in the Hat) describing the ETL.  May be the location of the ETL source and documentation repository.
source_release_date | The release date of the source data. | When the source data was made available for ETL'ing.  For sites doing incremental updates, the date the last increment made available.  This implies that for sites doing incremental updates the CDM Source table should be updated to reflect that changes were made to the CDM.
cdm_release_date | The release date of the CDM instance. | When the source data was made available for general use.  For sites doing incremental updates, this implies that the CDM Source table should be updated to reflect that changes were made to the CDM.
cdm_version | Identifies the CDM version | Enter the numeric portion of the version, e.g. 5.4
cdm_version_concept_id | The Concept Id representing the version of the CDM. | SELECT concept_id WHERE domain = Metadata and vocabulary_id = CDM and concept_code like %[numeric portion of the version]%
vocabulary_version | The vocabulary version used in the ETL | Obtained by SELECT vocabulary_version FROM vocabulary WHERE vocabulary_id = 'None'

Technology
==========
Expand All @@ -63,7 +81,7 @@ DataQualityDashboard is licensed under Apache License 2.0

### Development status

V1.0 ready for use.
V1.4 ready for use.

# Acknowledgements

Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ home:
links:
- text: Ask a question
href: http://forums.ohdsi.org
- text: DQD Example Output
href: https://data.ohdsi.org/DataQualityDashboardMDCD/

navbar:
structure:
Expand Down
117 changes: 39 additions & 78 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading