diff --git a/R/cohort-diagnostics-main.R b/R/cohort-diagnostics-main.R index c669aaf..825c912 100644 --- a/R/cohort-diagnostics-main.R +++ b/R/cohort-diagnostics-main.R @@ -621,6 +621,9 @@ cohortDiagnosticsServer <- function(id, if (!hasData(targetCohortId())) { return(NULL) } + if (sum(c('cohortId','conceptSetName') %in% colnames(dataSource$conceptSets)) !=2) { + return(NULL) + } dataSource$conceptSets %>% dplyr::filter(.data$cohortId == targetCohortId()) %>% dplyr::mutate(name = .data$conceptSetName) %>%