From dc6b265b0aada5779188c030bab3433ab2ac0e79 Mon Sep 17 00:00:00 2001 From: Jamie Gilbert Date: Mon, 26 Jun 2023 12:47:36 -0700 Subject: [PATCH] database name in cohort diagnostics cohort counts simple tab --- R/cohort-diagnostics-definition.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/cohort-diagnostics-definition.R b/R/cohort-diagnostics-definition.R index 6ff648b2..f58cf78f 100644 --- a/R/cohort-diagnostics-definition.R +++ b/R/cohort-diagnostics-definition.R @@ -613,10 +613,12 @@ cohortDefinitionsModule <- function(id, if (!hasData(data)) { return(NULL) } + data <- data %>% + dplyr::inner_join(databaseTable, by = "databaseId") %>% dplyr::filter(.data$cohortId == selectedCohortDefinitionRow()$cohortId) %>% dplyr::filter(.data$databaseId %in% databaseTable$databaseId) %>% - dplyr::select("databaseId", + dplyr::select("databaseName", "cohortSubjects", "cohortEntries") %>% dplyr::rename("persons" = "cohortSubjects", @@ -624,7 +626,7 @@ cohortDefinitionsModule <- function(id, shiny::validate(shiny::need(hasData(data), "There is no data for this cohort.")) - keyColumns <- c("databaseId") + keyColumns <- c("databaseName") dataColumns <- c("persons", "events") displayTable <- getDisplayTableSimple(data = data,