1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 00:23:03 +02:00

(v2.1.1.9274) Improve is_sir_eligible, rename verbose MDRO output

This commit is contained in:
2025-05-12 12:35:11 +02:00
parent 3f9012dc47
commit 7d45ca9fbf
7 changed files with 26 additions and 21 deletions

2
R/ab.R
View File

@ -652,7 +652,7 @@ generalise_antibiotic_name <- function(x) {
# replace more than 1 space
x <- trimws(gsub(" +", " ", x, perl = TRUE))
# remove last couple of words if they numbers or units
x <- gsub(" ([0-9]{3,99}|U?M?C?G)+$", "", x)
x <- gsub("( ([0-9]{3,}|U?M?C?G|L))+$", "", x, perl = TRUE)
# move HIGH to end
x <- trimws(gsub("(.*) HIGH(.*)", "\\1\\2 HIGH", x, perl = TRUE))
x