1
0
mirror of https://github.com/msberends/AMR.git synced 2026-04-28 09:03:51 +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
Version: 3.0.1.9047
Date: 2026-04-21
Version: 3.0.1.9048
Date: 2026-04-22
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
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
* 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 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 BRMO classification by including bacterial complexes (#275)
### Updates
* 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"`)
#'
#' 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:
#'
@@ -379,7 +379,7 @@ mdro <- function(x = NULL,
guideline$name <- "Bijzonder Resistente Micro-organismen (BRMO)"
guideline$author <- "Samenwerkingsverband Richtlijnen Infectiepreventie (SRI)"
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"
} else if (guideline$code == "brmo2017") {
guideline$name <- "WIP-Richtlijn Bijzonder Resistente Micro-organismen (BRMO)"
@@ -510,13 +510,13 @@ mdro <- function(x = NULL,
message_(
"Inferring resistance for ",
ab_name(.base_code, language = NULL, tolower = TRUE),
" (", font_bold(.base_code, collapse = NULL), ", ", font_italic("missing"), ") from ",
" (", font_italic("missing"), ") from ",
vector_or(
quotes = FALSE,
last_sep = " and/or ",
paste0(
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"
)
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(
3,
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, 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),
any_all = "any",
reason = "Enterobacterales group II: aminoglycoside + fluoroquinolone + cotrimoxazol"
@@ -1580,25 +1581,27 @@ mdro <- function(x = NULL,
)
# 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(
3,
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") &
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),
any_all = "any",
reason = "A. baumannii-calcoaceticus complex: aminoglycoside + ciprofloxacin or levofloxacin"
)
trans_tbl(
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,
any_all = "any",
reason = "A. baumannii-calcoaceticus complex: potential carbapenemase"
)
trans_tbl(
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,
any_all = "any",
reason = "A. baumannii-calcoaceticus complex: carbapenemase"
@@ -1851,6 +1854,7 @@ mdro <- function(x = NULL,
if (isTRUE(info.bak)) {
cat(group_msg)
cat("\n")
if (sum(!is.na(x$MDRO)) == 0) {
cat(font_bold(paste0("=> Found 0 MDROs since no isolates are covered by the guideline")))
} else {
@@ -1873,14 +1877,15 @@ mdro <- function(x = NULL,
))
if (length(rows_empty) > 0) {
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)) {
cat("\n")
}
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 ----

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}
\title{Data Set Denoting Bacterial Intrinsic Resistance}
\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{
\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()}}.

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}
\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:
\itemize{