Skip to content

Commit

Permalink
database name in cohort diagnostics cohort counts simple tab
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Jun 26, 2023
1 parent 1b2b3c6 commit dc6b265
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/cohort-diagnostics-definition.R
Original file line number Diff line number Diff line change
Expand Up @@ -613,18 +613,20 @@ 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",
"events" = "cohortEntries")

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,
Expand Down

0 comments on commit dc6b265

Please sign in to comment.