Skip to contents

Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines.

Usage

mdro(
  x = NULL,
  guideline = "CMI2012",
  col_mo = NULL,
  esbl = NA,
  carbapenemase = NA,
  mecA = NA,
  mecC = NA,
  vanA = NA,
  vanB = NA,
  info = interactive(),
  pct_required_classes = 0.5,
  combine_SI = TRUE,
  verbose = FALSE,
  only_sir_columns = FALSE,
  ...
)

custom_mdro_guideline(..., as_factor = TRUE)

brmo(x = NULL, only_sir_columns = FALSE, ...)

mrgn(x = NULL, only_sir_columns = FALSE, verbose = FALSE, ...)

mdr_tb(x = NULL, only_sir_columns = FALSE, verbose = FALSE, ...)

mdr_cmi2012(x = NULL, only_sir_columns = FALSE, verbose = FALSE, ...)

eucast_exceptional_phenotypes(
  x = NULL,
  only_sir_columns = FALSE,
  verbose = FALSE,
  ...
)

Source

See the supported guidelines above for the list of publications used for this function.

Arguments

x

a data.frame with antibiotics columns, like AMX or amox. Can be left blank for automatic determination.

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 names or codes of the microorganisms (see as.mo()) - the default is the first column of class mo. Values will be coerced using as.mo().

esbl

logical values, or a column name containing logical values, indicating the presence of an ESBL gene (or production of its proteins)

carbapenemase

logical values, or a column name containing logical values, indicating the presence of a carbapenemase gene (or production of its proteins)

mecA

logical values, or a column name containing logical values, indicating the presence of a mecA gene (or production of its proteins)

mecC

logical values, or a column name containing logical values, indicating the presence of a mecC gene (or production of its proteins)

vanA

logical values, or a column name containing logical values, indicating the presence of a vanA gene (or production of its proteins)

vanB

logical values, or a column name containing logical values, indicating the presence of a vanB gene (or production of its proteins)

info

a logical to indicate whether progress should be printed to the console - the default is 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 pct_required_classes argument to 0.5 (default) means that for every S. aureus isolate at least 8 different classes must be available. Any lower number of available classes will return NA for that isolate.

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 mdro() function, it follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using combine_SI = FALSE, resistance is considered when isolates are R or I.

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_sir_columns

a logical to indicate whether only antibiotic columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE)

...

in case of custom_mdro_guideline(): a set of rules, see section Using Custom Guidelines below. Otherwise: column name of an antibiotic, see section Antibiotics below.

as_factor

a logical to indicate whether the returned value should be an ordered factor (TRUE, default), or otherwise a character vector

Value

  • 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

Details

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.

Supported International / National Guidelines

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) (doi:10.1111/j.1469-0691.2011.03570.x )

  • guideline = "EUCAST3.3" (or simply guideline = "EUCAST")

    The European international guideline - EUCAST Expert Rules Version 3.3 "Intrinsic Resistance and Unusual Phenotypes" (link)

  • guideline = "EUCAST3.2"

    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 - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" (link)

    Also:

    • guideline = "BRMO 2017"

      The former Dutch national guideline - Werkgroep Infectiepreventie (WIP), RIVM, last revision as of 2017: "Bijzonder Resistente Micro-Organismen (BRMO)"

Please suggest to implement guidelines by letting us know: https://github.com/msberends/AMR/issues/new.

Using Custom Guidelines

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().

