diff --git a/DESCRIPTION b/DESCRIPTION index 39e7a303..37cb355f 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 . @@ -54,6 +54,5 @@ Suggests: testthat, withr Remotes: - ohdsi/CirceR, ohdsi/ResultModelManager RoxygenNote: 7.3.1 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 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/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 d7a14e1f..5541d7de 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) } @@ -410,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/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 @@