Skip to content

Commit

Permalink
fix coercion bug for drugType
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlavallee92 committed Feb 21, 2024
1 parent c4d52ee commit 80a49d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/attributes-concept.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ buildConceptAttribute <- function(ids, attributeName, connection, vocabularyData

attr_concept <- methods::new("conceptAttribute",
name = attributeName,
conceptSet = list(conceptsForAttributes))
conceptSet = conceptsForAttributes)
return(attr_concept)
}

Expand Down Expand Up @@ -165,7 +165,7 @@ unit <- function(x) {

# conceptSet <- as.list(as.data.frame(conceptSet)$conceptId) conceptSet <- as.list(conceptSet)

res <- methods::new("conceptAttribute", name = "unit", conceptSet = conceptSet)
res <- methods::new("conceptAttribute", name = "Unit", conceptSet = conceptSet)
return(res)
}

Expand All @@ -174,7 +174,7 @@ unit <- function(x) {
setMethod("as.list", "conceptAttribute", function(x) {

concepts <- purrr::map(x@conceptSet, ~as.list(.x))
nm <- stringr::str_to_title(x@name)
nm <- x@name

tibble::lst(`:=`(!!nm, concepts))
})
Expand Down

0 comments on commit 80a49d1

Please sign in to comment.