From 373bd250a837a3723aa220d9429e0dad95ceaf12 Mon Sep 17 00:00:00 2001 From: Edoardo Mancini Date: Fri, 17 Nov 2023 15:23:46 +0000 Subject: [PATCH 1/2] #76 TERMNAME -> TERMCHAR in get_terms --- DESCRIPTION | 2 +- NEWS.md | 4 +++- R/get_terms.R | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ff0b66c..15730f3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: pharmaversesdtm Type: Package Title: Test Data for the Pharmaverse Family of Packages -Version: 0.1.1.9000 +Version: 0.1.1.9001 Authors@R: c( person("Edoardo", "Mancini", email = "edoardo.mancini@roche.com", role = c("aut", "cre")), person("Gayatri", "G", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 734c36b..c70cde6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ ## New Features -Following Vaccine Specific SDTM datasets have been added. (#4) +The following Vaccine Specific SDTM datasets have been added. (#4) - `ce_vaccine` - `dm_vaccine` @@ -15,6 +15,8 @@ Following Vaccine Specific SDTM datasets have been added. (#4) - `suppex_vaccine` - `suppface_vaccine` +- `get_terms()` now expects `TERMCHAR` instead of `TERMNAME` in alignment with [this](https://github.com/pharmaverse/admiral/issues/2186) `{admiral}` issue. (#76) + # pharmaversesdtm 0.1.1 ## Documentation diff --git a/R/get_terms.R b/R/get_terms.R index 71337da..b63c22a 100644 --- a/R/get_terms.R +++ b/R/get_terms.R @@ -32,7 +32,7 @@ get_terms <- function(basket_select, select_id <- NULL } keep_cols <- c( - TERMNAME = "termname", + TERMCHAR = "termchar", SRCVAR = "termvar", GRPNAME = "smq_name", select_id @@ -57,7 +57,7 @@ get_terms <- function(basket_select, select_id <- NULL } keep_cols <- c( - TERMNAME = "termname", + TERMCHAR = "termchar", SRCVAR = "termvar", GRPNAME = "sdg_name", select_id From a6d5f66b6cfbf4098a2c058a4fe47bc826801f6a Mon Sep 17 00:00:00 2001 From: Edoardo Mancini Date: Fri, 17 Nov 2023 18:54:26 +0000 Subject: [PATCH 2/2] #76 update to query databases --- data-raw/query_databases.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data-raw/query_databases.R b/data-raw/query_databases.R index 2f61e61..761e732 100644 --- a/data-raw/query_databases.R +++ b/data-raw/query_databases.R @@ -6,7 +6,7 @@ library(dplyr) # Create smq dataset ---- pregsmq <- tribble( - ~termname, ~scope, + ~termchar, ~scope, "Achromotrichia congenital", "narrow", "Craniosynostosis", "narrow", "Hypophosphatasia", "narrow", @@ -36,7 +36,7 @@ pregsmq <- tribble( ) bilismq <- tribble( - ~termname, ~scope, + ~termchar, ~scope, "Bile duct cancer recurrent", "narrow", "Bile duct cancer recurrent", "broad", "Bile duct squamous cell carcinoma", "narrow", @@ -78,7 +78,7 @@ usethis::use_data(smq_db, overwrite = TRUE) # Create sdg dataset ---- sdg_db <- tribble( - ~termname, + ~termchar, "AMINOSALICYLIC ACID", "AMINOSALICYLATE CALCIUM", "AMINOSALICYLATE CALCIUM ALUMINIUM",