Skip to content

Commit

Permalink
have cohort concept sets function exit cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Nov 15, 2023
1 parent 5a4b974 commit 447c64c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/ConceptSets.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ extractConceptSetsSqlFromCohortSql <- function(cohortSql) {


extractConceptSetsJsonFromCohortJson <- function(cohortJson) {
cohortDefinition <-
cohortDefinition <- tryCatch({
RJSONIO::fromJSON(content = cohortJson, digits = 23)
}, error = function(msg) {
return(list())
})
if ("expression" %in% names(cohortDefinition)) {
expression <- cohortDefinition$expression
} else {
Expand Down

0 comments on commit 447c64c

Please sign in to comment.