From 80a49d1a3d0eff0c9f7829370e625d98e8870948 Mon Sep 17 00:00:00 2001 From: "Lavallee,Dr.,Martin (MED MA) BIP-US-R" Date: Wed, 21 Feb 2024 10:55:03 -0500 Subject: [PATCH] fix coercion bug for drugType --- R/attributes-concept.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/attributes-concept.R b/R/attributes-concept.R index a61f2d3d..76dd3fae 100644 --- a/R/attributes-concept.R +++ b/R/attributes-concept.R @@ -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) } @@ -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) } @@ -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)) })