(v1.6.0.9041) filter_ab_class() fix

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2021-05-16 10:50:00 +02:00
1 parent 00496e45b7
commit 916df6e90c
41 files changed
+142 -133

No files matched your search

+2 -2
View File
@@ -125,11 +125,11 @@ filter_ab_class <- function(x,
group %like% ab_class |
atc_group1 %like% ab_class |
atc_group2 %like% ab_class)
ab_group <- find_ab_group(ab_class)
if (ab_group == "") {
if (nrow(ab_reference) == 0) {
message_("Unknown antimicrobial class '", ab_class.bak, "', data left unchanged.")
return(x.bak)
}
ab_group <- find_ab_group(ab_class.bak)
# get the columns with a group names in the chosen ab class
agents <- ab_in_data[names(ab_in_data) %in% ab_reference$ab]
if (length(agents) == 0) {
+1 -1
View File
@@ -435,7 +435,7 @@ first_isolate <- function(x = NULL,
if (length(c(row.start:row.end)) == pm_n_distinct(x[c(row.start:row.end), col_mo, drop = TRUE])) {
if (info == TRUE) {
message_("=> Found ", font_bold(paste(length(c(row.start:row.end)), "first isolates")),
", as all isolates were different microorganisms",
", as all isolates were different microbial species",
add_fn = font_black,
as_note = FALSE)
}
+1 -1
View File
@@ -306,7 +306,7 @@ mdro <- function(x = NULL,
}
if (is.null(col_mo) & guideline$code == "tb") {
message_("No column found as input for `col_mo`, ",
font_bold(paste0("assuming all records contain", font_italic("Mycobacterium tuberculosis"), ".")))
font_bold(paste0("assuming all rows contain ", font_italic("Mycobacterium tuberculosis"), ".")))
x$mo <- as.mo("Mycobacterium tuberculosis") # consider overkill at all times: MO_lookup[which(MO_lookup$fullname == "Mycobacterium tuberculosis"), "mo", drop = TRUE]
col_mo <- "mo"
}