From c0bad468592e6a6f55691a38016436074fc3de5c Mon Sep 17 00:00:00 2001 From: Jamie Gilbert Date: Thu, 28 Sep 2023 10:40:37 -0700 Subject: [PATCH] fix for time distributions module not showing in CD --- R/cohort-diagnostics-main-ui.R | 7 ++++--- R/cohort-diagnostics-main.R | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/R/cohort-diagnostics-main-ui.R b/R/cohort-diagnostics-main-ui.R index 2073d382..d05bf3b8 100644 --- a/R/cohort-diagnostics-main-ui.R +++ b/R/cohort-diagnostics-main-ui.R @@ -16,6 +16,7 @@ cdUiControls <- function(ns) { panels <- shiny::tagList( + shiny::textOutput(outputId = ns("tabSelected")), shiny::conditionalPanel( condition = " input.tabs == 'databaseInformation'", @@ -90,7 +91,7 @@ cdUiControls <- function(ns) { condition = "input.tabs == 'cohortCounts' | input.tabs == 'cohortOverlap' | input.tabs == 'incidenceRates' | - input.tabs == 'timeDistributions'", + input.tabs == 'timeDistribution'", ns = ns, shinyWidgets::pickerInput( inputId = ns("cohorts"), @@ -230,8 +231,8 @@ cohortDiagnosticsView <- function(id = "DiagnosticsExplorer") { ), shiny::conditionalPanel( ns = ns, - condition = "input.tabs == 'timeDistributions'", - timeDistributionsView(ns("timeDistributions")) + condition = "input.tabs == 'timeDistribution'", + timeDistributionsView(id = ns("timeDistributions")) ), shiny::conditionalPanel( ns = ns, diff --git a/R/cohort-diagnostics-main.R b/R/cohort-diagnostics-main.R index 9e921b32..f05f553f 100644 --- a/R/cohort-diagnostics-main.R +++ b/R/cohort-diagnostics-main.R @@ -626,6 +626,8 @@ cohortDiagnosticsServer <- function(id, return(input$targetCohort) }) + output$tabSelected <- shiny::renderText(input$tabs) + if ("cohort" %in% enabledReports) { cohortDefinitionsModule(id = "cohortDefinitions", dataSource = dataSource,