1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 22:41:52 +02:00

(v1.7.1.9072) as.rsi() fix for UTIs

This commit is contained in:
2021-12-14 12:33:29 +01:00
parent 0cbf8f48b6
commit 5eef01165e
12 changed files with 1779 additions and 1778 deletions

View File

@ -799,7 +799,8 @@ exec_as.rsi <- function(method,
lookup_lancefield <- paste(mo_lancefield, ab)
lookup_other <- paste(mo_other, ab)
if (all(trans$uti == TRUE, na.rm = TRUE) & all(uti == FALSE)) {
if (length(unique(paste(trans$mo, trans$ab))) == length(unique(paste(trans$mo, trans$ab, trans$uti))) &&
any(trans$uti == TRUE, na.rm = TRUE) && all(uti == FALSE)) {
message_("WARNING.", add_fn = list(font_yellow, font_bold), as_note = FALSE)
warning_("Introducing NA: interpretation of ", font_bold(ab_name(ab, tolower = TRUE)), " for some microorganisms is only available for (uncomplicated) urinary tract infections (UTI). Use argument `uti` to set which isolates are from urine. See ?as.rsi.", call = FALSE)
warned <- TRUE