Skip to content

Commit

Permalink
Update cohort-diagnostics-main.R
Browse files Browse the repository at this point in the history
adding check for column names used in filter and mutate to cohort-diagnostics
  • Loading branch information
jreps committed Oct 2, 2024
1 parent 942c6ea commit b5cb001
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/cohort-diagnostics-main.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) %>%
Expand Down

0 comments on commit b5cb001

Please sign in to comment.