1
0
mirror of https://github.com/msberends/AMR.git synced 2026-04-28 10:23:53 +02:00

(v3.0.1.9048) fix #275

This commit is contained in:
2026-04-22 08:16:44 +02:00
parent e0f8cf0882
commit e7780b6d5f
14 changed files with 14053 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 3.0.1.9047 Version: 3.0.1.9048
Date: 2026-04-21 Date: 2026-04-22
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by data analysis and to work with microbial and antimicrobial properties by

View File

@@ -1,4 +1,4 @@
# AMR 3.0.1.9047 # AMR 3.0.1.9048
### New ### New
* Support for clinical breakpoints of 2026 of both CLSI and EUCAST, by adding all of their over 5,700 new clinical breakpoints to the `clinical_breakpoints` data set for usage in `as.sir()`. EUCAST 2026 is now the new default guideline for all MIC and disk diffusion interpretations. * Support for clinical breakpoints of 2026 of both CLSI and EUCAST, by adding all of their over 5,700 new clinical breakpoints to the `clinical_breakpoints` data set for usage in `as.sir()`. EUCAST 2026 is now the new default guideline for all MIC and disk diffusion interpretations.
@@ -33,6 +33,7 @@
* Fixed Italian translation of CoNS to Stafilococco coagulasi-negativo and CoPS to Stafilococco coagulasi-positivo (#256) * Fixed Italian translation of CoNS to Stafilococco coagulasi-negativo and CoPS to Stafilococco coagulasi-positivo (#256)
* Fixed SIR and MIC coercion of combined values, e.g. `as.sir("<= 0.002; S") ` or `as.mic("S; 0.002")` (#252) * Fixed SIR and MIC coercion of combined values, e.g. `as.sir("<= 0.002; S") ` or `as.mic("S; 0.002")` (#252)
* Fixed translation of foreign languages in `sir_df()` (#272) * Fixed translation of foreign languages in `sir_df()` (#272)
* Fixed BRMO classification by including bacterial complexes (#275)
### Updates ### Updates
* Extensive `cli` integration for better message handling and clickable links in messages and warnings (#191, #265) * Extensive `cli` integration for better message handling and clickable links in messages and warnings (#191, #265)

View File

@@ -84,7 +84,7 @@
#' #'
#' * `guideline = "BRMO 2024"` (or simply `guideline = "BRMO"`) #' * `guideline = "BRMO 2024"` (or simply `guideline = "BRMO"`)
#' #'
#' The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" ([link](https://www.sri-richtlijnen.nl/brmo)) #' The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" ([link](https://richtlijnendatabase.nl/richtlijn/bijzonder_resistente_micro-organismen_brmo))
#' #'
#' Also: #' Also:
#' #'
@@ -379,7 +379,7 @@ mdro <- function(x = NULL,
guideline$name <- "Bijzonder Resistente Micro-organismen (BRMO)" guideline$name <- "Bijzonder Resistente Micro-organismen (BRMO)"
guideline$author <- "Samenwerkingsverband Richtlijnen Infectiepreventie (SRI)" guideline$author <- "Samenwerkingsverband Richtlijnen Infectiepreventie (SRI)"
guideline$version <- "November 2024" guideline$version <- "November 2024"
guideline$source_url <- font_url("https://www.sri-richtlijnen.nl/brmo", "Direct link") guideline$source_url <- font_url("https://richtlijnendatabase.nl/richtlijn/bijzonder_resistente_micro-organismen_brmo", "Direct link")
guideline$type <- "BRMOs" guideline$type <- "BRMOs"
} else if (guideline$code == "brmo2017") { } else if (guideline$code == "brmo2017") {
guideline$name <- "WIP-Richtlijn Bijzonder Resistente Micro-organismen (BRMO)" guideline$name <- "WIP-Richtlijn Bijzonder Resistente Micro-organismen (BRMO)"
@@ -510,13 +510,13 @@ mdro <- function(x = NULL,
message_( message_(
"Inferring resistance for ", "Inferring resistance for ",
ab_name(.base_code, language = NULL, tolower = TRUE), ab_name(.base_code, language = NULL, tolower = TRUE),
" (", font_bold(.base_code, collapse = NULL), ", ", font_italic("missing"), ") from ", " (", font_italic("missing"), ") from ",
vector_or( vector_or(
quotes = FALSE, quotes = FALSE,
last_sep = " and/or ", last_sep = " and/or ",
paste0( paste0(
ab_name(.combos, language = NULL, tolower = TRUE), ab_name(.combos, language = NULL, tolower = TRUE),
" (", font_bold(.combos, collapse = NULL), ", ", font_italic("available"), ")" " ({.field ", font_bold(.combo_cols, collapse = NULL), "}, ", font_italic("available"), ")"
) )
) )
) )
@@ -1558,12 +1558,13 @@ mdro <- function(x = NULL,
reason = "Enterobacterales: carbapenemase" reason = "Enterobacterales: carbapenemase"
) )
c.freundii_complex <- AMR::microorganisms.groups$mo_name[AMR::microorganisms.groups$mo_group_name == "Citrobacter freundii complex"] c.freundii_complex <- AMR::microorganisms.groups$mo_name[AMR::microorganisms.groups$mo_group_name == "Citrobacter freundii complex"]
c.freundii_complex <- paste(c.freundii_complex, collapse = "|")
trans_tbl( trans_tbl(
3, 3,
rows = which(col_values(x, SXT) == "R" & rows = which(col_values(x, SXT) == "R" &
(col_values(x, GEN) == "R" | col_values(x, TOB) == "R" | col_values(x, AMK) == "R") & (col_values(x, GEN) == "R" | col_values(x, TOB) == "R" | col_values(x, AMK) == "R") &
(col_values(x, CIP) == "R" | col_values(x, NOR) == "R" | col_values(x, LVX) == "R") & (col_values(x, CIP) == "R" | col_values(x, NOR) == "R" | col_values(x, LVX) == "R") &
(x$genus %in% c("Enterobacter", "Providencia") | paste(x$genus, x$species) %in% c(c.freundii_complex, "Klebsiella aerogenes", "Hafnia alvei", "Morganella morganii"))), (x$fullname %like_case% c.freundii_complex | x$genus %in% c("Enterobacter", "Providencia") | paste(x$genus, x$species) %in% c("Klebsiella aerogenes", "Hafnia alvei", "Morganella morganii"))),
cols = c(SXT, aminoglycosides, fluoroquinolones), cols = c(SXT, aminoglycosides, fluoroquinolones),
any_all = "any", any_all = "any",
reason = "Enterobacterales group II: aminoglycoside + fluoroquinolone + cotrimoxazol" reason = "Enterobacterales group II: aminoglycoside + fluoroquinolone + cotrimoxazol"
@@ -1580,25 +1581,27 @@ mdro <- function(x = NULL,
) )
# Acinetobacter baumannii-calcoaceticus complex # Acinetobacter baumannii-calcoaceticus complex
a.baumannii_complex <- AMR::microorganisms.groups$mo_name[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"]
a.baumannii_complex <- paste(a.baumannii_complex, collapse = "|")
trans_tbl( trans_tbl(
3, 3,
rows = which((col_values(x, GEN) == "R" | col_values(x, TOB) == "R" | col_values(x, AMK) == "R") & rows = which((col_values(x, GEN) == "R" | col_values(x, TOB) == "R" | col_values(x, AMK) == "R") &
(col_values(x, CIP) == "R" | col_values(x, LVX) == "R") & (col_values(x, CIP) == "R" | col_values(x, LVX) == "R") &
x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"]), x$fullname %like_case% a.baumannii_complex),
cols = c(aminoglycosides, CIP, LVX), cols = c(aminoglycosides, CIP, LVX),
any_all = "any", any_all = "any",
reason = "A. baumannii-calcoaceticus complex: aminoglycoside + ciprofloxacin or levofloxacin" reason = "A. baumannii-calcoaceticus complex: aminoglycoside + ciprofloxacin or levofloxacin"
) )
trans_tbl( trans_tbl(
2, # unconfirmed 2, # unconfirmed
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & is.na(x$carbapenemase)), rows = which(x$fullname %like_case% a.baumannii_complex & is.na(x$carbapenemase)),
cols = carbapenems, cols = carbapenems,
any_all = "any", any_all = "any",
reason = "A. baumannii-calcoaceticus complex: potential carbapenemase" reason = "A. baumannii-calcoaceticus complex: potential carbapenemase"
) )
trans_tbl( trans_tbl(
3, 3,
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & x$carbapenemase == TRUE), rows = which(x$fullname %like_case% a.baumannii_complex & x$carbapenemase == TRUE),
cols = carbapenems, cols = carbapenems,
any_all = "any", any_all = "any",
reason = "A. baumannii-calcoaceticus complex: carbapenemase" reason = "A. baumannii-calcoaceticus complex: carbapenemase"
@@ -1851,6 +1854,7 @@ mdro <- function(x = NULL,
if (isTRUE(info.bak)) { if (isTRUE(info.bak)) {
cat(group_msg) cat(group_msg)
cat("\n")
if (sum(!is.na(x$MDRO)) == 0) { if (sum(!is.na(x$MDRO)) == 0) {
cat(font_bold(paste0("=> Found 0 MDROs since no isolates are covered by the guideline"))) cat(font_bold(paste0("=> Found 0 MDROs since no isolates are covered by the guideline")))
} else { } else {
@@ -1873,14 +1877,15 @@ mdro <- function(x = NULL,
)) ))
if (length(rows_empty) > 0) { if (length(rows_empty) > 0) {
if (isTRUE(info.bak)) { if (isTRUE(info.bak)) {
cat(font_italic(paste0(" (", length(rows_empty), " isolates had no test results)\n"))) cat(font_italic(paste0("\n (another ", length(rows_empty), " isolates had no test results)\n")))
} }
} else if (isTRUE(info.bak)) { } else if (isTRUE(info.bak)) {
cat("\n") cat("\n")
} }
if (isTRUE(info.bak) && !isTRUE(verbose)) { if (isTRUE(info.bak) && !isTRUE(verbose)) {
cat("\nRerun with 'verbose = TRUE' to retrieve detailed info and reasons for every MDRO classification.\n") cat("\n")
cat(format_inline_("Rerun with {.code verbose = TRUE} to retrieve detailed info and reasons for every MDRO classification.\n"))
} }
# Results ---- # Results ----

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
2af32dd70120441a2c041b74b374c8a1 990cbdfa55a1c2340aecfa67e8ac84d6

Binary file not shown.

View File

@@ -5,7 +5,7 @@
\alias{intrinsic_resistant} \alias{intrinsic_resistant}
\title{Data Set Denoting Bacterial Intrinsic Resistance} \title{Data Set Denoting Bacterial Intrinsic Resistance}
\format{ \format{
A \link[tibble:tibble]{tibble} with 271 905 observations and 2 variables: A \link[tibble:tibble]{tibble} with 285 928 observations and 2 variables:
\itemize{ \itemize{
\item \code{mo}\cr Microorganism ID which occurs in \code{\link[=microorganisms]{microorganisms$mo}}. Names can be retrieved using \code{\link[=mo_name]{mo_name()}}. \item \code{mo}\cr Microorganism ID which occurs in \code{\link[=microorganisms]{microorganisms$mo}}. Names can be retrieved using \code{\link[=mo_name]{mo_name()}}.
\item \code{ab}\cr Antimicrobial ID which occurs in \code{\link[=antimicrobials]{antimicrobials$ab}}. Names can be retrieved using \code{\link[=ab_name]{ab_name()}}. \item \code{ab}\cr Antimicrobial ID which occurs in \code{\link[=antimicrobials]{antimicrobials$ab}}. Names can be retrieved using \code{\link[=ab_name]{ab_name()}}.

View File

@@ -119,7 +119,7 @@ The international guideline for multi-drug resistant tuberculosis - World Health
The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; \doi{10.1186/s13756-015-0047-6} The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; \doi{10.1186/s13756-015-0047-6}
\item \code{guideline = "BRMO 2024"} (or simply \code{guideline = "BRMO"}) \item \code{guideline = "BRMO 2024"} (or simply \code{guideline = "BRMO"})
The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" (\href{https://www.sri-richtlijnen.nl/brmo}{link}) The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" (\href{https://richtlijnendatabase.nl/richtlijn/bijzonder_resistente_micro-organismen_brmo}{link})
Also: Also:
\itemize{ \itemize{