Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national and custom guidelines.
mdro(
x = NULL,
guideline = "CMI2012",
col_mo = NULL,
info = interactive(),
pct_required_classes = 0.5,
combine_SI = TRUE,
verbose = FALSE,
only_rsi_columns = FALSE,
...
)
custom_mdro_guideline(..., as_factor = TRUE)
brmo(x = NULL, only_rsi_columns = FALSE, ...)
mrgn(x = NULL, only_rsi_columns = FALSE, ...)
mdr_tb(x = NULL, only_rsi_columns = FALSE, ...)
mdr_cmi2012(x = NULL, only_rsi_columns = FALSE, ...)
eucast_exceptional_phenotypes(x = NULL, only_rsi_columns = FALSE, ...)
x | a data.frame with antibiotics columns, like |
---|---|
guideline | a specific guideline to follow, see sections Supported international / national guidelines and Using Custom Guidelines below. When left empty, the publication by Magiorakos et al. (see below) will be followed. |
col_mo | column name of the IDs of the microorganisms (see |
info | a logical to indicate whether progress should be printed to the console, defaults to only print while in interactive sessions |
pct_required_classes | minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for S. aureus. Setting this |
combine_SI | a logical to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the |
verbose | a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not. |
only_rsi_columns | a logical to indicate whether only antibiotic columns must be detected that were transformed to class |
... | in case of |
as_factor | a logical to indicate whether the returned value should be an ordered factor ( |
See the supported guidelines above for the list of publications used for this function.
CMI 2012 paper - function mdr_cmi2012()
or mdro()
:
Ordered factor with levels Negative
< Multi-drug-resistant (MDR)
< Extensively drug-resistant (XDR)
< Pandrug-resistant (PDR)
TB guideline - function mdr_tb()
or mdro(..., guideline = "TB")
:
Ordered factor with levels Negative
< Mono-resistant
< Poly-resistant
< Multi-drug-resistant
< Extensively drug-resistant
German guideline - function mrgn()
or mdro(..., guideline = "MRGN")
:
Ordered factor with levels Negative
< 3MRGN
< 4MRGN
Everything else, except for custom guidelines:
Ordered factor with levels Negative
< Positive, unconfirmed
< Positive
. The value "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
These functions are context-aware. This means that the x
argument can be left blank if used inside a data.frame call, see Examples.
For the pct_required_classes
argument, values above 1 will be divided by 100. This is to support both fractions (0.75
or 3/4
) and percentages (75
).
Note: Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named order Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu 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 mdro()
function makes sure that results from before 2016 and after 2016 are identical.
Currently supported guidelines are (case-insensitive):
guideline = "CMI2012"
(default)
Magiorakos AP, Srinivasan A et al. "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance." Clinical Microbiology and Infection (2012) (link)
guideline = "EUCAST3.2"
(or simply guideline = "EUCAST"
)
The European international guideline - EUCAST Expert Rules Version 3.2 "Intrinsic Resistance and Unusual Phenotypes" (link)
guideline = "EUCAST3.1"
The European international guideline - EUCAST Expert Rules Version 3.1 "Intrinsic Resistance and Exceptional Phenotypes Tables" (link)
guideline = "TB"
The international guideline for multi-drug resistant tuberculosis - World Health Organization "Companion handbook to the WHO guidelines for the programmatic management of drug-resistant tuberculosis" (link)
guideline = "MRGN"
The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; doi: 10.1186/s13756-015-0047-6
guideline = "BRMO"
The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) (ZKH)" (link)
Please suggest your own (country-specific) guidelines by letting us know: https://github.com/msberends/AMR/issues/new.
Custom guidelines can be set with the 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 the case_when()
function of the 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'. The rule is written before the tilde (~
) and the consequence of the rule is written after the tilde:
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 ~
(in this case '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.
custom
#> A set of custom MDRO rules:
#> 1. CIP is "R" and age is higher than 60 -> Elderly Type A
#> 2. ERY is "R" and age is higher than 60 -> Elderly Type B
#> 3. Otherwise -> Negative
#>
#> Unmatched rows will return NA.
The outcome of the function can be used for the guideline
argument in the mdro()
function:
x <- mdro(example_isolates,
guideline = custom)
table(x)
#> Negative Elderly Type A Elderly Type B
#> 1070 198 732
Rules can also be combined with other custom rules by using c()
:
x <- mdro(example_isolates,
guideline = c(custom,
custom_mdro_guideline(ERY == "R" & age > 50 ~ "Elderly Type C")))
table(x)
#> Negative Elderly Type A Elderly Type B Elderly Type C
#> 961 198 732 109
The rules set (the custom
object in this case) could be exported to a shared file location using saveRDS()
if you collaborate with multiple users. The custom rules set could then be imported using readRDS()
.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
To define antibiotics column names, leave as it is to determine it automatically with guess_ab_col()
or input a text (case-insensitive), or use NULL
to skip a column (e.g. TIC = NULL
to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
The following antibiotics are eligible for the functions eucast_rules()
and mdro()
. These are shown below in the format 'name (antimicrobial ID
, ATC code)', sorted alphabetically:
Amikacin (AMK
, J01MA02), amoxicillin (AMX
, J01MA04), amoxicillin/clavulanic acid (AMC
, J01MA08), ampicillin (AMP
, J01MA16), ampicillin/sulbactam (SAM
, J01MA15), azidocillin (AZD
, J01MA11), azithromycin (AZM
, J01MA12), azlocillin (AZL
, J01MA07), aztreonam (ATM
, J01MA14), bacampicillin (BAM
, J01MA06), benzathine benzylpenicillin (BNB
, J01MA01), benzathine phenoxymethylpenicillin (BNP
, J01MA18), benzylpenicillin (PEN
, J01MA03), carbenicillin (CRB
, J01MA17), carindacillin (CRN
, J01MA10), cefacetrile (CAC
, J01MA09), cefaclor (CEC
, J01MA05), cefadroxil (CFR
, J01MA13), cefaloridine (RID
, J01CA01), cefamandole (MAN
, J01CA04), cefatrizine (CTZ
, J01CA12), cefazedone (CZD
, J01CR05), cefazolin (CZO
, J01CA13), cefdinir (CDR
, J01AA02), cefditoren (DIT
, J01FA10), cefepime (FEP
, J01FA09), cefetamet (CAT
, J01CR02), cefixime (CFM
, J01AA08), cefmenoxime (CMX
, J01FA06), cefmetazole (CMZ
, J01CF04), cefodizime (DIZ
, J01CF05), cefonicid (CID
, J01CR01), cefoperazone (CFP
, J01CE04), cefoperazone/sulbactam (CSL
, J01CA09), ceforanide (CND
, J01DF01), cefotaxime (CTX
, J01CA06), cefotetan (CTT
, J01CE08), cefotiam (CTF
, J01CE10), cefoxitin (FOX
, J01CE01), cefpiramide (CPM
, J01CA03), cefpirome (CPO
, J01CA05), cefpodoxime (CPD
, J01CE07), cefprozil (CPR
, J01CF02), cefroxadine (CRD
, J01CF01), cefsulodin (CFS
, J01CA07), ceftaroline (CPT
, J01CA18), ceftazidime (CAZ
, J01CA11), ceftazidime/clavulanic acid (CCV
, J01CA14), ceftezole (CTL
, J01CF03), ceftibuten (CTB
, J01CA10), ceftizoxime (CZX
, J01CE06), ceftobiprole medocaril (CFM1
, J01CE05), ceftolozane/enzyme inhibitor (CEI
, J01CE02), ceftriaxone (CRO
, J01CA02), cefuroxime (CXM
, J01CA08), cephalexin (LEX
, J01CE09), cephalothin (CEP
, J01CE03), cephapirin (HAP
, J01CG01), cephradine (CED
, J01CA16), chloramphenicol (CHL
, J01CR04), ciprofloxacin (CIP
, J01CA15), clarithromycin (CLR
, J01CG02), clindamycin (CLI
, J01CA17), clometocillin (CLM
, J01CR03), cloxacillin (CLO
, J01DB10), colistin (COL
, J01DC04), cycloserine (CYC
, J01DB05), dalbavancin (DAL
, J01DB02), daptomycin (DAP
, J01DC03), dibekacin (DKB
, J01DB07), dicloxacillin (DIC
, J01DB06), dirithromycin (DIR
, J01DB04), doripenem (DOR
, J01DD15), doxycycline (DOX
, J01DD16), enoxacin (ENX
, J01DE01), epicillin (EPC
, J01DD10), ertapenem (ETP
, J01DD08), erythromycin (ERY
, J01DD05), fleroxacin (FLE
, J01DC09), flucloxacillin (FLC
, J01DD09), flurithromycin (FLR1
, J01DC06), fosfomycin (FOS
, J01DD12), fusidic acid (FUS
, J01DD62), gatifloxacin (GAT
, J01DC11), gemifloxacin (GEM
, J01DD01), gentamicin (GEN
, J01DC05), grepafloxacin (GRX
, J01DC07), hetacillin (HET
, J01DC01), imipenem (IPM
, J01DD11), isepamicin (ISE
, J01DE02), josamycin (JOS
, J01DD13), kanamycin (KAN
, J01DC10), latamoxef (LTM
, J01DB11), levofloxacin (LVX
, J01DD03), lincomycin (LIN
, J01DI02), linezolid (LNZ
, J01DD02), lomefloxacin (LOM
, J01DD52), loracarbef (LOR
, J01DB12), mecillinam (Amdinocillin) (MEC
, J01DD14), meropenem (MEM
, J01DD07), meropenem/vaborbactam (MEV
, J01DI01), metampicillin (MTM
, J01DI54), methicillin (MET
, J01DD04), mezlocillin (MEZ
, J01DC02), midecamycin (MID
, J01DB01), minocycline (MNO
, J01DB03), miocamycin (MCM
, J01DB08), moxifloxacin (MFX
, J01DB09), nalidixic acid (NAL
, J01DD06), neomycin (NEO
, J01DC08), netilmicin (NET
, J01DH04), nitrofurantoin (NIT
, J01DH03), norfloxacin (NOR
, J01DH51), ofloxacin (OFX
, J01DH02), oleandomycin (OLE
, J01DH52), oritavancin (ORI
, J01XA02), oxacillin (OXA
, J01XA01), pazufloxacin (PAZ
, J01XC01), pefloxacin (PEF
, J01FA13), penamecillin (PNM
, J01FA01), phenethicillin (PHE
, J01FA14), phenoxymethylpenicillin (PHN
, J01FA07), piperacillin (PIP
, J01FA03), piperacillin/tazobactam (TZP
, J01FA11), pivampicillin (PVM
, J01FA05), pivmecillinam (PME
, J01FA12), polymyxin B (PLB
, J01FA02), pristinamycin (PRI
, J01FA15), procaine benzylpenicillin (PRB
, J01FA08), propicillin (PRP
, J01FF02), prulifloxacin (PRU
, J01FG01), quinupristin/dalfopristin (QDA
, J01FG02), ribostamycin (RST
, J04AB02), rifampicin (RIF
, J01XX09), rokitamycin (ROK
, J01XX08), roxithromycin (RXT
, J01AA07), rufloxacin (RFL
, J01XB01), sisomicin (SIS
, J01XB02), sparfloxacin (SPX
, J01XE01), spiramycin (SPI
, J01AA12), streptoduocin (STR
, J01EA01), streptomycin (STR1
, J01XX01), sulbactam (SUL
, J01BA01), sulbenicillin (SBC
, J01GB06), sulfadiazine (SDI
, J01GB09), sulfadiazine/trimethoprim (SLT1
, J01GB03), sulfadimethoxine (SUD
, J01GB11), sulfadimidine (SDM
, J01GB04), sulfadimidine/trimethoprim (SLT2
, J01GB05), sulfafurazole (SLF
, J01GB07), sulfaisodimidine (SLF1
, J01GB10), sulfalene (SLF2
, J01GB08), sulfamazone (SZO
, J01GA02), sulfamerazine (SLF3
, J01GA01), sulfamerazine/trimethoprim (SLT3
, J01GB01), sulfamethizole (SLF4
, J01EE01), sulfamethoxazole (SMX
, J01MB02), sulfamethoxypyridazine (SLF5
, J01FF01), sulfametomidine (SLF6
, J01XA04), sulfametoxydiazine (SLF7
, J01XA05), sulfametrole/trimethoprim (SLT4
, J01XA03), sulfamoxole (SLF8
, J04AB01), sulfamoxole/trimethoprim (SLT5
, J01XX11), sulfanilamide (SLF9
, J01EC02), sulfaperin (SLF10
, J01ED01), sulfaphenazole (SLF11
, J01EB03), sulfapyridine (SLF12
, J01EB05), sulfathiazole (SUT
, J01EB01), sulfathiourea (SLF13
, J01ED02), sultamicillin (SLT6
, J01ED09), talampicillin (TAL
, J01ED07), tazobactam (TAZ
, J01EB02), tedizolid (TZD
, J01EC01), teicoplanin (TEC
, J01ED05), telavancin (TLV
, J01ED03), telithromycin (TLT
, J01ED04), temafloxacin (TMX
, J01EC03), temocillin (TEM
, J01EB06), tetracycline (TCY
, J01ED06), ticarcillin (TIC
, J01ED08), ticarcillin/clavulanic acid (TCC
, J01EB04), tigecycline (TGC
, J01EB07), tobramycin (TOB
, J01EB08), trimethoprim (TMP
, J01EE02), trimethoprim/sulfamethoxazole (SXT
, J01EE05), troleandomycin (TRL
, J01EE07), trovafloxacin (TVA
, J01EE03), vancomycin (VAN
, J01EE04)
In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories R and S/I as shown below (https://www.eucast.org/newsiandr/).
R = Resistant
A microorganism is categorised as Resistant when there is a high likelihood of therapeutic failure even when there is increased exposure. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
S = Susceptible
A microorganism is categorised as Susceptible, standard dosing regimen, when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.
I = Increased exposure, but still susceptible
A microorganism is categorised as Susceptible, Increased exposure when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.
This AMR package honours this (new) insight. Use susceptibility()
(equal to proportion_SI()
) to determine antimicrobial susceptibility and count_susceptible()
(equal to count_SI()
) to count susceptible isolates.
On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data.
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 %>%
mdro() %>%
table()
# no need to define `x` when used inside dplyr verbs:
example_isolates %>%
mutate(MDRO = mdro(),
EUCAST = eucast_exceptional_phenotypes(),
BRMO = brmo(),
MRGN = mrgn())
}
# }