From 2982e9c6d77097f8a45e106ae8e4af5831a89bfa Mon Sep 17 00:00:00 2001 From: Jamie Gilbert Date: Tue, 28 May 2024 12:28:46 -0700 Subject: [PATCH 1/7] Update cohort-diagnostics-main.R Get table names faile when schema specified --- R/cohort-diagnostics-main.R | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/R/cohort-diagnostics-main.R b/R/cohort-diagnostics-main.R index d7a14e1f..3cd9056a 100644 --- a/R/cohort-diagnostics-main.R +++ b/R/cohort-diagnostics-main.R @@ -20,14 +20,16 @@ tables <- connectionHandler$queryDb(sql, schema = schema) |> dplyr::pull("tableName") |> tolower() - return(tables) - } - - return( - DatabaseConnector::getTableNames(connectionHandler$getConnection(), + + } else if (connectionHandler$dbms() != "sqlite") { + tables <- DatabaseConnector::getTableNames(connectionHandler$getConnection(), databaseSchema = schema) |> tolower() - ) + } else { + tables <- DatabaseConnector::getTableNames(connectionHandler$getConnection()) |> + tolower() + } + return(tables) } From 941856c40db60c8c48d9d96a243909923aa78cc4 Mon Sep 17 00:00:00 2001 From: jgilber2 Date: Mon, 24 Jun 2024 08:30:51 -0700 Subject: [PATCH 2/7] News and description updates --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 39e7a303..7f01900e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: OhdsiShinyModules Type: Package Title: Repository of Shiny Modules for OHDSI Result Viewers -Version: 2.1.4 +Version: 2.1.5 Author: Jenna Reps Maintainer: Jenna Reps Description: Install this package to access useful shiny modules for building shiny apps to explore results using the OHDSI tools . diff --git a/NEWS.md b/NEWS.md index 22e484a7..a0b6fc9a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +OhdsiShinyModules v2.1.5 +======================== +Fixed issue in DatabaseConnector check for pooled connections of sqlite databases on cohort diagnotiscs load + OhdsiShinyModules v2.1.4 ======================== Fixed missing call to dplyr in CohortDiagnostics load up From 7523c834f86aa8ddde92d1893a5ae323f2c9c67c Mon Sep 17 00:00:00 2001 From: jgilber2 Date: Mon, 24 Jun 2024 09:42:16 -0700 Subject: [PATCH 3/7] removed circeR from remotes --- DESCRIPTION | 1 - 1 file changed, 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7f01900e..37cb355f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -54,6 +54,5 @@ Suggests: testthat, withr Remotes: - ohdsi/CirceR, ohdsi/ResultModelManager RoxygenNote: 7.3.1 From c51451b0bc6d324132f4636a2a6fd730ddeeeb33 Mon Sep 17 00:00:00 2001 From: jgilber2 Date: Mon, 15 Jul 2024 07:51:22 -0700 Subject: [PATCH 4/7] Fixed broken package docs --- R/cohort-diagnostics-main-ui.R | 2 +- R/cohort-diagnostics-main.R | 2 ++ R/cohort-diagnostics-orphanConcepts.R | 2 +- R/components-data-viewer.R | 4 +-- R/components-largeTableViewer.R | 4 +++ R/datasources-main.R | 6 ++-- R/helpers-componentsCreateCustomColDefList.R | 4 +-- R/phevaluator-main.R | 7 ++--- _pkgdown.yml | 31 +++++++++++++------- docs/index.html | 2 +- docs/pkgdown.yml | 4 +-- 11 files changed, 42 insertions(+), 26 deletions(-) diff --git a/R/cohort-diagnostics-main-ui.R b/R/cohort-diagnostics-main-ui.R index b4291c3c..8552922f 100644 --- a/R/cohort-diagnostics-main-ui.R +++ b/R/cohort-diagnostics-main-ui.R @@ -145,7 +145,7 @@ cdUiControls <- function(ns) { #' #' @return #' string location of the description helper file -#' +#' @family {CohortDiagnostics} #' @export cohortDiagnosticsHelperFile <- function() { fileLoc <- system.file('cohort-diagnostics-www', "cohort-diagnostics.html", package = utils::packageName()) diff --git a/R/cohort-diagnostics-main.R b/R/cohort-diagnostics-main.R index 3cd9056a..5541d7de 100644 --- a/R/cohort-diagnostics-main.R +++ b/R/cohort-diagnostics-main.R @@ -412,6 +412,8 @@ getResultsTemporalTimeRef <- function(dataSource) { #' @param connectionHandler ResultModelManager ConnectionHander instance #' @param resultDatabaseSettings results database settings #' @param dataSource dataSource optionally created with createCdDatabaseDataSource +#' +#' @family {CohortDiagnostics} #' @export cohortDiagnosticsServer <- function(id, connectionHandler, diff --git a/R/cohort-diagnostics-orphanConcepts.R b/R/cohort-diagnostics-orphanConcepts.R index d539812b..a50bf0db 100644 --- a/R/cohort-diagnostics-orphanConcepts.R +++ b/R/cohort-diagnostics-orphanConcepts.R @@ -17,7 +17,7 @@ #' Orphan Concepts View #' @description #' Use for customizing UI -#' +#' @family {CohortDiagnostics} #' @param id Namespace Id - use namespaced id ns("orphanConcepts") inside diagnosticsExplorer module #' @export orpahanConceptsView <- function(id) { diff --git a/R/components-data-viewer.R b/R/components-data-viewer.R index e9a52f15..8ad40662 100644 --- a/R/components-data-viewer.R +++ b/R/components-data-viewer.R @@ -11,7 +11,7 @@ #' @param downloadedFileName string, desired name of downloaded data file. can use the name from the module that is being used #' #' @return shiny module UI -#' +#' @family {Utils} resultTableViewer <- function( id = "result-table", downloadedFileName = NULL @@ -158,7 +158,7 @@ ohdsiReactableTheme <- reactable::reactableTheme( #' @param groupBy The columns to group by #' #' @return shiny module server -#' +#' @family {Utils} resultTableServer <- function( id, #string df, #data.frame diff --git a/R/components-largeTableViewer.R b/R/components-largeTableViewer.R index b89ce9fa..0e1c8220 100644 --- a/R/components-largeTableViewer.R +++ b/R/components-largeTableViewer.R @@ -19,6 +19,7 @@ #' @field countQuery count query string (should match query). Can be auto generated with sub query (default) but #' this will likely result in slow results #' @field connectionHandler ResultModelManager connection handler to execute query inside +#' @family {LargeTables} LargeDataTable <- R6::R6Class( classname = "LargeDataTable", public = list( @@ -102,6 +103,7 @@ LargeDataTable <- R6::R6Class( #' @param baseQuery base sql query #' @param countQuery count query string (should match query). Can be auto generated with sub query #' (default) but this will likely result in slow results +#' @family {LargeTables} createLargeSqlQueryDt <- function(connectionHandler = NULL, connectionDetails = NULL, baseQuery, @@ -126,6 +128,7 @@ createLargeSqlQueryDt <- function(connectionHandler = NULL, #' @param pageSizeChoices numeric selection options for pages #' @param selectedPageSize numeric selection options for pages #' @param fullDownloads allow download button of full dataset from query +#' @family {LargeTables} largeTableView <- function(id, pageSizeChoices = c(10,25,50,100), selectedPageSize = 10, fullDownloads = TRUE) { ns <- shiny::NS(id) checkmate::assertNumeric(pageSizeChoices, min.len = 1, finite = TRUE, lower = 1) @@ -209,6 +212,7 @@ largeTableView <- function(id, pageSizeChoices = c(10,25,50,100), selectedPageSi #' #' @param columns List or reactable returning list of reactable::columnDef objects #' @param ... Additional reactable options (searchable, sortable +#' @family {LargeTables} largeTableServer <- function(id, ldt, inputParams, diff --git a/R/datasources-main.R b/R/datasources-main.R index 9dd221bf..16ee7743 100644 --- a/R/datasources-main.R +++ b/R/datasources-main.R @@ -23,7 +23,7 @@ #' #' @return The helper html file for the datasources module #' @export -#' +#' @family {Utils} datasourcesHelperFile <- function() { fileLoc <- system.file('datasources-www', "datasources.html", package = "OhdsiShinyModules") @@ -38,7 +38,7 @@ datasourcesHelperFile <- function() { #' #' @return The UI for the datasources module #' @export -#' +#' @family {Utils} datasourcesViewer <- function(id) { ns <- shiny::NS(id) @@ -80,7 +80,7 @@ datasourcesViewer <- function(id) { #' #' @return The server for the datasources module #' @export -#' +#' @family {Utils} datasourcesServer <- function( id, connectionHandler, diff --git a/R/helpers-componentsCreateCustomColDefList.R b/R/helpers-componentsCreateCustomColDefList.R index 02392197..d629cf46 100644 --- a/R/helpers-componentsCreateCustomColDefList.R +++ b/R/helpers-componentsCreateCustomColDefList.R @@ -13,7 +13,7 @@ #' #' @return A named list of reactable::colDef objects #' @export -#' +#' @family {Utils} createCustomColDefList <- function(rawColNames, niceColNames = NULL, tooltipText = NULL, case = NULL, customColDefOptions = NULL) { @@ -86,7 +86,7 @@ createCustomColDefList <- function(rawColNames, niceColNames = NULL, #' #' @return html code to make a button label #' @export -#' +#' @family {Utils} makeButtonLabel <- function(label) { as.character(htmltools::tags$div(htmltools::tags$button(paste(label)))) } diff --git a/R/phevaluator-main.R b/R/phevaluator-main.R index 74353bb9..17ecfd82 100644 --- a/R/phevaluator-main.R +++ b/R/phevaluator-main.R @@ -25,7 +25,7 @@ #' @return String location of the phevaluator helper file #' #' @export -#' +#' @family {PheValuator} phevaluatorHelperFile <- function() { fileLoc <- system.file('phevaluator-www', "phevaluator.html", package = "OhdsiShinyModules") @@ -40,7 +40,7 @@ phevaluatorHelperFile <- function() { #' @return The user interface to the phevaluator results viewer #' #' @export -#' +#' @family {PheValuator} phevaluatorViewer <- function(id) { ns <- shiny::NS(id) @@ -141,8 +141,7 @@ phevaluatorViewer <- function(id) { #' @return The phevaluator main module server #' #' @export -#' - +#' @family {PheValuator} phevaluatorServer <- function( id, connectionHandler, diff --git a/_pkgdown.yml b/_pkgdown.yml index 00fb3c41..67d66644 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -110,12 +110,12 @@ reference: - cohortMethodServer - cohortMethodAttritionViewer - cohortMethodAttritionServer + - cohortMethodResultSummaryViewer + - cohortMethodResultSummaryServer - cohortMethodCovariateBalanceViewer - cohortMethodCovariateBalanceServer - cohortMethodDiagnosticsSummaryViewer - cohortMethodDiagnosticsSummaryServer - - cohortMethodForestPlotViewer - - cohortMethodForestPlotServer - cohortMethodKaplanMeierViewer - cohortMethodKaplanMeierServer - cohortMethodPopulationCharacteristicsViewer @@ -126,14 +126,14 @@ reference: - cohortMethodPropensityModelServer - cohortMethodPropensityScoreDistViewer - cohortMethodPropensityScoreDistServer - - cohortMethodResultsTableViewer - - cohortMethodResultsTableServer - - cohortMethodSubgroupsViewer - - cohortMethodSubgroupsServer - cohortMethodSystematicErrorViewer - cohortMethodSystematicErrorServer - - cohortMethodTitlePanelViewer - - cohortMethodTitlePanelServer + - evidenceSynthesisHelperFile + - evidenceSynthesisServer + - evidenceSynthesisViewer + - sccsHelperFile + - sccsServer + - sccsView - title: "Data diagnostics module" desc: > Modules for the DataDiagnostics package. @@ -149,7 +149,7 @@ reference: desc: > Modules for the CohortDiagnostics package. contents: - - cohortDiagnosticsSever + - cohortDiagnosticsServer - cohortDiagnosticsView - cohortDiagnosticsHelperFile - cohortDiagCharacterizationView @@ -170,4 +170,15 @@ reference: - timeDistributionsView - visitContextView - inclusionRulesView - \ No newline at end of file + - title: Cohort Diagnostics + desc: "Run cohort diagnostics, deploy shiny" + contents: has_concept("CohortDiagnostics") + - title: "PheValuator module" + desc: "PheValuator module" + contents: has_concept("PheValuator") + - title: Large Table + desc: "Utilities for tables that contain large amounts of rows" + contents: has_concept("LargeTables") + - title: Utils + desc: "Shared usable utility functions" + contents: has_concept("Utils") \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 93b3088b..9b6bb7f2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,7 @@ OhdsiShinyModules - 2.1.4 + 2.1.5 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 082aed1a..a8323449 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,7 +1,7 @@ -pandoc: 3.1.12.3 +pandoc: '3.2' pkgdown: 2.0.9 pkgdown_sha: ~ articles: AddingShinyModules: AddingShinyModules.html -last_built: 2024-04-25T21:46Z +last_built: 2024-07-15T14:49Z From d88d3cf8fe071da244cb8e7b73efcc66e276172f Mon Sep 17 00:00:00 2001 From: jgilber2 Date: Mon, 15 Jul 2024 08:21:36 -0700 Subject: [PATCH 5/7] Fixed broken package docs --- R/OhdsiShinyModules.R | 4 +- docs/404.html | 2 +- docs/articles/AddingShinyModules.html | 28 +- docs/articles/index.html | 8 +- docs/authors.html | 6 +- docs/news/index.html | 66 ++++- docs/reference/OhdsiShinyModules.html | 8 +- docs/reference/aboutHelperFile.html | 8 +- docs/reference/aboutServer.html | 22 +- docs/reference/aboutViewer.html | 8 +- docs/reference/cohortCountsModule.html | 10 +- docs/reference/cohortCountsView.html | 8 +- docs/reference/cohortDefinitionsModule.html | 10 +- docs/reference/cohortDefinitionsView.html | 8 +- .../cohortDiagnosticsHelperFile.html | 14 +- docs/reference/cohortDiagnosticsView.html | 8 +- docs/reference/cohortGeneratorHelperFile.html | 8 +- docs/reference/cohortGeneratorServer.html | 8 +- docs/reference/cohortGeneratorViewer.html | 8 +- docs/reference/cohortOverlapView.html | 8 +- .../compareCohortCharacterizationView.html | 8 +- docs/reference/conceptsInDataSourceView.html | 8 +- .../reference/createCdDatabaseDataSource.html | 40 +-- docs/reference/dataDiagnosticDrillServer.html | 18 +- docs/reference/dataDiagnosticDrillViewer.html | 8 +- docs/reference/dataDiagnosticHelperFile.html | 8 +- docs/reference/dataDiagnosticServer.html | 8 +- .../dataDiagnosticSummaryServer.html | 18 +- .../dataDiagnosticSummaryViewer.html | 8 +- docs/reference/dataDiagnosticViewer.html | 8 +- docs/reference/databaseInformationView.html | 8 +- .../reference/getCirceRenderedExpression.html | 8 +- docs/reference/getEnabledCdReports.html | 10 +- docs/reference/getLogoImage.html | 8 +- docs/reference/incidenceRatesView.html | 8 +- docs/reference/inclusionRulesView.html | 8 +- docs/reference/index.html | 268 ++++++++++++------ docs/reference/indexEventBreakdownView.html | 8 +- docs/reference/orpahanConceptsView.html | 14 +- docs/reference/timeDistributionsView.html | 8 +- docs/reference/visitContextView.html | 8 +- docs/sitemap.xml | 243 ++++++++++++++++ extras/OhdsiShinyModules.pdf | Bin 176724 -> 181102 bytes extras/PackageMaintenance.R | 2 +- man/LargeDataTable.Rd | 5 +- man/cohortDiagnosticsHelperFile.Rd | 6 + man/cohortDiagnosticsServer.Rd | 6 + man/createCustomColDefList.Rd | 10 + man/createLargeSqlQueryDt.Rd | 6 + man/datasourcesHelperFile.Rd | 10 + man/datasourcesServer.Rd | 10 + man/datasourcesViewer.Rd | 10 + man/largeTableServer.Rd | 6 + man/largeTableView.Rd | 6 + man/makeButtonLabel.Rd | 10 + man/orpahanConceptsView.Rd | 6 + man/phevaluatorHelperFile.Rd | 6 + man/phevaluatorServer.Rd | 6 + man/phevaluatorViewer.Rd | 6 + man/resultTableServer.Rd | 10 + man/resultTableViewer.Rd | 10 + 61 files changed, 811 insertions(+), 301 deletions(-) diff --git a/R/OhdsiShinyModules.R b/R/OhdsiShinyModules.R index be906dcd..77722f5a 100644 --- a/R/OhdsiShinyModules.R +++ b/R/OhdsiShinyModules.R @@ -19,9 +19,7 @@ #' OhdsiShinyModules #' #' @description A selection of shiny modules for exploring standardized OHDSI results -#' -#' @docType package #' @name OhdsiShinyModules #' @importFrom dplyr %>% #' @importFrom rlang .data -NULL +"_PACKAGE" diff --git a/docs/404.html b/docs/404.html index ede78397..52ada86d 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ OhdsiShinyModules - 2.1.4 + 2.1.5 diff --git a/docs/articles/AddingShinyModules.html b/docs/articles/AddingShinyModules.html index 92b0fbdb..d7a37445 100644 --- a/docs/articles/AddingShinyModules.html +++ b/docs/articles/AddingShinyModules.html @@ -6,7 +6,7 @@ Adding Shiny Modules • OhdsiShinyModules - + @@ -33,7 +33,7 @@ OhdsiShinyModules - 1.0.2 + 2.1.5 @@ -69,7 +69,7 @@