From 6260cb860866721a382424ac9206dcc7e5cf6ff5 Mon Sep 17 00:00:00 2001 From: Mattia Branca Date: Mon, 29 Jul 2024 16:50:58 +0200 Subject: [PATCH] #17 --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/asr.R | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7c8407f..86e53cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: SwissASR Title: Automated Completion of the SwissEthics Annual Safety Report -Version: 0.5.2 +Version: 0.5.3 Authors@R: c(person(given = "Alan G.", family = "Haynes", diff --git a/NEWS.md b/NEWS.md index fe15e73..dc35754 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# SwissASR 0.5.3 + +* Last updates to align with the latest template and add a warning for special characters causing a problem in producing the Word report from R. + # SwissASR 0.5.2 * Correction of template inputs, dates formatting and additional note for SAEs tables. diff --git a/R/asr.R b/R/asr.R index 5625e9a..b01cc3b 100644 --- a/R/asr.R +++ b/R/asr.R @@ -323,6 +323,23 @@ asr <- function(data, # data$trt <- as.character(data$trt) # +# Check in the text inputs if any detected special character causing problems is present + for(string in c("trial_title", + "protocol_number", + "basec_number", + "snctp_number", + "swissmedic_number", + "ec_name", + "tr_number", + "product_name", + "sponsor_contact", + "inst_name_address")){ + check_field_characters(get(string)) } + +# This check is for the arm names in case these are available and requested + if(!is.null(n_per_arm)){lapply(names(n_per_arm),check_field_characters)} + + dfs <- asr_dataprep(data, period_from = period_from, period_to = period_to