Antibiotics

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, J01GB06), amoxicillin (AMX, J01CA04), amoxicillin/clavulanic acid (AMC, J01CR02), ampicillin (AMP, J01CA01), ampicillin/sulbactam (SAM, J01CR01), apramycin (APR, QA07AA92), arbekacin (ARB, J01GB12), aspoxicillin (APX, J01CA19), azidocillin (AZD, J01CE04), azithromycin (AZM, J01FA10), azlocillin (AZL, J01CA09), aztreonam (ATM, J01DF01), bacampicillin (BAM, J01CA06), bekanamycin (BEK, J01GB13), benzathine benzylpenicillin (BNB, J01CE08), benzathine phenoxymethylpenicillin (BNP, J01CE10), benzylpenicillin (PEN, J01CE01), besifloxacin (BES, S01AE08), biapenem (BIA, J01DH05), carbenicillin (CRB, J01CA03), carindacillin (CRN, J01CA05), cefacetrile (CAC, J01DB10), cefaclor (CEC, J01DC04), cefadroxil (CFR, J01DB05), cefalexin (LEX, J01DB01), cefaloridine (RID, J01DB02), cefalotin (CEP, J01DB03), cefamandole (MAN, J01DC03), cefapirin (HAP, J01DB08), cefatrizine (CTZ, J01DB07), cefazedone (CZD, J01DB06), cefazolin (CZO, J01DB04), cefcapene (CCP, J01DD17), cefdinir (CDR, J01DD15), cefditoren (DIT, J01DD16), cefepime (FEP, J01DE01), cefetamet (CAT, J01DD10), cefiderocol (FDC, J01DI04), cefixime (CFM, J01DD08), cefmenoxime (CMX, J01DD05), cefmetazole (CMZ, J01DC09), cefodizime (DIZ, J01DD09), cefonicid (CID, J01DC06), cefoperazone (CFP, J01DD12), cefoperazone/sulbactam (CSL, J01DD62), ceforanide (CND, J01DC11), cefotaxime (CTX, J01DD01), cefotaxime/clavulanic acid (CTC, J01DD51), cefotetan (CTT, J01DC05), cefotiam (CTF, J01DC07), cefovecin (FOV, QJ01DD91), cefoxitin (FOX, J01DC01), cefozopran (ZOP, J01DE03), cefpiramide (CPM, J01DD11), cefpirome (CPO, J01DE02), cefpodoxime (CPD, J01DD13), cefprozil (CPR, J01DC10), cefquinome (CEQ, QG51AA07), cefroxadine (CRD, J01DB11), cefsulodin (CFS, J01DD03), ceftaroline (CPT, J01DI02), ceftazidime (CAZ, J01DD02), ceftazidime/clavulanic acid (CCV, J01DD52), cefteram (CEM, J01DD18), ceftezole (CTL, J01DB12), ceftibuten (CTB, J01DD14), ceftiofur (TIO, QJ01DD90), ceftizoxime (CZX, J01DD07), ceftobiprole medocaril (CFM1, J01DI01), ceftolozane/tazobactam (CZT, J01DI54), ceftriaxone (CRO, J01DD04), ceftriaxone/beta-lactamase inhibitor (CEB, J01DD63), cefuroxime (CXM, J01DC02), cephradine (CED, J01DB09), chloramphenicol (CHL, J01BA01), ciprofloxacin (CIP, J01MA02), clarithromycin (CLR, J01FA09), clindamycin (CLI, J01FF01), clometocillin (CLM, J01CE07), cloxacillin (CLO, J01CF02), colistin (COL, J01XB01), cycloserine (CYC, J04AB01), dalbavancin (DAL, J01XA04), danofloxacin (DAN, QJ01MA92), daptomycin (DAP, J01XX09), delafloxacin (DFX, J01MA23), dibekacin (DKB, J01GB09), dicloxacillin (DIC, J01CF01), difloxacin (DIF, QJ01MA94), dirithromycin (DIR, J01FA13), doripenem (DOR, J01DH04), doxycycline (DOX, J01AA02), enoxacin (ENX, J01MA04), enrofloxacin (ENR, QJ01MA90), epicillin (EPC, J01CA07), ertapenem (ETP, J01DH03), erythromycin (ERY, J01FA01), fleroxacin (FLE, J01MA08), flucloxacillin (FLC, J01CF05), flurithromycin (FLR1, J01FA14), fosfomycin (FOS, J01XX01), framycetin (FRM, D09AA01), fusidic acid (FUS, J01XC01), gamithromycin (GAM, QJ01FA95), garenoxacin (GRN, J01MA19), gatifloxacin (GAT, J01MA16), gemifloxacin (GEM, J01MA15), gentamicin (GEN, J01GB03), grepafloxacin (GRX, J01MA11), hetacillin (HET, J01CA18), imipenem (IPM, J01DH51), imipenem/relebactam (IMR, J01DH56), isepamicin (ISE, J01GB11), josamycin (JOS, J01FA07), kanamycin (KAN, J01GB04), kitasamycin (KIT, QJ01FA93), lascufloxacin (LSC, J01MA25), latamoxef (LTM, J01DD06), levofloxacin (LVX, J01MA12), levonadifloxacin (LND, J01MA24), lincomycin (LIN, J01FF02), linezolid (LNZ, J01XX08), lomefloxacin (LOM, J01MA07), loracarbef (LOR, J01DC08), marbofloxacin (MAR, QJ01MA93), mecillinam (MEC, J01CA11), meropenem (MEM, J01DH02), meropenem/vaborbactam (MEV, J01DH52), metampicillin (MTM, J01CA14), meticillin (MET, J01CF03), mezlocillin (MEZ, J01CA10), micronomicin (MCR, S01AA22), midecamycin (MID, J01FA03), minocycline (MNO, J01AA08), miocamycin (MCM, J01FA11), moxifloxacin (MFX, J01MA14), nadifloxacin (NAD, D10AF05), nafcillin (NAF, J01CF06), nalidixic acid (NAL, J01MB02), neomycin (NEO, J01GB05), netilmicin (NET, J01GB07), nitrofurantoin (NIT, J01XE01), norfloxacin (NOR, J01MA06), novobiocin (NOV, QJ01XX95), ofloxacin (OFX, J01MA01), oleandomycin (OLE, J01FA05), orbifloxacin (ORB, QJ01MA95), oritavancin (ORI, J01XA05), oxacillin (OXA, J01CF04), panipenem (PAN, J01DH55), pazufloxacin (PAZ, J01MA18), pefloxacin (PEF, J01MA03), penamecillin (PNM, J01CE06), pheneticillin (PHE, J01CE05), phenoxymethylpenicillin (PHN, J01CE02), piperacillin (PIP, J01CA12), piperacillin/tazobactam (TZP, J01CR05), pirlimycin (PRL, QJ51FF90), pivampicillin (PVM, J01CA02), pivmecillinam (PME, J01CA08), plazomicin (PLZ, J01GB14), polymyxin B (PLB, J01XB02), pradofloxacin (PRA, QJ01MA97), pristinamycin (PRI, J01FG01), procaine benzylpenicillin (PRB, J01CE09), propicillin (PRP, J01CE03), prulifloxacin (PRU, J01MA17), quinupristin/dalfopristin (QDA, QJ01FG02), ribostamycin (RST, J01GB10), rifampicin (RIF, J04AB02), rokitamycin (ROK, J01FA12), roxithromycin (RXT, J01FA06), rufloxacin (RFL, J01MA10), sarafloxacin (SAR, QJ01MA98), sisomicin (SIS, J01GB08), sitafloxacin (SIT, J01MA21), solithromycin (SOL, J01FA16), sparfloxacin (SPX, J01MA09), spiramycin (SPI, J01FA02), streptoduocin (STR, J01GA02), streptomycin (STR1, J01GA01), sulbactam (SUL, J01CG01), sulbenicillin (SBC, J01CA16), sulfadiazine (SDI, J01EC02), sulfadiazine/trimethoprim (SLT1, J01EE02), sulfadimethoxine (SUD, J01ED01), sulfadimidine (SDM, J01EB03), sulfadimidine/trimethoprim (SLT2, J01EE05), sulfafurazole (SLF, J01EB05), sulfaisodimidine (SLF1, J01EB01), sulfalene (SLF2, J01ED02), sulfamazone (SZO, J01ED09), sulfamerazine (SLF3, J01ED07), sulfamerazine/trimethoprim (SLT3, J01EE07), sulfamethizole (SLF4, J01EB02), sulfamethoxazole (SMX, J01EC01), sulfamethoxypyridazine (SLF5, J01ED05), sulfametomidine (SLF6, J01ED03), sulfametoxydiazine (SLF7, J01ED04), sulfametrole/trimethoprim (SLT4, J01EE03), sulfamoxole (SLF8, J01EC03), sulfamoxole/trimethoprim (SLT5, J01EE04), sulfanilamide (SLF9, J01EB06), sulfaperin (SLF10, J01ED06), sulfaphenazole (SLF11, J01ED08), sulfapyridine (SLF12, J01EB04), sulfathiazole (SUT, J01EB07), sulfathiourea (SLF13, J01EB08), sultamicillin (SLT6, J01CR04), talampicillin (TAL, J01CA15), tazobactam (TAZ, J01CG02), tebipenem (TBP, J01DH06), tedizolid (TZD, J01XX11), teicoplanin (TEC, J01XA02), telavancin (TLV, J01XA03), telithromycin (TLT, J01FA15), temafloxacin (TMX, J01MA05), temocillin (TEM, J01CA17), tetracycline (TCY, J01AA07), ticarcillin (TIC, J01CA13), ticarcillin/clavulanic acid (TCC, J01CR03), tigecycline (TGC, J01AA12), tilbroquinol (TBQ, P01AA05), tildipirosin (TIP, QJ01FA96), tilmicosin (TIL, QJ01FA91), tobramycin (TOB, J01GB01), tosufloxacin (TFX, J01MA22), trimethoprim (TMP, J01EA01), trimethoprim/sulfamethoxazole (SXT, J01EE01), troleandomycin (TRL, J01FA08), trovafloxacin (TVA, J01MA13), tulathromycin (TUL, QJ01FA94), tylosin (TYL, QJ01FA90), tylvalosin (TYL1, QJ01FA92), vancomycin (VAN, J01XA01)

