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

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2025-05-12 12:35:11 +02:00
1 parent 3f9012dc47
commit 7d45ca9fbf
7 files changed
+26 -21

No files matched your search

+1 -1
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