mirror of
https://github.com/msberends/AMR.git
synced 2025-07-12 20:21:58 +02:00
(v1.5.0.9004) custom MDRO guideline
This commit is contained in:
43
man/mdro.Rd
43
man/mdro.Rd
@ -8,6 +8,7 @@
|
||||
\alias{BRMO}
|
||||
\alias{3MRGN}
|
||||
\alias{4MRGN}
|
||||
\alias{custom_mdro_guideline}
|
||||
\alias{brmo}
|
||||
\alias{mrgn}
|
||||
\alias{mdr_tb}
|
||||
@ -29,6 +30,8 @@ mdro(
|
||||
...
|
||||
)
|
||||
|
||||
custom_mdro_guideline(...)
|
||||
|
||||
brmo(x, guideline = "BRMO", ...)
|
||||
|
||||
mrgn(x, guideline = "MRGN", ...)
|
||||
@ -42,7 +45,7 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
|
||||
\arguments{
|
||||
\item{x}{a \link{data.frame} with antibiotics columns, like \code{AMX} or \code{amox}. Can be left blank for automatic determination.}
|
||||
|
||||
\item{guideline}{a specific guideline to follow. When left empty, the publication by Magiorakos \emph{et al.} (2012, Clinical Microbiology and Infection) will be followed, please see \emph{Details}.}
|
||||
\item{guideline}{a specific guideline to follow. Can also have \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}} as input. When left empty, the publication by Magiorakos \emph{et al.} (2012, Clinical Microbiology and Infection) will be followed, please see \emph{Details}.}
|
||||
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link[=as.mo]{as.mo()}}), defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
|
||||
|
||||
@ -64,18 +67,21 @@ Ordered \link{factor} with levels \code{Negative} < \code{Multi-drug-resistant (
|
||||
Ordered \link{factor} with levels \code{Negative} < \code{Mono-resistant} < \code{Poly-resistant} < \code{Multi-drug-resistant} < \verb{Extensively drug-resistant}
|
||||
\item German guideline - function \code{\link[=mrgn]{mrgn()}} or \code{\link[=mdro]{mdro(..., guideline = "MRGN")}}:\cr
|
||||
Ordered \link{factor} with levels \code{Negative} < \verb{3MRGN} < \verb{4MRGN}
|
||||
\item Everything else:\cr
|
||||
\item Everything else, except for custom guidelines:\cr
|
||||
Ordered \link{factor} with levels \code{Negative} < \verb{Positive, unconfirmed} < \code{Positive}. The value \code{"Positive, unconfirmed"} means that, according to the guideline, it is not entirely sure if the isolate is multi-drug resistant and this should be confirmed with additional (e.g. molecular) tests
|
||||
}
|
||||
}
|
||||
\description{
|
||||
Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
|
||||
Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national and custom guidelines.
|
||||
}
|
||||
\details{
|
||||
These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}.
|
||||
|
||||
For the \code{pct_required_classes} argument, values above 1 will be divided by 100. This is to support both fractions (\code{0.75} or \code{3/4}) and percentages (\code{75}).
|
||||
|
||||
\strong{Note:} Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named \emph{order} Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu \emph{et al.} in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this \code{\link[=mdro]{mdro()}} function makes sure that results from before 2016 and after 2016 are identical.
|
||||
\subsection{International / National guidelines}{
|
||||
|
||||
Currently supported guidelines are (case-insensitive):
|
||||
\itemize{
|
||||
\item \code{guideline = "CMI2012"} (default)
|
||||
@ -99,8 +105,33 @@ The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WI
|
||||
}
|
||||
|
||||
Please suggest your own (country-specific) guidelines by letting us know: \url{https://github.com/msberends/AMR/issues/new}.
|
||||
}
|
||||
|
||||
\strong{Note:} Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named \emph{order} Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu \emph{et al.} in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this \code{\link[=mdro]{mdro()}} function makes sure that results from before 2016 and after 2016 are identical.
|
||||
\subsection{Custom guidelines}{
|
||||
|
||||
Custom guidelines can be set with the \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}} function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data.
|
||||
|
||||
If you are familiar with \code{case_when()} of the \code{dplyr} package, you will recognise the input method to set your own rules. Rules must be set using what \R considers to be the 'formula notation':\preformatted{custom <- custom_mdro_guideline("CIP == 'R' & age > 60" ~ "Elderly Type A",
|
||||
"ERY == 'R' & age > 60" ~ "Elderly Type B")
|
||||
}
|
||||
|
||||
If a row/an isolate matches the first rule, the value after the first \code{~} (in this case \emph{'Elderly Type A'}) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The number of rules is unlimited.
|
||||
|
||||
You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.\preformatted{custom
|
||||
#> A set of custom MDRO rules:
|
||||
#> 1. CIP == "R" & age > 60 -> "Elderly Type A"
|
||||
#> 2. ERY == "R" & age > 60 -> "Elderly Type B"
|
||||
#> 3. Otherwise -> "Negative"
|
||||
#>
|
||||
#> Unmatched rows will return NA.
|
||||
}
|
||||
|
||||
The outcome of the function can be used for the \code{guideline} argument in the \code{\link[=mdro]{mdro()}} function:\preformatted{x <- mdro(example_isolates, guideline = custom)
|
||||
table(x)
|
||||
}
|
||||
|
||||
The rules set (the \code{custom} object in this case) could be exported to a shared file location using \code{\link[=saveRDS]{saveRDS()}} if you collaborate with multiple users. The custom rules set could then be imported using \code{\link[=readRDS]{readRDS()}},
|
||||
}
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
|
||||
@ -142,6 +173,10 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
|
||||
\examples{
|
||||
mdro(example_isolates, guideline = "EUCAST")
|
||||
|
||||
mdro(example_isolates,
|
||||
guideline = custom_mdro_guideline("AMX == 'R'" ~ "Custom MDRO 1",
|
||||
"VAN == 'R'" ~ "Custom MDRO 2"))
|
||||
|
||||
\donttest{
|
||||
if (require("dplyr")) {
|
||||
example_isolates \%>\%
|
||||
|
Reference in New Issue
Block a user