Interpretation of SIR

In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I, and R as shown below (https://www.eucast.org/newsiandr):

  • S - Susceptible, standard dosing regimen
    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 - Susceptible, increased exposure
    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.

  • 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.

This AMR package honours this insight. Use susceptibility() (equal to proportion_SI()) to determine antimicrobial susceptibility and count_susceptible() (equal to count_SI()) to count susceptible isolates.

Examples

out <- mdro(example_isolates, guideline = "EUCAST")
str(out)
#>  Ord.factor w/ 3 levels "Negative"<"Positive, unconfirmed"<..: 1 1 1 1 1 1 1 1 1 1 ...
table(out)
#> out
#>              Negative Positive, unconfirmed              Positive 
#>                  1994                     0                     6 

out <- mdro(example_isolates,
  guideline = custom_mdro_guideline(
    AMX == "R" ~ "Custom MDRO 1",
    VAN == "R" ~ "Custom MDRO 2"
  )
)
table(out)
#> out
#>      Negative Custom MDRO 1 Custom MDRO 2 
#>           870           804           326 

# \donttest{
if (require("dplyr")) {
  example_isolates %>%
    mdro() %>%
    table()

  # no need to define `x` when used inside dplyr verbs:
  example_isolates %>%
    mutate(MDRO = mdro()) %>%
    pull(MDRO) %>%
    table()
}
#> Warning: in mdro(): NA introduced for isolates where the available percentage of
#> antimicrobial classes was below 50% (set with pct_required_classes)
#> Warning: There was 1 warning in `mutate()`.
#>  In argument: `MDRO = mdro()`.
#> Caused by warning:
#> ! in mdro(): NA introduced for isolates where the available percentage of
#> antimicrobial classes was below 50% (set with pct_required_classes)
#> .
#>                         Negative       Multi-drug-resistant (MDR) 
#>                             1617                              128 
#> Extensively drug-resistant (XDR)          Pandrug-resistant (PDR) 
#>                                0                                0 
# }