83 Commits
Author SHA1 Message Date
Claude eae14d44bf Restrict dev-versions and old-tinytest CI to main branch only
Both workflows were triggering on every push to every branch.
Narrowed push trigger to [main] so they only run after merging,
not on every feature/PR branch push.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 23:09:02 +00:00
Claude 11c175ae19 Slim CI matrix for PRs to ubuntu-latest / r-release only
For pull requests, check-recent now runs a single job (ubuntu-latest,
r-release) via a setup job that emits the matrix as JSON. On push and
schedule the full matrix is unchanged (devel + release on all OSes,
oldrel-1 through oldrel-4).

Also removed the pull_request trigger from check-recent-dev-pkgs; the
dev-packages check only needs to run on push/schedule.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 23:06:36 +00:00
Claude ec3b12b937 Fix regexec() calls: remove perl=TRUE unsupported in older R
regexec() only gained the perl argument in R 4.1.0. The CI matrix
covers oldrel-1 through oldrel-4 (R 3.x/4.0.x), so perl=TRUE caused
an 'unused argument' error on every message_() call in those
environments.

All four affected regexec() calls use POSIX-extended compatible
patterns, so dropping perl=TRUE is safe.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:56:44 +00:00
Claude 5ecbc9001e Fix {.topic} to use required pkg::topic format with display text
{.topic} in cli requires a package-qualified topic reference to generate
a valid x-r-help:pkg::topic URI. Bare {.topic AMR-options} produced a
malformed x-r-help:AMR-options URI (no package prefix).

Use the [display_text](pkg::topic) form throughout:
  {.topic [AMR-options](AMR::AMR-options)}
  {.topic [AMR-deprecated](AMR::AMR-deprecated)}

The hyphen in the topic name is fine as a URI string even though
AMR::AMR-options is not a valid R symbol expression.

The fallback handler in format_message() already handles the [text](uri)
form by extracting the display text, so plain-text output is unchanged.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:47:38 +00:00
Claude 8760c6d85a Add {.topic} markup for non-function help page references
Replace {.code ?AMR-options} and backtick-style ?AMR-options / ?AMR-deprecated
references with proper {.topic AMR-options} / {.topic AMR-deprecated} cli markup
in count.R, interpretive_rules.R, proportion.R, and zz_deprecated.R.

Add {.topic} fallback handler to format_message() in aa_helper_functions.R:
plain-text environments render {.topic foo} as ?foo, and the [text](topic)
link form extracts just the display text (same pattern as {.help}).

Also convert remaining backtick function/arg references in proportion.R to
{.help [{.fun ...}](AMR::...)}, {.arg}, and {.code} markup for consistency.

Note: zzz.R intentionally keeps the backtick form since its startup message
goes through packageStartupMessage() which bypasses our cli infrastructure.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:41:43 +00:00
Claude 3928a3de55 Fix {.help} markup to use correct cli link format [{.fun fn}](AMR::fn)
Replace all instances of {.help AMR::fn}() (incorrect format with manual
parentheses outside the link) with {.help [{.fun fn}](AMR::fn)} which is
the correct cli hyperlink syntax: the display text [{.fun fn}] renders the
function name with parentheses automatically, and (AMR::fn) is the link target.

Also update the plain-text fallback handler in aa_helper_functions.R to
extract the display text from the [text](topic) markdown link format,
so that non-cli environments show just the function name (e.g. `fn()`),
not the raw link markup.

Dynamic cases in amr_selectors.R and mo_property.R also updated.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:37:46 +00:00
Claude 10c00ff606 Implement cli::code_highlight() for R code examples in messages (issue #191)
Add highlight_code() helper that wraps cli::code_highlight() when cli >= 3.0.0
is available, falling back to plain code otherwise. Apply it to all inline
R code examples embedded in message/warning/stop strings across the package.

Also convert remaining backtick-quoted function and argument references in
messaging calls to proper cli markup: {.help AMR::fn}(), {.arg arg},
{.code expr}, and {.pkg pkg} throughout ab.R, ab_from_text.R, av_from_text.R,
amr_selectors.R, count.R, custom_antimicrobials.R, custom_microorganisms.R,
interpretive_rules.R, mo.R, mo_property.R, sir.R, sir_calc.R.

Fixes #191

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:23:39 +00:00
Claude b7edf3e548 Require cli >= 3.0.0 for cli_inform/cli_warn/cli_abort availability checks
cli_inform, cli_warn, and cli_abort were introduced in cli 3.0.0.
Add min_version = "3.0.0" (as character) to all four pkg_is_available("cli")
checks so older cli versions fall back to base R messaging.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:14:30 +00:00
Claude 0cc154257a Qualify all {.help} tags with AMR:: and convert backtick ?func references
- Add AMR:: namespace prefix and trailing () to all {.help} cli markup
  so they render as clickable help links (e.g. {.help AMR::as.sir}())
- Convert `?funcname` backtick-quoted help references to {.help AMR::funcname}()
  in aa_helper_functions.R, custom_eucast_rules.R, interpretive_rules.R,
  key_antimicrobials.R, mo.R, plotting.R, resistance_predict.R, and sir.R
- Skipped `?proportion` in sir_calc.R as 'proportion' is not exported

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 20:06:52 +00:00
Claude 4798d2c55e Replace {.fun} with {.help} for all exported functions in messaging
All function names referenced via {.fun …} in cli-style messages are
exported in NAMESPACE, so {.help …} is the appropriate markup — it
renders as a clickable help link rather than plain function styling.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 16:06:30 +00:00
Claude ad31fba556 Modernise messaging infrastructure with cli support
Rewrites message_(), warning_(), stop_() to use cli::cli_inform(),
cli::cli_warn(), and cli::cli_abort() when the cli package is available,
with a fully functional plain-text fallback for environments without cli.

Key changes:
- New cli_to_plain() helper converts cli inline markup ({.fun}, {.arg},
  {.val}, {.field}, {.cls}, {.pkg}, {.href}, {.url}, etc.) to readable
  plain-text equivalents for the non-cli fallback path
- word_wrap() simplified: drops add_fn, ANSI re-index algorithm, RStudio
  link injection, and operator spacing hack; returns pasted input unchanged
  when cli is available
- stop_() no longer references AMR_env$cli_abort; uses pkg_is_available()
  directly; passes sys.call() objects to cli::cli_abort() call= argument
- Removed add_fn parameter from message_(), warning_(), and word_wrap()
- All call sites across R/ updated: add_fn arguments removed, some paste0-
  based string construction converted to cli glue syntax ({.fun as.mo},
  {.arg col_mo}, {n} results, etc.)
- cli already listed in Suggests; no DESCRIPTION dependency changes needed

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 12:10:17 +00:00
dr. M.S. (Matthijs) Berends 8439e9c1d2 (v3.0.1.9035) fix loading in Positron 2026-03-18 10:32:11 +01:00
dr. M.S. (Matthijs) Berends 4dc3ec0008 (v3.0.1.9034) Add amr_course() 2026-03-11 16:07:31 +01:00
dr. M.S. (Matthijs) Berends 353eaa3f38 (v3.0.1.9033) add ionophores(), clorobiocin, aminocoumarins group 2026-03-09 11:57:36 +01:00
dr. M.S. (Matthijs) Berends cba315c2e7 (v3.0.1.9032) fix unit tests 2026-03-08 20:36:15 +01:00
dr. M.S. (Matthijs) Berends b6f8584994 (v3.0.1.9031) fix MDRO for non-RStudio terminal 2026-03-08 11:30:18 +01:00
dr. M.S. (Matthijs) Berends e2102c081a (v3.0.1.9030) fix R 3.6 2026-03-07 18:07:24 +01:00
Matthijs BerendsandClaude 9af726dcaa mdro(): infer base drug resistance from drug+inhibitor combination co… (#263)
* mdro(): infer base drug resistance from drug+inhibitor combination columns (#209)

When a base beta-lactam column (e.g., piperacillin/PIP) is absent but a
corresponding drug+inhibitor combination (e.g., piperacillin/tazobactam/TZP)
is present and resistant, resistance in the base drug is now correctly
inferred. This is clinically sound: resistance in a combination implies the
inhibitor provided no benefit, so the base drug is also resistant.

Susceptibility in a combination is NOT propagated to the base drug (the
inhibitor may be responsible for susceptibility), so only R values are
inferred; missing base drugs remain NA otherwise.

Implementation details:
- Uses AB_BETALACTAMS_WITH_INHIBITOR to identify all beta-lactam+inhibitor
  combinations present in the user's data
- Derives base drug AB codes by stripping the "/inhibitor" part from names
- Creates synthetic proxy columns (.sir_proxy_<AB>) in x, set to "R" when
  any matching combination is R, otherwise NA
- Proxy columns are added to cols_ab before drug variable assignment,
  so all existing guideline logic benefits without any changes
- Multiple combos for the same base drug are OR-ed (any R → R)
- Adds internal ab_without_inhibitor() helper for the name->base mapping
- Verbose mode reports which combinations are used for inference

Bumps version: 3.0.1.9028 -> 3.0.1.9029

https://claude.ai/code/session_01Cp154UtssHg84bw38xiiTG

* Add sir.R/mic.R fixes and mdro() unit tests; bump to 3.0.1.9030

R/sir.R (line 571):
  Guard purely numeric strings (e.g. "1", "8") from the Unicode letter
  filter. Values matching the broad SIR regex but consisting only of digits
  must not be stripped; add `x %unlike% "^[0-9+]$"` predicate.

R/mic.R (lines 220-222):
  Preserve the letter 'e' during Unicode-letter removal so that MIC values
  in scientific notation (e.g. "1e-3", "2.5e-2") survive the cleaning step.
  - Line 220: [\\p{L}] → [^e\\P{L}]  (remove all letters except 'e')
  - Line 222: [^0-9.><= -]+ → [^0-9e.><= -]+  (allow 'e' in whitelist)

tests/testthat/test-mdro.R:
  New tests for the drug+inhibitor inference added in the previous commit
  (issue #209):
  - TZP=R with no PIP column → PIP inferred R → MDRO class elevated
  - TZP=S with no PIP column → proxy col is NA (not S) → class lower
  - verbose mode emits "Inferring resistance" message
  - AMC=R with no AMX column runs without error (Enterococcus faecium)

https://claude.ai/code/session_01Cp154UtssHg84bw38xiiTG

* Fix version to single bump (9029) and update CLAUDE.md versioning rules

CLAUDE.md: Rewrite the "Version and date bump" subsection to document that:
- Exactly ONE version bump is allowed per PR (PRs are squash-merged into one
  commit on the default branch, so one commit = one version increment)
- The correct version is computed from git history:
    currentversion="${currenttag}.$((commits_since_tag + 9001 + 1))"
  with the +1 accounting for the PR's own squash commit not yet on the
  default branch
- Fall back to incrementing DESCRIPTION's version by 1 if git describe fails
- The Date: field tracks the date of the *last* PR commit (updated each time)

DESCRIPTION / NEWS.md: Correct the version from 3.0.1.9030 back to 3.0.1.9029.
Two version bumps were made across two commits in this PR; since it will be
squash-merged as one commit only one bump is correct. Also update Date to
today (2026-03-07).

https://claude.ai/code/session_01Cp154UtssHg84bw38xiiTG

* Fix stats::setNames, test accessor bug, and version script verification

R/mdro.R:
  Qualify setNames() as stats::setNames() in the drug+inhibitor inference
  block to satisfy R CMD CHECK's global-function checks.

tests/testthat/test-mdro.R:
  mdro() with verbose=FALSE returns an atomic ordered factor, not a
  data.frame. Fix three test errors introduced in the previous commit:
  - Line 320: result_no_pip$MDRO -> result_no_pip (factor, no $ accessor)
  - Line 328: result_tzp_s$MDRO / result_no_pip$MDRO -> direct factor refs
  - Line 347: expect_inherits(..., "data.frame") -> c("factor","ordered")
  Also fix the comment on line 347 to match the actual return type.

Version: confirmed at 3.0.1.9029 (no further bump; one bump already made
this PR). git describe failed (no tags in dev environment) — fallback
applies. The +1 in CLAUDE.md's formula is correct for tagged repos:
currentcommit + 9001 + 1 = 27 + 9001 + 1 = 9029 ✓

https://claude.ai/code/session_01Cp154UtssHg84bw38xiiTG

* Fix unit tests: use mrgn guideline and expect_message() for proxy tests

Three failures corrected:

1. Classification tests (lines 321, 329): The EUCAST guideline for
   P. aeruginosa already has OR logic (PIP OR TZP), so TZP=R alone
   satisfies it regardless of whether the PIP proxy exists. Switch to
   guideline="mrgn": the MRGN 4MRGN criterion for P. aeruginosa
   requires PIP=R explicitly (lines 1488-1496 of mdro.R), with no TZP
   fallback. Without the proxy: PIP missing -> not 4MRGN -> level 1.
   With the proxy (TZP=R infers PIP=R): 4MRGN reached -> level 3.
   The TZP=S case leaves proxy=NA, so PIP is still absent effectively
   -> level 1, which is < level 3 as expected.

2. Verbose/message test (line 335): message_() routes through message()
   to stderr, not cat() to stdout. expect_output() only captures stdout
   so it always saw nothing. Fix: use expect_message() instead, and
   remove the inner suppressMessages() that was swallowing the message
   before expect_message() could capture it.

Also trim two stale lines left over from the old expect_output block.

https://claude.ai/code/session_01Cp154UtssHg84bw38xiiTG

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-07 18:06:55 +01:00
dr. M.S. (Matthijs) Berends daab605ca4 (v3.0.1.9028) fix unique CIDs 2026-03-06 18:53:42 +01:00
dr. M.S. (Matthijs) Berends c0a394008e (v3.0.1.9027) Fixes #252 and add documentation update regarding #253 2026-03-06 13:10:33 +01:00
dr. M.S. (Matthijs) Berends 60e8f2bae6 (v3.0.1.9026) fix ab_group(NA) 2026-03-06 12:41:27 +01:00
Matthijs BerendsandClaude 4e3ea95fbd Claude/fix issue 245 (#262)
* fix: restore valid AB codes mangled by generalise_antibiotic_name() (#245)

When as.ab() received a vector containing both valid AB codes (like ETH,
PHN, PHE, STH, THA, MTH, THI1) and an untranslatable value, the fast
path at line 100 was skipped. The slow path then applied
generalise_antibiotic_name(), which rewrites "TH"->"T" and "PH"->"F",
mangling these short AB codes (e.g. ETH->"ET", PHN->"FN") so they could
no longer be found in the lookup table.

Fix: save the pre-generalised values before applying
generalise_antibiotic_name(), then restore any elements that were already
valid AB codes in their original form.

https://claude.ai/code/session_01Sujw89qa48NoUmMPDBJLz9

* fix: use toupper() in AB code restoration to handle lowercase input (#245)

Ensures that lowercase user input (e.g. 'eth', 'phn') is matched
case-insensitively against the uppercase AB codes in $ab, and that
the restored value is stored in uppercase to match the lookup table.

https://claude.ai/code/session_01Sujw89qa48NoUmMPDBJLz9

* revert: remove unnecessary toupper() since x is already uppercased

https://claude.ai/code/session_01Sujw89qa48NoUmMPDBJLz9

* Revise versioning and date bump requirements for PRs

Updated versioning instructions for pull requests to include date bump.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 08:59:44 +01:00
dr. M.S. (Matthijs) Berends 0311834035 Merge branch 'main' of https://github.com/msberends/AMR 2026-03-03 15:44:34 +01:00
dr. M.S. (Matthijs) Berends b6211931f8 (v3.0.1.9022) add ceftibuten/avibactam (CTA), kasugamycin (KAS), ostreogrycin (OST), thiostrepton (THS), xeruborbactam (XER), zorbamycin (ZOR) 2026-03-03 15:41:08 +01:00
Matthijs BerendsandClaude 2c21eba04c add CLAUDE.md with project context for Claude Code (#261)
* add CLAUDE.md with project context for Claude Code

Provides development commands, architecture overview, file conventions,
custom S3 classes, data files, testing setup, and versioning guidelines
to help Claude Code assist effectively in this repository.

https://claude.ai/code/session_01L3fTxqsg3Gc6J1znpWN1Mx

* add CLAUDE.md to .Rbuildignore

Excludes the Claude Code context file from the R package build tarball.

https://claude.ai/code/session_01L3fTxqsg3Gc6J1znpWN1Mx

* document version-bump requirement for every PR in CLAUDE.md

Each PR must increment the .9zzz dev counter by 1 in both
DESCRIPTION (Version: field) and NEWS.md (top-level heading).

https://claude.ai/code/session_01L3fTxqsg3Gc6J1znpWN1Mx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 17:13:11 +01:00
dr. M.S. (Matthijs) Berends 12cf144b19 (v3.0.1.9021) add guideline to resistance() and susceptibility() 2026-02-12 20:34:06 +01:00
dr. M.S. (Matthijs) Berends 499c830ee7 (v3.0.1.9020) unit test fixes 2026-02-09 13:16:36 +01:00
dr. M.S. (Matthijs) Berends ba4c159154 (v3.0.1.9019) Wildtype/Non-wildtype support, and start with interpretive_rules()
Fixes #246
Fixes #254
Fixes #255
Fixes #256
2026-02-08 23:15:40 +01:00
dr. M.S. (Matthijs) Berends 2df2911cf4 (v3.0.1.9018) fixes #249
updates AB groups
2026-01-16 10:57:03 +01:00
dr. M.S. (Matthijs) Berends fd50c51543 (v3.0.1.9017) fix documentation 2026-01-08 14:03:02 +01:00
dr. M.S. (Matthijs) Berends cfd1922dd9 (v3.0.1.9016) fix unit test 2026-01-08 12:29:08 +01:00
dr. M.S. (Matthijs) Berends 7df28bce28 (v3.0.1.9015) fix translations 2026-01-08 10:21:48 +01:00
dr. M.S. (Matthijs) Berends 7b9c151241 (v3.0.1.9014) try-again fix 2026-01-07 15:10:21 +01:00
dr. M.S. (Matthijs) Berends 85e8e814e8 (v3.0.1.9013) fix translations 2026-01-07 13:30:54 +01:00
dr. M.S. (Matthijs) Berends fa827f27f4 (v3.0.1.9012) fix translations 2026-01-07 11:00:58 +01:00
dr. M.S. (Matthijs) Berends 9d1b4565f6 (v3.0.1.9008) fix #246
Merge branch 'main' of https://github.com/msberends/AMR

# Conflicts:
#	DESCRIPTION
#	NEWS.md
#	R/sysdata.rda
#	data/antibiotics.rda
2026-01-06 23:11:34 +01:00
dr. M.S. (Matthijs) Berends cfbbfb4fa5 (v3.0.1.9007) fix #246 2026-01-06 23:08:50 +01:00
dr. M.S. (Matthijs) Berends 35debe25ee (v3.0.1.9009) tidymodels vignette 2025-12-23 11:02:26 +01:00
RUG e9cf3d5572 (v3.0.1.9008) tidymodels vignette 2025-12-22 19:04:39 +01:00
RUG a5c6aa9fa8 (v3.0.1.9007) fix vignette 2025-12-22 09:34:58 +01:00
dr. M.S. (Matthijs) Berends f6e28ac95c (v3.0.1.9006) Fix website 2025-12-21 12:29:46 +01:00
dr. M.S. (Matthijs) Berends 151af21f38 (v3.0.1.9005) re-add tidymodels implementation 2025-12-21 12:19:43 +01:00
dr. M.S. (Matthijs) Berends 225c73f7e7 (v3.0.1.9004) Revamp as.sir() interpretation for capped MICs
Fixes #243
Fixes #244
2025-12-15 13:18:13 +01:00
dr. M.S. (Matthijs) Berends ba30b08f76 (v3.0.1.9003) Add taniborbactam and cefepime/taniborbactam 2025-11-24 11:24:02 +01:00
dr. M.S. (Matthijs) Berends d366949f1b (v3.0.1.9002) replace WHONET directives with their GitHub repo 2025-10-13 22:12:48 +02:00
dr. M.S. (Matthijs) Berends 0b24967b23 (v3.0.1.9001) fix antibiogram 2025-09-30 10:54:07 +02:00
dr. M.S. (Matthijs) Berends adee419f1c v3.0.1 2025-09-20 17:14:07 +01:00
dr. M.S. (Matthijs) Berends 33fb1849eb (v3.0.0.9036) Prepare for v3.0.1 2025-09-19 12:23:59 +01:00
dr. M.S. (Matthijs) Berends 13f2a864da (v3.0.0.9035) fix mo_pathogenicity unit test following MycoBank bugfix 2025-09-18 14:22:52 +01:00
dr. M.S. (Matthijs) Berends 10ba36821e (v3.0.0.9034) fix MycoBank synonyms 2025-09-18 13:58:34 +01:00
dr. M.S. (Matthijs) Berends 5796e8f3a4 (v3.0.0.9033) rename workflow 2025-09-15 09:10:54 +02:00
dr. M.S. (Matthijs) Berends b11866af57 (v3.0.0.9032) add GitHub Action for dev version of packages 2025-09-13 14:02:59 +02:00
dr. M.S. (Matthijs) Berends e8c99f2775 (v3.0.0.9031) fix for ggplot2 2025-09-12 16:52:59 +02:00
dr. M.S. (Matthijs) Berends 5b99888151 (v3.0.0.9030) fix NEWS 2025-09-11 14:41:28 +02:00
dr. M.S. (Matthijs) Berends c7b2acbeb6 (v3.0.0.9029) fix for vignette and envir data 2025-09-10 16:19:30 +02:00
dr. M.S. (Matthijs) Berends 1922fb5ff2 (v3.0.0.9028) fix as.ab() warning 2025-09-10 15:06:51 +02:00
dr. M.S. (Matthijs) Berends 4d7c4ca52c (v3.0.0.9027) skimr update and as.ab warning - fixes #234, fixes #232 2025-09-10 13:32:52 +02:00
dr. M.S. (Matthijs) Berends d5a568318b (v3.0.0.9026) fix tidymodels doc 2025-09-04 15:03:28 +02:00
dr. M.S. (Matthijs) Berends c1c49fa463 (v3.0.0.9025) fix todo tracker 2025-09-04 14:40:24 +02:00
dr. M.S. (Matthijs) Berends d2ced1db61 (v3.0.0.9024) fix todo tracker 2025-09-04 14:28:01 +02:00
dr. M.S. (Matthijs) Berends 3d40b20c10 (v3.0.0.9023) update todo tracker 2025-09-04 14:04:22 +02:00
dr. M.S. (Matthijs) Berends 3ba1b8a10a (v3.0.0.9022) postpone new features - we like a clearly focussed bugfix release first 2025-09-03 15:39:44 +02:00
dr. M.S. (Matthijs) Berends 0744c6feee (v3.0.0.9021) checkouts 2025-09-03 12:12:05 +02:00
dr. M.S. (Matthijs) Berends eca638529c new umcg logo and old CHECKOUT update 2025-09-03 11:49:10 +02:00
dr. M.S. (Matthijs) Berends 60bd631e1a (v3.0.0.9019) Fixes #229, #230, #227, #225 2025-09-01 16:56:55 +02:00
dr. M.S. (Matthijs) Berends 9b07a8573a (v3.0.0.9018) keep all reasons in mdro(), fixed #227 2025-08-07 16:23:47 +02:00
dr. M.S. (Matthijs) Berends fc72cf9324 (v3.0.0.9017) semantic versioning only on branch main 2025-07-28 12:24:52 +02:00
dr. M.S. (Matthijs) Berends 2f866985c9 (v3.0.0.9016) fix for plotting 2025-07-23 22:05:20 +02:00
RUG 6cb724a208 (v3.0.0.9015) plotting fix 2025-07-19 14:06:36 +02:00
dr. M.S. (Matthijs) Berends 49274f010b (v3.0.0.9014) fix plot colours 2025-07-18 15:57:48 +02:00
RUG 8da0f525b5 set lang for R<3.5 2025-07-17 22:58:34 +02:00
Nick Thomson 68442f3042 (v3.0.0.9012) Python wrapper fix 2025-07-17 19:43:07 +02:00
dr. M.S. (Matthijs) Berends 39ea5f6597 (v3.0.0.9011) allow names for age_groups() 2025-07-17 19:32:46 +02:00
dr. M.S. (Matthijs) Berends 65ec098acf (v3.0.0.9010) in as.sir(), add note when higher taxonomic levels are used 2025-07-17 19:06:12 +02:00
Nick Thomson e9e3de4469 (v3.0.0.9009) fix as.sir when uti = FALSE 2025-07-17 17:15:52 +02:00
dr. M.S. (Matthijs) Berends d94bdd2c6a (v3.0.0.9008) fix ggplot_sir(), support lighter green for SDD 2025-07-17 17:05:41 +02:00
dr. M.S. (Matthijs) Berends 8dab0a3730 (v3.0.0.9007) allow any tidyselect language in as.sir() 2025-07-17 14:29:35 +02:00
Matthijs Berends 0138e33ce9 Update 1-bug-report.yml 2025-06-22 20:47:31 +02:00
Matthijs Berends 1013ef6086 Update _pkgdown.yml 2025-06-13 17:05:51 +02:00
dr. M.S. (Matthijs) Berends 8fd8ee508f (v3.0.0.9004) random mic fix 2025-06-13 16:12:28 +02:00
dr. M.S. (Matthijs) Berends 72db2b2562 (v3.0.0.9003) eucast_rules fix, new tidymodels integration 2025-06-13 14:03:21 +02:00
dr. M.S. (Matthijs) Berends 3742e9e994 (v3.0.0.9002) website version nr 2025-06-06 09:37:25 +02:00
dr. M.S. (Matthijs) Berends 753f0e1ef9 (v3.0.0.9001) the first fixes 2025-06-04 13:10:20 +02:00
158 changed files with 13026 additions and 13515 deletions
+2
View File
@@ -9,6 +9,7 @@
^_pkgdown\.yml$ ^_pkgdown\.yml$
^appveyor\.yml$ ^appveyor\.yml$
^codecov\.yml$ ^codecov\.yml$
^CLAUDE\.md$
^cran-comments\.md$ ^cran-comments\.md$
^CRAN-RELEASE$ ^CRAN-RELEASE$
^\.github$ ^\.github$
@@ -40,3 +41,4 @@
^CRAN-SUBMISSION$ ^CRAN-SUBMISSION$
^PythonPackage$ ^PythonPackage$
^README\.Rmd$ ^README\.Rmd$
\.no_include$
+5 -5
View File
@@ -22,9 +22,9 @@ body:
label: Minimal Reproducible Example (optional) label: Minimal Reproducible Example (optional)
description: Please include a short R code snippet that reproduces the problem, if possible. description: Please include a short R code snippet that reproduces the problem, if possible.
placeholder: placeholder:
e.g. e.g.
```r ```r
ab_name("amoxicillin/clavulanic acid", language = "es") ab_name("amoxicillin/clavulanic acid", language = "es")
``` ```
validations: validations:
required: false required: false
@@ -42,7 +42,7 @@ body:
multiple: false multiple: false
options: options:
- '' - ''
- Latest CRAN version (2.1.1) - Latest CRAN version (3.0.1)
- One of the latest GitHub versions (2.1.1.9xxx) - One of the latest GitHub versions (3.0.1.9xxx)
validations: validations:
required: true required: true
+44 -43
View File
@@ -48,7 +48,6 @@ echo "Running prehook..."
if command -v Rscript > /dev/null; then if command -v Rscript > /dev/null; then
if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then
Rscript -e "source('data-raw/_pre_commit_checks.R')" Rscript -e "source('data-raw/_pre_commit_checks.R')"
currentpkg=$(Rscript -e "cat(pkgload::pkg_name())")
echo "- Adding changed files in ./data-raw and ./man to this commit" echo "- Adding changed files in ./data-raw and ./man to this commit"
git add data-raw/* git add data-raw/*
git add data/* git add data/*
@@ -57,60 +56,62 @@ if command -v Rscript > /dev/null; then
git add NAMESPACE git add NAMESPACE
else else
echo "- R package 'pkgload', 'devtools', or 'dplyr' not installed!" echo "- R package 'pkgload', 'devtools', or 'dplyr' not installed!"
currentpkg="your"
fi fi
else else
echo "- R is not available on your system!" echo "- R is not available on your system!"
currentpkg="your"
fi fi
echo "" echo ""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "Updating semantic versioning and date..." echo "Updating semantic versioning and date..."
# Get tags from remote and remove tags not on remote current_branch=$(git rev-parse --abbrev-ref HEAD)
git fetch origin --prune --prune-tags --quiet if [ "$current_branch" != "main" ]; then
currenttagfull=$(git describe --tags --abbrev=0) echo "- Current branch is '$current_branch'; skipping version/date update (only runs on 'main')"
currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
# Assume main branch to be 'main' or 'master'
defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
if [ "$currenttag" = "" ]; then
currenttag="0.0.1"
currentcommit=$(git rev-list --count ${defaultbranch})
echo "- No git tags found, creating one in format 'v(x).(y).(z)' - currently ${currentcommit} previous commits in '${defaultbranch}'"
else else
currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch}) # Version update logic begins here
echo "- Latest tag is '${currenttagfull}', with ${currentcommit} previous commits in '${defaultbranch}'"
fi # Get tags from remote and remove tags not on remote
git fetch origin --prune --prune-tags --quiet
# Combine tag and commit number currenttagfull=$(git describe --tags --abbrev=0)
currentversion="$currenttag.$((currentcommit + 9001))" currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
echo "- ${currentpkg} pkg version set to ${currentversion}"
# Assume main branch to be 'main' or 'master'
# Update version number and date in DESCRIPTION defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION if [ "$currenttag" = "" ]; then
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION currenttag="0.0.1"
echo "- Updated version number and date in ./DESCRIPTION" currentcommit=$(git rev-list --count ${defaultbranch})
rm -f DESCRIPTION-- echo "- No git tags found, creating one in format 'v(x).(y).(z)' - currently ${currentcommit} previous commits in '${defaultbranch}'"
git add DESCRIPTION else
currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
# Update version number in NEWS.md echo "- Latest tag is '${currenttagfull}', with ${currentcommit} previous commits in '${defaultbranch}'"
if [ -e "NEWS.md" ]; then
if [ "$currentpkg" = "your" ]; then
currentpkg=""
fi fi
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
echo "- Updated version number in ./NEWS.md" # Combine tag and commit number
rm -f NEWS.md-- currentversion="$currenttag.$((currentcommit + 9001))"
git add NEWS.md echo "- AMR pkg version set to ${currentversion}"
else
echo "- No NEWS.md found!" # Update version number and date in DESCRIPTION
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
echo "- Updated version number and date in ./DESCRIPTION"
rm -f DESCRIPTION--
git add DESCRIPTION
# Update version number in NEWS.md
if [ -e "NEWS.md" ]; then
sed -i -- "1s/.*/# AMR ${currentversion}/" NEWS.md
echo "- Updated version number in ./NEWS.md"
rm -f NEWS.md--
git add NEWS.md
else
echo "- No NEWS.md found!"
fi
echo ""
# Save the version number for use in the commit-msg hook
echo "${currentversion}" > .git/commit_version.tmp
fi fi
echo ""
# Save the version number for use in the commit-msg hook
echo "${currentversion}" > .git/commit_version.tmp
git add data-raw/* git add data-raw/*
git add data/* git add data/*
@@ -18,7 +18,7 @@
# This R package is free software; you can freely use and distribute # # This R package is free software; you can freely use and distribute #
# it for both personal and commercial purposes under the terms of the # # it for both personal and commercial purposes under the terms of the #
# GNU General Public License version 2.0 (GNU GPL-2), as published by # # GNU General Public License version 2.0 (GNU GPL-2), as published by #
# the Free Software Foundation. # the Free Software Foundation. #
# We created this package for both routine data analysis and academic # # We created this package for both routine data analysis and academic #
# research and it was publicly released in the hope that it will be # # research and it was publicly released in the hope that it will be #
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
@@ -29,17 +29,33 @@
on: on:
push: push:
branches: '**' branches: [main]
pull_request: schedule:
branches: '**' # also run a schedule everyday at 1 AM.
# this is to check that all dependencies are still available (see R/zzz.R)
- cron: '0 1 * * *'
name: lintr name: check-recent-dev-pkgs
jobs: jobs:
lintr: R-code-check:
runs-on: ubuntu-latest runs-on: ${{ matrix.config.os }}
continue-on-error: ${{ matrix.config.allowfail }}
name: ${{ matrix.config.os }} (dev-pkgs)
strategy:
fail-fast: false
matrix:
config:
# current 'release' version on Ubuntu
- {os: ubuntu-latest, r: 'release', allowfail: false}
env: env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -47,39 +63,21 @@ jobs:
- uses: r-lib/actions/setup-r@v2 - uses: r-lib/actions/setup-r@v2
with: with:
r-version: release r-version: ${{ matrix.config.r }}
# use RStudio Package Manager to quickly install packages use-public-rspm: false
use-public-rspm: true extra-repositories: >
https://tidyverse.r-universe.dev
https://r-lib.r-universe.dev
https://tidymodels.r-universe.dev
https://yihui.r-universe.dev
- uses: r-lib/actions/setup-r-dependencies@v2 - uses: r-lib/actions/setup-r-dependencies@v2
with: with:
extra-packages: | extra-packages: any::rcmdcheck
any::lintr needs: check
any::cyclocomp upgrade: 'TRUE'
any::roxygen2
any::devtools - uses: r-lib/actions/check-r-package@v2
any::usethis with:
upload-snapshots: true
- name: Remove unneeded folders build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
run: |
# do not check these folders
rm -rf data-raw
rm -rf tests
rm -rf vignettes
- name: Lint
run: |
# get ALL linters, not just default ones
linters <- getNamespaceExports(asNamespace("lintr"))
linters <- sort(linters[grepl("_linter$", linters)])
# lose deprecated
linters <- linters[!grepl("^(closed_curly|open_curly|paren_brace|semicolon_terminator|consecutive_stopifnot|no_tab|single_quotes|unnecessary_nested_if|unneeded_concatenation)_linter$", linters)]
linters <- linters[linters != "linter"]
# and the ones we find unnnecessary
linters <- linters[!grepl("^(commented_code|extraction_operator|implicit_integer|indentation|line_length|namespace|nonportable_path|object_length|object_name|object_usage|is)_linter$", linters)]
# put the functions in a list
linters_list <- lapply(linters, function(l) eval(parse(text = paste0("lintr::", l, "()")), envir = asNamespace("lintr")))
names(linters_list) <- linters
# run them all!
lintr::lint_package(linters = linters_list, exclusions = list("R/aa_helper_pm_functions.R"))
shell: Rscript {0}
+16 -17
View File
@@ -41,7 +41,22 @@ on:
name: check-recent name: check-recent
jobs: jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo 'matrix={"config":[{"os":"ubuntu-latest","r":"release","allowfail":false}]}' >> "$GITHUB_OUTPUT"
else
echo 'matrix={"config":[{"os":"windows-latest","r":"devel","allowfail":false},{"os":"ubuntu-latest","r":"devel","allowfail":false,"http-user-agent":"release"},{"os":"macOS-latest","r":"release","allowfail":true},{"os":"windows-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-1","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-2","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-3","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-4","allowfail":false}]}' >> "$GITHUB_OUTPUT"
fi
R-code-check: R-code-check:
needs: setup
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.config.os }}
continue-on-error: ${{ matrix.config.allowfail }} continue-on-error: ${{ matrix.config.allowfail }}
@@ -50,23 +65,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
config:
# current development version, check all major OSes:
# - {os: macOS-latest, r: 'devel', allowfail: true}
- {os: windows-latest, r: 'devel', allowfail: false}
- {os: ubuntu-latest, r: 'devel', allowfail: false, http-user-agent: 'release'}
# current 'release' version, check all major OSes:
- {os: macOS-latest, r: 'release', allowfail: true}
- {os: windows-latest, r: 'release', allowfail: false}
- {os: ubuntu-latest, r: 'release', allowfail: false}
# older versions (see also check-old-tinytest.yaml for even older versions):
- {os: ubuntu-latest, r: 'oldrel-1', allowfail: false}
- {os: ubuntu-latest, r: 'oldrel-2', allowfail: false}
- {os: ubuntu-latest, r: 'oldrel-3', allowfail: false}
- {os: ubuntu-latest, r: 'oldrel-4', allowfail: false}
env: env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+21 -9
View File
@@ -29,8 +29,8 @@
on: on:
push: push:
# only run after a git push on any branch in this repo # only run after a git push on the main branch
branches: '**' branches: [main]
name: check-old name: check-old
@@ -50,17 +50,24 @@ jobs:
# For these old versions, dependencies and vignettes will not be checked. # For these old versions, dependencies and vignettes will not be checked.
# For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R releases). # For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R releases).
- {os: ubuntu-latest, r: '3.6', allowfail: false} - {os: ubuntu-latest, r: '3.6', allowfail: false}
# - {os: windows-latest, r: '3.5', allowfail: true} # always fails, horrible with UTF-8 # - {os: windows-latest, r: '3.5', allowfail: false} # always fails, horrible with UTF-8
- {os: ubuntu-latest, r: '3.4', allowfail: false} # - {os: ubuntu-latest, r: '3.4', allowfail: false} # 3.1-3.4 now always fails with Error in grep(warn_re, lines, invert = TRUE, value = TRUE) attempt to set index 46/46 in SET_STRING_ELT
- {os: ubuntu-latest, r: '3.3', allowfail: false} # - {os: ubuntu-latest, r: '3.3', allowfail: false}
- {os: ubuntu-latest, r: '3.2', allowfail: false} # - {os: ubuntu-latest, r: '3.2', allowfail: false}
- {os: ubuntu-latest, r: '3.1', allowfail: false} # - {os: ubuntu-latest, r: '3.1', allowfail: false}
- {os: ubuntu-latest, r: '3.0', allowfail: false} - {os: ubuntu-latest, r: '3.0', allowfail: false}
env: env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
steps: steps:
- name: Set up locales
run: |
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2 - uses: r-lib/actions/setup-r@v2
@@ -69,9 +76,14 @@ jobs:
- uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-pandoc@v2
- name: Install tinytest from CRAN - name: Install suggested pkgs (and tinytest) from CRAN
run: | run: |
install.packages("tinytest", repos = "https://cran.r-project.org") desc_lines <- readLines('DESCRIPTION')
suggests <- readLines('DESCRIPTION')[grepl("^(Suggests:| )", readLines('DESCRIPTION'))]
suggests <- suggests[(which(grepl("^Suggests", suggests)) + 1):length(suggests)]
suggests <- gsub("[ ,]", "", suggests)
pkgs <- unique(c(suggests, "tinytest"))
for (p in pkgs) try(install.packages(p, repos = "https://cran.r-project.org"), silent = TRUE)
shell: Rscript {0} shell: Rscript {0}
- name: Show session info - name: Show session info
+4 -3
View File
@@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
PYPI_PAT: ${{ secrets.PYPI_PAT }} GH_REPO_SCOPE: ${{ secrets.GH_REPO_SCOPE }}
steps: steps:
- name: Checkout code - name: Checkout code
@@ -78,6 +78,7 @@ jobs:
cd PythonPackage/AMR cd PythonPackage/AMR
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# TODO - Support Miniconda and Anaconda too
# - name: Set up Miniconda # - name: Set up Miniconda
# continue-on-error: true # continue-on-error: true
# uses: conda-incubator/setup-miniconda@v2 # uses: conda-incubator/setup-miniconda@v2
@@ -117,7 +118,7 @@ jobs:
rm -rf PythonPackage rm -rf PythonPackage
git init git init
git remote add origin https://$PYPI_PAT@github.com/msberends/AMR git remote add origin https://$GH_REPO_SCOPE@github.com/msberends/AMR
git checkout --orphan python-wrapper git checkout --orphan python-wrapper
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -125,4 +126,4 @@ jobs:
git rm -rf . || true git rm -rf . || true
git add . git add .
git commit -m "Python wrapper update" git commit -m "Python wrapper update"
git push https://$PYPI_PAT@github.com/msberends/AMR.git python-wrapper --force git push https://$GH_REPO_SCOPE@github.com/msberends/AMR.git python-wrapper --force
@@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
PYPI_PAT: ${{ secrets.PYPI_PAT }} GH_REPO_SCOPE: ${{ secrets.GH_REPO_SCOPE }}
steps: steps:
- name: Checkout code - name: Checkout code
@@ -63,4 +63,4 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
git add latest_training_data.txt git add latest_training_data.txt
git commit -m "GPT training data update" git commit -m "GPT training data update"
git push https://$PYPI_PAT@github.com/msberends/amr-for-r-assistant.git main --force git push https://$GH_REPO_SCOPE@github.com/msberends/amr-for-r-assistant.git main --force
+84
View File
@@ -0,0 +1,84 @@
# ==================================================================== #
# TITLE: #
# AMR: An R Package for Working with Antimicrobial Resistance Data #
# #
# SOURCE CODE: #
# https://github.com/msberends/AMR #
# #
# PLEASE CITE THIS SOFTWARE AS: #
# Berends MS, Luz CF, Friedrich AW, et al. (2022). #
# AMR: An R Package for Working with Antimicrobial Resistance Data. #
# Journal of Statistical Software, 104(3), 1-31. #
# https://doi.org/10.18637/jss.v104.i03 #
# #
# Developed at the University of Groningen and the University Medical #
# Center Groningen in The Netherlands, in collaboration with many #
# colleagues from around the world, see our website. #
# #
# This R package is free software; you can freely use and distribute #
# it for both personal and commercial purposes under the terms of the #
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
# the Free Software Foundation. #
# We created this package for both routine data analysis and academic #
# research and it was publicly released in the hope that it will be #
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
on:
push:
# only on main
branches: "main"
name: Update TODO Tracker
jobs:
update-todo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate TODO list from R/
run: |
export TZ=Europe/Amsterdam
last_updated=$(date +"%e %B %Y %H:%M:%S %Z" | sed 's/^ *//')
echo "## \`TODO\` Report" > todo.md
echo "" >> todo.md
echo "**Last Updated: ${last_updated}**" >> todo.md
echo "" >> todo.md
echo "_This overview is automatically updated on each push to \`main\`. It provides an automated overview of all mentions of the text \`TODO\`._" >> todo.md
echo "" >> todo.md
todos=$(grep -rn --include=\*.{R,Rmd,yaml,yml,md,css,js} --exclude={todo-tracker.yml,todo.md} "TODO" . || true)
if [ -z "$todos" ]; then
echo "✅ No TODOs found." >> todo.md
else
echo "$todos" | awk -F: -v repo="https://github.com/msberends/AMR/blob/main/" '
{
file = $1
gsub("^\\./", "", file) # remove leading ./ if present
line = $2
text = substr($0, index($0,$3))
if (file != last_file) {
if (last_file != "") print "```"
print ""
print "### [`" file "`](" repo file ")"
print "```r"
last_file = file
}
printf "L%s: %s\n", line, text
}
' >> todo.md
echo "\`\`\`" >> todo.md
fi
- name: Update GitHub issue
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GH_REPO_SCOPE }}
issue-number: 231
comment-id: 3253439219
body-file: todo.md
edit-mode: replace
+4 -5
View File
@@ -42,16 +42,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: checkout
uses: actions/checkout@v4
with: with:
# this is to keep timestamps, the default fetch-depth: 1 gets the timestamps of the moment of cloning # this is to keep timestamps, the default fetch-depth: 1 gets the timestamps of the moment of cloning
# we need this for the download page on our website - dates must be of the files, not of the latest git push # we need this for the download page on our website - dates must be of the files, not of the latest git push
fetch-depth: 0 fetch-depth: 0
- name: Preserve timestamps - name: restore timestamps
run: | uses: chetan/git-restore-mtime-action@v2
sudo apt install git-restore-mtime
git restore-mtime
- uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-pandoc@v2
+1
View File
@@ -1,5 +1,6 @@
Meta Meta
doc doc
docs
.Renviron .Renviron
.Rproj.user .Rproj.user
.Rhistory .Rhistory
+183
View File
@@ -0,0 +1,183 @@
# CLAUDE.md — AMR R Package
This file provides context for Claude Code when working in this repository.
## Project Overview
**AMR** is a zero-dependency R package for antimicrobial resistance (AMR) data analysis using a One Health approach. It is peer-reviewed, used in 175+ countries, and supports 28 languages.
Key capabilities:
- SIR (Susceptible/Intermediate/Resistant) classification using EUCAST 20112025 and CLSI 20112025 breakpoints
- Antibiogram generation: traditional, combined, syndromic, and WISCA
- Microorganism taxonomy database (~79,000 species)
- Antimicrobial drug database (~620 drugs)
- Multi-drug resistant organism (MDRO) classification
- First-isolate identification
- Minimum Inhibitory Concentration (MIC) and disk diffusion handling
- Multilingual output (28 languages)
## Common Commands
All commands run inside an R session:
```r
# Rebuild documentation (roxygen2 → .Rd files + NAMESPACE)
devtools::document()
# Run all tests
devtools::test()
# Full package check (CRAN-level: docs + tests + checks)
devtools::check()
# Build pkgdown website locally
pkgdown::build_site()
# Code coverage report
covr::package_coverage()
```
From the shell:
```bash
# CRAN check from parent directory
R CMD check AMR
```
## Repository Structure
```
R/ # All R source files (62 files, ~28,000 lines)
man/ # Auto-generated .Rd documentation (do not edit manually)
tests/testthat/ # testthat test files (test-*.R) and helper-functions.R
data/ # Pre-compiled .rda datasets
data-raw/ # Scripts used to generate data/ files
vignettes/ # Rmd vignette articles
inst/ # Installed files (translations, etc.)
_pkgdown.yml # pkgdown website configuration
```
## R Source File Conventions
**Naming conventions in `R/`:**
| Prefix/Name | Purpose |
|---|---|
| `aa_*.R` | Loaded first (helpers, globals, options, package docs) |
| `zz_deprecated.R` | Deprecated function wrappers |
| `zzz.R` | `.onLoad` / `.onAttach` initialization |
**Key source files:**
- `aa_helper_functions.R` / `aa_helper_pm_functions.R` — internal utility functions (large; ~63 KB and ~37 KB)
- `aa_globals.R` — global constants and breakpoint lookup structures
- `aa_options.R``amr_options()` / `get_AMR_option()` system
- `mo.R` / `mo_property.R` — microorganism lookup and properties
- `ab.R` / `ab_property.R` — antimicrobial drug functions
- `av.R` / `av_property.R` — antiviral drug functions
- `sir.R` / `sir_calc.R` / `sir_df.R` — SIR classification engine
- `mic.R` / `disk.R` — MIC and disk diffusion classes
- `antibiogram.R` — antibiogram generation (traditional, combined, syndromic, WISCA)
- `first_isolate.R` — first-isolate identification algorithms
- `mdro.R` — MDRO classification (EUCAST, CLSI, CDC, custom guidelines)
- `amr_selectors.R` — tidyselect helpers for selecting AMR columns
- `interpretive_rules.R` / `custom_eucast_rules.R` — clinical interpretation rules
- `translate.R` — 28-language translation system
- `ggplot_sir.R` / `ggplot_pca.R` / `plotting.R` — visualisation functions
## Custom S3 Classes
The package defines five S3 classes with full print/format/plot/vctrs support:
| Class | Created by | Represents |
|---|---|---|
| `<mo>` | `as.mo()` | Microorganism code |
| `<ab>` | `as.ab()` | Antimicrobial drug code |
| `<av>` | `as.av()` | Antiviral drug code |
| `<sir>` | `as.sir()` | SIR value (S/I/R/SDD) |
| `<mic>` | `as.mic()` | Minimum inhibitory concentration |
| `<disk>` | `as.disk()` | Disk diffusion diameter |
## Data Files
Pre-compiled in `data/` (do not edit directly; regenerate via `data-raw/` scripts):
| File | Contents |
|---|---|
| `microorganisms.rda` | ~79,000 microbial species with full taxonomy |
| `antimicrobials.rda` | ~620 antimicrobial drugs with ATC codes |
| `antivirals.rda` | Antiviral drugs |
| `clinical_breakpoints.rda` | EUCAST + CLSI breakpoints (20112025) |
| `intrinsic_resistant.rda` | Intrinsic resistance patterns |
| `example_isolates.rda` | Example AMR dataset for documentation/testing |
| `WHONET.rda` | Example WHONET-format dataset |
## Zero-Dependency Design
The package has **no `Imports`** in `DESCRIPTION`. All optional integrations (ggplot2, dplyr, data.table, tidymodels, cli, crayon, etc.) are listed in `Suggests` and guarded with:
```r
if (requireNamespace("pkg", quietly = TRUE)) { ... }
```
Never add packages to `Imports`. If new functionality requires an external package, add it to `Suggests` and guard usage appropriately.
## Testing
- **Framework:** `testthat` (R ≥ 3.1); legacy `tinytest` used for R 3.03.6 CI
- **Test files:** `tests/testthat/test-*.R`
- **Helpers:** `tests/testthat/helper-functions.R`
- **CI matrix:** GitHub Actions across Windows / macOS / Linux × R devel / release / oldrel-1 through oldrel-4
- **Coverage:** `covr` (some files excluded: `atc_online.R`, `mo_source.R`, `translate.R`, `resistance_predict.R`, `zz_deprecated.R`, helper files, `zzz.R`)
## Documentation
- All exported functions use **roxygen2** blocks (`RoxygenNote: 7.3.3`, markdown enabled)
- Run `devtools::document()` after any change to roxygen comments
- Never edit files in `man/` directly — they are auto-generated
- Vignettes live in `vignettes/` as `.Rmd` files
- The pkgdown website is configured in `_pkgdown.yml`
## Versioning
Version format: `major.minor.patch.dev` (e.g., `3.0.1.9021`)
- Development versions use a `.9xxx` suffix
- Stable CRAN releases drop the dev suffix (e.g., `3.0.1`)
- `NEWS.md` uses sections **New**, **Fixes**, **Updates** with GitHub issue references (`#NNN`)
### Version and date bump required for every PR
All PRs are **squash-merged**, so each PR lands as exactly **one commit** on the default branch. Version numbers are kept in sync with the cumulative commit count since the last released tag. Therefore **exactly one version bump is allowed per PR**, regardless of how many intermediate commits are made on the branch.
#### Computing the correct version number
Run the following from the repo root to determine the version string to use:
```bash
currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
currenttagfull=$(git describe --tags --abbrev=0)
defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
currentversion="${currenttag}.$((currentcommit + 9001 + 1))"
echo "$currentversion"
```
The `+ 1` accounts for the fact that this PR's squash commit is not yet on the default branch. Set **both** of these files to the resulting version string (and only once per PR, even across multiple commits):
1. **`DESCRIPTION`** — the `Version:` field
2. **`NEWS.md`** — the top-level heading `# AMR <version>`
If `git describe` fails (e.g. no tags exist in the environment), fall back to reading the current version from `DESCRIPTION` and adding 1 to the last numeric component — but only if no bump has already been made in this PR.
#### Date field
The `Date:` field in `DESCRIPTION` must reflect the date of the **last commit to the PR** (not the first), in ISO format. Update it with every commit so it is always current:
```
Date: 2026-03-07
```
## Internal State
The package uses a private `AMR_env` environment (created in `aa_globals.R`) for caching expensive lookups (e.g., microorganism matching scores, breakpoint tables). This avoids re-computation within a session.
+3 -3
View File
@@ -1,3 +1,3 @@
Version: 3.0.0 Version: 3.0.1
Date: 2025-06-01 16:52:53 UTC Date: 2025-09-20 10:56:46 UTC
SHA: 79038fed2169a25a7fc067c80bb25d9d78be21d9 SHA: 33fb1849eb5aa6d33828e643c8f5047dd93447e3
+7 -5
View File
@@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 3.0.0 Version: 3.0.1.9036
Date: 2025-06-01 Date: 2026-03-18
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by data analysis and to work with microbial and antimicrobial properties by
@@ -27,10 +27,10 @@ Authors@R: c(
person(given = c("Judith", "M."), family = "Fonville", role = "ctb"), person(given = c("Judith", "M."), family = "Fonville", role = "ctb"),
person(given = c("Kathryn"), family = "Holt", role = "ctb", comment = c(ORCID = "0000-0003-3949-2471")), person(given = c("Kathryn"), family = "Holt", role = "ctb", comment = c(ORCID = "0000-0003-3949-2471")),
person(given = c("Larisse"), family = "Bolton", role = "ctb", comment = c(ORCID = "0000-0001-7879-2173")), person(given = c("Larisse"), family = "Bolton", role = "ctb", comment = c(ORCID = "0000-0001-7879-2173")),
person(given = c("Matthew"), family = "Saab", role = "ctb"), person(given = c("Matthew"), family = "Saab", role = "ctb", comment = c(ORCID = "0009-0008-6626-7919")),
person(given = c("Natacha"), family = "Couto", role = "ctb", comment = c(ORCID = "0000-0002-9152-5464")), person(given = c("Natacha"), family = "Couto", role = "ctb", comment = c(ORCID = "0000-0002-9152-5464")),
person(given = c("Peter"), family = "Dutey-Magni", role = "ctb", comment = c(ORCID = "0000-0002-8942-9836")), person(given = c("Peter"), family = "Dutey-Magni", role = "ctb", comment = c(ORCID = "0000-0002-8942-9836")),
person(given = c("Rogier", "P."), family = "Schade", role = "ctb"), person(given = c("Rogier", "P."), family = "Schade", role = "ctb", comment = c(ORCID = "0000-0002-9487-4467")),
person(given = c("Sofia"), family = "Ny", role = "ctb", comment = c(ORCID = "0000-0002-2017-1363")), person(given = c("Sofia"), family = "Ny", role = "ctb", comment = c(ORCID = "0000-0002-2017-1363")),
person(given = c("Alex", "W."), family = "Friedrich", role = "ths", comment = c(ORCID = "0000-0003-4881-038X")), person(given = c("Alex", "W."), family = "Friedrich", role = "ths", comment = c(ORCID = "0000-0003-4881-038X")),
person(given = c("Bhanu", "N.", "M."), family = "Sinha", role = "ths", comment = c(ORCID = "0000-0003-1634-0010")), person(given = c("Bhanu", "N.", "M."), family = "Sinha", role = "ths", comment = c(ORCID = "0000-0003-1634-0010")),
@@ -51,6 +51,8 @@ Suggests:
pillar, pillar,
progress, progress,
readxl, readxl,
recipes,
rlang,
rmarkdown, rmarkdown,
rstudioapi, rstudioapi,
rvest, rvest,
@@ -68,5 +70,5 @@ BugReports: https://github.com/msberends/AMR/issues
License: GPL-2 | file LICENSE License: GPL-2 | file LICENSE
Encoding: UTF-8 Encoding: UTF-8
LazyData: true LazyData: true
RoxygenNote: 7.3.2 RoxygenNote: 7.3.3
Roxygen: list(markdown = TRUE, old_usage = TRUE) Roxygen: list(markdown = TRUE, old_usage = TRUE)
+28
View File
@@ -106,6 +106,8 @@ S3method(print,mo_uncertainties)
S3method(print,pca) S3method(print,pca)
S3method(print,sir) S3method(print,sir)
S3method(print,sir_log) S3method(print,sir_log)
S3method(print,step_mic_log2)
S3method(print,step_sir_numeric)
S3method(quantile,mic) S3method(quantile,mic)
S3method(rep,ab) S3method(rep,ab)
S3method(rep,av) S3method(rep,av)
@@ -131,8 +133,10 @@ export("%like%")
export("%like_case%") export("%like_case%")
export("%unlike%") export("%unlike%")
export("%unlike_case%") export("%unlike_case%")
export(NA_ab_)
export(NA_disk_) export(NA_disk_)
export(NA_mic_) export(NA_mic_)
export(NA_mo_)
export(NA_sir_) export(NA_sir_)
export(ab_atc) export(ab_atc)
export(ab_atc_group1) export(ab_atc_group1)
@@ -159,9 +163,16 @@ export(administrable_per_os)
export(age) export(age)
export(age_groups) export(age_groups)
export(all_antimicrobials) export(all_antimicrobials)
export(all_disk)
export(all_disk_predictors)
export(all_mic)
export(all_mic_predictors)
export(all_sir)
export(all_sir_predictors)
export(aminoglycosides) export(aminoglycosides)
export(aminopenicillins) export(aminopenicillins)
export(amr_class) export(amr_class)
export(amr_course)
export(amr_distance_from_row) export(amr_distance_from_row)
export(amr_selector) export(amr_selector)
export(anti_join_microorganisms) export(anti_join_microorganisms)
@@ -206,6 +217,7 @@ export(cephalosporins_4th)
export(cephalosporins_5th) export(cephalosporins_5th)
export(clear_custom_antimicrobials) export(clear_custom_antimicrobials)
export(clear_custom_microorganisms) export(clear_custom_microorganisms)
export(clsi_rules)
export(count_I) export(count_I)
export(count_IR) export(count_IR)
export(count_R) export(count_R)
@@ -236,6 +248,8 @@ export(ggplot_sir_predict)
export(glycopeptides) export(glycopeptides)
export(guess_ab_col) export(guess_ab_col)
export(inner_join_microorganisms) export(inner_join_microorganisms)
export(interpretive_rules)
export(ionophores)
export(is.ab) export(is.ab)
export(is.av) export(is.av)
export(is.disk) export(is.disk)
@@ -312,7 +326,9 @@ export(not_intrinsic_resistant)
export(oxazolidinones) export(oxazolidinones)
export(pca) export(pca)
export(penicillins) export(penicillins)
export(peptides)
export(phenicols) export(phenicols)
export(phosphonics)
export(polymyxins) export(polymyxins)
export(proportion_I) export(proportion_I)
export(proportion_IR) export(proportion_IR)
@@ -352,6 +368,9 @@ export(sir_df)
export(sir_interpretation_history) export(sir_interpretation_history)
export(sir_predict) export(sir_predict)
export(skewness) export(skewness)
export(spiropyrimidinetriones)
export(step_mic_log2)
export(step_sir_numeric)
export(streptogramins) export(streptogramins)
export(sulfonamides) export(sulfonamides)
export(susceptibility) export(susceptibility)
@@ -373,6 +392,8 @@ if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, disk)
if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, mic) if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, mic)
if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, resistance_predict) if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, resistance_predict)
if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, sir) if(getRversion() >= "3.0.0") S3method(ggplot2::fortify, sir)
if(getRversion() >= "3.0.0") S3method(ggplot2::scale_type, mic)
if(getRversion() >= "3.0.0") S3method(ggplot2::scale_type, sir)
if(getRversion() >= "3.0.0") S3method(knitr::knit_print, antibiogram) if(getRversion() >= "3.0.0") S3method(knitr::knit_print, antibiogram)
if(getRversion() >= "3.0.0") S3method(knitr::knit_print, formatted_bug_drug_combinations) if(getRversion() >= "3.0.0") S3method(knitr::knit_print, formatted_bug_drug_combinations)
if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, ab) if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, ab)
@@ -388,6 +409,13 @@ if(getRversion() >= "3.0.0") S3method(pillar::type_sum, av)
if(getRversion() >= "3.0.0") S3method(pillar::type_sum, mic) if(getRversion() >= "3.0.0") S3method(pillar::type_sum, mic)
if(getRversion() >= "3.0.0") S3method(pillar::type_sum, mo) if(getRversion() >= "3.0.0") S3method(pillar::type_sum, mo)
if(getRversion() >= "3.0.0") S3method(pillar::type_sum, sir) if(getRversion() >= "3.0.0") S3method(pillar::type_sum, sir)
if(getRversion() >= "3.0.0") S3method(recipes::bake, step_mic_log2)
if(getRversion() >= "3.0.0") S3method(recipes::bake, step_sir_numeric)
if(getRversion() >= "3.0.0") S3method(recipes::prep, step_mic_log2)
if(getRversion() >= "3.0.0") S3method(recipes::prep, step_sir_numeric)
if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_mic_log2)
if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_sir_numeric)
if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, ab)
if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, disk) if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, disk)
if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, mic) if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, mic)
if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, mo) if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, mo)
+90 -3
View File
@@ -1,9 +1,96 @@
# AMR 3.0.1.9036
### Updates
* Modernised messaging infrastructure: `message_()`, `warning_()`, and `stop_()` now use `cli` for rich formatting (colours, inline markup, hyperlinks) when the `cli` package is installed, with a fully functional plain-text fallback when `cli` is absent
* Removed `add_fn` parameter from `message_()`, `warning_()`, and `word_wrap()` — styling is now handled by `cli` markup or dropped from the plain-text path
* New internal helper `cli_to_plain()` converts cli inline markup (`{.fun}`, `{.arg}`, `{.val}`, etc.) to plain-text equivalents for the non-cli fallback path
* Call sites across all R source files updated from `paste0()`-based string construction to cli glue syntax (e.g. `{.fun as.mo}`, `{.arg col_mo}`, `{n} results`)
# AMR 3.0.1.9035
### New
* Integration with the **tidymodels** framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via `recipes`
- `step_mic_log2()` to transform `<mic>` columns with log2, and `step_sir_numeric()` to convert `<sir>` columns to numeric
- New `tidyselect` helpers:
- `all_sir()`, `all_sir_predictors()`
- `all_mic()`, `all_mic_predictors()`
- `all_disk()`, `all_disk_predictors()`
* Data set `esbl_isolates` to practise with AMR modelling
* AMR selectors `ionophores()`, `peptides()`, `phosphonics()` and `spiropyrimidinetriones()`
* Support for Wildtype (WT) / Non-wildtype (NWT) in `as.sir()`, all plotting functions, and all susceptibility/resistance functions.
- `as.sir()` gained an argument `as_wt_nwt`, which defaults to `TRUE` only when `breakpoint_type = "ECOFF"` (#254)
- This transforms the output from S/R to WT/NWT
- Functions such as `susceptibility()` count WT as S and NWT as R
* Function `interpretive_rules()`, which allows future implementation of CLSI interpretive rules (#235)
- `eucast_rules()` has become a wrapper around that function
* Function `amr_course()`, which allows for automated download and unpacking of a GitHub repository for e.g. webinar use
### Fixes
* Fixed a bug in `as.sir()` where values that were purely numeric (e.g., `"1"`) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter
* Fixed a bug in `as.mic()` where MIC values in scientific notation (e.g., `"1e-3"`) were incorrectly handled because the letter `e` was removed along with other Unicode letters; scientific notation `e` is now preserved
* Fixed a bug in `as.ab()` where certain AB codes containing "PH" or "TH" (such as `ETH`, `MTH`, `PHE`, `PHN`, `STH`, `THA`, `THI1`) would incorrectly return `NA` when combined in a vector with any untranslatable value (#245)
* Fixed a bug in `antibiogram()` for when no antimicrobials are set
* Fixed a bug in `as.sir()` where for numeric input the arguments `S`, `I`, and `R` would not be considered (#244)
* Fixed some foreign translations of antimicrobial drugs
* Fixed a bug for printing column names to the console when using `mutate_at(vars(...), as.mic)` (#249)
* Fixed a bug to disregard `NI` for susceptibility proportion functions
* Fixed Italian translation of CoNS to Stafilococco coagulasi-negativo and CoPS to Stafilococco coagulasi-positivo (#256)
* Fixed SIR and MIC coercion of combined values, e.g. `as.sir("<= 0.002; S") ` or `as.mic("S; 0.002")` (#252)
### Updates
* `mdro()` now infers resistance for a _missing_ base drug column from an _available_ corresponding drug+inhibitor combination showing resistance (e.g., piperacillin is absent but required, while piperacillin/tazobactam available and resistant). Can be set with the new argument `infer_from_combinations`, which defaults to `TRUE` (#209). Note that this can yield a higher MDRO detection (which is a good thing as it has become more reliable).
* `susceptibility()` and `resistance()` gained the argument `guideline`, which defaults to EUCAST, for interpreting the 'I' category correctly.
* Added to the `antimicrobials` data set: cefepime/taniborbactam (`FTA`), ceftibuten/avibactam (`CTA`), clorobiocin (`CLB`), kasugamycin (`KAS`), ostreogrycin (`OST`), taniborbactam (`TAN`), thiostrepton (`THS`), xeruborbactam (`XER`), and zorbamycin (`ZOR`)
* `as.mic()` and `rescale_mic()` gained the argument `round_to_next_log2`, which can be set to `TRUE` to round all values up to the nearest next log2 level (#255)
* `antimicrobials$group` is now a `list` instead of a `character`, to contain any group the drug is in (#246)
* `ab_group()` gained an argument `all_groups` to return all groups the antimicrobial drug is in (#246)
* Added explaining message to `as.sir()` when interpreting numeric values (e.g., 1 for S, 2 for I, 3 for R) (#244)
* Updated handling of capped MIC values (`<`, `<=`, `>`, `>=`) in `as.sir()` in the argument `capped_mic_handling`: (#243)
* Introduced four clearly defined options: `"none"`, `"conservative"` (default), `"standard"`, and `"lenient"`
* Interpretation of capped MIC values now consistently returns `"NI"` (non-interpretable) when the true MIC could be at either side of a breakpoint, depending on the selected handling mode
* This results in more reliable behaviour compared to previous versions for capped MIC values
* Removed the `"inverse"` option, which has now become redundant
* `ab_group()` now returns values consist with the AMR selectors (#246)
* Added two new `NA` objects, `NA_ab_` and `NA_mo_`, analogous to base R's `NA_character_` and `NA_integer_`, for use in pipelines that require typed missing values
# AMR 3.0.1
This is a bugfix release following the release of v3.0.0 in June 2025.
### Changed
* Fixed bugs introduced by `ggplot2` v4.0.0 (#236)
* MIC scale functions (such as `scale_y_mic()`) will now be applied automatically when plotting values of class `mic`
* SIR scale functions (such as `scale_x_sir()`) will now be applied automatically when plotting values of class `sir`
* Fixed a bug in `antibiogram()` for when no antimicrobials are set
* Fixed a bug in `antibiogram()` to allow column names containing the `+` character (#222)
* Fixed a bug in `as.ab()` for antimicrobial codes with a number in it if they are preceded by a space
* Fixed a bug in `eucast_rules()` for using specific custom rules
* Fixed a bug in `as.sir()` to allow any tidyselect language (#220)
* Fixed a bug in `as.sir()` to pick right breakpoint when `uti = FALSE` (#216)
* Fixed a bug in `ggplot_sir()` when using `combine_SI = FALSE` (#213)
* Fixed a bug in `mdro()` to make sure all genes specified in arguments are acknowledged
* Fixed a bug the `antimicrobials` data set to remove statins (#229)
* Fixed a bug the `microorganisms` data set for MycoBank IDs and synonyms (#233)
* Fixed ATC J01CR05 to map to piperacillin/tazobactam rather than piperacillin/sulbactam (#230)
* Fixed skimmers (`skimr` package) of class `ab`, `sir`, and `disk` (#234)
* Fixed all plotting to contain a separate colour for SDD (susceptible dose-dependent) (#223)
* Fixed some specific Dutch translations for antimicrobials
* Added a warning to `as.ab()` if input resembles antiviral codes or names (#232)
* Added all reasons in verbose output of `mdro()` (#227)
* Added `names` to `age_groups()` so that custom names can be given (#215)
* Added note to `as.sir()` to make it explicit when higher-level taxonomic breakpoints are used (#218)
* Added antibiotic codes from the Comprehensive Antibiotic Resistance Database (CARD) to the `antimicrobials` data set (#225)
* Updated Fosfomycin to be of antibiotic class Phosphonics (#225)
* Updated `random_mic()` and `random_disk()` to set skewedness of the distribution and allow multiple microorganisms
# AMR 3.0.0 # AMR 3.0.0
This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the [University of Prince Edward Island's Atlantic Veterinary College](https://www.upei.ca/avc), Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change. This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the [University of Prince Edward Island's Atlantic Veterinary College](https://www.upei.ca/avc), Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change.
### Breaking ### Breaking
* Dataset `antibiotics` has been renamed to `antimicrobials` as the data set contains more than just antibiotics. Using `antibiotics` will still work, but now returns a warning. * Data set `antibiotics` has been renamed to `antimicrobials` as the data set contains more than just antibiotics. Using `antibiotics` will still work, but now returns a warning.
* Removed all functions and references that used the deprecated `rsi` class, which were all replaced with their `sir` equivalents over two years ago. * Removed all functions and references that used the deprecated `rsi` class, which were all replaced with their `sir` equivalents over two years ago.
* Functions `resistance_predict()` and `sir_predict()` are now deprecated and will be removed in a future version. Use the `tidymodels` framework instead, for which we [wrote a basic introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html). * Functions `resistance_predict()` and `sir_predict()` are now deprecated and will be removed in a future version. Use the `tidymodels` framework instead, for which we [wrote a basic introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
@@ -15,7 +102,7 @@ This package now supports not only tools for AMR data analysis in clinical setti
* `ab_atc()` now supports ATC codes of veterinary antimicrobials (that all start with "Q") * `ab_atc()` now supports ATC codes of veterinary antimicrobials (that all start with "Q")
* `ab_url()` now supports retrieving the WHOCC url of their ATCvet pages * `ab_url()` now supports retrieving the WHOCC url of their ATCvet pages
* **Support for WISCA antibiograms** * **Support for WISCA antibiograms**
* The `antibiogram()` function now supports creating true Weighted-Incidence Syndromic Combination Antibiograms (WISCA), a powerful Bayesian method for estimating regimen coverage probabilities using pathogen incidence and antimicrobial susceptibility data. WISCA offers improved precision for syndrome-specific treatment, even in datasets with sparse data. A dedicated `wisca()` function is also available for easy usage. * The `antibiogram()` function now supports creating true Weighted-Incidence Syndromic Combination Antibiograms (WISCA), a powerful Bayesian method for estimating regimen coverage probabilities using pathogen incidence and antimicrobial susceptibility data. WISCA offers improved precision for syndrome-specific treatment, even in data sets with sparse data. A dedicated `wisca()` function is also available for easy usage.
* **More global coverage of languages** * **More global coverage of languages**
* Added full support for 8 new languages: Arabic, Bengali, Hindi, Indonesian, Korean, Swahili, Urdu, and Vietnamese. The `AMR` package is now available in 28 languages. * Added full support for 8 new languages: Arabic, Bengali, Hindi, Indonesian, Korean, Swahili, Urdu, and Vietnamese. The `AMR` package is now available in 28 languages.
* **Major update to fungal taxonomy and tools for mycologists** * **Major update to fungal taxonomy and tools for mycologists**
@@ -122,7 +209,7 @@ This package now supports not only tools for AMR data analysis in clinical setti
## Older Versions ## Older Versions
This changelog only contains changes from AMR v3.0 (March 2025) and later. This changelog only contains changes from AMR v3.0 (June 2025) and later.
* For prior v2 versions, please see [our v2 archive](https://github.com/msberends/AMR/blob/v2.1.1/NEWS.md). * For prior v2 versions, please see [our v2 archive](https://github.com/msberends/AMR/blob/v2.1.1/NEWS.md).
* For prior v1 versions, please see [our v1 archive](https://github.com/msberends/AMR/blob/v1.8.2/NEWS.md). * For prior v1 versions, please see [our v1 archive](https://github.com/msberends/AMR/blob/v1.8.2/NEWS.md).
+11 -10
View File
@@ -34,37 +34,37 @@ EUCAST_VERSION_BREAKPOINTS <- list(
version_txt = "v15.0", version_txt = "v15.0",
year = 2025, year = 2025,
title = "'EUCAST Clinical Breakpoint Tables'", title = "'EUCAST Clinical Breakpoint Tables'",
url = "https://www.eucast.org/clinical_breakpoints/" url = "https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/"
), ),
"14.0" = list( "14.0" = list(
version_txt = "v14.0", version_txt = "v14.0",
year = 2024, year = 2024,
title = "'EUCAST Clinical Breakpoint Tables'", title = "'EUCAST Clinical Breakpoint Tables'",
url = "https://www.eucast.org/clinical_breakpoints/" url = "https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/"
), ),
"13.1" = list( "13.1" = list(
version_txt = "v13.1", version_txt = "v13.1",
year = 2023, year = 2023,
title = "'EUCAST Clinical Breakpoint Tables'", title = "'EUCAST Clinical Breakpoint Tables'",
url = "https://www.eucast.org/clinical_breakpoints/" url = "https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/"
), ),
"12.0" = list( "12.0" = list(
version_txt = "v12.0", version_txt = "v12.0",
year = 2022, year = 2022,
title = "'EUCAST Clinical Breakpoint Tables'", title = "'EUCAST Clinical Breakpoint Tables'",
url = "https://www.eucast.org/clinical_breakpoints/" url = "https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/"
), ),
"11.0" = list( "11.0" = list(
version_txt = "v11.0", version_txt = "v11.0",
year = 2021, year = 2021,
title = "'EUCAST Clinical Breakpoint Tables'", title = "'EUCAST Clinical Breakpoint Tables'",
url = "https://www.eucast.org/clinical_breakpoints/" url = "https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/"
), ),
"10.0" = list( "10.0" = list(
version_txt = "v10.0", version_txt = "v10.0",
year = 2020, year = 2020,
title = "'EUCAST Clinical Breakpoint Tables'", title = "'EUCAST Clinical Breakpoint Tables'",
url = "https://www.eucast.org/ast_of_bacteria/previous_versions_of_documents/" url = "https://www.eucast.org/bacteria/document-archive/"
) )
) )
EUCAST_VERSION_EXPERT_RULES <- list( EUCAST_VERSION_EXPERT_RULES <- list(
@@ -72,19 +72,19 @@ EUCAST_VERSION_EXPERT_RULES <- list(
version_txt = "v3.3", version_txt = "v3.3",
year = 2021, year = 2021,
title = "'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes'", title = "'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes'",
url = "https://www.eucast.org/expert_rules_and_expected_phenotypes" url = "https://www.eucast.org/bacteria/important-additional-information/expert-rules/"
), ),
"3.2" = list( "3.2" = list(
version_txt = "v3.2", version_txt = "v3.2",
year = 2020, year = 2020,
title = "'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes'", title = "'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes'",
url = "https://www.eucast.org/expert_rules_and_expected_phenotypes" url = "https://www.eucast.org/bacteria/important-additional-information/expert-rules/"
), ),
"3.1" = list( "3.1" = list(
version_txt = "v3.1", version_txt = "v3.1",
year = 2016, year = 2016,
title = "'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes'", title = "'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes'",
url = "https://www.eucast.org/expert_rules_and_expected_phenotypes" url = "https://www.eucast.org/bacteria/important-additional-information/expert-rules/"
) )
) )
EUCAST_VERSION_EXPECTED_PHENOTYPES <- list( EUCAST_VERSION_EXPECTED_PHENOTYPES <- list(
@@ -92,7 +92,7 @@ EUCAST_VERSION_EXPECTED_PHENOTYPES <- list(
version_txt = "v1.2", version_txt = "v1.2",
year = 2023, year = 2023,
title = "'EUCAST Expected Resistant Phenotypes'", title = "'EUCAST Expected Resistant Phenotypes'",
url = "https://www.eucast.org/expert_rules_and_expected_phenotypes" url = "https://www.eucast.org/bacteria/important-additional-information/expert-rules/"
) )
) )
@@ -233,6 +233,7 @@ globalVariables(c(
"uti_index", "uti_index",
"value", "value",
"varname", "varname",
"where",
"x", "x",
"xvar", "xvar",
"y", "y",
+233 -244
View File
@@ -63,31 +63,6 @@ pm_left_join <- function(x, y, by = NULL, suffix = c(".x", ".y")) {
merged merged
} }
# support where() like tidyverse (this function will also be used when running `antibiogram()`):
where <- function(fn) {
# based on https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
if (!is.function(fn)) {
stop_("`", deparse(substitute(fn)), "()` is not a valid predicate function.")
}
df <- pm_select_env$.data
cols <- pm_select_env$get_colnames()
if (is.null(df)) {
df <- get_current_data("where", call = FALSE)
cols <- colnames(df)
}
preds <- unlist(lapply(
df,
function(x, fn) {
do.call("fn", list(x))
},
fn
))
if (!is.logical(preds)) stop_("`where()` must be used with functions that return `TRUE` or `FALSE`.")
data_cols <- cols
cols <- data_cols[preds]
which(data_cols %in% cols)
}
# copied and slightly rewritten from {poorman} under permissive license (2021-10-15) # copied and slightly rewritten from {poorman} under permissive license (2021-10-15)
# https://github.com/nathaneastwood/poorman, MIT licensed, Nathan Eastwood, 2020 # https://github.com/nathaneastwood/poorman, MIT licensed, Nathan Eastwood, 2020
case_when_AMR <- function(...) { case_when_AMR <- function(...) {
@@ -330,8 +305,7 @@ search_type_in_df <- function(x, type, info = TRUE, add_col_prefix = TRUE) {
# this column should contain logicals # this column should contain logicals
if (!is.logical(x[, found, drop = TRUE])) { if (!is.logical(x[, found, drop = TRUE])) {
message_("Column '", font_bold(found), "' found as input for `", ifelse(add_col_prefix, "col_", ""), type, message_("Column '", font_bold(found), "' found as input for `", ifelse(add_col_prefix, "col_", ""), type,
"`, but this column does not contain 'logical' values (TRUE/FALSE) and was ignored.", "`, but this column does not contain 'logical' values (TRUE/FALSE) and was ignored."
add_fn = font_red
) )
found <- NULL found <- NULL
} }
@@ -408,17 +382,30 @@ pkg_is_available <- function(pkg, also_load = FALSE, min_version = NULL) {
isTRUE(out) isTRUE(out)
} }
highlight_code <- function(code) {
if (pkg_is_available("cli", min_version = "3.0.0")) {
cli::code_highlight(code)
} else {
code
}
}
import_fn <- function(name, pkg, error_on_fail = TRUE) { import_fn <- function(name, pkg, error_on_fail = TRUE) {
if (isTRUE(error_on_fail)) { if (isTRUE(error_on_fail)) {
stop_ifnot_installed(pkg) stop_ifnot_installed(pkg)
} }
if (pkg == "rstudioapi" && !in_rstudio()) {
# only allow rstudioapi to be imported if we're in RStudio
return(NULL)
}
tryCatch( tryCatch(
# don't use get() to avoid fetching non-API functions # don't use get() to avoid fetching non-API functions
getExportedValue(name = name, ns = asNamespace(pkg)), getExportedValue(name = name, ns = asNamespace(pkg)),
error = function(e) { error = function(e) {
if (isTRUE(error_on_fail)) { if (isTRUE(error_on_fail)) {
stop_("function `", name, "()` is not an exported object from package '", pkg, stop_("function {.code ", name, "()} is not an exported object from package '", pkg,
"'. Please create an issue at ", font_url("https://github.com/msberends/AMR/issues"), ". Many thanks!", "'. Please create an issue at https://github.com/msberends/AMR/issues. Many thanks!",
call = FALSE call = FALSE
) )
} else { } else {
@@ -428,30 +415,108 @@ import_fn <- function(name, pkg, error_on_fail = TRUE) {
) )
} }
# Convert cli glue markup to plain text for the non-cli fallback path.
# Called by message_(), warning_(), and stop_() when cli is not available.
cli_to_plain <- function(msg, envir = parent.frame()) {
resolve <- function(x) {
# If x looks like {expr}, evaluate the inner expression
if (grepl("^\\{.+\\}$", x)) {
inner <- substring(x, 2L, nchar(x) - 1L)
tryCatch(
paste0(as.character(eval(parse(text = inner), envir = envir)), collapse = ", "),
error = function(e) x
)
} else {
x
}
}
apply_sub <- function(msg, pattern, formatter) {
while (grepl(pattern, msg, perl = TRUE)) {
m <- regexec(pattern, msg)
matches <- regmatches(msg, m)[[1]]
if (length(matches) < 2L) break
full_match <- matches[1L]
content <- matches[2L]
replacement <- formatter(content)
idx <- regexpr(full_match, msg, fixed = TRUE)
if (idx == -1L) break
msg <- paste0(
substr(msg, 1L, idx - 1L),
replacement,
substr(msg, idx + nchar(full_match), nchar(msg))
)
}
msg
}
# cli inline markup -> plain-text equivalents (one level of glue nesting allowed)
msg <- apply_sub(msg, "\\{\\.fun (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0("`", resolve(c), "()`"))
msg <- apply_sub(msg, "\\{\\.arg (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0("`", resolve(c), "`"))
msg <- apply_sub(msg, "\\{\\.code (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0("`", resolve(c), "`"))
msg <- apply_sub(msg, "\\{\\.val (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0('"', resolve(c), '"'))
msg <- apply_sub(msg, "\\{\\.field (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0('"', resolve(c), '"'))
msg <- apply_sub(msg, "\\{\\.cls (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0("<", resolve(c), ">"))
msg <- apply_sub(msg, "\\{\\.pkg (\\{[^}]+\\}|[^}]+)\\}", function(c) resolve(c))
msg <- apply_sub(msg, "\\{\\.strong (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0("*", resolve(c), "*"))
msg <- apply_sub(msg, "\\{\\.emph (\\{[^}]+\\}|[^}]+)\\}", function(c) paste0("*", resolve(c), "*"))
msg <- apply_sub(msg, "\\{\\.help ([^}]+)\\}", function(c) {
# Handle [display text](topic) markdown link format: extract just the display text
m <- regmatches(c, regexec("^\\[(.*)\\]\\([^)]*\\)$", c))[[1L]]
if (length(m) >= 2L) m[2L] else paste0("`", resolve(c), "`")
})
msg <- apply_sub(msg, "\\{\\.topic ([^}]+)\\}", function(c) {
# Handle [display text](topic) markdown link format: extract just the display text
m <- regmatches(c, regexec("^\\[(.*)\\]\\([^)]*\\)$", c))[[1L]]
if (length(m) >= 2L) m[2L] else paste0("?", resolve(c))
})
msg <- apply_sub(msg, "\\{\\.url (\\{[^}]+\\}|[^}]+)\\}", function(c) resolve(c))
msg <- apply_sub(msg, "\\{\\.href ([^}]+)\\}", function(c) strsplit(resolve(c), " ", fixed = TRUE)[[1L]][1L])
# bare {variable} or {expression} -> evaluate in caller's environment
while (grepl("\\{[^{}]+\\}", msg)) {
m <- regexec("\\{([^{}]+)\\}", msg)
matches <- regmatches(msg, m)[[1]]
if (length(matches) < 2L) break
full_match <- matches[1L]
inner <- matches[2L]
replacement <- tryCatch(
paste0(as.character(eval(parse(text = inner), envir = envir)), collapse = ", "),
error = function(e) full_match
)
idx <- regexpr(full_match, msg, fixed = TRUE)
if (idx == -1L) break
msg <- paste0(
substr(msg, 1L, idx - 1L),
replacement,
substr(msg, idx + nchar(full_match), nchar(msg))
)
}
msg
}
# this alternative wrapper to the message(), warning() and stop() functions: # this alternative wrapper to the message(), warning() and stop() functions:
# - wraps text to never break lines within words # - wraps text to never break lines within words (plain-text fallback only)
# - ignores formatted text while wrapping # - adds indentation for note-style messages (plain-text fallback only)
# - adds indentation dependent on the type of message (such as NOTE) # When cli is available this just returns the pasted input; cli handles formatting.
# - can add additional formatting functions like blue or bold text
word_wrap <- function(..., word_wrap <- function(...,
add_fn = list(),
as_note = FALSE, as_note = FALSE,
width = 0.95 * getOption("width"), width = 0.95 * getOption("width"),
extra_indent = 0) { extra_indent = 0) {
if (pkg_is_available("cli", min_version = "3.0.0")) {
return(paste0(c(...), collapse = ""))
}
msg <- paste0(c(...), collapse = "") msg <- paste0(c(...), collapse = "")
if (isTRUE(as_note)) { if (isTRUE(as_note)) {
msg <- paste0(AMR_env$info_icon, " ", gsub("^note:? ?", "", msg, ignore.case = TRUE)) msg <- paste0(AMR_env$info_icon, " ", gsub("^note:? ?", "", msg, ignore.case = TRUE))
} }
if (grepl("\n", msg, fixed = TRUE)) {
if (msg %like% "\n") {
# run word_wraps() over every line here, bind them and return again
return(paste0( return(paste0(
vapply( vapply(
FUN.VALUE = character(1), FUN.VALUE = character(1),
trimws(unlist(strsplit(msg, "\n", fixed = TRUE)), which = "right"), trimws(unlist(strsplit(msg, "\n", fixed = TRUE)), which = "right"),
word_wrap, word_wrap,
add_fn = add_fn,
as_note = FALSE, as_note = FALSE,
width = width, width = width,
extra_indent = extra_indent extra_indent = extra_indent
@@ -459,155 +524,75 @@ word_wrap <- function(...,
collapse = "\n" collapse = "\n"
)) ))
} }
wrapped <- paste0(strwrap(msg, width = width), collapse = "\n")
# correct for operators (will add the space later on) if (grepl("\u2139 ", msg, fixed = TRUE)) {
ops <- "([,./><\\]\\[])" indentation <- 2L + extra_indent
msg <- gsub(paste0(ops, " ", ops), "\\1\\2", msg, perl = TRUE) } else if (grepl("^=> ", msg)) {
# we need to correct for already applied style, that adds text like "\033[31m\" indentation <- 3L + extra_indent
msg_stripped <- gsub("(.*)?\\033\\]8;;.*\\a(.*?)\\033\\]8;;\\a(.*)", "\\1\\2\\3", msg, perl = TRUE) # for font_url()
msg_stripped <- font_stripstyle(msg_stripped)
# where are the spaces now?
msg_stripped_wrapped <- paste0(
strwrap(msg_stripped,
simplify = TRUE,
width = width
),
collapse = "\n"
)
msg_stripped_wrapped <- paste0(unlist(strsplit(msg_stripped_wrapped, "(\n|\\*\\|\\*)")),
collapse = "\n"
)
msg_stripped_spaces <- which(unlist(strsplit(msg_stripped, "", fixed = TRUE)) == " ")
msg_stripped_wrapped_spaces <- which(unlist(strsplit(msg_stripped_wrapped, "", fixed = TRUE)) != "\n")
# so these are the indices of spaces that need to be replaced
replace_spaces <- which(!msg_stripped_spaces %in% msg_stripped_wrapped_spaces)
# put it together
msg <- unlist(strsplit(msg, " ", fixed = TRUE))
msg[replace_spaces] <- paste0(msg[replace_spaces], "\n")
# add space around operators again
msg <- gsub(paste0(ops, ops), "\\1 \\2", msg, perl = TRUE)
msg <- paste0(msg, collapse = " ")
msg <- gsub("\n ", "\n", msg, fixed = TRUE)
if (msg_stripped %like% "\u2139 ") {
indentation <- 2 + extra_indent
} else if (msg_stripped %like% "^=> ") {
indentation <- 3 + extra_indent
} else { } else {
indentation <- 0 + extra_indent indentation <- 0L + extra_indent
} }
msg <- gsub("\n", paste0("\n", strrep(" ", indentation)), msg, fixed = TRUE) if (indentation > 0L) {
# remove trailing empty characters wrapped <- gsub("\n", paste0("\n", strrep(" ", indentation)), wrapped, fixed = TRUE)
msg <- gsub("(\n| )+$", "", msg)
if (length(add_fn) > 0) {
if (!is.list(add_fn)) {
add_fn <- list(add_fn)
}
for (i in seq_len(length(add_fn))) {
msg <- add_fn[[i]](msg)
}
} }
gsub("(\n| )+$", "", wrapped)
# format backticks
if (pkg_is_available("cli") &&
tryCatch(isTRUE(getExportedValue("ansi_has_hyperlink_support", ns = asNamespace("cli"))()), error = function(e) FALSE) &&
tryCatch(getExportedValue("isAvailable", ns = asNamespace("rstudioapi"))(), error = function(e) {
return(FALSE)
}) &&
tryCatch(getExportedValue("versionInfo", ns = asNamespace("rstudioapi"))()$version > "2023.6.0.0", error = function(e) {
return(FALSE)
})) {
# we are in a recent version of RStudio, so do something nice: add links to our help pages in the console.
parts <- strsplit(msg, "`", fixed = TRUE)[[1]]
cmds <- parts %in% paste0(ls(envir = asNamespace("AMR")), "()")
# functions with a dot are not allowed: https://github.com/rstudio/rstudio/issues/11273#issuecomment-1156193252
# lead them to the help page of our package
parts[cmds & parts %like% "[.]"] <- font_url(
url = paste0("ide:help:AMR::", gsub("()", "", parts[cmds & parts %like% "[.]"], fixed = TRUE)),
txt = parts[cmds & parts %like% "[.]"]
)
# otherwise, give a 'click to run' popup
parts[cmds & parts %unlike% "[.]"] <- font_url(
url = paste0("ide:run:AMR::", parts[cmds & parts %unlike% "[.]"]),
txt = parts[cmds & parts %unlike% "[.]"]
)
# datasets should give help page as well
parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")] <- font_url(
url = paste0("ide:help:AMR::", gsub("()", "", parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")], fixed = TRUE)),
txt = parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")]
)
# text starting with `?` must also lead to the help page
parts[parts %like% "^[?].+"] <- font_url(
url = paste0("ide:help:AMR::", gsub("?", "", parts[parts %like% "^[?].+"], fixed = TRUE)),
txt = parts[parts %like% "^[?].+"]
)
msg <- paste0(parts, collapse = "`")
}
msg <- gsub("`(.+?)`", font_grey_bg("\\1"), msg)
# clean introduced whitespace in between fullstops
msg <- gsub("[.] +[.]", "..", msg)
# remove extra space that was introduced (e.g. "Smith et al. , 2022")
msg <- gsub(". ,", ".,", msg, fixed = TRUE)
msg <- gsub("[ ,", "[,", msg, fixed = TRUE)
msg <- gsub("/ /", "//", msg, fixed = TRUE)
msg
} }
message_ <- function(..., message_ <- function(...,
appendLF = TRUE, appendLF = TRUE,
add_fn = list(font_blue),
as_note = TRUE) { as_note = TRUE) {
message( if (pkg_is_available("cli", min_version = "3.0.0")) {
word_wrap(..., msg <- paste0(c(...), collapse = "")
add_fn = add_fn, if (isTRUE(as_note)) {
as_note = as_note cli::cli_inform(c("i" = msg), .envir = parent.frame())
), } else {
appendLF = appendLF cli::cli_inform(msg, .envir = parent.frame())
) }
} else {
plain_msg <- cli_to_plain(paste0(c(...), collapse = ""), envir = parent.frame())
message(word_wrap(plain_msg, as_note = as_note), appendLF = appendLF)
}
} }
warning_ <- function(..., warning_ <- function(...,
add_fn = list(),
immediate = FALSE, immediate = FALSE,
call = FALSE) { call = FALSE) {
warning( if (pkg_is_available("cli", min_version = "3.0.0")) {
trimws2(word_wrap(..., msg <- paste0(c(...), collapse = "")
add_fn = add_fn, cli::cli_warn(msg, .envir = parent.frame())
as_note = FALSE } else {
)), plain_msg <- cli_to_plain(paste0(c(...), collapse = ""), envir = parent.frame())
immediate. = immediate, warning(trimws2(word_wrap(plain_msg, as_note = FALSE)), immediate. = immediate, call. = call)
call. = call }
)
} }
# this alternative to the stop() function: # this alternative to the stop() function:
# - adds the function name where the error was thrown # - adds the function name where the error was thrown (plain-text fallback)
# - wraps text to never break lines within words # - wraps text to never break lines within words (plain-text fallback)
stop_ <- function(..., call = TRUE) { stop_ <- function(..., call = TRUE) {
msg <- paste0(c(...), collapse = "") msg <- paste0(c(...), collapse = "")
msg_call <- "" if (pkg_is_available("cli", min_version = "3.0.0")) {
if (!isFALSE(call)) {
if (isTRUE(call)) { if (isTRUE(call)) {
call <- as.character(sys.call(-1)[1]) call_obj <- sys.call(-1)
} else if (!isFALSE(call)) {
call_obj <- sys.call(call)
} else { } else {
# so you can go back more than 1 call, as used in sir_calc(), that now throws a reference to e.g. n_sir() call_obj <- NULL
call <- as.character(sys.call(call)[1])
} }
msg_call <- paste0("in ", call, "():") cli::cli_abort(msg, call = call_obj, .envir = parent.frame())
}
msg <- trimws2(word_wrap(msg, add_fn = list(), as_note = FALSE))
if (!is.null(AMR_env$cli_abort) && length(unlist(strsplit(msg, "\n", fixed = TRUE))) <= 1) {
if (is.character(call)) {
call <- as.call(str2lang(paste0(call, "()")))
} else {
call <- NULL
}
AMR_env$cli_abort(msg, call = call)
} else { } else {
stop(paste(msg_call, msg), call. = FALSE) msg_call <- ""
if (!isFALSE(call)) {
if (isTRUE(call)) {
call_name <- as.character(sys.call(-1)[1])
} else {
# go back more than 1 call, as used in sir_calc() to reference e.g. n_sir()
call_name <- as.character(sys.call(call)[1])
}
msg_call <- paste0("in ", call_name, "():")
}
plain_msg <- cli_to_plain(trimws2(word_wrap(msg, as_note = FALSE)), envir = parent.frame())
stop(paste(msg_call, plain_msg), call. = FALSE)
} }
} }
@@ -650,7 +635,7 @@ stop_ifnot <- function(expr, ..., call = TRUE) {
return_after_integrity_check <- function(value, type, check_vector) { return_after_integrity_check <- function(value, type, check_vector) {
if (!all(value[!is.na(value)] %in% check_vector)) { if (!all(value[!is.na(value)] %in% check_vector)) {
warning_(paste0("invalid ", type, ", NA generated")) warning_("invalid ", type, ", NA generated")
value[!value %in% check_vector] <- NA value[!value %in% check_vector] <- NA
} }
value value
@@ -714,8 +699,12 @@ format_included_data_number <- function(data) {
vector_or <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_captital = FALSE, last_sep = " or ") { vector_or <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_captital = FALSE, last_sep = " or ") {
# makes unique and sorts, and this also removed NAs # makes unique and sorts, and this also removed NAs
v <- unique(v) v <- unique(v)
has_na <- anyNA(v)
if (isTRUE(sort)) { if (isTRUE(sort)) {
v <- sort(v) v <- sort(v)
if (has_na) {
v <- c(v, NA)
}
} }
if (isTRUE(reverse)) { if (isTRUE(reverse)) {
v <- rev(v) v <- rev(v)
@@ -737,18 +726,25 @@ vector_or <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_ca
# class 'sir' should be sorted like this # class 'sir' should be sorted like this
v <- c("S", "I", "R") v <- c("S", "I", "R")
} }
if (identical(v, c("I", "NI", "R", "S", "SDD"))) { if (identical(v, sort(VALID_SIR_LEVELS))) {
# class 'sir' should be sorted like this # class 'sir' should be sorted like this
v <- c("S", "SDD", "I", "R", "NI") v <- VALID_SIR_LEVELS
} }
# oxford comma # oxford comma
if (last_sep %in% c(" or ", " and ") && length(v) > 2) { if (last_sep %in% c(" or ", " and ") && length(v) > 2) {
last_sep <- paste0(",", last_sep) last_sep <- paste0(",", last_sep)
} }
NAs <- which(is.na(v))
if (is.numeric(v)) {
v <- trimws(vapply(FUN.VALUE = character(1), v, format, scientific = FALSE))
}
quoted <- paste0(quotes, v, quotes)
quoted[NAs] <- "NA"
# all commas except for last item, so will become '"val1", "val2", "val3" or "val4"' # all commas except for last item, so will become '"val1", "val2", "val3" or "val4"'
paste0( paste0(
paste0(quotes, v[seq_len(length(v) - 1)], quotes, collapse = ", "), paste(quoted[seq_len(length(quoted) - 1)], collapse = ", "),
last_sep, paste0(quotes, v[length(v)], quotes) last_sep, quoted[length(quoted)]
) )
} }
@@ -814,7 +810,7 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
# if object is missing, or another error: # if object is missing, or another error:
tryCatch(invisible(object), tryCatch(invisible(object),
error = function(e) AMR_env$meet_criteria_error_txt <- e$message error = function(e) AMR_env$meet_criteria_error_txt <- conditionMessage(e)
) )
if (!is.null(AMR_env$meet_criteria_error_txt)) { if (!is.null(AMR_env$meet_criteria_error_txt)) {
error_txt <- AMR_env$meet_criteria_error_txt error_txt <- AMR_env$meet_criteria_error_txt
@@ -949,7 +945,7 @@ ascertain_sir_classes <- function(x, obj_name) {
warning_( warning_(
"the data provided in argument `", obj_name, "the data provided in argument `", obj_name,
"` should contain at least one column of class 'sir'. Eligible SIR column were now guessed. ", "` should contain at least one column of class 'sir'. Eligible SIR column were now guessed. ",
"See `?as.sir`.", "See {.help [{.fun as.sir}](AMR::as.sir)}.",
immediate = TRUE immediate = TRUE
) )
sirs_eligible <- is_sir_eligible(x) sirs_eligible <- is_sir_eligible(x)
@@ -995,8 +991,13 @@ get_current_data <- function(arg_name, call) {
# an element `.data` will be in the environment when using dplyr::select() # an element `.data` will be in the environment when using dplyr::select()
return(env$`.data`) return(env$`.data`)
} else if (valid_df(env$training)) { } else if (valid_df(env$training)) {
# an element `training` will be in the environment when using some tidymodels functions such as `prep()` if (!is.null(env$x) && valid_df(env$x$template)) {
return(env$training) # an element `x$template` will be in the environment when using some tidymodels functions such as `prep()`
return(env$x$template)
} else {
# this is a fallback for some tidymodels functions such as `prep()`
return(env$training)
}
} else if (valid_df(env$data)) { } else if (valid_df(env$data)) {
# an element `data` will be in the environment when using older dplyr versions, or some tidymodels functions such as `fit()` # an element `data` will be in the environment when using older dplyr versions, or some tidymodels functions such as `fit()`
return(env$data) return(env$data)
@@ -1066,24 +1067,8 @@ get_current_column <- function() {
# cur_column() doesn't always work (only allowed for certain conditions set by dplyr), but it's probably still possible: # cur_column() doesn't always work (only allowed for certain conditions set by dplyr), but it's probably still possible:
frms <- lapply(sys.frames(), function(env) { frms <- lapply(sys.frames(), function(env) {
if (tryCatch(!is.null(env$i), error = function(e) FALSE)) { if (all(c("dots", "i") %in% names(env))) {
if (!is.null(env$tibble_vars)) { names(env$dots)[env$i]
# for mutate_if()
# TODO remove later, was part of older dplyr versions (at least not in dplyr 1.1.4)
env$tibble_vars[env$i]
} else {
# for mutate(across())
if (!is.null(env$data) && is.data.frame(env$data)) {
df <- env$data
} else {
df <- tryCatch(get_current_data(NA, 0), error = function(e) NULL)
}
if (is.data.frame(df)) {
colnames(df)[env$i]
} else {
env$i
}
}
} else { } else {
NULL NULL
} }
@@ -1137,11 +1122,14 @@ format_custom_query_rule <- function(query, colours = has_colour()) {
query <- gsub("any\\((.*)\\)$", paste0(font_black("any of "), "\\1"), query) query <- gsub("any\\((.*)\\)$", paste0(font_black("any of "), "\\1"), query)
query <- gsub("all\\((.*)\\)$", paste0(font_black("all of "), "\\1"), query) query <- gsub("all\\((.*)\\)$", paste0(font_black("all of "), "\\1"), query)
if (colours == TRUE) { if (colours == TRUE) {
query <- gsub("[\"']R[\"']", font_rose_bg(" R "), query)
query <- gsub("[\"']SDD[\"']", font_orange_bg(" SDD "), query)
query <- gsub("[\"']S[\"']", font_green_bg(" S "), query) query <- gsub("[\"']S[\"']", font_green_bg(" S "), query)
query <- gsub("[\"']NI[\"']", font_grey_bg(font_black(" NI ")), query) query <- gsub("[\"']SDD[\"']", font_orange_bg(" SDD "), query)
query <- gsub("[\"']I[\"']", font_orange_bg(" I "), query) query <- gsub("[\"']I[\"']", font_orange_bg(" I "), query)
query <- gsub("[\"']R[\"']", font_rose_bg(" R "), query)
query <- gsub("[\"']NI[\"']", font_grey_bg(font_black(" NI ")), query)
query <- gsub("[\"']WT[\"']", font_green_bg(" SDD "), query)
query <- gsub("[\"']NWT[\"']", font_rose_bg(" I "), query)
query <- gsub("[\"']NS[\"']", font_rose_bg(" R "), query)
} }
# replace the black colour 'stops' with blue colour 'starts' # replace the black colour 'stops' with blue colour 'starts'
query <- gsub("\033[39m", "\033[34m", as.character(query), fixed = TRUE) query <- gsub("\033[39m", "\033[34m", as.character(query), fixed = TRUE)
@@ -1213,6 +1201,13 @@ reset_all_thrown_messages <- function() {
) )
} }
in_rstudio <- function() {
identical(Sys.getenv("RSTUDIO"), "1")
}
in_positron <- function() {
identical(Sys.getenv("POSITRON"), "1")
}
has_colour <- function() { has_colour <- function() {
if (is.null(AMR_env$supports_colour)) { if (is.null(AMR_env$supports_colour)) {
if (Sys.getenv("EMACS") != "" || Sys.getenv("INSIDE_EMACS") != "") { if (Sys.getenv("EMACS") != "" || Sys.getenv("INSIDE_EMACS") != "") {
@@ -1244,8 +1239,14 @@ try_colour <- function(..., before, after, collapse = " ") {
} }
} }
is_dark <- function() { is_dark <- function() {
if (is.null(AMR_env$is_dark_theme)) { AMR_env$current_theme <- NULL
AMR_env$is_dark_theme <- !has_colour() || tryCatch(isTRUE(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$dark), error = function(e) FALSE) current_theme_fn <- import_fn("getThemeInfo", "rstudioapi", error_on_fail = FALSE)
if (!is.null(current_theme_fn)) {
AMR_env$current_theme <- current_theme_fn()$editor
}
if (!identical(AMR_env$current_theme, AMR_env$former_theme) || is.null(AMR_env$is_dark_theme)) {
AMR_env$former_theme <- AMR_env$current_theme
AMR_env$is_dark_theme <- !has_colour() || tryCatch(isTRUE(current_theme_fn()$dark), error = function(e) TRUE)
} }
isTRUE(AMR_env$is_dark_theme) isTRUE(AMR_env$is_dark_theme)
} }
@@ -1317,6 +1318,10 @@ font_green_bg <- function(..., collapse = " ") {
# this is #3caea3 (picked to be colourblind-safe with other SIR colours) # this is #3caea3 (picked to be colourblind-safe with other SIR colours)
try_colour(font_black(..., collapse = collapse, adapt = FALSE), before = "\033[48;5;79m", after = "\033[49m", collapse = collapse) try_colour(font_black(..., collapse = collapse, adapt = FALSE), before = "\033[48;5;79m", after = "\033[49m", collapse = collapse)
} }
font_green_lighter_bg <- function(..., collapse = " ") {
# this is #8FD6C4 (picked to be colourblind-safe with other SIR colours)
try_colour(font_black(..., collapse = collapse, adapt = FALSE), before = "\033[48;5;158m", after = "\033[49m", collapse = collapse)
}
font_purple_bg <- function(..., collapse = " ") { font_purple_bg <- function(..., collapse = " ") {
try_colour(font_black(..., collapse = collapse, adapt = FALSE), before = "\033[48;5;89m", after = "\033[49m", collapse = collapse) try_colour(font_black(..., collapse = collapse, adapt = FALSE), before = "\033[48;5;89m", after = "\033[49m", collapse = collapse)
} }
@@ -1634,6 +1639,36 @@ get_n_cores <- function(max_cores = Inf) {
n_cores n_cores
} }
# Support `where()` if tidyselect not installed ----
if (!is.null(import_fn("where", "tidyselect", error_on_fail = FALSE))) {
# tidyselect::where() exists, retrieve from their namespace to make `where()`s work across the package in default arguments
where <- tidyselect::where
} else {
where <- function(fn) {
# based on https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
if (!is.function(fn)) {
stop_("`", deparse(substitute(fn)), "()` is not a valid predicate function.")
}
df <- pm_select_env$.data
cols <- pm_select_env$get_colnames()
if (is.null(df)) {
df <- get_current_data("where", call = FALSE)
cols <- colnames(df)
}
preds <- unlist(lapply(
df,
function(x, fn) {
do.call("fn", list(x))
},
fn
))
if (!is.logical(preds)) stop_("`where()` must be used with functions that return `TRUE` or `FALSE`.")
data_cols <- cols
cols <- data_cols[preds]
which(data_cols %in% cols)
}
}
# Faster data.table implementations ---- # Faster data.table implementations ----
match <- function(x, table, ...) { match <- function(x, table, ...) {
@@ -1653,52 +1688,6 @@ match <- function(x, table, ...) {
} }
} }
# nolint start
# Register S3 methods ----
# copied from vctrs::s3_register by their permission:
# https://github.com/r-lib/vctrs/blob/05968ce8e669f73213e3e894b5f4424af4f46316/R/register-s3.R
s3_register <- function(generic, class, method = NULL) {
stopifnot(is.character(generic), length(generic) == 1)
stopifnot(is.character(class), length(class) == 1)
pieces <- strsplit(generic, "::")[[1]]
stopifnot(length(pieces) == 2)
package <- pieces[[1]]
generic <- pieces[[2]]
caller <- parent.frame()
get_method_env <- function() {
top <- topenv(caller)
if (isNamespace(top)) {
asNamespace(environmentName(top))
} else {
caller
}
}
get_method <- function(method, env) {
if (is.null(method)) {
get(paste0(generic, ".", class), envir = get_method_env())
} else {
method
}
}
method_fn <- get_method(method)
stopifnot(is.function(method_fn))
setHook(packageEvent(package, "onLoad"), function(...) {
ns <- asNamespace(package)
method_fn <- get_method(method)
registerS3method(generic, class, method_fn, envir = ns)
})
if (!isNamespaceLoaded(package)) {
return(invisible())
}
envir <- asNamespace(package)
if (exists(generic, envir)) {
registerS3method(generic, class, method_fn, envir = envir)
}
invisible()
}
# Support old R versions ---- # Support old R versions ----
# these functions were not available in previous versions of R # these functions were not available in previous versions of R
# see here for the full list: https://github.com/r-lib/backports # see here for the full list: https://github.com/r-lib/backports
+13 -1
View File
@@ -952,7 +952,19 @@ pm_select_env$get_nrow <- function() nrow(pm_select_env$.data)
pm_select_env$get_ncol <- function() ncol(pm_select_env$.data) pm_select_env$get_ncol <- function() ncol(pm_select_env$.data)
pm_select <- function(.data, ...) { pm_select <- function(.data, ...) {
col_pos <- pm_select_positions(.data, ..., .group_pos = TRUE) # col_pos <- pm_select_positions(.data, ..., .group_pos = TRUE),
col_pos <- tryCatch(pm_select_positions(.data, ..., .group_pos = TRUE), error = function(e) NULL)
if (is.null(col_pos)) {
# try with tidyverse
select_dplyr <- import_fn("select", "dplyr", error_on_fail = FALSE)
if (!is.null(select_dplyr)) {
col_pos <- which(colnames(.data) %in% colnames(select_dplyr(.data, ...)))
} else {
# this will throw an error as it did, but dplyr is not available, so no other option
col_pos <- pm_select_positions(.data, ..., .group_pos = TRUE)
}
}
map_names <- names(col_pos) map_names <- names(col_pos)
map_names_length <- nchar(map_names) map_names_length <- nchar(map_names)
if (any(map_names_length == 0L)) { if (any(map_names_length == 0L)) {
+17 -5
View File
@@ -29,15 +29,27 @@
#' Options for the AMR package #' Options for the AMR package
#' #'
#' This is an overview of all the package-specific [options()] you can set in the `AMR` package. #' @description
#' @section Options: #' This is an overview of all the package-specific options you can set in the `AMR` package. Set them using the [options()] function, e.g.:
#'
#' `options(AMR_guideline = "CLSI")`
#' @section Options (alphabetical order):
#' * `AMR_antibiogram_formatting_type` \cr A [numeric] (1-22) to use in [antibiogram()], to indicate which formatting type to use. #' * `AMR_antibiogram_formatting_type` \cr A [numeric] (1-22) to use in [antibiogram()], to indicate which formatting type to use.
#' * `AMR_breakpoint_type` \cr A [character] to use in [as.sir()], to indicate which breakpoint type to use. This must be either `r vector_or(clinical_breakpoints$type)`. #' * `AMR_breakpoint_type` \cr A [character] to use in [as.sir()], to indicate which breakpoint type to use. This must be either `r vector_or(clinical_breakpoints$type)`.
#' * `AMR_capped_mic_handling` \cr A [character] to use in [as.sir()], to indicate how capped MIC values (`<`, `<=`, `>`, `>=`) should be interpreted. Must be one of `"standard"`, `"strict"`, `"relaxed"`, or `"inverse"` - the default is `"standard"`. #' * `AMR_capped_mic_handling` \cr A [character] to use in [as.sir()], to indicate how capped MIC values (`<`, `<=`, `>`, `>=`) should be interpreted. Must be one of `"none"`, `"conservative"`, `"standard"`, or `"lenient"` - the default is `"conservative"`.
#' * `AMR_cleaning_regex` \cr A [regular expression][base::regex] (case-insensitive) to use in [as.mo()] and all [`mo_*`][mo_property()] functions, to clean the user input. The default is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar". #' * `AMR_cleaning_regex` \cr A [regular expression][base::regex] (case-insensitive) to use in [as.mo()] and all [`mo_*`][mo_property()] functions, to clean the user input. The default is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar".
#' * `AMR_custom_ab` \cr A file location to an RDS file, to use custom antimicrobial drugs with this package. This is explained in [add_custom_antimicrobials()]. #' * `AMR_custom_ab` \cr A file location to an RDS file, to use custom antimicrobial drugs with this package. This is explained in [add_custom_antimicrobials()].
#' * `AMR_custom_mo` \cr A file location to an RDS file, to use custom microorganisms with this package. This is explained in [add_custom_microorganisms()]. #' * `AMR_custom_mo` \cr A file location to an RDS file, to use custom microorganisms with this package. This is explained in [add_custom_microorganisms()].
#' * `AMR_eucastrules` \cr A [character] to set the default types of rules for [eucast_rules()] function, must be one or more of: `"breakpoints"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expert")`. #' * `AMR_eucastrules` \cr A [character] to set the default types of rules for [eucast_rules()] function, must be one or more of: `"breakpoints"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expert")`.
#' * `AMR_guideline` \cr A [character] to set the default guideline used throughout the `AMR` package wherever a `guideline` argument is available. This option is used as the default in e.g. [as.sir()], [resistance()], [susceptibility()], [interpretive_rules()] and many plotting functions. **While unset**, the AMR package uses the latest implemented EUCAST guideline (currently `r AMR::clinical_breakpoints$guideline[1]`).
#'
#' - For [as.sir()], this determines which clinical breakpoint guideline is used to interpret MIC values and disk diffusion diameters. It can be either the guideline name (e.g., `"CLSI"` or `"EUCAST"`) or the name including a year (e.g., `"CLSI 2019"`). Supported guidelines are EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))` to `r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`, and CLSI `r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))` to `r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`.
#'
#' - For [resistance()] and [susceptibility()], this setting determines how the `"I"` (Intermediate / Increased exposure) category is handled in calculations. Under CLSI, `"I"` is considered *resistant* in susceptibility calculations; under EUCAST, `"I"` is considered *susceptible* in susceptibility calculations. Explicitly setting this option ensures reproducible AMR proportion estimates.
#'
#' - For [interpretive_rules()], this determines which guideline-specific interpretive (expert) rules are applied to antimicrobial test results, either EUCAST or CLSI.
#'
#' - For many plotting functions (e.g., for MIC or disk diffusion values), supplying `mo` and `ab` enables automatic SIR-based interpretative colouring. These colours are derived from [as.sir()] in the background and therefore depend on the active `guideline` setting, which again uses `r AMR::clinical_breakpoints$guideline[1]` if not set explicitly.
#' * `AMR_guideline` \cr A [character] to set the default guideline for interpreting MIC values and disk diffusion diameters with [as.sir()]. Can be only the guideline name (e.g., `"CLSI"`) or the name with a year (e.g. `"CLSI 2019"`). The default to the latest implemented EUCAST guideline, currently \code{"`r clinical_breakpoints$guideline[1]`"}. Supported guideline are currently EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`). #' * `AMR_guideline` \cr A [character] to set the default guideline for interpreting MIC values and disk diffusion diameters with [as.sir()]. Can be only the guideline name (e.g., `"CLSI"`) or the name with a year (e.g. `"CLSI 2019"`). The default to the latest implemented EUCAST guideline, currently \code{"`r clinical_breakpoints$guideline[1]`"}. Supported guideline are currently EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`).
#' * `AMR_ignore_pattern` \cr A [regular expression][base::regex] to ignore (i.e., make `NA`) any match given in [as.mo()] and all [`mo_*`][mo_property()] functions. #' * `AMR_ignore_pattern` \cr A [regular expression][base::regex] to ignore (i.e., make `NA`) any match given in [as.mo()] and all [`mo_*`][mo_property()] functions.
#' * `AMR_include_PKPD` \cr A [logical] to use in [as.sir()], to indicate that PK/PD clinical breakpoints must be applied as a last resort - the default is `TRUE`. #' * `AMR_include_PKPD` \cr A [logical] to use in [as.sir()], to indicate that PK/PD clinical breakpoints must be applied as a last resort - the default is `TRUE`.
@@ -63,9 +75,9 @@
#' #'
#' ...to add Portuguese language support of antimicrobials, and allow PK/PD rules when interpreting MIC values with [as.sir()]. #' ...to add Portuguese language support of antimicrobials, and allow PK/PD rules when interpreting MIC values with [as.sir()].
#' #'
#' ### Share Options Within Team #' ## Share Options Within Team
#' #'
#' For a more global approach, e.g. within a (data) team, save an options file to a remote file location, such as a shared network drive, and have each user read in this file automatically at start-up. This would work in this way: #' For a more collaborative approach, e.g. within a (data) team, save an options file to a remote file location, such as a shared network drive, and have each user read in this file automatically at start-up. This would work in this way:
#' #'
#' 1. Save a plain text file to e.g. "X:/team_folder/R_options.R" and fill it with preferred settings. #' 1. Save a plain text file to e.g. "X:/team_folder/R_options.R" and fill it with preferred settings.
#' #'
+40 -5
View File
@@ -54,7 +54,7 @@
#' @section Source: #' @section Source:
#' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://atcddd.fhi.no/atc_ddd_index/} #' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://atcddd.fhi.no/atc_ddd_index/}
#' #'
#' European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm} #' European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm}
#' @aliases ab #' @aliases ab
#' @return A [character] [vector] with additional class [`ab`] #' @return A [character] [vector] with additional class [`ab`]
#' @seealso #' @seealso
@@ -119,7 +119,14 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
x[x %like_case% "^PENICILLIN" & x %unlike_case% "[ /+-]"] <- "benzylpenicillin" x[x %like_case% "^PENICILLIN" & x %unlike_case% "[ /+-]"] <- "benzylpenicillin"
x_bak_clean <- x x_bak_clean <- x
if (already_regex == FALSE) { if (already_regex == FALSE) {
x_bak_clean_before_gen <- x_bak_clean
x_bak_clean <- generalise_antibiotic_name(x_bak_clean) x_bak_clean <- generalise_antibiotic_name(x_bak_clean)
# generalise_antibiotic_name() rewrites "PH"->"F" and "TH"->"T", which
# mangles short valid AB codes (e.g. "ETH"->"ET", "PHN"->"FN", "STH"->"ST")
# making them unrecognisable in the lookup. Restore any values that were
# already valid AB codes before generalisation (#245).
is_valid_ab_code <- x_bak_clean_before_gen %in% AMR_env$AB_lookup$ab
x_bak_clean[is_valid_ab_code] <- x_bak_clean_before_gen[is_valid_ab_code]
} }
x <- unique(x_bak_clean) # this means that every x is in fact generalise_antibiotic_name(x) x <- unique(x_bak_clean) # this means that every x is in fact generalise_antibiotic_name(x)
@@ -184,7 +191,8 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
x_new[known_codes_cid] <- AMR_env$AB_lookup$ab[match(x[known_codes_cid], AMR_env$AB_lookup$cid)] x_new[known_codes_cid] <- AMR_env$AB_lookup$ab[match(x[known_codes_cid], AMR_env$AB_lookup$cid)]
previously_coerced <- x %in% AMR_env$ab_previously_coerced$x previously_coerced <- x %in% AMR_env$ab_previously_coerced$x
x_new[previously_coerced & is.na(x_new)] <- AMR_env$ab_previously_coerced$ab[match(x[is.na(x_new) & x %in% AMR_env$ab_previously_coerced$x], AMR_env$ab_previously_coerced$x)] x_new[previously_coerced & is.na(x_new)] <- AMR_env$ab_previously_coerced$ab[match(x[is.na(x_new) & x %in% AMR_env$ab_previously_coerced$x], AMR_env$ab_previously_coerced$x)]
if (any(previously_coerced) && isTRUE(info) && message_not_thrown_before("as.ab", entire_session = TRUE)) { previously_coerced_mention <- x %in% AMR_env$ab_previously_coerced$x & !x %in% AMR_env$AB_lookup$ab & !x %in% AMR_env$AB_lookup$generalised_name
if (any(previously_coerced_mention) && isTRUE(info) && message_not_thrown_before("as.ab", entire_session = TRUE)) {
message_( message_(
"Returning previously coerced ", "Returning previously coerced ",
ifelse(length(unique(which(x[which(previously_coerced)] %in% x_bak_clean))) > 1, "value for an antimicrobial", "values for various antimicrobials"), ifelse(length(unique(which(x[which(previously_coerced)] %in% x_bak_clean))) > 1, "value for an antimicrobial", "values for various antimicrobials"),
@@ -201,6 +209,9 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
if (sum(already_known) < length(x)) { if (sum(already_known) < length(x)) {
progress <- progress_ticker(n = sum(!already_known), n_min = 25, print = info) # start if n >= 25 progress <- progress_ticker(n = sum(!already_known), n_min = 25, print = info) # start if n >= 25
on.exit(close(progress)) on.exit(close(progress))
if (any(x_new[!already_known & !is.na(x_new)] %in% unlist(AMR_env$AV_lookup$generalised_all, use.names = FALSE), na.rm = TRUE)) {
warning_("in {.help [{.fun as.ab}](AMR::as.ab)}: some input seems to resemble antiviral drugs - use {.help [{.fun as.av}](AMR::as.av)} or e.g. {.help [{.fun av_name}](AMR::av_name)} for these, not {.help [{.fun as.ab}](AMR::as.ab)} or e.g. {.help [{.fun ab_name}](AMR::ab_name)}.")
}
} }
for (i in which(!already_known)) { for (i in which(!already_known)) {
@@ -447,7 +458,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
x_unknown <- x_unknown[!x_unknown %in% c("", NA)] x_unknown <- x_unknown[!x_unknown %in% c("", NA)]
if (length(x_unknown) > 0 && fast_mode == FALSE) { if (length(x_unknown) > 0 && fast_mode == FALSE) {
warning_( warning_(
"in `as.ab()`: these values could not be coerced to a valid antimicrobial ID: ", "in `as.ab()`: ", ifelse(length(unique(x_unknown)) == 1, "this value", "these values"), " could not be coerced to a valid antimicrobial ID: ",
vector_and(x_unknown), "." vector_and(x_unknown), "."
) )
} }
@@ -503,6 +514,14 @@ ab_reset_session <- function() {
} }
} }
#' @rdname as.ab
#' @details `NA_ab_` is a missing value of the new `ab` class, analogous to e.g. base \R's [`NA_character_`][base::NA].
#' @format NULL
#' @export
NA_ab_ <- set_clean_class(NA_character_,
new_class = c("ab", "character")
)
# this prevents the requirement for putting the dependency in Imports: # this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, ab) #' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, ab)
pillar_shaft.ab <- function(x, ...) { pillar_shaft.ab <- function(x, ...) {
@@ -510,7 +529,7 @@ pillar_shaft.ab <- function(x, ...) {
out[is.na(x)] <- font_na(NA) out[is.na(x)] <- font_na(NA)
# add the names to the drugs as mouse-over! # add the names to the drugs as mouse-over!
if (tryCatch(isTRUE(getExportedValue("ansi_has_hyperlink_support", ns = asNamespace("cli"))()), error = function(e) FALSE)) { if (in_rstudio()) {
out[!is.na(x)] <- font_url( out[!is.na(x)] <- font_url(
url = paste0(x[!is.na(x)], ": ", ab_name(x[!is.na(x)])), url = paste0(x[!is.na(x)], ": ", ab_name(x[!is.na(x)])),
txt = out[!is.na(x)] txt = out[!is.na(x)]
@@ -626,6 +645,20 @@ rep.ab <- function(x, ...) {
out out
} }
# this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, ab)
get_skimmers.ab <- function(column) {
ab <- as.ab(column, info = FALSE)
ab <- ab[!is.na(ab)]
skimr::sfl(
skim_type = "ab",
n_unique = ~ length(unique(ab)),
top_ab = ~ names(sort(-table(ab)))[1L],
top_ab_name = ~ names(sort(-table(ab_name(ab, info = FALSE))))[1L],
top_group = ~ names(sort(-table(ab_group(ab, info = FALSE))))[1L]
)
}
generalise_antibiotic_name <- function(x) { generalise_antibiotic_name <- function(x) {
x <- toupper(x) x <- toupper(x)
# remove suffices # remove suffices
@@ -655,7 +688,9 @@ generalise_antibiotic_name <- function(x) {
x <- trimws(gsub(" +", " ", x, perl = TRUE)) x <- trimws(gsub(" +", " ", x, perl = TRUE))
# remove last couple of words if they numbers or units # remove last couple of words if they numbers or units
x <- gsub("( ([0-9]{3,}|U?M?C?G|L))+$", "", x, perl = TRUE) x <- gsub("( ([0-9]{3,}|U?M?C?G|L))+$", "", x, perl = TRUE)
# move HIGH to end # remove whitespace prior to numbers if preceded by A-Z
x <- gsub("([A-Z]+) +([0-9]+)", "\\1\\2", x, perl = TRUE)
# move HIGH to the end
x <- trimws(gsub("(.*) HIGH(.*)", "\\1\\2 HIGH", x, perl = TRUE)) x <- trimws(gsub("(.*) HIGH(.*)", "\\1\\2 HIGH", x, perl = TRUE))
x x
} }
+1 -1
View File
@@ -212,7 +212,7 @@ ab_from_text <- function(text,
} }
}) })
} else { } else {
stop_("`type` must be either 'drug', 'dose' or 'administration'") stop_("{.arg type} must be either 'drug', 'dose' or 'administration'")
} }
# collapse text if needed # collapse text if needed
+26 -4
View File
@@ -65,6 +65,7 @@
#' ab_synonyms("AMX") #' ab_synonyms("AMX")
#' ab_tradenames("AMX") #' ab_tradenames("AMX")
#' ab_group("AMX") #' ab_group("AMX")
#' ab_group("AMX", all_groups = TRUE) # most specific to most general
#' ab_atc_group1("AMX") #' ab_atc_group1("AMX")
#' ab_atc_group2("AMX") #' ab_atc_group2("AMX")
#' ab_url("AMX") #' ab_url("AMX")
@@ -163,11 +164,32 @@ ab_tradenames <- function(x, ...) {
} }
#' @rdname ab_property #' @rdname ab_property
#' @param all_groups A [logical] to indicate whether all antimicrobial groups must be return as a vector for each input value. For example, an antibiotic in the "aminopenicillins" group, is also in the "penicillins" and "beta-lactams" groups. Setting `all_groups = TRUE` would return all three for such an antibiotic, while `all_groups = FALSE` (default) only returns the most specific group name.
#' @export #' @export
ab_group <- function(x, language = get_AMR_locale(), ...) { ab_group <- function(x, language = get_AMR_locale(), all_groups = FALSE, ...) {
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
language <- validate_language(language) language <- validate_language(language)
translate_into_language(ab_validate(x = x, property = "group", ...), language = language, only_affect_ab_names = TRUE) meet_criteria(all_groups, allow_class = "logical", has_length = 1)
grps <- ab_validate(x = x, property = "group", ...)
for (i in seq_along(grps)) {
if (is.null(grps[[i]]) || all(is.na(grps[[i]]))) {
grps[[i]] <- NA_character_
}
if (all_groups == FALSE) {
# take the first match based on ABX_PRIORITY_LIST
grps[[i]] <- grps[[i]][1]
}
if (language != "en") {
grps[[i]] <- translate_into_language(grps[[i]], language = language, only_affect_ab_names = TRUE)
}
}
names(grps) <- x
if (length(grps) == 1 || all_groups == FALSE) {
unname(unlist(grps))
} else {
grps
}
} }
#' @rdname ab_property #' @rdname ab_property
@@ -282,7 +304,7 @@ ab_info <- function(x, language = get_AMR_locale(), ...) {
ab = as.character(x), ab = as.character(x),
cid = ab_cid(x), cid = ab_cid(x),
name = ab_name(x, language = language), name = ab_name(x, language = language),
group = ab_group(x, language = language), group = ab_group(x, language = language, all_groups = TRUE),
atc = ab_atc(x), atc = ab_atc(x),
atc_group1 = ab_atc_group1(x, language = language), atc_group1 = ab_atc_group1(x, language = language),
atc_group2 = ab_atc_group2(x, language = language), atc_group2 = ab_atc_group2(x, language = language),
@@ -445,7 +467,7 @@ ab_validate <- function(x, property, ...) {
# try to catch an error when inputting an invalid argument # try to catch an error when inputting an invalid argument
# so the 'call.' can be set to FALSE # so the 'call.' can be set to FALSE
tryCatch(x[1L] %in% AMR_env$AB_lookup[1, property, drop = TRUE], tryCatch(x[1L] %in% AMR_env$AB_lookup[1, property, drop = TRUE],
error = function(e) stop(e$message, call. = FALSE) error = function(e) stop(conditionMessage(e), call. = FALSE)
) )
if (!all(x %in% AMR_env$AB_lookup[, property, drop = TRUE])) { if (!all(x %in% AMR_env$AB_lookup[, property, drop = TRUE])) {
+11 -3
View File
@@ -128,9 +128,10 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
#' Split Ages into Age Groups #' Split Ages into Age Groups
#' #'
#' Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis. #' Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered [factor].
#' @param x Age, e.g. calculated with [age()]. #' @param x Age, e.g. calculated with [age()].
#' @param split_at Values to split `x` at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See *Details*. #' @param split_at Values to split `x` at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See *Details*.
#' @param names Optional names to be given to the various age groups.
#' @param na.rm A [logical] to indicate whether missing values should be removed. #' @param na.rm A [logical] to indicate whether missing values should be removed.
#' @details To split ages, the input for the `split_at` argument can be: #' @details To split ages, the input for the `split_at` argument can be:
#' #'
@@ -152,6 +153,7 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
#' #'
#' # split into 0-19, 20-49 and 50+ #' # split into 0-19, 20-49 and 50+
#' age_groups(ages, c(20, 50)) #' age_groups(ages, c(20, 50))
#' age_groups(ages, c(20, 50), names = c("Under 20 years", "20 to 50 years", "Over 50 years"))
#' #'
#' # split into groups of ten years #' # split into groups of ten years
#' age_groups(ages, 1:10 * 10) #' age_groups(ages, 1:10 * 10)
@@ -181,9 +183,10 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
#' ) #' )
#' } #' }
#' } #' }
age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) { age_groups <- function(x, split_at = c(0, 12, 25, 55, 75), names = NULL, na.rm = FALSE) {
meet_criteria(x, allow_class = c("numeric", "integer"), is_positive_or_zero = TRUE, is_finite = TRUE) meet_criteria(x, allow_class = c("numeric", "integer"), is_positive_or_zero = TRUE, is_finite = TRUE)
meet_criteria(split_at, allow_class = c("numeric", "integer", "character"), is_positive_or_zero = TRUE, is_finite = TRUE) meet_criteria(split_at, allow_class = c("numeric", "integer", "character"), is_positive_or_zero = TRUE, is_finite = TRUE)
meet_criteria(names, allow_class = "character", allow_NULL = TRUE)
meet_criteria(na.rm, allow_class = "logical", has_length = 1) meet_criteria(na.rm, allow_class = "logical", has_length = 1)
if (any(x < 0, na.rm = TRUE)) { if (any(x < 0, na.rm = TRUE)) {
@@ -208,7 +211,7 @@ age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
split_at <- c(0, split_at) split_at <- c(0, split_at)
} }
split_at <- split_at[!is.na(split_at)] split_at <- split_at[!is.na(split_at)]
stop_if(length(split_at) == 1, "invalid value for `split_at`") # only 0 is available stop_if(length(split_at) == 1, "invalid value for `split_at`.") # only 0 is available
# turn input values to 'split_at' indices # turn input values to 'split_at' indices
y <- x y <- x
@@ -224,6 +227,11 @@ age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
agegroups <- factor(lbls[y], levels = lbls, ordered = TRUE) agegroups <- factor(lbls[y], levels = lbls, ordered = TRUE)
if (!is.null(names)) {
stop_ifnot(length(names) == length(levels(agegroups)), "`names` must have the same length as the number of age groups (", length(levels(agegroups)), ").")
levels(agegroups) <- names
}
if (isTRUE(na.rm)) { if (isTRUE(na.rm)) {
agegroups <- agegroups[!is.na(agegroups)] agegroups <- agegroups[!is.na(agegroups)]
} }
+62
View File
@@ -0,0 +1,62 @@
# ==================================================================== #
# TITLE: #
# AMR: An R Package for Working with Antimicrobial Resistance Data #
# #
# SOURCE CODE: #
# https://github.com/msberends/AMR #
# #
# PLEASE CITE THIS SOFTWARE AS: #
# Berends MS, Luz CF, Friedrich AW, et al. (2022). #
# AMR: An R Package for Working with Antimicrobial Resistance Data. #
# Journal of Statistical Software, 104(3), 1-31. #
# https://doi.org/10.18637/jss.v104.i03 #
# #
# Developed at the University of Groningen and the University Medical #
# Center Groningen in The Netherlands, in collaboration with many #
# colleagues from around the world, see our website. #
# #
# This R package is free software; you can freely use and distribute #
# it for both personal and commercial purposes under the terms of the #
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
# the Free Software Foundation. #
# We created this package for both routine data analysis and academic #
# research and it was publicly released in the hope that it will be #
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Download and Unpack an AMR Course Repository
#'
#' Downloads and unpacks a GitHub repository containing course materials, using [usethis::use_course()]. This is a convenience wrapper intended for use in educational settings, such as workshops or tutorials associated with the AMR package.
#' @param github_repo A character string specifying the GitHub repository with username and repo name, e.g. `"https://github.com/username/repo"`.
#' @param branch A character string specifying the branch to download. Defaults to `"main"`.
#' @param ... Additional arguments passed on to [usethis::use_course()].
#' @details
#' This function constructs a ZIP archive URL from the provided `github_repo` and `branch`, then delegates to [usethis::use_course()] to handle the download and extraction.
#'
#' The function is designed for interactive use in course or workshop settings and is not intended for use in non-interactive or automated pipelines.
#' @return
#' Called for its side effect. [usethis::use_course()] will prompt the user to choose a destination and open the extracted project. Returns invisibly whatever [usethis::use_course()] returns.
#' @seealso [usethis::use_course()]
#' @export
#' @examples
#' \dontrun{
#'
#' # Let this run by users, e.g., webinar participants
#' amr_course("https://github.com/my_user_name/our_AMR_course")
#' }
amr_course <- function(github_repo, branch = "main", ...) {
if (!"usethis" %in% rownames(utils::installed.packages())) {
if ("rlang" %in% rownames(utils::installed.packages())) {
rlang::check_installed("usethis")
} else {
stop("Package usethis is not installed. Please run: install.packages(\"usethis\")", call. = FALSE)
}
}
url <- paste0(github_repo, "/archive/refs/heads/", branch, ".zip")
use_course <- import_fn("use_course", "usethis")
message("This will download and unpack the contents of a repository.\n")
use_course(url, ...)
}
+49 -13
View File
@@ -352,6 +352,14 @@ glycopeptides <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
amr_select_exec("glycopeptides", only_sir_columns = only_sir_columns, return_all = return_all) amr_select_exec("glycopeptides", only_sir_columns = only_sir_columns, return_all = return_all)
} }
#' @rdname antimicrobial_selectors
#' @export
ionophores <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
meet_criteria(return_all, allow_class = "logical", has_length = 1)
amr_select_exec("ionophores", only_sir_columns = only_sir_columns, return_all = return_all)
}
#' @rdname antimicrobial_selectors #' @rdname antimicrobial_selectors
#' @export #' @export
isoxazolylpenicillins <- function(only_sir_columns = FALSE, only_treatable = TRUE, return_all = TRUE, ...) { isoxazolylpenicillins <- function(only_sir_columns = FALSE, only_treatable = TRUE, return_all = TRUE, ...) {
@@ -417,6 +425,14 @@ penicillins <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
amr_select_exec("penicillins", only_sir_columns = only_sir_columns, return_all = return_all) amr_select_exec("penicillins", only_sir_columns = only_sir_columns, return_all = return_all)
} }
#' @rdname antimicrobial_selectors
#' @export
peptides <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
meet_criteria(return_all, allow_class = "logical", has_length = 1)
amr_select_exec("peptides", only_sir_columns = only_sir_columns, return_all = return_all)
}
#' @rdname antimicrobial_selectors #' @rdname antimicrobial_selectors
#' @export #' @export
phenicols <- function(only_sir_columns = FALSE, return_all = TRUE, ...) { phenicols <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
@@ -425,6 +441,14 @@ phenicols <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
amr_select_exec("phenicols", only_sir_columns = only_sir_columns, return_all = return_all) amr_select_exec("phenicols", only_sir_columns = only_sir_columns, return_all = return_all)
} }
#' @rdname antimicrobial_selectors
#' @export
phosphonics <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
meet_criteria(return_all, allow_class = "logical", has_length = 1)
amr_select_exec("phosphonics", only_sir_columns = only_sir_columns, return_all = return_all)
}
#' @rdname antimicrobial_selectors #' @rdname antimicrobial_selectors
#' @export #' @export
polymyxins <- function(only_sir_columns = FALSE, only_treatable = TRUE, return_all = TRUE, ...) { polymyxins <- function(only_sir_columns = FALSE, only_treatable = TRUE, return_all = TRUE, ...) {
@@ -450,6 +474,14 @@ rifamycins <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
amr_select_exec("rifamycins", only_sir_columns = only_sir_columns, return_all = return_all) amr_select_exec("rifamycins", only_sir_columns = only_sir_columns, return_all = return_all)
} }
#' @rdname antimicrobial_selectors
#' @export
spiropyrimidinetriones <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
meet_criteria(return_all, allow_class = "logical", has_length = 1)
amr_select_exec("spiropyrimidinetriones", only_sir_columns = only_sir_columns, return_all = return_all)
}
#' @rdname antimicrobial_selectors #' @rdname antimicrobial_selectors
#' @export #' @export
streptogramins <- function(only_sir_columns = FALSE, return_all = TRUE, ...) { streptogramins <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
@@ -527,7 +559,7 @@ amr_selector <- function(filter,
) )
call <- substitute(filter) call <- substitute(filter)
agents <- tryCatch(AMR_env$AB_lookup[which(eval(call, envir = AMR_env$AB_lookup)), "ab", drop = TRUE], agents <- tryCatch(AMR_env$AB_lookup[which(eval(call, envir = AMR_env$AB_lookup)), "ab", drop = TRUE],
error = function(e) stop_(e$message, call = -5) error = function(e) stop_(conditionMessage(e), call = -5)
) )
agents <- ab_in_data[ab_in_data %in% agents] agents <- ab_in_data[ab_in_data %in% agents]
message_agent_names( message_agent_names(
@@ -640,7 +672,7 @@ not_intrinsic_resistant <- function(only_sir_columns = FALSE, col_mo = NULL, ver
) )
} }
), ),
error = function(e) stop_("in not_intrinsic_resistant(): ", e$message, call = FALSE) error = function(e) stop_("in not_intrinsic_resistant(): ", conditionMessage(e), call = FALSE)
) )
agents <- ab_in_data[ab_in_data %in% names(vars_df_R[which(vars_df_R)])] agents <- ab_in_data[ab_in_data %in% names(vars_df_R[which(vars_df_R)])]
@@ -685,7 +717,7 @@ amr_select_exec <- function(function_name,
} }
# untreatable drugs # untreatable drugs
untreatable <- AMR_env$AB_lookup$ab[which(AMR_env$AB_lookup$name %like% "(-high|EDTA|polysorbate|macromethod|screening|nacubactam)")] untreatable <- AMR_env$AB_lookup$ab[which(AMR_env$AB_lookup$name %like% "(-high|EDTA|polysorbate|macromethod|screening|nacubactam|inducible)")]
if (!is.null(vars_df) && only_treatable == TRUE) { if (!is.null(vars_df) && only_treatable == TRUE) {
if (any(untreatable %in% names(ab_in_data))) { if (any(untreatable %in% names(ab_in_data))) {
if (message_not_thrown_before(function_name, "amr_class", "untreatable")) { if (message_not_thrown_before(function_name, "amr_class", "untreatable")) {
@@ -713,9 +745,9 @@ amr_select_exec <- function(function_name,
if (is.null(amr_class_args) || isTRUE(function_name %in% c("antifungals", "antimycobacterials"))) { if (is.null(amr_class_args) || isTRUE(function_name %in% c("antifungals", "antimycobacterials"))) {
ab_group <- NULL ab_group <- NULL
if (isTRUE(function_name == "antifungals")) { if (isTRUE(function_name == "antifungals")) {
abx <- AMR_env$AB_lookup$ab[which(AMR_env$AB_lookup$group == "Antifungals")] abx <- AMR_env$AB_lookup$ab[which(vapply(FUN.VALUE = logical(1), AMR_env$AB_lookup$group, function(x) "Antifungals" %in% x))]
} else if (isTRUE(function_name == "antimycobacterials")) { } else if (isTRUE(function_name == "antimycobacterials")) {
abx <- AMR_env$AB_lookup$ab[which(AMR_env$AB_lookup$group == "Antimycobacterials")] abx <- AMR_env$AB_lookup$ab[which(vapply(FUN.VALUE = logical(1), AMR_env$AB_lookup$group, function(x) "Antimycobacterials" %in% x))]
} else { } else {
# their upper case equivalent are vectors with class 'ab', created in data-raw/_pre_commit_checks.R # their upper case equivalent are vectors with class 'ab', created in data-raw/_pre_commit_checks.R
# carbapenems() gets its codes from AMR:::AB_CARBAPENEMS # carbapenems() gets its codes from AMR:::AB_CARBAPENEMS
@@ -723,7 +755,11 @@ amr_select_exec <- function(function_name,
# manually added codes from add_custom_antimicrobials() must also be supported # manually added codes from add_custom_antimicrobials() must also be supported
if (length(AMR_env$custom_ab_codes) > 0) { if (length(AMR_env$custom_ab_codes) > 0) {
custom_ab <- AMR_env$AB_lookup[which(AMR_env$AB_lookup$ab %in% AMR_env$custom_ab_codes), ] custom_ab <- AMR_env$AB_lookup[which(AMR_env$AB_lookup$ab %in% AMR_env$custom_ab_codes), ]
check_string <- paste0(custom_ab$group, custom_ab$atc_group1, custom_ab$atc_group2) check_string <- paste0(
vapply(FUN.VALUE = character(1), custom_ab$group, function(x) paste(x, collapse = " ")),
custom_ab$atc_group1,
custom_ab$atc_group2
)
if (function_name == "betalactams") { if (function_name == "betalactams") {
find_group <- "beta[-]?lactams" find_group <- "beta[-]?lactams"
} else if (function_name %like% "cephalosporins_") { } else if (function_name %like% "cephalosporins_") {
@@ -801,7 +837,7 @@ amr_select_exec <- function(function_name,
#' @export #' @export
#' @noRd #' @noRd
print.amr_selector <- function(x, ...) { print.amr_selector <- function(x, ...) {
warning_("It should never be needed to print an antimicrobial selector class. Are you using data.table? Then add the argument `with = FALSE`, see our examples at `?amr_selector`.", warning_("It should never be needed to print an antimicrobial selector class. Are you using {.pkg data.table}? Then add the argument {.code with = FALSE}, see our examples at {.help [{.fun amr_selector}](AMR::amr_selector)}.",
immediate = TRUE immediate = TRUE
) )
cat("Class 'amr_selector'\n") cat("Class 'amr_selector'\n")
@@ -819,10 +855,10 @@ c.amr_selector <- function(...) {
all_any_amr_selector <- function(type, ..., na.rm = TRUE) { all_any_amr_selector <- function(type, ..., na.rm = TRUE) {
cols_ab <- c(...) cols_ab <- c(...)
result <- cols_ab[toupper(cols_ab) %in% c("S", "SDD", "I", "R", "NI")] result <- cols_ab[toupper(cols_ab) %in% VALID_SIR_LEVELS]
if (length(result) == 0) { if (length(result) == 0) {
message_("Filtering ", type, " of columns ", vector_and(font_bold(cols_ab, collapse = NULL), quotes = "'"), ' to contain value "S", "I" or "R"') message_("Filtering ", type, " of columns ", vector_and(font_bold(cols_ab, collapse = NULL), quotes = "'"), ' to contain value "S", "I" or "R"')
result <- c("S", "SDD", "I", "R", "NI") result <- VALID_SIR_LEVELS
} }
cols_ab <- cols_ab[!cols_ab %in% result] cols_ab <- cols_ab[!cols_ab %in% result]
df <- get_current_data(arg_name = NA, call = -3) df <- get_current_data(arg_name = NA, call = -3)
@@ -931,7 +967,7 @@ any.amr_selector_any_all <- function(..., na.rm = FALSE) {
} }
} }
# this is `!=`, so turn around the values # this is `!=`, so turn around the values
sir <- c("S", "SDD", "I", "R", "NI") sir <- VALID_SIR_LEVELS
e2 <- sir[sir != e2] e2 <- sir[sir != e2]
structure(all_any_amr_selector(type = type, e1, e2), structure(all_any_amr_selector(type = type, e1, e2),
class = c("amr_selector_any_all", "logical") class = c("amr_selector_any_all", "logical")
@@ -1001,11 +1037,11 @@ find_ab_names <- function(ab_group, n = 3) {
# try popular first, they have DDDs # try popular first, they have DDDs
drugs <- AMR_env$AB_lookup[which((!is.na(AMR_env$AB_lookup$iv_ddd) | !is.na(AMR_env$AB_lookup$oral_ddd)) & drugs <- AMR_env$AB_lookup[which((!is.na(AMR_env$AB_lookup$iv_ddd) | !is.na(AMR_env$AB_lookup$oral_ddd)) &
AMR_env$AB_lookup$name %unlike% " " & AMR_env$AB_lookup$name %unlike% " " &
AMR_env$AB_lookup$group %like% ab_group & vapply(FUN.VALUE = character(1), AMR_env$AB_lookup$group, function(x) paste(x, collapse = " ")) %like% ab_group &
AMR_env$AB_lookup$ab %unlike% "[0-9]$"), ]$name AMR_env$AB_lookup$ab %unlike% "[0-9]$"), ]$name
if (length(drugs) < n) { if (length(drugs) < n) {
# now try it all # now try it all
drugs <- AMR_env$AB_lookup[which((AMR_env$AB_lookup$group %like% ab_group | drugs <- AMR_env$AB_lookup[which((vapply(FUN.VALUE = character(1), AMR_env$AB_lookup$group, function(x) paste(x, collapse = " ")) %like% ab_group |
AMR_env$AB_lookup$atc_group1 %like% ab_group | AMR_env$AB_lookup$atc_group1 %like% ab_group |
AMR_env$AB_lookup$atc_group2 %like% ab_group) & AMR_env$AB_lookup$atc_group2 %like% ab_group) &
AMR_env$AB_lookup$ab %unlike% "[0-9]$"), ]$name AMR_env$AB_lookup$ab %unlike% "[0-9]$"), ]$name
@@ -1026,7 +1062,7 @@ message_agent_names <- function(function_name, agents, ab_group = NULL, examples
if (message_not_thrown_before(function_name, sort(agents))) { if (message_not_thrown_before(function_name, sort(agents))) {
if (length(agents) == 0) { if (length(agents) == 0) {
if (is.null(ab_group)) { if (is.null(ab_group)) {
message_("For `", function_name, "()` no antimicrobial drugs found", examples, ".") message_("For {.help [{.fun ", function_name, "}](AMR::", function_name, ")} no antimicrobial drugs found", examples, ".")
} else if (ab_group == "administrable_per_os") { } else if (ab_group == "administrable_per_os") {
message_("No orally administrable drugs found", examples, ".") message_("No orally administrable drugs found", examples, ".")
} else if (ab_group == "administrable_iv") { } else if (ab_group == "administrable_iv") {
+34 -21
View File
@@ -40,6 +40,7 @@
#' - A combination of the above, using `c()`, e.g.: #' - A combination of the above, using `c()`, e.g.:
#' - `c(aminoglycosides(), "AMP", "AMC")` #' - `c(aminoglycosides(), "AMP", "AMC")`
#' - `c(aminoglycosides(), carbapenems())` #' - `c(aminoglycosides(), carbapenems())`
#' - Column indices using numbers
#' - Combination therapy, indicated by using `"+"`, with or without [antimicrobial selectors][antimicrobial_selectors], e.g.: #' - Combination therapy, indicated by using `"+"`, with or without [antimicrobial selectors][antimicrobial_selectors], e.g.:
#' - `"cipro + genta"` #' - `"cipro + genta"`
#' - `"TZP+TOB"` #' - `"TZP+TOB"`
@@ -162,7 +163,7 @@
#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN")) #' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
#' ``` #' ```
#' #'
#' WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre datasets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs). #' WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre data sets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs).
#' #'
#' ### Grouped tibbles #' ### Grouped tibbles
#' #'
@@ -444,7 +445,7 @@ antibiogram.default <- function(x,
meet_criteria(wisca, allow_class = "logical", has_length = 1) meet_criteria(wisca, allow_class = "logical", has_length = 1)
if (isTRUE(wisca)) { if (isTRUE(wisca)) {
if (!is.null(mo_transform) && !missing(mo_transform)) { if (!is.null(mo_transform) && !missing(mo_transform)) {
warning_("WISCA must be based on the species level as WISCA parameters are based on this. For that reason, `mo_transform` will be ignored.") warning_("WISCA must be based on the species level as WISCA parameters are based on this. For that reason, {.arg mo_transform} will be ignored.")
} }
mo_transform <- function(x) suppressMessages(suppressWarnings(paste(mo_genus(x, keep_synonyms = TRUE, language = NULL), mo_species(x, keep_synonyms = TRUE, language = NULL)))) mo_transform <- function(x) suppressMessages(suppressWarnings(paste(mo_genus(x, keep_synonyms = TRUE, language = NULL), mo_species(x, keep_synonyms = TRUE, language = NULL))))
} }
@@ -452,7 +453,7 @@ antibiogram.default <- function(x,
deprecation_warning("antibiotics", "antimicrobials", fn = "antibiogram", is_argument = TRUE) deprecation_warning("antibiotics", "antimicrobials", fn = "antibiogram", is_argument = TRUE)
antimicrobials <- list(...)$antibiotics antimicrobials <- list(...)$antibiotics
} }
meet_criteria(antimicrobials, allow_class = "character", allow_NA = FALSE, allow_NULL = FALSE) meet_criteria(antimicrobials, allow_class = c("character", "numeric", "integer", "function"), allow_NA = FALSE, allow_NULL = FALSE)
if (!is.function(mo_transform)) { if (!is.function(mo_transform)) {
meet_criteria(mo_transform, allow_class = "character", has_length = 1, is_in = c("name", "shortname", "gramstain", colnames(AMR::microorganisms)), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(mo_transform, allow_class = "character", has_length = 1, is_in = c("name", "shortname", "gramstain", colnames(AMR::microorganisms)), allow_NULL = TRUE, allow_NA = TRUE)
} }
@@ -481,7 +482,7 @@ antibiogram.default <- function(x,
# try to find columns based on type # try to find columns based on type
if (is.null(col_mo)) { if (is.null(col_mo)) {
col_mo <- search_type_in_df(x = x, type = "mo", info = info) col_mo <- search_type_in_df(x = x, type = "mo", info = info)
stop_if(is.null(col_mo), "`col_mo` must be set") stop_if(is.null(col_mo), "{.arg col_mo} must be set")
} }
# transform MOs # transform MOs
x$`.mo` <- x[, col_mo, drop = TRUE] x$`.mo` <- x[, col_mo, drop = TRUE]
@@ -518,7 +519,11 @@ antibiogram.default <- function(x,
# get antimicrobials # get antimicrobials
ab_trycatch <- tryCatch(colnames(suppressWarnings(x[, antimicrobials, drop = FALSE])), error = function(e) NULL) ab_trycatch <- tryCatch(colnames(suppressWarnings(x[, antimicrobials, drop = FALSE])), error = function(e) NULL)
if (is.null(ab_trycatch)) { if (is.null(ab_trycatch)) {
stop_ifnot(is.character(suppressMessages(antimicrobials)), "`antimicrobials` must be an antimicrobial selector, or a character vector.") # try with tidyverse
ab_trycatch <- tryCatch(colnames(dplyr::select(x, {{ antimicrobials }})), error = function(e) NULL)
}
if (is.null(ab_trycatch)) {
stop_ifnot(is.character(suppressMessages(antimicrobials)), "{.arg antimicrobials} must be an antimicrobial selector, or a character vector.")
antimicrobials.bak <- antimicrobials antimicrobials.bak <- antimicrobials
# split antimicrobials on separator and make it a list # split antimicrobials on separator and make it a list
antimicrobials <- strsplit(gsub(" ", "", antimicrobials), "+", fixed = TRUE) antimicrobials <- strsplit(gsub(" ", "", antimicrobials), "+", fixed = TRUE)
@@ -555,12 +560,11 @@ antibiogram.default <- function(x,
next next
} else { } else {
# determine whether this new column should contain S, I, R, or NA # determine whether this new column should contain S, I, R, or NA
S_values <- c("S", "WT")
if (isTRUE(combine_SI)) { if (isTRUE(combine_SI)) {
S_values <- c("S", "SDD", "I") S_values <- c(S_values, "SDD", "I")
} else {
S_values <- "S"
} }
other_values <- setdiff(c("S", "SDD", "I", "R"), S_values) other_values <- setdiff(c("S", "SDD", "I", "R", "WT", "NWT", "NS"), S_values)
x_transposed <- as.list(as.data.frame(t(x[, abx, drop = FALSE]), stringsAsFactors = FALSE)) x_transposed <- as.list(as.data.frame(t(x[, abx, drop = FALSE]), stringsAsFactors = FALSE))
if (isTRUE(only_all_tested)) { if (isTRUE(only_all_tested)) {
x[new_colname] <- as.sir(vapply(FUN.VALUE = character(1), x_transposed, function(x) ifelse(anyNA(x), NA_character_, ifelse(any(x %in% S_values), "S", "R")), USE.NAMES = FALSE)) x[new_colname] <- as.sir(vapply(FUN.VALUE = character(1), x_transposed, function(x) ifelse(anyNA(x), NA_character_, ifelse(any(x %in% S_values), "S", "R")), USE.NAMES = FALSE))
@@ -575,6 +579,15 @@ antibiogram.default <- function(x,
} }
antimicrobials <- unlist(antimicrobials) antimicrobials <- unlist(antimicrobials)
} else { } else {
existing_ab_combined_cols <- ab_trycatch[ab_trycatch %like% "[+]" & ab_trycatch %in% colnames(x)]
if (length(existing_ab_combined_cols) > 0 && !is.null(ab_transform)) {
ab_transform <- NULL
warning_(
"Detected column name(s) containing the '+' character, which conflicts with the expected syntax in `antibiogram()`: the '+' is used to combine separate antimicrobial drug columns (e.g., \"AMP+GEN\").\n\n",
"To avoid incorrectly guessing which antimicrobials this represents, `ab_transform` was automatically set to `NULL`.\n\n",
"If this is unintended, please rename the column(s) to avoid using '+' in the name, or set `ab_transform = NULL` explicitly to suppress this message."
)
}
antimicrobials <- ab_trycatch antimicrobials <- ab_trycatch
} }
@@ -601,13 +614,12 @@ antibiogram.default <- function(x,
counts <- out counts <- out
out$n_susceptible <- out$S + out$WT
if (isTRUE(combine_SI)) { if (isTRUE(combine_SI)) {
out$n_susceptible <- out$S + out$I + out$SDD out$n_susceptible <- out$n_susceptible + out$I + out$SDD
} else {
out$n_susceptible <- out$S
} }
if (all(out$n_tested < minimum, na.rm = TRUE) && wisca == FALSE) { if (all(out$n_tested < minimum, na.rm = TRUE) && wisca == FALSE) {
warning_("All combinations had less than `minimum = ", minimum, "` results, returning an empty antibiogram") warning_("All combinations had less than {.arg minimum} = {minimum} results, returning an empty antibiogram")
return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram")) return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram"))
} else if (any(out$n_tested < minimum, na.rm = TRUE)) { } else if (any(out$n_tested < minimum, na.rm = TRUE)) {
mins <- sum(out$n_tested < minimum, na.rm = TRUE) mins <- sum(out$n_tested < minimum, na.rm = TRUE)
@@ -615,7 +627,7 @@ antibiogram.default <- function(x,
out <- out %pm>% out <- out %pm>%
subset(n_tested >= minimum) subset(n_tested >= minimum)
if (isTRUE(info) && mins > 0) { if (isTRUE(info) && mins > 0) {
message_("NOTE: ", mins, " combinations had less than `minimum = ", minimum, "` results and were ignored", add_fn = font_red) message_("NOTE: {mins} combinations had less than {.arg minimum} = {minimum} results and were ignored")
} }
} }
} }
@@ -800,7 +812,7 @@ antibiogram.default <- function(x,
# 21. 5 (4-6,N=15/300) # 21. 5 (4-6,N=15/300)
# 22. 5% (4-6%,N=15/300) # 22. 5% (4-6%,N=15/300)
if (wisca == TRUE && !formatting_type %in% c(1, 2, 13, 14) && info == TRUE && message_not_thrown_before("antibiogram", wisca, formatting_type)) { if (wisca == TRUE && !formatting_type %in% c(1, 2, 13, 14) && info == TRUE && message_not_thrown_before("antibiogram", wisca, formatting_type)) {
message_("Using WISCA with a `formatting_type` that includes the denominator is not useful") message_("Using WISCA with a {.arg formatting_type} that includes the denominator is not useful")
} }
out$digits <- digits # since pm_sumarise() cannot work with an object outside the current frame out$digits <- digits # since pm_sumarise() cannot work with an object outside the current frame
if (formatting_type == 1) out <- out %pm>% pm_summarise(out_value = round(coverage * 100, digits = digits)) if (formatting_type == 1) out <- out %pm>% pm_summarise(out_value = round(coverage * 100, digits = digits))
@@ -986,8 +998,8 @@ antibiogram.grouped_df <- function(x,
interval_side = "two-tailed", interval_side = "two-tailed",
info = interactive(), info = interactive(),
...) { ...) {
stop_ifnot(is.null(mo_transform), "`mo_transform` must not be set if creating an antibiogram using a grouped tibble. The groups will become the variables over which the antimicrobials are calculated, which could include the pathogen information (though not necessary). Nonetheless, this makes `mo_transform` redundant.", call = FALSE) stop_ifnot(is.null(mo_transform), "{.arg mo_transform} must not be set if creating an antibiogram using a grouped tibble. The groups will become the variables over which the antimicrobials are calculated, which could include the pathogen information (though not necessary). Nonetheless, this makes {.arg mo_transform} redundant.", call = FALSE)
stop_ifnot(is.null(syndromic_group), "`syndromic_group` must not be set if creating an antibiogram using a grouped tibble. The groups will become the variables over which the antimicrobials are calculated, making `syndromic_groups` redundant.", call = FALSE) stop_ifnot(is.null(syndromic_group), "{.arg syndromic_group} must not be set if creating an antibiogram using a grouped tibble. The groups will become the variables over which the antimicrobials are calculated, making {.arg syndromic_group} redundant.", call = FALSE)
groups <- attributes(x)$groups groups <- attributes(x)$groups
n_groups <- NROW(groups) n_groups <- NROW(groups)
progress <- progress_ticker( progress <- progress_ticker(
@@ -1186,7 +1198,7 @@ simulate_coverage <- function(params) {
#' @param wisca_model The outcome of [wisca()] or [`antibiogram(..., wisca = TRUE)`][antibiogram()]. #' @param wisca_model The outcome of [wisca()] or [`antibiogram(..., wisca = TRUE)`][antibiogram()].
#' @rdname antibiogram #' @rdname antibiogram
retrieve_wisca_parameters <- function(wisca_model, ...) { retrieve_wisca_parameters <- function(wisca_model, ...) {
stop_ifnot(isTRUE(attributes(wisca_model)$wisca), "This function only applies to WISCA models. Use `wisca()` or `antibiogram(..., wisca = TRUE)` to create a WISCA model.") stop_ifnot(isTRUE(attributes(wisca_model)$wisca), "This function only applies to WISCA models. Use {.help [{.fun wisca}](AMR::wisca)} or {.help [{.fun antibiogram}](AMR::antibiogram)} (with {.code wisca = TRUE}) to create a WISCA model.")
attributes(wisca_model)$wisca_parameters attributes(wisca_model)$wisca_parameters
} }
@@ -1194,12 +1206,13 @@ retrieve_wisca_parameters <- function(wisca_model, ...) {
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::tbl_sum, antibiogram) #' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::tbl_sum, antibiogram)
tbl_sum.antibiogram <- function(x, ...) { tbl_sum.antibiogram <- function(x, ...) {
dims <- paste(format(NROW(x), big.mark = ","), AMR_env$cross_icon, format(NCOL(x), big.mark = ",")) dims <- paste(format(NROW(x), big.mark = ","), AMR_env$cross_icon, format(NCOL(x), big.mark = ","))
names(dims) <- "An Antibiogram"
if (isTRUE(attributes(x)$wisca)) { if (isTRUE(attributes(x)$wisca)) {
names(dims) <- paste0("An Antibiogram (WISCA / ", attributes(x)$conf_interval * 100, "% CI)") dims <- c(dims, Type = paste0("WISCA with ", attributes(x)$conf_interval * 100, "% CI"))
} else if (isTRUE(attributes(x)$formatting_type >= 13)) { } else if (isTRUE(attributes(x)$formatting_type >= 13)) {
names(dims) <- paste0("An Antibiogram (non-WISCA / ", attributes(x)$conf_interval * 100, "% CI)") dims <- c(dims, Type = paste0("Non-WISCA with ", attributes(x)$conf_interval * 100, "% CI"))
} else { } else {
names(dims) <- paste0("An Antibiogram (non-WISCA)") dims <- c(dims, Type = paste0("Non-WISCA without CI"))
} }
dims dims
} }
+3 -3
View File
@@ -99,12 +99,12 @@ atc_online_property <- function(atc_code,
read_html <- import_fn("read_html", "xml2") read_html <- import_fn("read_html", "xml2")
if (!all(atc_code %in% unlist(AMR::antimicrobials$atc))) { if (!all(atc_code %in% unlist(AMR::antimicrobials$atc))) {
atc_code <- as.character(ab_atc(atc_code, only_first = TRUE)) missing <- atc_code %unlike% "[A-Z][0-9][0-9][A-Z][A-Z][0-9][0-9]"
atc_code[missing] <- as.character(ab_atc(atc_code[missing], only_first = TRUE))
} }
if (!has_internet()) { if (!has_internet()) {
message_("There appears to be no internet connection, returning NA.", message_("There appears to be no internet connection, returning NA.",
add_fn = font_red,
as_note = FALSE as_note = FALSE
) )
return(rep(NA, length(atc_code))) return(rep(NA, length(atc_code)))
@@ -180,7 +180,7 @@ atc_online_property <- function(atc_code,
colnames(out) <- gsub("^atc.*", "atc", tolower(colnames(out))) colnames(out) <- gsub("^atc.*", "atc", tolower(colnames(out)))
if (length(out) == 0) { if (length(out) == 0) {
message_("in `atc_online_property()`: no properties found for ATC ", atc_code[i], ". Please check ", font_url(atc_url, "this WHOCC webpage"), ".") message_("in {.help [{.fun atc_online_property}](AMR::atc_online_property)}: no properties found for ATC ", atc_code[i], ". Please check {.href {atc_url} this WHOCC webpage}.")
returnvalue[i] <- NA returnvalue[i] <- NA
next next
} }
+1 -1
View File
@@ -51,7 +51,7 @@
#' @section Source: #' @section Source:
#' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://atcddd.fhi.no/atc_ddd_index/} #' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://atcddd.fhi.no/atc_ddd_index/}
#' #'
#' European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm} #' European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm}
#' @aliases av #' @aliases av
#' @return A [character] [vector] with additional class [`ab`] #' @return A [character] [vector] with additional class [`ab`]
#' @seealso #' @seealso
+1 -1
View File
@@ -168,7 +168,7 @@ av_from_text <- function(text,
} }
}) })
} else { } else {
stop_("`type` must be either 'drug', 'dose' or 'administration'") stop_("{.arg type} must be either 'drug', 'dose' or 'administration'")
} }
# collapse text if needed # collapse text if needed
+1 -1
View File
@@ -264,7 +264,7 @@ av_validate <- function(x, property, ...) {
# try to catch an error when inputting an invalid argument # try to catch an error when inputting an invalid argument
# so the 'call.' can be set to FALSE # so the 'call.' can be set to FALSE
tryCatch(x[1L] %in% AMR_env$AV_lookup[1, property, drop = TRUE], tryCatch(x[1L] %in% AMR_env$AV_lookup[1, property, drop = TRUE],
error = function(e) stop(e$message, call. = FALSE) error = function(e) stop(conditionMessage(e), call. = FALSE)
) )
if (!all(x %in% AMR_env$AV_lookup[, property, drop = TRUE])) { if (!all(x %in% AMR_env$AV_lookup[, property, drop = TRUE])) {
+20 -7
View File
@@ -43,7 +43,7 @@
#' @details The function [format()] calculates the resistance per bug-drug combination and returns a table ready for reporting/publishing. Use `combine_SI = TRUE` (default) to test R vs. S+I and `combine_SI = FALSE` to test R+I vs. S. This table can also directly be used in R Markdown / Quarto without the need for e.g. [knitr::kable()]. #' @details The function [format()] calculates the resistance per bug-drug combination and returns a table ready for reporting/publishing. Use `combine_SI = TRUE` (default) to test R vs. S+I and `combine_SI = FALSE` to test R+I vs. S. This table can also directly be used in R Markdown / Quarto without the need for e.g. [knitr::kable()].
#' @export #' @export
#' @rdname bug_drug_combinations #' @rdname bug_drug_combinations
#' @return The function [bug_drug_combinations()] returns a [data.frame] with columns "mo", "ab", "S", "SDD", "I", "R", and "total". #' @return The function [bug_drug_combinations()] returns a [data.frame] with columns "mo", "ab", "S", "SDD", "I", "R", "WT, "NWT", and "total".
#' @examples #' @examples
#' # example_isolates is a data set available in the AMR package. #' # example_isolates is a data set available in the AMR package.
#' # run ?example_isolates for more info. #' # run ?example_isolates for more info.
@@ -111,6 +111,8 @@ bug_drug_combinations <- function(x,
SDD = integer(0), SDD = integer(0),
I = integer(0), I = integer(0),
R = integer(0), R = integer(0),
WT = integer(0),
NWT = integer(0),
total = integer(0), total = integer(0),
total_rows = integer(0), total_rows = integer(0),
stringsAsFactors = FALSE stringsAsFactors = FALSE
@@ -133,6 +135,9 @@ bug_drug_combinations <- function(x,
I = m["I", ], I = m["I", ],
R = m["R", ], R = m["R", ],
NI = m["NI", ], NI = m["NI", ],
WT = m["WT", ],
NWT = m["NWT", ],
NS = m["NS", ],
na = m[which(is.na(rownames(m))), ], na = m[which(is.na(rownames(m))), ],
stringsAsFactors = FALSE stringsAsFactors = FALSE
) )
@@ -146,8 +151,11 @@ bug_drug_combinations <- function(x,
I = merged$I, I = merged$I,
R = merged$R, R = merged$R,
NI = merged$NI, NI = merged$NI,
total = merged$S + merged$SDD + merged$I + merged$R + merged$NI, WT = merged$WT,
total_rows = merged$S + merged$SDD + merged$I + merged$R + merged$NI + merged$na, NWT = merged$NWT,
NS = merged$NS,
total = merged$S + merged$SDD + merged$I + merged$R + merged$NI + merged$WT + merged$NWT + merged$NS,
total_rows = merged$S + merged$SDD + merged$I + merged$R + merged$NI + merged$WT + merged$NWT + merged$NS + merged$na,
stringsAsFactors = FALSE stringsAsFactors = FALSE
) )
if (data_has_groups) { if (data_has_groups) {
@@ -229,12 +237,17 @@ format.bug_drug_combinations <- function(x,
I = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$I[i], na.rm = TRUE)), I = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$I[i], na.rm = TRUE)),
R = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$R[i], na.rm = TRUE)), R = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$R[i], na.rm = TRUE)),
NI = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$NI[i], na.rm = TRUE)), NI = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$NI[i], na.rm = TRUE)),
WT = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$WT[i], na.rm = TRUE)),
NWT = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$NWT[i], na.rm = TRUE)),
NS = vapply(FUN.VALUE = double(1), idx, function(i) sum(x$NS[i], na.rm = TRUE)),
total = vapply(FUN.VALUE = double(1), idx, function(i) { total = vapply(FUN.VALUE = double(1), idx, function(i) {
sum(x$S[i], na.rm = TRUE) + sum(x$S[i], na.rm = TRUE) +
sum(x$SDD[i], na.rm = TRUE) + sum(x$SDD[i], na.rm = TRUE) +
sum(x$I[i], na.rm = TRUE) + sum(x$I[i], na.rm = TRUE) +
sum(x$R[i], na.rm = TRUE) + sum(x$R[i], na.rm = TRUE) +
sum(x$NI[i], na.rm = TRUE) sum(x$WT[i], na.rm = TRUE) +
sum(x$NWT[i], na.rm = TRUE) +
sum(x$NS[i], na.rm = TRUE)
}), }),
stringsAsFactors = FALSE stringsAsFactors = FALSE
) )
@@ -246,10 +259,10 @@ format.bug_drug_combinations <- function(x,
if (remove_intrinsic_resistant == TRUE) { if (remove_intrinsic_resistant == TRUE) {
x <- subset(x, R != total) x <- subset(x, R != total)
} }
x$isolates <- x$R + x$NWT
if (combine_SI == TRUE) { if (combine_SI == TRUE) {
x$isolates <- x$R x$isolates <- x$isolates + x$I + x$SDD
} else {
x$isolates <- x$R + x$I + x$SDD
} }
give_ab_name <- function(ab, format, language) { give_ab_name <- function(ab, format, language) {
+45 -20
View File
@@ -33,13 +33,16 @@
#' #'
#' [count_resistant()] should be used to count resistant isolates, [count_susceptible()] should be used to count susceptible isolates. #' [count_resistant()] should be used to count resistant isolates, [count_susceptible()] should be used to count susceptible isolates.
#' @param ... One or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with [as.sir()] if needed. #' @param ... One or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with [as.sir()] if needed.
#' @param guideline Either `"EUCAST"` (default) or `"CLSI"`. With EUCAST, the 'I' category will be considered as susceptible (see [EUCAST website](https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/)), but with with CLSI, it will be considered resistant. Therefore:
#' * EUCAST: [count_susceptible()] \eqn{= N_{S} + N_{I}}, [count_resistant()] \eqn{= N_{R}}
#' * CLSI: [count_susceptible()] \eqn{= N_{S} + N_{SDD}}, [count_resistant()] \eqn{= N_{I} + N_{R}}
#'
#' You can also use e.g. [count_R()] or [count_S()] instead, to be explicit.
#' @inheritParams proportion #' @inheritParams proportion
#' @inheritSection as.sir Interpretation of SIR #' @inheritSection as.sir Interpretation of SIR
#' @details These functions are meant to count isolates. Use the [resistance()]/[susceptibility()] functions to calculate microbial resistance/susceptibility. #' @details These functions are meant to count isolates. Use the [resistance()]/[susceptibility()] functions to calculate microbial resistance/susceptibility.
#' #'
#' The function [count_resistant()] is equal to the function [count_R()]. The function [count_susceptible()] is equal to the function [count_SI()]. #' The function [n_sir()] is an alias of [count_all()]. They can be used to count all available isolates, i.e. where all input antimicrobials have an available result (S, I or R). Their use is equal to `dplyr`'s `n_distinct()`. Their function is equal to `count_susceptible(...) + count_resistant(...)`.
#'
#' The function [n_sir()] is an alias of [count_all()]. They can be used to count all available isolates, i.e. where all input antimicrobials have an available result (S, I or R). Their use is equal to `n_distinct()`. Their function is equal to `count_susceptible(...) + count_resistant(...)`.
#' #'
#' The function [count_df()] takes any variable from `data` that has an [`sir`] class (created with [as.sir()]) and counts the number of S's, I's and R's. It also supports grouped variables. The function [sir_df()] works exactly like [count_df()], but adds the percentage of S, I and R. #' The function [count_df()] takes any variable from `data` that has an [`sir`] class (created with [as.sir()]) and counts the number of S's, I's and R's. It also supports grouped variables. The function [sir_df()] works exactly like [count_df()], but adds the percentage of S, I and R.
#' @inheritSection proportion Combination Therapy #' @inheritSection proportion Combination Therapy
@@ -119,27 +122,49 @@
#' count_df(translate = FALSE) #' count_df(translate = FALSE)
#' } #' }
#' } #' }
count_resistant <- function(..., only_all_tested = FALSE) { count_resistant <- function(...,
only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc()
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("count_resistant", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun count_resistant}](AMR::count_resistant)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")
message_("This message will be shown once per session.")
}
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = "R", ab_result = c(
"R", "NWT", "NS",
if (identical(guideline, "CLSI")) "I"
),
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
#' @rdname count #' @rdname count
#' @export #' @export
count_susceptible <- function(..., only_all_tested = FALSE) { count_susceptible <- function(...,
only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc()
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("count_susceptible", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun count_susceptible}](AMR::count_susceptible)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")
message_("This message will be shown once per session.")
}
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("S", "SDD", "I"), ab_result = c(
"S", "SDD", "WT",
if (identical(guideline, "EUCAST")) "I"
),
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -152,7 +177,7 @@ count_S <- function(..., only_all_tested = FALSE) {
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -161,11 +186,11 @@ count_S <- function(..., only_all_tested = FALSE) {
count_SI <- function(..., only_all_tested = FALSE) { count_SI <- function(..., only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("S", "SDD", "I"), ab_result = c("S", "SDD", "I", "WT"),
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -178,7 +203,7 @@ count_I <- function(..., only_all_tested = FALSE) {
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -187,11 +212,11 @@ count_I <- function(..., only_all_tested = FALSE) {
count_IR <- function(..., only_all_tested = FALSE) { count_IR <- function(..., only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("I", "SDD", "R"), ab_result = c("I", "SDD", "R", "NWT"),
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -200,11 +225,11 @@ count_IR <- function(..., only_all_tested = FALSE) {
count_R <- function(..., only_all_tested = FALSE) { count_R <- function(..., only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = "R", ab_result = c("R", "NWT", "NS"),
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -213,11 +238,11 @@ count_R <- function(..., only_all_tested = FALSE) {
count_all <- function(..., only_all_tested = FALSE) { count_all <- function(..., only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("S", "SDD", "I", "R", "NI"), ab_result = VALID_SIR_LEVELS,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -240,6 +265,6 @@ count_df <- function(data,
combine_SI = combine_SI, combine_SI = combine_SI,
confidence_level = 0.95 # doesn't matter, will be removed confidence_level = 0.95 # doesn't matter, will be removed
), ),
error = function(e) stop_(gsub("in sir_calc_df(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc_df(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
+1 -1
View File
@@ -155,7 +155,7 @@ add_custom_antimicrobials <- function(x) {
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(!AMR_env$ab_previously_coerced$ab %in% c(x$ab, x$generalised_name) & !AMR_env$ab_previously_coerced$x %in% c(x$ab, x$generalised_name)), , drop = FALSE] AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(!AMR_env$ab_previously_coerced$ab %in% c(x$ab, x$generalised_name) & !AMR_env$ab_previously_coerced$x %in% c(x$ab, x$generalised_name)), , drop = FALSE]
class(AMR_env$AB_lookup$ab) <- c("ab", "character") class(AMR_env$AB_lookup$ab) <- c("ab", "character")
message_("Added ", nr2char(nrow(x)), " record", ifelse(nrow(x) > 1, "s", ""), " to the internal `antimicrobials` data set.") message_("Added ", nr2char(nrow(x)), " record", ifelse(nrow(x) > 1, "s", ""), " to the internal {.code antimicrobials} data set.")
} }
#' @rdname add_custom_antimicrobials #' @rdname add_custom_antimicrobials
+6 -6
View File
@@ -150,15 +150,15 @@ custom_eucast_rules <- function(...) {
) )
stop_if( stop_if(
identical(dots, "error"), identical(dots, "error"),
"rules must be a valid formula inputs (e.g., using '~'), see `?custom_eucast_rules`" "rules must be a valid formula inputs (e.g., using '~'), see {.help [{.fun custom_eucast_rules}](AMR::custom_eucast_rules)}"
) )
n_dots <- length(dots) n_dots <- length(dots)
stop_if(n_dots == 0, "no custom rules were set. Please read the documentation using `?custom_eucast_rules`.") stop_if(n_dots == 0, "no custom rules were set. Please read the documentation using {.help [{.fun custom_eucast_rules}](AMR::custom_eucast_rules)}.")
out <- vector("list", n_dots) out <- vector("list", n_dots)
for (i in seq_len(n_dots)) { for (i in seq_len(n_dots)) {
stop_ifnot( stop_ifnot(
inherits(dots[[i]], "formula"), inherits(dots[[i]], "formula"),
"rule ", i, " must be a valid formula input (e.g., using '~'), see `?custom_eucast_rules`" "rule ", i, " must be a valid formula input (e.g., using '~'), see {.help [{.fun custom_eucast_rules}](AMR::custom_eucast_rules)}"
) )
# Query # Query
@@ -180,7 +180,7 @@ custom_eucast_rules <- function(...) {
result <- dots[[i]][[3]] result <- dots[[i]][[3]]
stop_ifnot( stop_ifnot(
deparse(result) %like% "==", deparse(result) %like% "==",
"the result of rule ", i, " (the part after the `~`) must contain `==`, such as in `... ~ ampicillin == \"R\"`, see `?custom_eucast_rules`" "the result of rule ", i, " (the part after the `~`) must contain `==`, such as in `... ~ ampicillin == \"R\"`, see {.help [{.fun custom_eucast_rules}](AMR::custom_eucast_rules)}"
) )
result_group <- as.character(result)[[2]] result_group <- as.character(result)[[2]]
result_group <- as.character(str2lang(result_group)) result_group <- as.character(str2lang(result_group))
@@ -220,8 +220,8 @@ custom_eucast_rules <- function(...) {
result_value <- as.character(result)[[3]] result_value <- as.character(result)[[3]]
result_value[result_value == "NA"] <- NA result_value[result_value == "NA"] <- NA
stop_ifnot( stop_ifnot(
result_value %in% c("S", "SDD", "I", "R", "NI", NA), result_value %in% c(VALID_SIR_LEVELS, NA),
"the resulting value of rule ", i, " must be either \"S\", \"SDD\", \"I\", \"R\", \"NI\" or NA" paste0("the resulting value of rule ", i, " must be either ", vector_or(c(VALID_SIR_LEVELS, NA), sort = FALSE))
) )
result_value <- as.sir(result_value) result_value <- as.sir(result_value)
+10 -11
View File
@@ -145,15 +145,15 @@ custom_mdro_guideline <- function(..., as_factor = TRUE) {
) )
stop_if( stop_if(
identical(dots, "error"), identical(dots, "error"),
"rules must be a valid formula inputs (e.g., using '~'), see `?mdro`" "rules must be a valid formula inputs (e.g., using '~'), see {.help [{.fun mdro}](AMR::mdro)}"
) )
n_dots <- length(dots) n_dots <- length(dots)
stop_if(n_dots == 0, "no custom rules were set. Please read the documentation using `?mdro`.") stop_if(n_dots == 0, "no custom rules were set. Please read the documentation using {.help [{.fun mdro}](AMR::mdro)}.")
out <- vector("list", n_dots) out <- vector("list", n_dots)
for (i in seq_len(n_dots)) { for (i in seq_len(n_dots)) {
stop_ifnot( stop_ifnot(
inherits(dots[[i]], "formula"), inherits(dots[[i]], "formula"),
"rule ", i, " must be a valid formula input (e.g., using '~'), see `?mdro`" "rule ", i, " must be a valid formula input (e.g., using '~'), see {.help [{.fun mdro}](AMR::mdro)}"
) )
# Query # Query
@@ -175,7 +175,7 @@ custom_mdro_guideline <- function(..., as_factor = TRUE) {
# Value # Value
val <- tryCatch(eval(dots[[i]][[3]]), error = function(e) NULL) val <- tryCatch(eval(dots[[i]][[3]]), error = function(e) NULL)
stop_if(is.null(val), "rule ", i, " must return a valid value, it now returns an error: ", tryCatch(eval(dots[[i]][[3]]), error = function(e) e$message)) stop_if(is.null(val), "rule ", i, " must return a valid value, it now returns an error: ", tryCatch(eval(dots[[i]][[3]]), error = function(e) conditionMessage(e)))
stop_if(length(val) > 1, "rule ", i, " must return a value of length 1, not ", length(val)) stop_if(length(val) > 1, "rule ", i, " must return a value of length 1, not ", length(val))
out[[i]]$value <- as.character(val) out[[i]]$value <- as.character(val)
} }
@@ -202,7 +202,7 @@ c.custom_mdro_guideline <- function(x, ..., as_factor = NULL) {
} }
for (g in list(...)) { for (g in list(...)) {
stop_ifnot(inherits(g, "custom_mdro_guideline"), stop_ifnot(inherits(g, "custom_mdro_guideline"),
"for combining custom MDRO guidelines, all rules must be created with `custom_mdro_guideline()`", "for combining custom MDRO guidelines, all rules must be created with {.help [{.fun custom_mdro_guideline}](AMR::custom_mdro_guideline)}",
call = FALSE call = FALSE
) )
vals <- attributes(x)$values vals <- attributes(x)$values
@@ -254,21 +254,20 @@ run_custom_mdro_guideline <- function(df, guideline, info) {
for (i in seq_len(n_dots)) { for (i in seq_len(n_dots)) {
qry <- tryCatch(eval(parse(text = guideline[[i]]$query), envir = df, enclos = parent.frame()), qry <- tryCatch(eval(parse(text = guideline[[i]]$query), envir = df, enclos = parent.frame()),
error = function(e) { error = function(e) {
AMR_env$err_msg <- e$message AMR_env$err_msg <- conditionMessage(e)
return("error") return("error")
} }
) )
if (identical(qry, "error")) { if (identical(qry, "error")) {
warning_("in `custom_mdro_guideline()`: rule ", i, warning_("in {.help [{.fun custom_mdro_guideline}](AMR::custom_mdro_guideline)}: rule ", i,
" (`", as.character(guideline[[i]]$query), "`) was ignored because of this error message: ", " (`", as.character(guideline[[i]]$query), "`) was ignored because of this error message: ",
AMR_env$err_msg, AMR_env$err_msg,
call = FALSE, call = FALSE
add_fn = font_red
) )
next next
} }
stop_ifnot(is.logical(qry), "in custom_mdro_guideline(): rule ", i, " (`", guideline[[i]]$query, stop_ifnot(is.logical(qry), "in {.help [{.fun custom_mdro_guideline}](AMR::custom_mdro_guideline)}: rule ", i, " (`", guideline[[i]]$query,
"`) must return `TRUE` or `FALSE`, not ", "`) must return {.code TRUE} or {.code FALSE}, not ",
format_class(class(qry), plural = FALSE), format_class(class(qry), plural = FALSE),
call = FALSE call = FALSE
) )
+3 -3
View File
@@ -281,9 +281,9 @@ add_custom_microorganisms <- function(x) {
AMR_env$MO_lookup <- unique(rbind_AMR(AMR_env$MO_lookup, new_df)) AMR_env$MO_lookup <- unique(rbind_AMR(AMR_env$MO_lookup, new_df))
class(AMR_env$MO_lookup$mo) <- c("mo", "character") class(AMR_env$MO_lookup$mo) <- c("mo", "character")
if (nrow(x) <= 3) { if (nrow(x) <= 3) {
message_("Added ", vector_and(italicise(x$fullname), quotes = FALSE), " to the internal `microorganisms` data set.") message_("Added ", vector_and(italicise(x$fullname), quotes = FALSE), " to the internal {.code microorganisms} data set.")
} else { } else {
message_("Added ", nr2char(nrow(x)), " records to the internal `microorganisms` data set.") message_("Added ", nr2char(nrow(x)), " records to the internal {.code microorganisms} data set.")
} }
} }
@@ -303,7 +303,7 @@ clear_custom_microorganisms <- function() {
AMR_env$custom_mo_codes <- character(0) AMR_env$custom_mo_codes <- character(0)
AMR_env$mo_previously_coerced <- AMR_env$mo_previously_coerced[which(AMR_env$mo_previously_coerced$mo %in% AMR_env$MO_lookup$mo), , drop = FALSE] AMR_env$mo_previously_coerced <- AMR_env$mo_previously_coerced[which(AMR_env$mo_previously_coerced$mo %in% AMR_env$MO_lookup$mo), , drop = FALSE]
AMR_env$mo_uncertainties <- AMR_env$mo_uncertainties[0, , drop = FALSE] AMR_env$mo_uncertainties <- AMR_env$mo_uncertainties[0, , drop = FALSE]
message_("Cleared ", nr2char(n - n2), " custom record", ifelse(n - n2 > 1, "s", ""), " from the internal `microorganisms` data set.") message_("Cleared ", nr2char(n - n2), " custom record", ifelse(n - n2 > 1, "s", ""), " from the internal {.code microorganisms} data set.")
} }
abbreviate_mo <- function(x, minlength = 5, prefix = "", hyphen_as_space = FALSE, ...) { abbreviate_mo <- function(x, minlength = 5, prefix = "", hyphen_as_space = FALSE, ...) {
+14 -2
View File
@@ -38,7 +38,7 @@
#' - `ab`\cr antimicrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. ***This is a unique identifier.*** #' - `ab`\cr antimicrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. ***This is a unique identifier.***
#' - `cid`\cr Compound ID as found in PubChem. ***This is a unique identifier.*** #' - `cid`\cr Compound ID as found in PubChem. ***This is a unique identifier.***
#' - `name`\cr Official name as used by WHONET/EARS-Net or the WHO. ***This is a unique identifier.*** #' - `name`\cr Official name as used by WHONET/EARS-Net or the WHO. ***This is a unique identifier.***
#' - `group`\cr A short and concise group name, based on WHONET and WHOCC definitions #' - `group`\cr One or more short and concise group names, based on WHONET and WHOCC definitions
#' - `atc`\cr ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like `J01CR02` (last updated `r documentation_date(TAXONOMY_VERSION$ATC_DDD$accessed_date)`): #' - `atc`\cr ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like `J01CR02` (last updated `r documentation_date(TAXONOMY_VERSION$ATC_DDD$accessed_date)`):
#' - `atc_group1`\cr Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like `"Macrolides, lincosamides and streptogramins"` #' - `atc_group1`\cr Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like `"Macrolides, lincosamides and streptogramins"`
#' - `atc_group2`\cr Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like `"Macrolides"` #' - `atc_group2`\cr Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like `"Macrolides"`
@@ -282,7 +282,7 @@
#' Data Set with Clinical Breakpoints for SIR Interpretation #' Data Set with Clinical Breakpoints for SIR Interpretation
#' #'
#' @description Data set containing clinical breakpoints to interpret MIC and disk diffusion to SIR values, according to international guidelines. This dataset contain breakpoints for humans, `r length(unique(clinical_breakpoints$host[!clinical_breakpoints$host %in% clinical_breakpoints$type]))` different animal groups, and ECOFFs. #' @description Data set containing clinical breakpoints to interpret MIC and disk diffusion to SIR values, according to international guidelines. This data set contains breakpoints for humans, `r length(unique(clinical_breakpoints$host[!clinical_breakpoints$host %in% clinical_breakpoints$type]))` different animal groups, and ECOFFs.
#' #'
#' These breakpoints are currently implemented: #' These breakpoints are currently implemented:
#' - For **clinical microbiology**: EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST" & type == "human")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST" & type == "human")$guideline)))` and CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "human")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "human")$guideline)))`; #' - For **clinical microbiology**: EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST" & type == "human")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST" & type == "human")$guideline)))` and CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "human")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "human")$guideline)))`;
@@ -361,3 +361,15 @@
#' @examples #' @examples
#' dosage #' dosage
"dosage" "dosage"
#' Data Set with `r format(nrow(esbl_isolates), big.mark = " ")` ESBL Isolates
#'
#' A data set containing `r format(nrow(esbl_isolates), big.mark = " ")` microbial isolates with MIC values of common antibiotics and a binary `esbl` column for extended-spectrum beta-lactamase (ESBL) production. This data set contains randomised fictitious data but reflects reality and can be used to practise AMR-related machine learning, e.g., classification modelling with [tidymodels](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
#' @format A [tibble][tibble::tibble] with `r format(nrow(esbl_isolates), big.mark = " ")` observations and `r ncol(esbl_isolates)` variables:
#' - `esbl`\cr Logical indicator if the isolate is ESBL-producing
#' - `genus`\cr Genus of the microorganism
#' - `AMC:COL`\cr MIC values for 17 antimicrobial drugs, transformed to class [`mic`] (see [as.mic()])
#' @details See our [tidymodels integration][amr-tidymodels] for an example using this data set.
#' @examples
#' esbl_isolates
"esbl_isolates"
+8 -6
View File
@@ -121,7 +121,7 @@ as.disk <- function(x, na.rm = FALSE) {
cur_col <- get_current_column() cur_col <- get_current_column()
warning_("in `as.disk()`: ", na_after - na_before, " result", warning_("in `as.disk()`: ", na_after - na_before, " result",
ifelse(na_after - na_before > 1, "s", ""), ifelse(na_after - na_before > 1, "s", ""),
ifelse(is.null(cur_col), "", paste0(" in index '", cur_col, "'")), ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
" truncated (", " truncated (",
round(((na_after - na_before) / length(x)) * 100), round(((na_after - na_before) / length(x)) * 100),
"%) that were invalid disk zones: ", "%) that were invalid disk zones: ",
@@ -236,12 +236,14 @@ rep.disk <- function(x, ...) {
# this prevents the requirement for putting the dependency in Imports: # this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, disk) #' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, disk)
get_skimmers.disk <- function(column) { get_skimmers.disk <- function(column) {
column <- as.integer(column)
skimr::sfl( skimr::sfl(
skim_type = "disk", skim_type = "disk",
min = ~ min(as.double(.), na.rm = TRUE), p0 = ~ stats::quantile(column, probs = 0, na.rm = TRUE, names = FALSE),
max = ~ max(as.double(.), na.rm = TRUE), p25 = ~ stats::quantile(column, probs = 0.25, na.rm = TRUE, names = FALSE),
median = ~ stats::median(as.double(.), na.rm = TRUE), p50 = ~ stats::quantile(column, probs = 0.5, na.rm = TRUE, names = FALSE),
n_unique = ~ length(unique(stats::na.omit(.))), p75 = ~ stats::quantile(column, probs = 0.75, na.rm = TRUE, names = FALSE),
hist = ~ skimr::inline_hist(stats::na.omit(as.double(.))) p100 = ~ stats::quantile(column, probs = 1, na.rm = TRUE, names = FALSE),
hist = ~ skimr::inline_hist(stats::na.omit(column), 10)
) )
} }
+33 -41
View File
@@ -61,7 +61,7 @@
#' #'
#' All isolates with a microbial ID of `NA` will be excluded as first isolate. #' All isolates with a microbial ID of `NA` will be excluded as first isolate.
#' #'
#' ### Different methods #' ## Different methods
#' #'
#' According to previously-mentioned sources, there are different methods (algorithms) to select first isolates with increasing reliability: isolate-based, patient-based, episode-based and phenotype-based. All methods select on a combination of the taxonomic genus and species (not subspecies). #' According to previously-mentioned sources, there are different methods (algorithms) to select first isolates with increasing reliability: isolate-based, patient-based, episode-based and phenotype-based. All methods select on a combination of the taxonomic genus and species (not subspecies).
#' #'
@@ -89,21 +89,29 @@
#' | - Major difference in any antimicrobial result | - `first_isolate(x, type = "points")` | #' | - Major difference in any antimicrobial result | - `first_isolate(x, type = "points")` |
#' | - Any difference in key antimicrobial results | - `first_isolate(x, type = "keyantimicrobials")` | #' | - Any difference in key antimicrobial results | - `first_isolate(x, type = "keyantimicrobials")` |
#' #'
#' ### Isolate-based #' **Isolate-based**
#'
#' _Minimum variables required: Microorganism identifier_
#' #'
#' This method does not require any selection, as all isolates should be included. It does, however, respect all arguments set in the [first_isolate()] function. For example, the default setting for `include_unknown` (`FALSE`) will omit selection of rows without a microbial ID. #' This method does not require any selection, as all isolates should be included. It does, however, respect all arguments set in the [first_isolate()] function. For example, the default setting for `include_unknown` (`FALSE`) will omit selection of rows without a microbial ID.
#' #'
#' ### Patient-based #' **Patient-based**
#' #'
#' To include every genus-species combination per patient once, set the `episode_days` to `Inf`. This method makes sure that no duplicate isolates are selected from the same patient. This method is preferred to e.g. identify the first MRSA finding of each patient to determine the incidence. Conversely, in a large longitudinal data set, this could mean that isolates are *excluded* that were found years after the initial isolate. #' _Minimum variables required: Microorganism identifier, Patient identifier_
#' #'
#' ### Episode-based #' This method includes every genus-species combination per patient once. This method makes sure that no duplicate isolates are selected from the same patient. This method is preferred to e.g. identify the first MRSA finding of each patient to determine the incidence. Conversely, in a large longitudinal data set, this could mean that isolates are *excluded* that were found years after the initial isolate.
#' #'
#' To include every genus-species combination per patient episode once, set the `episode_days` to a sensible number of days. Depending on the type of analysis, this could be 14, 30, 60 or 365. Short episodes are common for analysing specific hospital or ward data or ICU cases, long episodes are common for analysing regional and national data. #' **Episode-based**
#'
#' _Minimum variables required: Microorganism identifier, Patient identifier, Date_
#'
#' To include every genus-species combination per patient episode once, set the `episode_days` to a sensible number of days. Depending on the type of analysis, this could be e.g., 14, 30, 60 or 365. Short episodes are common for analysing specific hospital or ward data or ICU cases, long episodes are common for analysing regional and national data.
#' #'
#' This is the most common method to correct for duplicate isolates. Patients are categorised into episodes based on their ID and dates (e.g., the date of specimen receipt or laboratory result). While this is a common method, it does not take into account antimicrobial test results. This means that e.g. a methicillin-resistant *Staphylococcus aureus* (MRSA) isolate cannot be differentiated from a wildtype *Staphylococcus aureus* isolate. #' This is the most common method to correct for duplicate isolates. Patients are categorised into episodes based on their ID and dates (e.g., the date of specimen receipt or laboratory result). While this is a common method, it does not take into account antimicrobial test results. This means that e.g. a methicillin-resistant *Staphylococcus aureus* (MRSA) isolate cannot be differentiated from a wildtype *Staphylococcus aureus* isolate.
#' #'
#' ### Phenotype-based #' **Phenotype-based**
#'
#' _Minimum variables required: Microorganism identifier, Patient identifier, Date, Antimicrobial test results_
#' #'
#' This is a more reliable method, since it also *weighs* the antibiogram (antimicrobial test results) yielding so-called 'first weighted isolates'. There are two different methods to weigh the antibiogram: #' This is a more reliable method, since it also *weighs* the antibiogram (antimicrobial test results) yielding so-called 'first weighted isolates'. There are two different methods to weigh the antibiogram:
#' #'
@@ -238,7 +246,7 @@ first_isolate <- function(x = NULL,
FUN.VALUE = logical(1), FUN.VALUE = logical(1),
X = x, X = x,
# check only first 10,000 rows # check only first 10,000 rows
FUN = function(x) any(as.character(x[1:10000]) %in% c("S", "SDD", "I", "R", "NI"), na.rm = TRUE), FUN = function(x) any(as.character(x[1:10000]) %in% VALID_SIR_LEVELS, na.rm = TRUE),
USE.NAMES = FALSE USE.NAMES = FALSE
)) ))
if (method == "phenotype-based" && !any_col_contains_sir) { if (method == "phenotype-based" && !any_col_contains_sir) {
@@ -255,8 +263,7 @@ first_isolate <- function(x = NULL,
), ),
"" ""
) )
), )
add_fn = font_red
) )
} }
@@ -264,7 +271,7 @@ first_isolate <- function(x = NULL,
# -- mo # -- mo
if (is.null(col_mo)) { if (is.null(col_mo)) {
col_mo <- search_type_in_df(x = x, type = "mo", info = info) col_mo <- search_type_in_df(x = x, type = "mo", info = info)
stop_if(is.null(col_mo), "`col_mo` must be set") stop_if(is.null(col_mo), "{.arg col_mo} must be set")
} }
# methods ---- # methods ----
@@ -301,7 +308,7 @@ first_isolate <- function(x = NULL,
# -- date # -- date
if (is.null(col_date)) { if (is.null(col_date)) {
col_date <- search_type_in_df(x = x, type = "date", info = info) col_date <- search_type_in_df(x = x, type = "date", info = info)
stop_if(is.null(col_date), "`col_date` must be set") stop_if(is.null(col_date), "{.arg col_date} must be set")
} }
# -- patient id # -- patient id
@@ -310,11 +317,11 @@ first_isolate <- function(x = NULL,
# WHONET support # WHONET support
x$patient_id <- paste(x$`First name`, x$`Last name`, x$Sex) x$patient_id <- paste(x$`First name`, x$`Last name`, x$Sex)
col_patient_id <- "patient_id" col_patient_id <- "patient_id"
message_("Using combined columns '", font_bold("First name"), "', '", font_bold("Last name"), "' and '", font_bold("Sex"), "' as input for `col_patient_id`") message_("Using combined columns '", font_bold("First name"), "', '", font_bold("Last name"), "' and '", font_bold("Sex"), "' as input for {.arg col_patient_id}")
} else { } else {
col_patient_id <- search_type_in_df(x = x, type = "patient_id", info = info) col_patient_id <- search_type_in_df(x = x, type = "patient_id", info = info)
} }
stop_if(is.null(col_patient_id), "`col_patient_id` must be set") stop_if(is.null(col_patient_id), "{.arg col_patient_id} must be set")
} }
# -- specimen # -- specimen
@@ -326,7 +333,7 @@ first_isolate <- function(x = NULL,
check_columns_existance <- function(column, tblname = x) { check_columns_existance <- function(column, tblname = x) {
if (!is.null(column)) { if (!is.null(column)) {
stop_ifnot(column %in% colnames(tblname), stop_ifnot(column %in% colnames(tblname),
"Column '", column, "' not found.", "Column '{column}' not found.",
call = FALSE call = FALSE
) )
} }
@@ -355,9 +362,7 @@ first_isolate <- function(x = NULL,
} }
# remove testcodes # remove testcodes
if (!is.null(testcodes_exclude) && isTRUE(info) && message_not_thrown_before("first_isolate", "excludingtestcodes")) { if (!is.null(testcodes_exclude) && isTRUE(info) && message_not_thrown_before("first_isolate", "excludingtestcodes")) {
message_("Excluding test codes: ", vector_and(testcodes_exclude, quotes = TRUE), message_("Excluding test codes: ", vector_and(testcodes_exclude, quotes = TRUE))
add_fn = font_red
)
} }
if (is.null(col_specimen)) { if (is.null(col_specimen)) {
@@ -368,9 +373,7 @@ first_isolate <- function(x = NULL,
if (!is.null(specimen_group)) { if (!is.null(specimen_group)) {
check_columns_existance(col_specimen, x) check_columns_existance(col_specimen, x)
if (isTRUE(info) && message_not_thrown_before("first_isolate", "excludingspecimen")) { if (isTRUE(info) && message_not_thrown_before("first_isolate", "excludingspecimen")) {
message_("Excluding other than specimen group '", specimen_group, "'", message_("Excluding other than specimen group '{specimen_group}'")
add_fn = font_red
)
} }
} }
if (!is.null(col_keyantimicrobials)) { if (!is.null(col_keyantimicrobials)) {
@@ -412,7 +415,6 @@ first_isolate <- function(x = NULL,
if (abs(row.start) == Inf || abs(row.end) == Inf) { if (abs(row.start) == Inf || abs(row.end) == Inf) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("=> Found ", font_bold("no isolates"), message_("=> Found ", font_bold("no isolates"),
add_fn = font_black,
as_note = FALSE as_note = FALSE
) )
} }
@@ -421,7 +423,6 @@ first_isolate <- function(x = NULL,
if (row.start == row.end) { if (row.start == row.end) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("=> Found ", font_bold("1 first isolate"), ", as the data only contained 1 row", message_("=> Found ", font_bold("1 first isolate"), ", as the data only contained 1 row",
add_fn = font_black,
as_note = FALSE as_note = FALSE
) )
} }
@@ -429,9 +430,7 @@ first_isolate <- function(x = NULL,
} }
if (length(c(row.start:row.end)) == pm_n_distinct(x[c(row.start:row.end), col_mo, drop = TRUE])) { if (length(c(row.start:row.end)) == pm_n_distinct(x[c(row.start:row.end), col_mo, drop = TRUE])) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("=> Found ", font_bold(paste(length(c(row.start:row.end)), "first isolates")), message_("=> Found {.strong {length(c(row.start:row.end))} first isolates}, as all isolates were different microbial species",
", as all isolates were different microbial species",
add_fn = font_black,
as_note = FALSE as_note = FALSE
) )
} }
@@ -450,14 +449,12 @@ first_isolate <- function(x = NULL,
if (type == "keyantimicrobials") { if (type == "keyantimicrobials") {
message_("Basing inclusion on key antimicrobials, ", message_("Basing inclusion on key antimicrobials, ",
ifelse(ignore_I == FALSE, "not ", ""), ifelse(ignore_I == FALSE, "not ", ""),
"ignoring I", "ignoring I"
add_fn = font_red
) )
} }
if (type == "points") { if (type == "points") {
message_("Basing inclusion on all antimicrobial results, using a points threshold of ", message_("Basing inclusion on all antimicrobial results, using a points threshold of ",
points_threshold, points_threshold
add_fn = font_red
) )
} }
} }
@@ -516,9 +513,7 @@ first_isolate <- function(x = NULL,
if (any(!is.na(x$newvar_is_icu)) && any(x$newvar_is_icu == TRUE, na.rm = TRUE)) { if (any(!is.na(x$newvar_is_icu)) && any(x$newvar_is_icu == TRUE, na.rm = TRUE)) {
if (icu_exclude == TRUE) { if (icu_exclude == TRUE) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("Excluding ", format(sum(x$newvar_is_icu, na.rm = TRUE), decimal.mark = decimal.mark, big.mark = big.mark), " isolates from ICU.", message_("Excluding ", format(sum(x$newvar_is_icu, na.rm = TRUE), decimal.mark = decimal.mark, big.mark = big.mark), " isolates from ICU.")
add_fn = font_red
)
} }
x[which(x$newvar_is_icu), "newvar_first_isolate"] <- FALSE x[which(x$newvar_is_icu), "newvar_first_isolate"] <- FALSE
} else if (isTRUE(info)) { } else if (isTRUE(info)) {
@@ -542,9 +537,8 @@ first_isolate <- function(x = NULL,
paste0('"', x, '"') paste0('"', x, '"')
} }
}) })
message_("\nGroup: ", paste0(names(group), " = ", group, collapse = ", "), "\n", message_("\nGroup: {toString(paste0(names(group), ' = ', group))}\n",
as_note = FALSE, as_note = FALSE
add_fn = font_red
) )
} }
} }
@@ -557,8 +551,7 @@ first_isolate <- function(x = NULL,
format(sum(x$newvar_mo == "UNKNOWN", na.rm = TRUE), format(sum(x$newvar_mo == "UNKNOWN", na.rm = TRUE),
decimal.mark = decimal.mark, big.mark = big.mark decimal.mark = decimal.mark, big.mark = big.mark
), ),
" isolates with a microbial ID 'UNKNOWN' (in column '", font_bold(col_mo), "')", " isolates with a microbial ID 'UNKNOWN' (in column '", font_bold(col_mo), "')"
add_fn = font_red
) )
} }
x[which(x$newvar_mo == "UNKNOWN"), "newvar_first_isolate"] <- include_unknown x[which(x$newvar_mo == "UNKNOWN"), "newvar_first_isolate"] <- include_unknown
@@ -569,8 +562,7 @@ first_isolate <- function(x = NULL,
"Excluding ", format(sum(is.na(x$newvar_mo), na.rm = TRUE), "Excluding ", format(sum(is.na(x$newvar_mo), na.rm = TRUE),
decimal.mark = decimal.mark, big.mark = big.mark decimal.mark = decimal.mark, big.mark = big.mark
), ),
" isolates with a microbial ID `NA` (in column '", font_bold(col_mo), "')", " isolates with a microbial ID `NA` (in column '", font_bold(col_mo), "')"
add_fn = font_red
) )
} }
x[which(is.na(x$newvar_mo)), "newvar_first_isolate"] <- FALSE x[which(is.na(x$newvar_mo)), "newvar_first_isolate"] <- FALSE
@@ -616,7 +608,7 @@ first_isolate <- function(x = NULL,
), ),
p_found_total, " of total where a microbial ID was available)" p_found_total, " of total where a microbial ID was available)"
), ),
add_fn = font_black, as_note = FALSE as_note = FALSE
) )
} }
+3 -2
View File
@@ -177,6 +177,7 @@ ggplot_sir <- function(data,
nrow = NULL, nrow = NULL,
colours = c( colours = c(
S = "#3CAEA3", S = "#3CAEA3",
SDD = "#8FD6C4",
SI = "#3CAEA3", SI = "#3CAEA3",
I = "#F6D55C", I = "#F6D55C",
IR = "#ED553B", IR = "#ED553B",
@@ -205,7 +206,7 @@ ggplot_sir <- function(data,
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE) meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
language <- validate_language(language) language <- validate_language(language)
meet_criteria(nrow, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE) meet_criteria(nrow, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
meet_criteria(colours, allow_class = c("character", "logical")) meet_criteria(colours, allow_class = c("character", "logical"), allow_NULL = TRUE)
meet_criteria(datalabels, allow_class = "logical", has_length = 1) meet_criteria(datalabels, allow_class = "logical", has_length = 1)
meet_criteria(datalabels.size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE) meet_criteria(datalabels.size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
meet_criteria(datalabels.colour, allow_class = "character", has_length = 1) meet_criteria(datalabels.colour, allow_class = "character", has_length = 1)
@@ -245,7 +246,7 @@ ggplot_sir <- function(data,
) + ) +
theme_sir() theme_sir()
if (fill == "interpretation") { if (fill == "interpretation" && !is.null(colours) && !isFALSE(colours)) {
p <- suppressWarnings(p + scale_sir_colours(aesthetics = "fill", colours = colours)) p <- suppressWarnings(p + scale_sir_colours(aesthetics = "fill", colours = colours))
} }
+6 -8
View File
@@ -79,7 +79,6 @@ guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE, only_s
if (isTRUE(verbose)) { if (isTRUE(verbose)) {
message_("No column found as input for ", search_string, message_("No column found as input for ", search_string,
" (", ab_name(search_string, language = NULL, tolower = TRUE), ").", " (", ab_name(search_string, language = NULL, tolower = TRUE), ").",
add_fn = font_black,
as_note = FALSE as_note = FALSE
) )
} }
@@ -211,7 +210,7 @@ get_column_abx <- function(x,
newnames <- suppressWarnings(as.ab(names(dots), info = FALSE)) newnames <- suppressWarnings(as.ab(names(dots), info = FALSE))
if (anyNA(newnames)) { if (anyNA(newnames)) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_(paste0(font_yellow(font_bold(" WARNING: ")), "some columns returned `NA` for `as.ab()`"), as_note = FALSE) message_("WARNING: some columns returned NA for {.help [{.fun as.ab}](AMR::as.ab)}", as_note = FALSE)
} }
warning_("Invalid antibiotic reference(s): ", vector_and(names(dots)[is.na(newnames)], quotes = FALSE), warning_("Invalid antibiotic reference(s): ", vector_and(names(dots)[is.na(newnames)], quotes = FALSE),
call = FALSE, call = FALSE,
@@ -222,7 +221,7 @@ get_column_abx <- function(x,
unexisting_cols <- which(!vapply(FUN.VALUE = logical(1), dots, function(col) all(col %in% x_columns))) unexisting_cols <- which(!vapply(FUN.VALUE = logical(1), dots, function(col) all(col %in% x_columns)))
if (length(unexisting_cols) > 0) { if (length(unexisting_cols) > 0) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_(" ERROR", add_fn = list(font_red, font_bold), as_note = FALSE) message_(" ERROR", as_note = FALSE)
} }
stop_("Column(s) not found: ", vector_and(unlist(dots[[unexisting_cols]]), quotes = FALSE), stop_("Column(s) not found: ", vector_and(unlist(dots[[unexisting_cols]]), quotes = FALSE),
call = FALSE call = FALSE
@@ -266,11 +265,11 @@ get_column_abx <- function(x,
if (isTRUE(info)) { if (isTRUE(info)) {
if (all_okay == TRUE) { if (all_okay == TRUE) {
message_(" OK.", add_fn = list(font_green, font_bold), as_note = FALSE) message_(" OK.", as_note = FALSE)
} else if (!isFALSE(dups)) { } else if (!isFALSE(dups)) {
message_(paste0(font_yellow(font_bold(" WARNING: ")), "some results from `as.ab()` are duplicated: ", vector_and(dups, quotes = "`")), as_note = FALSE) message_("WARNING: some results from {.help [{.fun as.ab}](AMR::as.ab)} are duplicated: ", vector_and(dups, quotes = "`"), as_note = FALSE)
} else { } else {
message_(" WARNING.", add_fn = list(font_yellow, font_bold), as_note = FALSE) message_(" WARNING.", as_note = FALSE)
} }
for (i in seq_len(length(out))) { for (i in seq_len(length(out))) {
@@ -288,8 +287,7 @@ get_column_abx <- function(x,
"Column '", font_bold(out[i]), "' will not be used for ", "Column '", font_bold(out[i]), "' will not be used for ",
names(out)[i], " (", suppressMessages(ab_name(names(out)[i], tolower = TRUE, language = NULL, fast_mode = TRUE)), ")", names(out)[i], " (", suppressMessages(ab_name(names(out)[i], tolower = TRUE, language = NULL, fast_mode = TRUE)), ")",
", as this antimicrobial has already been set." ", as this antimicrobial has already been set."
), )
add_fn = font_red
) )
} }
} }
+89 -73
View File
@@ -53,15 +53,16 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
vector_and(txt, quotes = FALSE) vector_and(txt, quotes = FALSE)
} }
#' Apply EUCAST Rules #' Apply Interpretive Rules
#' #'
#' @description #' @description
#' Apply rules from clinical breakpoints notes and expected resistant phenotypes as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, <https://www.eucast.org>), see *Source*. Use [eucast_dosage()] to get a [data.frame] with advised dosages of a certain bug-drug combination, which is based on the [dosage] data set. #' Apply rules from clinical breakpoints notes and expected resistant phenotypes as defined by e.g. the European Committee on Antimicrobial Susceptibility Testing (EUCAST, <https://www.eucast.org>), see *Source*. Use [eucast_dosage()] to get a [data.frame] with advised dosages of a certain bug-drug combination, which is based on the [dosage] data set.
#' #'
#' To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see *Details*. #' To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive rules are applied, some AMR-specific rules can be applied at default, see *Details*.
#' @param x A data set with antimicrobials columns, such as `amox`, `AMX` and `AMC`. #' @param x A data set with antimicrobials columns, such as `amox`, `AMX` and `AMC`.
#' @param info A [logical] to indicate whether progress should be printed to the console - the default is only print while in interactive sessions. #' @param info A [logical] to indicate whether progress should be printed to the console - the default is only print while in interactive sessions.
#' @param rules A [character] vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expected_phenotypes"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expected_phenotypes")`. The default value can be set to another value using the package option [`AMR_eucastrules`][AMR-options]: `options(AMR_eucastrules = "all")`. If using `"custom"`, be sure to fill in argument `custom_rules` too. Custom rules can be created with [custom_eucast_rules()]. #' @param guideline A guideline name, either "EUCAST" (default) or "CLSI". This can be set with the package option [`AMR_guideline`][AMR-options].
#' @param rules A [character] vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expected_phenotypes"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expected_phenotypes")`. The default value can be set to another value using the package option [`AMR_interpretive_rules`][AMR-options]: `options(AMR_interpretive_rules = "all")`. If using `"custom"`, be sure to fill in argument `custom_rules` too. Custom rules can be created with [custom_eucast_rules()].
#' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time. #' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.
#' @param version_breakpoints The version number to use for the EUCAST Clinical Breakpoints guideline. Can be `r vector_or(names(EUCAST_VERSION_BREAKPOINTS), reverse = TRUE)`. #' @param version_breakpoints The version number to use for the EUCAST Clinical Breakpoints guideline. Can be `r vector_or(names(EUCAST_VERSION_BREAKPOINTS), reverse = TRUE)`.
#' @param version_expected_phenotypes The version number to use for the EUCAST Expected Phenotypes. Can be `r vector_or(names(EUCAST_VERSION_EXPECTED_PHENOTYPES), reverse = TRUE)`. #' @param version_expected_phenotypes The version number to use for the EUCAST Expected Phenotypes. Can be `r vector_or(names(EUCAST_VERSION_EXPECTED_PHENOTYPES), reverse = TRUE)`.
@@ -100,9 +101,9 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
#' #'
#' Important examples include amoxicillin and amoxicillin/clavulanic acid, and trimethoprim and trimethoprim/sulfamethoxazole. Needless to say, for these rules to work, both drugs must be available in the data set. #' Important examples include amoxicillin and amoxicillin/clavulanic acid, and trimethoprim and trimethoprim/sulfamethoxazole. Needless to say, for these rules to work, both drugs must be available in the data set.
#' #'
#' Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include `"other"` to the `rules` argument, or use `eucast_rules(..., rules = "all")`. You can also set the package option [`AMR_eucastrules`][AMR-options], i.e. run `options(AMR_eucastrules = "all")`. #' Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include `"other"` to the `rules` argument, or use `eucast_rules(..., rules = "all")`. You can also set the package option [`AMR_interpretive_rules`][AMR-options], i.e. run `options(AMR_interpretive_rules = "all")`.
#' @aliases EUCAST #' @aliases EUCAST
#' @rdname eucast_rules #' @rdname interpretive_rules
#' @export #' @export
#' @return The input of `x`, possibly with edited values of antimicrobials. Or, if `verbose = TRUE`, a [data.frame] with all original and new values of the affected bug-drug combinations. #' @return The input of `x`, possibly with edited values of antimicrobials. Or, if `verbose = TRUE`, a [data.frame] with all original and new values of the affected bug-drug combinations.
#' @source #' @source
@@ -156,21 +157,23 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
#' eucast_dosage(c("tobra", "genta", "cipro"), "iv") #' eucast_dosage(c("tobra", "genta", "cipro"), "iv")
#' #'
#' eucast_dosage(c("tobra", "genta", "cipro"), "iv", version_breakpoints = 10) #' eucast_dosage(c("tobra", "genta", "cipro"), "iv", version_breakpoints = 10)
eucast_rules <- function(x, interpretive_rules <- function(x,
col_mo = NULL, col_mo = NULL,
info = interactive(), info = interactive(),
rules = getOption("AMR_eucastrules", default = c("breakpoints", "expected_phenotypes")), rules = getOption("AMR_interpretive_rules", default = c("breakpoints", "expected_phenotypes")),
verbose = FALSE, guideline = getOption("AMR_guideline", "EUCAST"),
version_breakpoints = 15.0, verbose = FALSE,
version_expected_phenotypes = 1.2, version_breakpoints = 15.0,
version_expertrules = 3.3, version_expected_phenotypes = 1.2,
ampc_cephalosporin_resistance = NA, version_expertrules = 3.3,
only_sir_columns = any(is.sir(x)), ampc_cephalosporin_resistance = NA,
custom_rules = NULL, only_sir_columns = any(is.sir(x)),
overwrite = FALSE, custom_rules = NULL,
...) { overwrite = FALSE,
...) {
meet_criteria(x, allow_class = "data.frame") meet_criteria(x, allow_class = "data.frame")
meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE) meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE)
meet_criteria(guideline, allow_class = "character", has_length = 1, is_in = c("EUCAST", "CLSI"))
meet_criteria(info, allow_class = "logical", has_length = 1) meet_criteria(info, allow_class = "logical", has_length = 1)
meet_criteria(rules, allow_class = "character", has_length = c(1, 2, 3, 4, 5, 6), is_in = c("breakpoints", "expected_phenotypes", "expert", "other", "all", "custom")) meet_criteria(rules, allow_class = "character", has_length = c(1, 2, 3, 4, 5, 6), is_in = c("breakpoints", "expected_phenotypes", "expert", "other", "all", "custom"))
meet_criteria(verbose, allow_class = "logical", has_length = 1) meet_criteria(verbose, allow_class = "logical", has_length = 1)
@@ -182,21 +185,26 @@ eucast_rules <- function(x,
meet_criteria(custom_rules, allow_class = "custom_eucast_rules", allow_NULL = TRUE) meet_criteria(custom_rules, allow_class = "custom_eucast_rules", allow_NULL = TRUE)
meet_criteria(overwrite, allow_class = "logical", has_length = 1) meet_criteria(overwrite, allow_class = "logical", has_length = 1)
stop_if(
guideline == "CLSI",
"CLSI guideline is not yet supported."
)
stop_if( stop_if(
!is.na(ampc_cephalosporin_resistance) && !any(c("expert", "all") %in% rules), !is.na(ampc_cephalosporin_resistance) && !any(c("expert", "all") %in% rules),
"For the `ampc_cephalosporin_resistance` argument to work, the `rules` argument must contain `\"expert\"` or `\"all\"`." "For the {.arg ampc_cephalosporin_resistance} argument to work, the {.arg rules} argument must contain {.code \"expert\"} or {.code \"all\"}."
) )
add_MO_lookup_to_AMR_env() add_MO_lookup_to_AMR_env()
if ("custom" %in% rules && is.null(custom_rules)) { if ("custom" %in% rules && is.null(custom_rules)) {
warning_("in `eucast_rules()`: no custom rules were set with the `custom_rules` argument", warning_("in {.help [{.fun eucast_rules}](AMR::eucast_rules)}: no custom rules were set with the {.arg custom_rules} argument",
immediate = TRUE immediate = TRUE
) )
rules <- rules[rules != "custom"] rules <- rules[rules != "custom"]
if (length(rules) == 0) { if (length(rules) == 0) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("No other rules were set, returning original data", add_fn = font_red, as_note = FALSE) message_("No other rules were set, returning original data", as_note = FALSE)
} }
return(x) return(x)
} }
@@ -224,7 +232,7 @@ eucast_rules <- function(x,
q_continue <- utils::menu(choices = c("OK", "Cancel"), graphics = FALSE, title = txt) q_continue <- utils::menu(choices = c("OK", "Cancel"), graphics = FALSE, title = txt)
} }
if (q_continue %in% c(FALSE, 2)) { if (q_continue %in% c(FALSE, 2)) {
message_("Cancelled, returning original data", add_fn = font_red, as_note = FALSE) message_("Cancelled, returning original data", as_note = FALSE)
return(x) return(x)
} }
} }
@@ -233,7 +241,7 @@ eucast_rules <- function(x,
# -- mo # -- mo
if (is.null(col_mo)) { if (is.null(col_mo)) {
col_mo <- search_type_in_df(x = x, type = "mo", info = info) col_mo <- search_type_in_df(x = x, type = "mo", info = info)
stop_if(is.null(col_mo), "`col_mo` must be set") stop_if(is.null(col_mo), "{.arg col_mo} must be set")
} }
decimal.mark <- getOption("OutDec") decimal.mark <- getOption("OutDec")
@@ -442,7 +450,7 @@ eucast_rules <- function(x,
# big speed gain! only analyse unique rows: # big speed gain! only analyse unique rows:
pm_distinct(`.rowid`, .keep_all = TRUE) %pm>% pm_distinct(`.rowid`, .keep_all = TRUE) %pm>%
as.data.frame(stringsAsFactors = FALSE) as.data.frame(stringsAsFactors = FALSE)
x[, col_mo] <- as.mo(as.character(x[, col_mo, drop = TRUE]), info = info) x[, col_mo] <- as.mo(as.character(x[, col_mo, drop = TRUE]), info = FALSE)
# rename col_mo to prevent interference with joined columns # rename col_mo to prevent interference with joined columns
colnames(x)[colnames(x) == col_mo] <- ".col_mo" colnames(x)[colnames(x) == col_mo] <- ".col_mo"
col_mo <- ".col_mo" col_mo <- ".col_mo"
@@ -450,13 +458,20 @@ eucast_rules <- function(x,
x <- left_join_microorganisms(x, by = col_mo, suffix = c("_oldcols", "")) x <- left_join_microorganisms(x, by = col_mo, suffix = c("_oldcols", ""))
x$gramstain <- mo_gramstain(x[, col_mo, drop = TRUE], language = NULL, info = FALSE) x$gramstain <- mo_gramstain(x[, col_mo, drop = TRUE], language = NULL, info = FALSE)
x$genus_species <- trimws(paste(x$genus, x$species)) x$genus_species <- trimws(paste(x$genus, x$species))
if (isTRUE(info) && NROW(x) > 10000) { if (isTRUE(info) && NROW(x.bak) > 10000) {
message_(" OK.", add_fn = list(font_green, font_bold), as_note = FALSE) message_("OK.", as_note = FALSE)
} }
n_added <- 0 n_added <- 0
n_changed <- 0 n_changed <- 0
rule_current <- ""
rule_group_current <- ""
rule_group_previous <- ""
rule_next <- ""
rule_previous <- ""
rule_text <- ""
# >>> Apply Other rules: enzyme inhibitors <<< ------------------------------------------ # >>> Apply Other rules: enzyme inhibitors <<< ------------------------------------------
if (any(c("all", "other") %in% rules)) { if (any(c("all", "other") %in% rules)) {
if (isTRUE(info)) { if (isTRUE(info)) {
@@ -466,7 +481,7 @@ eucast_rules <- function(x,
"Rules by the ", "Rules by the ",
font_bold(paste0("AMR package v", utils::packageDescription("AMR")$Version)), font_bold(paste0("AMR package v", utils::packageDescription("AMR")$Version)),
" (", format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y"), " (", format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y"),
"), see `?eucast_rules`\n" "), see {.help [{.fun eucast_rules}](AMR::eucast_rules)}\n"
) )
)) ))
cat("\n\n") cat("\n\n")
@@ -580,23 +595,13 @@ eucast_rules <- function(x,
} else { } else {
if (isTRUE(info)) { if (isTRUE(info)) {
cat("\n") cat("\n")
message_(paste0( message_("Skipping inhibitor-inheritance rules defined by this AMR package: setting S to drug+inhibitor where drug is S, and setting R to drug where drug+inhibitor is R. Add \"other\" or \"all\" to the {.arg rules} argument to apply those rules.")
font_red("Skipping inhibitor-inheritance rules defined by this AMR package: setting "),
font_green_bg(" S "),
font_red(" to drug+inhibitor where drug is "),
font_green_bg(" S "),
font_red(", and setting "),
font_rose_bg(" R "),
font_red(" to drug where drug+inhibitor is "),
font_rose_bg(" R "),
font_red(". Add \"other\" or \"all\" to the `rules` argument to apply those rules.")
))
} }
} }
if (!any(c("all", "custom") %in% rules) && !is.null(custom_rules)) { if (!any(c("all", "custom") %in% rules) && !is.null(custom_rules)) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("Skipping custom EUCAST rules, since the `rules` argument does not contain \"custom\".") message_("Skipping custom EUCAST rules, since the {.arg rules} argument does not contain {.code \"custom\"}.")
} }
custom_rules <- NULL custom_rules <- NULL
} }
@@ -617,31 +622,16 @@ eucast_rules <- function(x,
eucast_rules_df <- eucast_rules_df %pm>% eucast_rules_df <- eucast_rules_df %pm>%
rbind_AMR(eucast_rules_df_total %pm>% rbind_AMR(eucast_rules_df_total %pm>%
subset(reference.rule_group %like% "breakpoint" & reference.version == version_breakpoints)) subset(reference.rule_group %like% "breakpoint" & reference.version == version_breakpoints))
# eucast_rules_df <- subset(
# eucast_rules_df,
# reference.rule_group %unlike% "breakpoint" |
# (reference.rule_group %like% "breakpoint" & reference.version == version_breakpoints)
# )
} }
if (any(c("all", "expected_phenotypes") %in% rules)) { if (any(c("all", "expected_phenotypes") %in% rules)) {
eucast_rules_df <- eucast_rules_df %pm>% eucast_rules_df <- eucast_rules_df %pm>%
rbind_AMR(eucast_rules_df_total %pm>% rbind_AMR(eucast_rules_df_total %pm>%
subset(reference.rule_group %like% "expected" & reference.version == version_expected_phenotypes)) subset(reference.rule_group %like% "expected" & reference.version == version_expected_phenotypes))
# eucast_rules_df <- subset(
# eucast_rules_df,
# reference.rule_group %unlike% "expected" |
# (reference.rule_group %like% "expected" & reference.version == version_expected_phenotypes)
# )
} }
if (any(c("all", "expert") %in% rules)) { if (any(c("all", "expert") %in% rules)) {
eucast_rules_df <- eucast_rules_df %pm>% eucast_rules_df <- eucast_rules_df %pm>%
rbind_AMR(eucast_rules_df_total %pm>% rbind_AMR(eucast_rules_df_total %pm>%
subset(reference.rule_group %like% "expert" & reference.version == version_expertrules)) subset(reference.rule_group %like% "expert" & reference.version == version_expertrules))
# eucast_rules_df <- subset(
# eucast_rules_df,
# reference.rule_group %unlike% "expert" |
# (reference.rule_group %like% "expert" & reference.version == version_expertrules)
# )
} }
## filter out AmpC de-repressed cephalosporin-resistant mutants ---- ## filter out AmpC de-repressed cephalosporin-resistant mutants ----
# no need to filter on version number here - the rules contain these version number, so are inherently filtered # no need to filter on version number here - the rules contain these version number, so are inherently filtered
@@ -664,14 +654,16 @@ eucast_rules <- function(x,
# we only hints on remaining rows in `eucast_rules_df` # we only hints on remaining rows in `eucast_rules_df`
screening_abx <- as.character(AMR::antimicrobials$ab[which(AMR::antimicrobials$ab %like% "-S$")]) screening_abx <- as.character(AMR::antimicrobials$ab[which(AMR::antimicrobials$ab %like% "-S$")])
screening_abx <- screening_abx[screening_abx %in% unique(unlist(strsplit(EUCAST_RULES_DF$and_these_antibiotics[!is.na(EUCAST_RULES_DF$and_these_antibiotics)], ", *")))] screening_abx <- screening_abx[screening_abx %in% unique(unlist(strsplit(EUCAST_RULES_DF$and_these_antibiotics[!is.na(EUCAST_RULES_DF$and_these_antibiotics)], ", *")))]
if (isTRUE(info)) {
cat("\n")
}
for (ab_s in screening_abx) { for (ab_s in screening_abx) {
ab <- gsub("-S$", "", ab_s) ab <- gsub("-S$", "", ab_s)
if (ab %in% names(cols_ab) && !ab_s %in% names(cols_ab)) { if (ab %in% names(cols_ab) && !ab_s %in% names(cols_ab)) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("Using column '", cols_ab[names(cols_ab) == ab], message_("Using column '", cols_ab[names(cols_ab) == ab],
"' as ", ab_name(ab_s, language = NULL, tolower = TRUE), "' as ", ab_name(ab_s, language = NULL, tolower = TRUE),
" since a column '", ab_s, "' is missing but required for the chosen rules", " since a column '", ab_s, "' is missing but required for the chosen rules"
add_fn = font_red
) )
} }
cols_ab <- c(cols_ab, stats::setNames(unname(cols_ab[names(cols_ab) == ab]), ab_s)) cols_ab <- c(cols_ab, stats::setNames(unname(cols_ab[names(cols_ab) == ab]), ab_s))
@@ -894,7 +886,9 @@ eucast_rules <- function(x,
} }
for (i in seq_len(length(custom_rules))) { for (i in seq_len(length(custom_rules))) {
rule <- custom_rules[[i]] rule <- custom_rules[[i]]
rows <- which(eval(parse(text = rule$query), envir = x)) rows <- tryCatch(which(eval(parse(text = rule$query), envir = x)),
error = function(e) stop_(conditionMessage(e), " (check available data and compare with the custom rules set)", call = FALSE)
)
cols <- as.character(rule$result_group) cols <- as.character(rule$result_group)
cols <- c( cols <- c(
cols[cols %in% colnames(x)], # direct column names cols[cols %in% colnames(x)], # direct column names
@@ -908,9 +902,8 @@ eucast_rules <- function(x,
get_antibiotic_names(cols) get_antibiotic_names(cols)
) )
if (isTRUE(info)) { if (isTRUE(info)) {
# print rule
cat(italicise_taxonomy( cat(italicise_taxonomy(
word_wrap(format_custom_query_rule(rule$query, colours = FALSE), word_wrap(rule_text,
width = getOption("width") - 30, width = getOption("width") - 30,
extra_indent = 6 extra_indent = 6
), ),
@@ -1057,9 +1050,9 @@ eucast_rules <- function(x,
cat(paste0(font_grey(strrep("-", 0.95 * getOption("width", 100))), "\n")) cat(paste0(font_grey(strrep("-", 0.95 * getOption("width", 100))), "\n"))
if (isFALSE(verbose) && total_n_added + total_n_changed > 0) { if (isFALSE(verbose) && total_n_added + total_n_changed > 0) {
cat("\n", word_wrap("Use `eucast_rules(..., verbose = TRUE)` (on your original data) to get a data.frame with all specified edits instead."), "\n\n", sep = "") cat("\n", word_wrap("Use ", highlight_code("eucast_rules(..., verbose = TRUE)"), " (on your original data) to get a data.frame with all specified edits instead."), "\n\n", sep = "")
} else if (isTRUE(verbose)) { } else if (isTRUE(verbose)) {
cat("\n", word_wrap("Used 'Verbose mode' (`verbose = TRUE`), which returns a data.frame with all specified edits.\nUse `verbose = FALSE` to apply the rules on your data."), "\n\n", sep = "") cat("\n", word_wrap("Used 'Verbose mode' ({.code verbose = TRUE}), which returns a data.frame with all specified edits.\nUse {.code verbose = FALSE} to apply the rules on your data."), "\n\n", sep = "")
} }
} }
@@ -1069,13 +1062,13 @@ eucast_rules <- function(x,
warn_lacking_sir_class <- warn_lacking_sir_class[order(colnames(x.bak))] warn_lacking_sir_class <- warn_lacking_sir_class[order(colnames(x.bak))]
warn_lacking_sir_class <- warn_lacking_sir_class[!is.na(warn_lacking_sir_class)] warn_lacking_sir_class <- warn_lacking_sir_class[!is.na(warn_lacking_sir_class)]
warning_( warning_(
"in `eucast_rules()`: not all columns with antimicrobial results are of class 'sir'. Transform them on beforehand, with e.g.:\n", "in {.help [{.fun eucast_rules}](AMR::eucast_rules)}: not all columns with antimicrobial results are of class 'sir'. Transform them on beforehand, with e.g.:\n",
" - ", x_deparsed, " %>% as.sir(", ifelse(length(warn_lacking_sir_class) == 1, " - ", highlight_code(paste0(x_deparsed, " %>% as.sir(", ifelse(length(warn_lacking_sir_class) == 1,
warn_lacking_sir_class, warn_lacking_sir_class,
paste0(warn_lacking_sir_class[1], ":", warn_lacking_sir_class[length(warn_lacking_sir_class)]) paste0(warn_lacking_sir_class[1], ":", warn_lacking_sir_class[length(warn_lacking_sir_class)])
), ")\n", ), ")")), "\n",
" - ", x_deparsed, " %>% mutate_if(is_sir_eligible, as.sir)\n", " - ", highlight_code(paste0(x_deparsed, " %>% mutate_if(is_sir_eligible, as.sir)")), "\n",
" - ", x_deparsed, " %>% mutate(across(where(is_sir_eligible), as.sir))" " - ", highlight_code(paste0(x_deparsed, " %>% mutate(across(where(is_sir_eligible), as.sir))"))
) )
} }
@@ -1096,6 +1089,29 @@ eucast_rules <- function(x,
} }
} }
#' @rdname interpretive_rules
#' @export
eucast_rules <- function(x,
col_mo = NULL,
info = interactive(),
rules = getOption("AMR_interpretive_rules", default = c("breakpoints", "expected_phenotypes")),
...) {
if (!is.null(getOption("AMR_eucastrules", default = NULL))) {
warning_("The global option {.code AMR_eucastrules} that you have set is now invalid was ignored - set {.code AMR_interpretive_rules} instead. See {.topic [AMR-options](AMR::AMR-options)}.")
}
interpretive_rules(x = x, col_mo = col_mo, info = info, rules = rules, guideline = "EUCAST", ...)
}
#' @rdname interpretive_rules
#' @export
clsi_rules <- function(x,
col_mo = NULL,
info = interactive(),
rules = getOption("AMR_interpretive_rules", default = c("breakpoints", "expected_phenotypes")),
...) {
interpretive_rules(x = x, col_mo = col_mo, info = info, rules = rules, guideline = "CLSI", ...)
}
# helper function for editing the table ---- # helper function for editing the table ----
edit_sir <- function(x, edit_sir <- function(x,
to, to,
@@ -1135,10 +1151,10 @@ edit_sir <- function(x,
track_changes$sir_warn <- cols[!vapply(FUN.VALUE = logical(1), x[, cols, drop = FALSE], is.sir)] track_changes$sir_warn <- cols[!vapply(FUN.VALUE = logical(1), x[, cols, drop = FALSE], is.sir)]
} }
isNA <- is.na(new_edits[rows, cols]) isNA <- is.na(new_edits[rows, cols])
isSIR <- !isNA & (new_edits[rows, cols] == "S" | new_edits[rows, cols] == "I" | new_edits[rows, cols] == "R" | new_edits[rows, cols] == "SDD" | new_edits[rows, cols] == "NI") isSIR <- !isNA & (new_edits[rows, cols] == "S" | new_edits[rows, cols] == "I" | new_edits[rows, cols] == "R" | new_edits[rows, cols] == "SDD" | new_edits[rows, cols] == "NI" | new_edits[rows, cols] == "WT" | new_edits[rows, cols] == "NWT" | new_edits[rows, cols] == "NS")
non_SIR <- !isSIR non_SIR <- !isSIR
if (isFALSE(overwrite) && any(isSIR) && message_not_thrown_before("edit_sir.warning_overwrite")) { if (isFALSE(overwrite) && any(isSIR) && message_not_thrown_before("edit_sir.warning_overwrite")) {
warning_("Some values had SIR values and were not overwritten, since `overwrite = FALSE`.") warning_("Some values had SIR values and were not overwritten, since {.code overwrite = FALSE}.")
} }
tryCatch( tryCatch(
# insert into original table # insert into original table
@@ -1162,7 +1178,7 @@ edit_sir <- function(x,
suppressWarnings(new_edits[rows, cols][non_SIR] <<- to) suppressWarnings(new_edits[rows, cols][non_SIR] <<- to)
} }
warning_( warning_(
"in `eucast_rules()`: value \"", to, "\" added to the factor levels of column", "in {.help [{.fun eucast_rules}](AMR::eucast_rules)}: value \"", to, "\" added to the factor levels of column",
ifelse(length(cols) == 1, "", "s"), ifelse(length(cols) == 1, "", "s"),
" ", vector_and(cols, quotes = "`", sort = FALSE), " ", vector_and(cols, quotes = "`", sort = FALSE),
" because this value was not an existing factor level." " because this value was not an existing factor level."
@@ -1170,7 +1186,7 @@ edit_sir <- function(x,
txt_warning() txt_warning()
warned <- FALSE warned <- FALSE
} else { } else {
warning_("in `eucast_rules()`: ", w$message) warning_("in {.help [{.fun eucast_rules}](AMR::eucast_rules)}: ", w$message)
txt_warning() txt_warning()
} }
}, },
@@ -1182,7 +1198,7 @@ edit_sir <- function(x,
ifelse(length(rows) > 10, "...", ""), ifelse(length(rows) > 10, "...", ""),
" while writing value '", to, " while writing value '", to,
"' to column(s) `", paste(cols, collapse = "`, `"), "' to column(s) `", paste(cols, collapse = "`, `"),
"`:\n", e$message "`:\n", conditionMessage(e)
), ),
call. = FALSE call. = FALSE
) )
@@ -1234,7 +1250,7 @@ edit_sir <- function(x,
return(track_changes) return(track_changes)
} }
#' @rdname eucast_rules #' @rdname interpretive_rules
#' @export #' @export
eucast_dosage <- function(ab, administration = "iv", version_breakpoints = 15) { eucast_dosage <- function(ab, administration = "iv", version_breakpoints = 15) {
meet_criteria(ab, allow_class = c("character", "numeric", "integer", "factor")) meet_criteria(ab, allow_class = c("character", "numeric", "integer", "factor"))
+3 -3
View File
@@ -143,9 +143,9 @@ join_microorganisms <- function(type, x, by, suffix, ...) {
if (is.null(by) && NCOL(x) == 1) { if (is.null(by) && NCOL(x) == 1) {
by <- colnames(x)[1L] by <- colnames(x)[1L]
} else { } else {
stop_if(is.null(by), "no column with microorganism names or codes found, set this column with `by`", call = -2) stop_if(is.null(by), "no column with microorganism names or codes found, set this column with {.arg by}", call = -2)
} }
message_('Joining, by = "', by, '"', add_fn = font_black, as_note = FALSE) # message same as dplyr::join functions message_('Joining, by = "{by}"', as_note = FALSE) # message same as dplyr::join functions
} }
if (!all(x[, by, drop = TRUE] %in% AMR_env$MO_lookup$mo, na.rm = TRUE)) { if (!all(x[, by, drop = TRUE] %in% AMR_env$MO_lookup$mo, na.rm = TRUE)) {
x$join.mo <- as.mo(x[, by, drop = TRUE]) x$join.mo <- as.mo(x[, by, drop = TRUE])
@@ -185,7 +185,7 @@ join_microorganisms <- function(type, x, by, suffix, ...) {
} }
if (type %like% "full|left|right|inner" && NROW(joined) > NROW(x)) { if (type %like% "full|left|right|inner" && NROW(joined) > NROW(x)) {
warning_("in `", type, "_microorganisms()`: the newly joined data set contains ", nrow(joined) - nrow(x), " rows more than the number of rows of `x`.") warning_("in `{type}_microorganisms()`: the newly joined data set contains {nrow(joined) - nrow(x)} rows more than the number of rows of {.arg x}.")
} }
as_original_data_class(joined, class(x.bak)) # will remove tibble groups as_original_data_class(joined, class(x.bak)) # will remove tibble groups
+5 -4
View File
@@ -187,7 +187,7 @@ key_antimicrobials <- function(x = NULL,
"No columns available ", "No columns available ",
paste0("Only using ", values_new_length, " out of ", values_old_length, " defined columns ") paste0("Only using ", values_new_length, " out of ", values_old_length, " defined columns ")
), ),
"as key antimicrobials for ", name, "s. See `?key_antimicrobials`." "as key antimicrobials for ", name, "s. See {.help [{.fun key_antimicrobials}](AMR::key_antimicrobials)}."
) )
} }
@@ -282,6 +282,9 @@ generate_antimicrobials_string <- function(df) {
function(x) { function(x) {
x <- toupper(as.character(x)) x <- toupper(as.character(x))
x[x == "SDD"] <- "I" x[x == "SDD"] <- "I"
x[x == "WT"] <- "S"
x[x == "NWT"] <- "R"
x[x == "NS"] <- "R"
# ignore "NI" here, no use for determining first isolates # ignore "NI" here, no use for determining first isolates
x[!x %in% c("S", "I", "R")] <- "." x[!x %in% c("S", "I", "R")] <- "."
paste(x) paste(x)
@@ -312,9 +315,7 @@ antimicrobials_equal <- function(y,
key2sir <- function(val) { key2sir <- function(val) {
val <- strsplit(val, "", fixed = TRUE)[[1L]] val <- strsplit(val, "", fixed = TRUE)[[1L]]
val.int <- rep(NA_real_, length(val)) val.int <- rep(NA_real_, length(val))
val.int[val == "S"] <- 1 val.int[val %in% VALID_SIR_LEVELS] <- as.double(as.sir(val[val %in% VALID_SIR_LEVELS]))
val.int[val %in% c("I", "SDD")] <- 2
val.int[val == "R"] <- 3
val.int val.int
} }
# only run on uniques # only run on uniques
+109 -69
View File
@@ -31,7 +31,7 @@
#' #'
#' Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines. #' Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines.
#' @param x A [data.frame] with antimicrobials columns, like `AMX` or `amox`. Can be left blank for automatic determination. #' @param x A [data.frame] with antimicrobials columns, like `AMX` or `amox`. Can be left blank for automatic determination.
#' @param 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. #' @param 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.
#' @param esbl [logical] values, or a column name containing logical values, indicating the presence of an ESBL gene (or production of its proteins). #' @param esbl [logical] values, or a column name containing logical values, indicating the presence of an ESBL gene (or production of its proteins).
#' @param carbapenemase [logical] values, or a column name containing logical values, indicating the presence of a carbapenemase gene (or production of its proteins). #' @param carbapenemase [logical] values, or a column name containing logical values, indicating the presence of a carbapenemase gene (or production of its proteins).
#' @param mecA [logical] values, or a column name containing logical values, indicating the presence of a *mecA* gene (or production of its proteins). #' @param mecA [logical] values, or a column name containing logical values, indicating the presence of a *mecA* gene (or production of its proteins).
@@ -41,7 +41,8 @@
#' @inheritParams eucast_rules #' @inheritParams eucast_rules
#' @param 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. #' @param 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.
#' @param 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. #' @param 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.
#' @param 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. #' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function returns a data set with the MDRO results in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
#' @param infer_from_combinations A [logical] to indicate whether resistance for a missing base beta-lactam drug should be inferred from an available drug+inhibitor combination (e.g., piperacillin from piperacillin/tazobactam). The clinical basis is that resistance in a combination always implies resistance in the base drug, since the enzyme inhibitor provides no benefit when the organism is truly resistant. Only resistance is inferred; susceptibility in a combination does **not** imply susceptibility in the base drug (the inhibitor may be responsible). Defaults to `TRUE`.
#' @details #' @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*. #' These functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*.
#' #'
@@ -143,6 +144,7 @@ mdro <- function(x = NULL,
combine_SI = TRUE, combine_SI = TRUE,
verbose = FALSE, verbose = FALSE,
only_sir_columns = any(is.sir(x)), only_sir_columns = any(is.sir(x)),
infer_from_combinations = TRUE,
...) { ...) {
if (is_null_or_grouped_tbl(x)) { if (is_null_or_grouped_tbl(x)) {
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call) # when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
@@ -165,57 +167,32 @@ mdro <- function(x = NULL,
meet_criteria(combine_SI, allow_class = "logical", has_length = 1) meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
meet_criteria(verbose, allow_class = "logical", has_length = 1) meet_criteria(verbose, allow_class = "logical", has_length = 1)
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
meet_criteria(infer_from_combinations, allow_class = "logical", has_length = 1)
if (isTRUE(only_sir_columns) && !any(is.sir(x))) { if (isTRUE(only_sir_columns) && !any(is.sir(x))) {
stop_("There were no SIR columns found in the data set, despite `only_sir_columns` being `TRUE`. Transform columns with `as.sir()` for valid antimicrobial interpretations.") stop_("There were no SIR columns found in the data set, despite {.arg only_sir_columns} being {.code TRUE}. Transform columns with {.help [{.fun as.sir}](AMR::as.sir)} for valid antimicrobial interpretations.")
} else if (!isTRUE(only_sir_columns) && !any(is.sir(x)) && !any(is_sir_eligible(x))) { } else if (!isTRUE(only_sir_columns) && !any(is.sir(x)) && !any(is_sir_eligible(x))) {
stop_("There were no eligible SIR columns found in the data set. Transform columns with `as.sir()` for valid antimicrobial interpretations.") stop_("There were no eligible SIR columns found in the data set. Transform columns with {.help [{.fun as.sir}](AMR::as.sir)} for valid antimicrobial interpretations.")
} }
# get gene values as TRUE/FALSE # get gene values as TRUE/FALSE
if (is.character(esbl)) { resolve_gene_var <- function(x, gene, varname) {
meet_criteria(esbl, is_in = colnames(x), allow_NA = FALSE, has_length = 1) if (is.character(gene)) {
esbl <- x[[esbl]] meet_criteria(gene, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
meet_criteria(esbl, allow_class = "logical", allow_NA = TRUE) gene <- x[[gene]]
} else if (length(esbl) == 1) { meet_criteria(gene, allow_class = "logical", allow_NA = TRUE)
esbl <- rep(esbl, NROW(x)) } else if (length(gene) == 1) {
} gene <- rep(gene, NROW(x))
if (is.character(carbapenemase)) { }
meet_criteria(carbapenemase, is_in = colnames(x), allow_NA = FALSE, has_length = 1) x[[varname]] <- gene
carbapenemase <- x[[carbapenemase]] x
meet_criteria(carbapenemase, allow_class = "logical", allow_NA = TRUE)
} else if (length(carbapenemase) == 1) {
carbapenemase <- rep(carbapenemase, NROW(x))
}
if (is.character(mecA)) {
meet_criteria(mecA, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
mecA <- x[[mecA]]
meet_criteria(mecA, allow_class = "logical", allow_NA = TRUE)
} else if (length(mecA) == 1) {
mecA <- rep(mecA, NROW(x))
}
if (is.character(mecC)) {
meet_criteria(mecC, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
mecC <- x[[mecC]]
meet_criteria(mecC, allow_class = "logical", allow_NA = TRUE)
} else if (length(mecC) == 1) {
mecC <- rep(mecC, NROW(x))
}
if (is.character(vanA)) {
meet_criteria(vanA, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
vanA <- x[[vanA]]
meet_criteria(vanA, allow_class = "logical", allow_NA = TRUE)
} else if (length(vanA) == 1) {
vanA <- rep(vanA, NROW(x))
}
if (is.character(vanB)) {
meet_criteria(vanB, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
vanB <- x[[vanB]]
meet_criteria(vanB, allow_class = "logical", allow_NA = TRUE)
} else if (length(vanB) == 1) {
vanB <- rep(vanB, NROW(x))
} }
x <- resolve_gene_var(x, esbl, "esbl")
x <- resolve_gene_var(x, carbapenemase, "carbapenemase")
x <- resolve_gene_var(x, mecA, "mecA")
x <- resolve_gene_var(x, mecC, "mecC")
x <- resolve_gene_var(x, vanA, "vanA")
x <- resolve_gene_var(x, vanB, "vanB")
info.bak <- info info.bak <- info
# don't throw info's more than once per call # don't throw info's more than once per call
@@ -236,7 +213,7 @@ mdro <- function(x = NULL,
q_continue <- utils::menu(choices = c("OK", "Cancel"), graphics = FALSE, title = txt) q_continue <- utils::menu(choices = c("OK", "Cancel"), graphics = FALSE, title = txt)
} }
if (q_continue %in% c(FALSE, 2)) { if (q_continue %in% c(FALSE, 2)) {
message_("Cancelled, returning original data", add_fn = font_red, as_note = FALSE) message_("Cancelled, returning original data", as_note = FALSE)
return(x) return(x)
} }
} }
@@ -274,7 +251,7 @@ mdro <- function(x = NULL,
guideline.bak <- guideline guideline.bak <- guideline
if (is.list(guideline)) { if (is.list(guideline)) {
# Custom MDRO guideline --------------------------------------------------- # Custom MDRO guideline ---------------------------------------------------
stop_ifnot(inherits(guideline, "custom_mdro_guideline"), "use `custom_mdro_guideline()` to create custom guidelines") stop_ifnot(inherits(guideline, "custom_mdro_guideline"), "use {.help [{.fun custom_mdro_guideline}](AMR::custom_mdro_guideline)} to create custom guidelines")
if (isTRUE(info)) { if (isTRUE(info)) {
txt <- paste0( txt <- paste0(
"Determining MDROs based on custom rules", "Determining MDROs based on custom rules",
@@ -351,13 +328,13 @@ mdro <- function(x = NULL,
} }
if (is.null(col_mo) && guideline$code == "tb") { if (is.null(col_mo) && guideline$code == "tb") {
message_( message_(
"No column found as input for `col_mo`, ", "No column found as input for {.arg col_mo}, ",
font_bold(paste0("assuming all rows contain ", font_italic("Mycobacterium tuberculosis"), ".")) font_bold(paste0("assuming all rows contain ", font_italic("Mycobacterium tuberculosis"), "."))
) )
x$mo <- as.mo("Mycobacterium tuberculosis", keep_synonyms = TRUE) x$mo <- as.mo("Mycobacterium tuberculosis", keep_synonyms = TRUE)
col_mo <- "mo" col_mo <- "mo"
} }
stop_if(is.null(col_mo), "`col_mo` must be set") stop_if(is.null(col_mo), "{.arg col_mo} must be set")
if (guideline$code == "cmi2012") { if (guideline$code == "cmi2012") {
guideline$name <- "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance." guideline$name <- "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance."
@@ -499,12 +476,58 @@ mdro <- function(x = NULL,
if (!"AMP" %in% names(cols_ab) && "AMX" %in% names(cols_ab)) { if (!"AMP" %in% names(cols_ab) && "AMX" %in% names(cols_ab)) {
# ampicillin column is missing, but amoxicillin is available # ampicillin column is missing, but amoxicillin is available
if (isTRUE(info)) { if (isTRUE(info)) {
message_("Using column '", cols_ab[names(cols_ab) == "AMX"], "' as input for ampicillin since many MDRO rules depend on it.", add_fn = font_red) message_("Using column '", cols_ab[names(cols_ab) == "AMX"], "' as input for ampicillin since many MDRO rules depend on it.")
} }
cols_ab <- c(cols_ab, c(AMP = unname(cols_ab[names(cols_ab) == "AMX"]))) cols_ab <- c(cols_ab, c(AMP = unname(cols_ab[names(cols_ab) == "AMX"])))
} }
cols_ab <- cols_ab[!duplicated(cols_ab)] cols_ab <- cols_ab[!duplicated(cols_ab)]
# Infer resistance for missing base drugs ----
if (isTRUE(infer_from_combinations)) {
.combos_in_data <- AB_BETALACTAMS_WITH_INHIBITOR[AB_BETALACTAMS_WITH_INHIBITOR %in% names(cols_ab)]
if (length(.combos_in_data) > 0) {
.base_drugs <- suppressMessages(
as.ab(gsub("/.*", "", ab_name(as.character(.combos_in_data), language = NULL)))
)
.unique_bases <- unique(.base_drugs[!is.na(.base_drugs)])
for (.base in .unique_bases) {
.base_code <- as.character(.base)
if (!.base_code %in% names(cols_ab)) {
# Base drug column absent; find all available combo columns for this base drug
.combos <- .combos_in_data[!is.na(.base_drugs) & as.character(.base_drugs) == .base_code]
.combo_cols <- unname(cols_ab[as.character(.combos)])
.combo_cols <- .combo_cols[!is.na(.combo_cols)]
if (length(.combo_cols) > 0) {
# Vectorised: if ANY combination is R, infer base drug as R; otherwise NA
.sir_chars <- as.data.frame(
lapply(x[, .combo_cols, drop = FALSE], function(col) as.character(as.sir(col))),
stringsAsFactors = FALSE
)
.new_col <- paste0(.base_code, ".inferred_sir_proxy_from#", paste0(.combos, collapse = "/"), "#")
x[[.new_col]] <- ifelse(rowSums(.sir_chars == "R", na.rm = TRUE) > 0L, "R", NA_character_)
cols_ab <- c(cols_ab, stats::setNames(.new_col, .base_code))
if (isTRUE(info.bak)) {
message_(
"Inferring resistance for ",
ab_name(.base_code, language = NULL, tolower = TRUE),
" (", font_bold(.base_code, collapse = NULL), ", ", font_italic("missing"), ") from ",
vector_or(
quotes = FALSE,
last_sep = " and/or ",
paste0(
ab_name(.combos, language = NULL, tolower = TRUE),
" (", font_bold(.combos, collapse = NULL), ", ", font_italic("available"), ")"
)
)
)
}
}
}
}
cols_ab <- cols_ab[!duplicated(names(cols_ab))]
}
}
# nolint start # nolint start
AMC <- cols_ab["AMC"] AMC <- cols_ab["AMC"]
AMK <- cols_ab["AMK"] AMK <- cols_ab["AMK"]
@@ -699,6 +722,16 @@ mdro <- function(x = NULL,
x x
} }
ab_without_inhibitor <- function(ab_codes) {
# Get the base drug AB code from a drug+inhibitor combination.
# e.g., AMC (amoxicillin/clavulanic acid) -> AMX (amoxicillin)
# TZP (piperacillin/tazobactam) -> PIP (piperacillin)
# SAM (ampicillin/sulbactam) -> AMP (ampicillin)
combo_names <- ab_name(ab_codes, language = NULL)
base_names <- gsub("/.*", "", combo_names)
suppressMessages(as.ab(base_names))
}
# antimicrobial classes # antimicrobial classes
# nolint start # nolint start
aminoglycosides <- c(TOB, GEN) aminoglycosides <- c(TOB, GEN)
@@ -772,7 +805,7 @@ mdro <- function(x = NULL,
) )
} }
x[rows_to_change, "MDRO"] <<- to x[rows_to_change, "MDRO"] <<- to
x[rows_to_change, "reason"] <<- reason x[rows_to_change, "reason"] <<- paste0(x[rows_to_change, "reason", drop = TRUE], "; ", reason)
x[rows_not_to_change, "reason"] <<- "guideline criteria not met" x[rows_not_to_change, "reason"] <<- "guideline criteria not met"
} }
} }
@@ -802,7 +835,7 @@ mdro <- function(x = NULL,
sum(vapply( sum(vapply(
FUN.VALUE = logical(1), FUN.VALUE = logical(1),
group_tbl, group_tbl,
function(group) any(unlist(x[row, group[!is.na(group)], drop = TRUE]) %in% c("S", "SDD", "I", "R")) function(group) any(unlist(x[row, group[!is.na(group)], drop = TRUE]) %in% VALID_SIR_LEVELS[VALID_SIR_LEVELS != "NI"])
)) ))
} }
) )
@@ -842,7 +875,7 @@ mdro <- function(x = NULL,
} }
if (isTRUE(info)) { if (isTRUE(info)) {
message_(" OK.", add_fn = list(font_green, font_bold), as_note = FALSE) message_(" OK.", as_note = FALSE)
} }
} }
@@ -854,7 +887,7 @@ mdro <- function(x = NULL,
x <- left_join_microorganisms(x, by = col_mo) x <- left_join_microorganisms(x, by = col_mo)
x$MDRO <- ifelse(!is.na(x$genus), 1, NA_integer_) x$MDRO <- ifelse(!is.na(x$genus), 1, NA_integer_)
x$row_number <- seq_len(nrow(x)) x$row_number <- seq_len(nrow(x))
x$reason <- NA_character_ x$reason <- ""
x$all_nonsusceptible_columns <- "" x$all_nonsusceptible_columns <- ""
if (guideline$code == "cmi2012") { if (guideline$code == "cmi2012") {
@@ -1498,7 +1531,7 @@ mdro <- function(x = NULL,
} }
trans_tbl( trans_tbl(
3, # positive 3, # positive
rows = which(x$order == "Enterobacterales" & esbl == TRUE), rows = which(x$order == "Enterobacterales" & x$esbl == TRUE),
cols = "any", cols = "any",
any_all = "any", any_all = "any",
reason = "Enterobacterales: ESBL" reason = "Enterobacterales: ESBL"
@@ -1519,17 +1552,18 @@ mdro <- function(x = NULL,
) )
trans_tbl( trans_tbl(
3, 3,
rows = which(x$order == "Enterobacterales" & carbapenemase == TRUE), rows = which(x$order == "Enterobacterales" & x$carbapenemase == TRUE),
cols = "any", cols = "any",
any_all = "any", any_all = "any",
reason = "Enterobacterales: carbapenemase" reason = "Enterobacterales: carbapenemase"
) )
c.freundii_complex <- AMR::microorganisms.groups$mo_name[AMR::microorganisms.groups$mo_group_name == "Citrobacter freundii complex"]
trans_tbl( trans_tbl(
3, 3,
rows = which(col_values(x, SXT) == "R" & rows = which(col_values(x, SXT) == "R" &
(col_values(x, GEN) == "R" | col_values(x, TOB) == "R" | col_values(x, AMK) == "R") & (col_values(x, GEN) == "R" | col_values(x, TOB) == "R" | col_values(x, AMK) == "R") &
(col_values(x, CIP) == "R" | col_values(x, NOR) == "R" | col_values(x, LVX) == "R") & (col_values(x, CIP) == "R" | col_values(x, NOR) == "R" | col_values(x, LVX) == "R") &
(x$genus %in% c("Enterobacter", "Providencia") | paste(x$genus, x$species) %in% c("Citrobacter freundii", "Klebsiella aerogenes", "Hafnia alvei", "Morganella morganii"))), (x$genus %in% c("Enterobacter", "Providencia") | paste(x$genus, x$species) %in% c(c.freundii_complex, "Klebsiella aerogenes", "Hafnia alvei", "Morganella morganii"))),
cols = c(SXT, aminoglycosides, fluoroquinolones), cols = c(SXT, aminoglycosides, fluoroquinolones),
any_all = "any", any_all = "any",
reason = "Enterobacterales group II: aminoglycoside + fluoroquinolone + cotrimoxazol" reason = "Enterobacterales group II: aminoglycoside + fluoroquinolone + cotrimoxazol"
@@ -1557,14 +1591,14 @@ mdro <- function(x = NULL,
) )
trans_tbl( trans_tbl(
2, # unconfirmed 2, # unconfirmed
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & is.na(carbapenemase)), rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & is.na(x$carbapenemase)),
cols = carbapenems, cols = carbapenems,
any_all = "any", any_all = "any",
reason = "A. baumannii-calcoaceticus complex: potential carbapenemase" reason = "A. baumannii-calcoaceticus complex: potential carbapenemase"
) )
trans_tbl( trans_tbl(
3, 3,
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & carbapenemase == TRUE), rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & x$carbapenemase == TRUE),
cols = carbapenems, cols = carbapenems,
any_all = "any", any_all = "any",
reason = "A. baumannii-calcoaceticus complex: carbapenemase" reason = "A. baumannii-calcoaceticus complex: carbapenemase"
@@ -1574,6 +1608,7 @@ mdro <- function(x = NULL,
x$psae <- 0 x$psae <- 0
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, TOB) == "R") | NA_as_FALSE(col_values(x, AMK) == "R"), 1, 0) x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, TOB) == "R") | NA_as_FALSE(col_values(x, AMK) == "R"), 1, 0)
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, IPM) == "R") | NA_as_FALSE(col_values(x, MEM) == "R"), 1, 0) x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, IPM) == "R") | NA_as_FALSE(col_values(x, MEM) == "R"), 1, 0)
x$psae <- x$psae + ifelse(NA_as_FALSE(x$carbapenemase), 1, 0)
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, PIP) == "R") | NA_as_FALSE(col_values(x, TZP) == "R"), 1, 0) x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, PIP) == "R") | NA_as_FALSE(col_values(x, TZP) == "R"), 1, 0)
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CAZ) == "R") | NA_as_FALSE(col_values(x, CZA) == "R"), 1, 0) x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CAZ) == "R") | NA_as_FALSE(col_values(x, CZA) == "R"), 1, 0)
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CIP) == "R") | NA_as_FALSE(col_values(x, NOR) == "R") | NA_as_FALSE(col_values(x, LVX) == "R"), 1, 0) x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CIP) == "R") | NA_as_FALSE(col_values(x, NOR) == "R") | NA_as_FALSE(col_values(x, LVX) == "R"), 1, 0)
@@ -1602,7 +1637,7 @@ mdro <- function(x = NULL,
) )
trans_tbl( trans_tbl(
3, 3,
rows = which(x$genus == "Enterococcus" & x$species == "faecium" & (vanA == TRUE | vanB == TRUE)), rows = which(x$genus == "Enterococcus" & x$species == "faecium" & (x$vanA == TRUE | x$vanB == TRUE)),
cols = c(PEN, AMX, AMP, VAN), cols = c(PEN, AMX, AMP, VAN),
any_all = "any", any_all = "any",
reason = "E. faecium: vanA/vanB gene + penicillin group" reason = "E. faecium: vanA/vanB gene + penicillin group"
@@ -1611,14 +1646,14 @@ mdro <- function(x = NULL,
# Staphylococcus aureus complex (= aureus, argenteus or schweitzeri) # Staphylococcus aureus complex (= aureus, argenteus or schweitzeri)
trans_tbl( trans_tbl(
2, 2,
rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (is.na(mecA) | is.na(mecC))), rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (is.na(x$mecA) | is.na(x$mecC))),
cols = c(AMC, TZP, FLC, OXA, FOX, FOX1), cols = c(AMC, TZP, FLC, OXA, FOX, FOX1),
any_all = "any", any_all = "any",
reason = "S. aureus complex: potential MRSA" reason = "S. aureus complex: potential MRSA"
) )
trans_tbl( trans_tbl(
3, 3,
rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (mecA == TRUE | mecC == TRUE)), rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (x$mecA == TRUE | x$mecC == TRUE)),
cols = "any", cols = "any",
any_all = "any", any_all = "any",
reason = "S. aureus complex: mecA/mecC gene" reason = "S. aureus complex: mecA/mecC gene"
@@ -1899,10 +1934,15 @@ mdro <- function(x = NULL,
# fill in empty reasons # fill in empty reasons
x$reason[is.na(x$reason)] <- "not covered by guideline" x$reason[is.na(x$reason)] <- "not covered by guideline"
x[rows_empty, "reason"] <- paste(x[rows_empty, "reason"], "(note: no available test results)") x[rows_empty, "reason"] <- paste(x[rows_empty, "reason"], "(note: no available test results)")
# starting semicolons must be removed
x$reason <- trimws(gsub("^;", "", x$reason))
# if criteria were not met initially, but later they were, then they have a following semicolon; remove the initial lack of meeting criteria
x$reason <- trimws(gsub("guideline criteria not met;", "", x$reason, fixed = TRUE))
# format data set # format data set
colnames(x)[colnames(x) == col_mo] <- "microorganism" colnames(x)[colnames(x) == col_mo] <- "microorganism"
x$microorganism <- mo_name(x$microorganism, language = NULL) x$microorganism <- mo_name(x$microorganism, language = NULL)
x$guideline <- paste0(guideline$author, " - ", guideline$name, ", ", guideline$version, ")") x$guideline <- paste0(guideline$author, " - ", guideline$name, ifelse(is.na(guideline$version), "", paste0(" (", guideline$version, ")")))
x$all_nonsusceptible_columns <- gsub(".inferred_sir_proxy_from#(.*?)#", " (inferred from \\1)", x$all_nonsusceptible_columns, perl = TRUE)
x[, c( x[, c(
"row_number", "row_number",
"microorganism", "microorganism",
@@ -1925,7 +1965,7 @@ brmo <- function(x = NULL, only_sir_columns = any(is.sir(x)), ...) {
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
stop_if( stop_if(
"guideline" %in% names(list(...)), "guideline" %in% names(list(...)),
"argument `guideline` must not be set since this is a guideline-specific function" "argument {.arg guideline} must not be set since this is a guideline-specific function"
) )
mdro(x = x, only_sir_columns = only_sir_columns, guideline = "BRMO", ...) mdro(x = x, only_sir_columns = only_sir_columns, guideline = "BRMO", ...)
} }
@@ -1938,7 +1978,7 @@ mrgn <- function(x = NULL, only_sir_columns = any(is.sir(x)), verbose = FALSE, .
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
stop_if( stop_if(
"guideline" %in% names(list(...)), "guideline" %in% names(list(...)),
"argument `guideline` must not be set since this is a guideline-specific function" "argument {.arg guideline} must not be set since this is a guideline-specific function"
) )
mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "MRGN", ...) mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "MRGN", ...)
} }
@@ -1950,7 +1990,7 @@ mdr_tb <- function(x = NULL, only_sir_columns = any(is.sir(x)), verbose = FALSE,
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
stop_if( stop_if(
"guideline" %in% names(list(...)), "guideline" %in% names(list(...)),
"argument `guideline` must not be set since this is a guideline-specific function" "argument {.arg guideline} must not be set since this is a guideline-specific function"
) )
mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "TB", ...) mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "TB", ...)
} }
@@ -1962,7 +2002,7 @@ mdr_cmi2012 <- function(x = NULL, only_sir_columns = any(is.sir(x)), verbose = F
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
stop_if( stop_if(
"guideline" %in% names(list(...)), "guideline" %in% names(list(...)),
"argument `guideline` must not be set since this is a guideline-specific function" "argument {.arg guideline} must not be set since this is a guideline-specific function"
) )
mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "CMI 2012", ...) mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "CMI 2012", ...)
} }
@@ -1974,7 +2014,7 @@ eucast_exceptional_phenotypes <- function(x = NULL, only_sir_columns = any(is.si
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
stop_if( stop_if(
"guideline" %in% names(list(...)), "guideline" %in% names(list(...)),
"argument `guideline` must not be set since this is a guideline-specific function" "argument {.arg guideline} must not be set since this is a guideline-specific function"
) )
mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "EUCAST", ...) mdro(x = x, only_sir_columns = only_sir_columns, verbose = verbose, guideline = "EUCAST", ...)
} }
+2 -2
View File
@@ -31,7 +31,7 @@
#' #'
#' Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand. #' Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand.
#' @param x A vector of class [sir][as.sir()], [mic][as.mic()] or [disk][as.disk()], or a [data.frame] containing columns of any of these classes. #' @param x A vector of class [sir][as.sir()], [mic][as.mic()] or [disk][as.disk()], or a [data.frame] containing columns of any of these classes.
#' @param ... Variables to select. Supports [tidyselect language][tidyselect::language] (such as `column1:column4` and `where(is.mic)`), and can thus also be [antimicrobial selectors][amr_selector()]. #' @param ... Variables to select. Supports [tidyselect language][tidyselect::starts_with()] such as `where(is.mic)`, `starts_with(...)`, or `column1:column4`, and can thus also be [antimicrobial selectors][amr_selector()].
#' @param combine_SI A [logical] to indicate whether all values of S, SDD, and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is `TRUE`. #' @param combine_SI A [logical] to indicate whether all values of S, SDD, and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is `TRUE`.
#' @details The mean AMR distance is effectively [the Z-score](https://en.wikipedia.org/wiki/Standard_score); a normalised numeric value to compare AMR test results which can help to identify similar isolates, without comparing antibiograms by hand. #' @details The mean AMR distance is effectively [the Z-score](https://en.wikipedia.org/wiki/Standard_score); a normalised numeric value to compare AMR test results which can help to identify similar isolates, without comparing antibiograms by hand.
#' #'
@@ -118,7 +118,7 @@ mean_amr_distance.disk <- function(x, ...) {
mean_amr_distance.sir <- function(x, ..., combine_SI = TRUE) { mean_amr_distance.sir <- function(x, ..., combine_SI = TRUE) {
meet_criteria(combine_SI, allow_class = "logical", has_length = 1, .call_depth = -1) meet_criteria(combine_SI, allow_class = "logical", has_length = 1, .call_depth = -1)
if (isTRUE(combine_SI)) { if (isTRUE(combine_SI)) {
x[x %in% c("I", "SDD")] <- "S" x[x %in% c("I", "SDD")] <- "S" # do not acknowledge CLSI/EUCAST guideline here to keep the numeric mean_amr_distance consistent between systems
} }
mean_amr_distance(as.double(x)) mean_amr_distance(as.double(x))
} }
+52 -13
View File
@@ -63,6 +63,7 @@ COMMON_MIC_VALUES <- c(
#' @param x A [character] or [numeric] vector. #' @param x A [character] or [numeric] vector.
#' @param na.rm A [logical] indicating whether missing values should be removed. #' @param na.rm A [logical] indicating whether missing values should be removed.
#' @param keep_operators A [character] specifying how to handle operators (such as `>` and `<=`) in the input. Accepts one of three values: `"all"` (or `TRUE`) to keep all operators, `"none"` (or `FALSE`) to remove all operators, or `"edges"` to keep operators only at both ends of the range. #' @param keep_operators A [character] specifying how to handle operators (such as `>` and `<=`) in the input. Accepts one of three values: `"all"` (or `TRUE`) to keep all operators, `"none"` (or `FALSE`) to remove all operators, or `"edges"` to keep operators only at both ends of the range.
#' @param round_to_next_log2 A [logical] to round up all values to the next log2 level, that are not either `r vector_or(COMMON_MIC_VALUES, quotes = F)`. Values that are already in this list (with or without operators), are left unchanged (including any operators).
#' @param ... Arguments passed on to methods. #' @param ... Arguments passed on to methods.
#' @details To interpret MIC values as SIR values, use [as.sir()] on MIC values. It supports guidelines from EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`). #' @details To interpret MIC values as SIR values, use [as.sir()] on MIC values. It supports guidelines from EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`).
#' #'
@@ -125,7 +126,7 @@ COMMON_MIC_VALUES <- c(
#' # this can also coerce combined MIC/SIR values: #' # this can also coerce combined MIC/SIR values:
#' as.mic("<=0.002; S") #' as.mic("<=0.002; S")
#' #'
#' # mathematical processing treats MICs as numeric values #' # mathematical processing treats MICs as, and returns, numeric values
#' fivenum(mic_data) #' fivenum(mic_data)
#' quantile(mic_data) #' quantile(mic_data)
#' all(mic_data < 512) #' all(mic_data < 512)
@@ -133,6 +134,10 @@ COMMON_MIC_VALUES <- c(
#' # rescale MICs using rescale_mic() #' # rescale MICs using rescale_mic()
#' rescale_mic(mic_data, mic_range = c(4, 16)) #' rescale_mic(mic_data, mic_range = c(4, 16))
#' #'
#' # round up to nearest log2 level, e.g. for CLSI breakpoint interpretation:
#' c(1:8)
#' as.mic(c(1:8), round_to_next_log2 = TRUE)
#'
#' # interpret MIC values #' # interpret MIC values
#' as.sir( #' as.sir(
#' x = as.mic(2), #' x = as.mic(2),
@@ -157,10 +162,12 @@ COMMON_MIC_VALUES <- c(
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' autoplot(mic_data, mo = "E. coli", ab = "cipro", language = "nl") # Dutch #' autoplot(mic_data, mo = "E. coli", ab = "cipro", language = "nl") # Dutch
#' } #' }
as.mic <- function(x, na.rm = FALSE, keep_operators = "all") { as.mic <- function(x, na.rm = FALSE, keep_operators = "all", round_to_next_log2 = FALSE) {
meet_criteria(x, allow_NA = TRUE) meet_criteria(x, allow_NA = TRUE)
meet_criteria(na.rm, allow_class = "logical", has_length = 1) meet_criteria(na.rm, allow_class = "logical", has_length = 1)
meet_criteria(keep_operators, allow_class = c("character", "logical"), is_in = c("all", "none", "edges", FALSE, TRUE), has_length = 1) meet_criteria(keep_operators, allow_class = c("character", "logical"), is_in = c("all", "none", "edges", FALSE, TRUE), has_length = 1)
meet_criteria(round_to_next_log2, allow_class = "logical", has_length = 1)
if (isTRUE(keep_operators)) { if (isTRUE(keep_operators)) {
keep_operators <- "all" keep_operators <- "all"
} else if (isFALSE(keep_operators)) { } else if (isFALSE(keep_operators)) {
@@ -168,6 +175,9 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
} }
if (is.mic(x) && (keep_operators == "all" || !any(x %like% "[>=<]", na.rm = TRUE))) { if (is.mic(x) && (keep_operators == "all" || !any(x %like% "[>=<]", na.rm = TRUE))) {
if (isTRUE(round_to_next_log2)) {
x <- roundup_to_nearest_log2(x)
}
if (!identical(levels(x), VALID_MIC_LEVELS)) { if (!identical(levels(x), VALID_MIC_LEVELS)) {
# might be from an older AMR version - just update MIC factor levels # might be from an older AMR version - just update MIC factor levels
x <- set_clean_class(factor(as.character(x), levels = VALID_MIC_LEVELS, ordered = TRUE), x <- set_clean_class(factor(as.character(x), levels = VALID_MIC_LEVELS, ordered = TRUE),
@@ -207,8 +217,9 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
warning_("Some MICs were combined values, only the first values are kept") warning_("Some MICs were combined values, only the first values are kept")
x[x %like% "[0-9]/.*[0-9]"] <- gsub("/.*", "", x[x %like% "[0-9]/.*[0-9]"]) x[x %like% "[0-9]/.*[0-9]"] <- gsub("/.*", "", x[x %like% "[0-9]/.*[0-9]"])
} }
x <- trimws2(gsub("[^e\\P{L}]", "", x, perl = TRUE)) # \p{L} is the Unicode category for all letters, including those with diacritics
# remove other invalid characters # remove other invalid characters
x <- gsub("[^a-zA-Z0-9.><= -]+", "", x, perl = TRUE) x <- gsub("[^0-9e.><= -]+", "", x, perl = TRUE)
# transform => to >= and =< to <= # transform => to >= and =< to <=
x <- gsub("=<", "<=", x, fixed = TRUE) x <- gsub("=<", "<=", x, fixed = TRUE)
x <- gsub("=>", ">=", x, fixed = TRUE) x <- gsub("=>", ">=", x, fixed = TRUE)
@@ -260,7 +271,7 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
cur_col <- get_current_column() cur_col <- get_current_column()
warning_("in `as.mic()`: ", na_after - na_before, " result", warning_("in `as.mic()`: ", na_after - na_before, " result",
ifelse(na_after - na_before > 1, "s", ""), ifelse(na_after - na_before > 1, "s", ""),
ifelse(is.null(cur_col), "", paste0(" in index '", cur_col, "'")), ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
" truncated (", " truncated (",
round(((na_after - na_before) / length(x)) * 100), round(((na_after - na_before) / length(x)) * 100),
"%) that were invalid MICs: ", "%) that were invalid MICs: ",
@@ -279,6 +290,10 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
x[!x %in% keep] <- gsub("[>=<]", "", x[!x %in% keep]) x[!x %in% keep] <- gsub("[>=<]", "", x[!x %in% keep])
} }
if (isTRUE(round_to_next_log2)) {
x <- roundup_to_nearest_log2(x)
}
set_clean_class(factor(x, levels = VALID_MIC_LEVELS, ordered = TRUE), set_clean_class(factor(x, levels = VALID_MIC_LEVELS, ordered = TRUE),
new_class = c("mic", "ordered", "factor") new_class = c("mic", "ordered", "factor")
) )
@@ -305,7 +320,7 @@ NA_mic_ <- set_clean_class(factor(NA, levels = VALID_MIC_LEVELS, ordered = TRUE)
#' @rdname as.mic #' @rdname as.mic
#' @param mic_range A manual range to rescale the MIC values, e.g., `mic_range = c(0.001, 32)`. Use `NA` to prevent rescaling on one side, e.g., `mic_range = c(NA, 32)`. #' @param mic_range A manual range to rescale the MIC values, e.g., `mic_range = c(0.001, 32)`. Use `NA` to prevent rescaling on one side, e.g., `mic_range = c(NA, 32)`.
#' @export #' @export
rescale_mic <- function(x, mic_range, keep_operators = "edges", as.mic = TRUE) { rescale_mic <- function(x, mic_range, keep_operators = "edges", as.mic = TRUE, round_to_next_log2 = FALSE) {
meet_criteria(mic_range, allow_class = c("numeric", "integer", "logical", "mic"), has_length = 2, allow_NA = TRUE, allow_NULL = TRUE) meet_criteria(mic_range, allow_class = c("numeric", "integer", "logical", "mic"), has_length = 2, allow_NA = TRUE, allow_NULL = TRUE)
if (is.numeric(mic_range)) { if (is.numeric(mic_range)) {
mic_range <- trimws(format(mic_range, scientific = FALSE)) mic_range <- trimws(format(mic_range, scientific = FALSE))
@@ -336,7 +351,7 @@ rescale_mic <- function(x, mic_range, keep_operators = "edges", as.mic = TRUE) {
x[x > max_mic] <- max_mic x[x > max_mic] <- max_mic
} }
x <- as.mic(x, keep_operators = ifelse(keep_operators == "edges", "none", keep_operators)) x <- as.mic(x, keep_operators = ifelse(keep_operators == "edges", "none", keep_operators), round_to_next_log2 = round_to_next_log2)
if (isTRUE(as.mic)) { if (isTRUE(as.mic)) {
if (keep_operators == "edges" && length(unique(x)) > 1) { if (keep_operators == "edges" && length(unique(x)) > 1) {
@@ -432,11 +447,17 @@ pillar_shaft.mic <- function(x, ...) {
} }
crude_numbers <- as.double(x) crude_numbers <- as.double(x)
operators <- gsub("[^<=>]+", "", as.character(x)) operators <- gsub("[^<=>]+", "", as.character(x))
# colourise operators
operators[!is.na(operators) & operators != ""] <- font_silver(operators[!is.na(operators) & operators != ""], collapse = NULL) operators[!is.na(operators) & operators != ""] <- font_silver(operators[!is.na(operators) & operators != ""], collapse = NULL)
out <- trimws(paste0(operators, trimws(format(crude_numbers)))) out <- trimws(paste0(operators, trimws(format(crude_numbers))))
out[is.na(x)] <- font_na(NA) out[is.na(x)] <- font_na(NA)
# make trailing zeroes less visible # make trailing zeroes less visible
out[out %like% "[.]"] <- gsub("([.]?0+)$", font_silver("\\1"), out[out %like% "[.]"], perl = TRUE) if (is_dark()) {
fn <- font_silver
} else {
fn <- font_white
}
out[out %like% "[.]"] <- gsub("([.]?0+)$", fn("\\1"), out[out %like% "[.]"], perl = TRUE)
create_pillar_column(out, align = "right", width = max(nchar(font_stripstyle(out)))) create_pillar_column(out, align = "right", width = max(nchar(font_stripstyle(out))))
} }
@@ -590,15 +611,33 @@ get_skimmers.mic <- function(column) {
column <- as.mic(column) # make sure that currently implemented MIC levels are used column <- as.mic(column) # make sure that currently implemented MIC levels are used
skimr::sfl( skimr::sfl(
skim_type = "mic", skim_type = "mic",
p0 = ~ stats::quantile(., probs = 0, na.rm = TRUE, names = FALSE), p0 = ~ stats::quantile(column, probs = 0, na.rm = TRUE, names = FALSE),
p25 = ~ stats::quantile(., probs = 0.25, na.rm = TRUE, names = FALSE), p25 = ~ stats::quantile(column, probs = 0.25, na.rm = TRUE, names = FALSE),
p50 = ~ stats::quantile(., probs = 0.5, na.rm = TRUE, names = FALSE), p50 = ~ stats::quantile(column, probs = 0.5, na.rm = TRUE, names = FALSE),
p75 = ~ stats::quantile(., probs = 0.75, na.rm = TRUE, names = FALSE), p75 = ~ stats::quantile(column, probs = 0.75, na.rm = TRUE, names = FALSE),
p100 = ~ stats::quantile(., probs = 1, na.rm = TRUE, names = FALSE), p100 = ~ stats::quantile(column, probs = 1, na.rm = TRUE, names = FALSE),
hist = ~ skimr::inline_hist(log2(stats::na.omit(.)), 5) hist = ~ skimr::inline_hist(log2(stats::na.omit(column)), 10)
) )
} }
roundup_to_nearest_log2 <- function(x) {
x_dbl <- suppressWarnings(as.double(gsub("[>=<]", "", x)))
x_new <- vapply(
FUN.VALUE = double(1),
x_dbl,
function(val) {
if (is.na(val)) {
NA_real_
} else {
COMMON_MIC_VALUES[which(COMMON_MIC_VALUES >= val)][1]
}
}
)
x[!x_dbl %in% COMMON_MIC_VALUES] <- x_new[!x_dbl %in% COMMON_MIC_VALUES]
x
}
# Miscellaneous mathematical functions ------------------------------------ # Miscellaneous mathematical functions ------------------------------------
#' @method mean mic #' @method mean mic
+37 -19
View File
@@ -38,13 +38,15 @@
#' #'
#' This excludes enterococci at default (who are in group D), use `Lancefield = "all"` to also categorise all enterococci as group D. #' This excludes enterococci at default (who are in group D), use `Lancefield = "all"` to also categorise all enterococci as group D.
#' @param minimum_matching_score A numeric value to set as the lower limit for the [MO matching score][mo_matching_score()]. When left blank, this will be determined automatically based on the character length of `x`, its [taxonomic kingdom][microorganisms] and [human pathogenicity][mo_matching_score()]. #' @param minimum_matching_score A numeric value to set as the lower limit for the [MO matching score][mo_matching_score()]. When left blank, this will be determined automatically based on the character length of `x`, its [taxonomic kingdom][microorganisms] and [human pathogenicity][mo_matching_score()].
#' @param keep_synonyms A [logical] to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default is `FALSE`, which will return a note if old taxonomic names were processed. The default can be set with the package option [`AMR_keep_synonyms`][AMR-options], i.e. `options(AMR_keep_synonyms = TRUE)` or `options(AMR_keep_synonyms = FALSE)`. #' @param keep_synonyms A [logical] to indicate if outdated, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. Do note that the term "synonym" is in this case jargon from the field of microbial taxonomy - it is not in place to denote that e.g. "Streptococcus Group A" is a synonym of *S. pyogenes*. Though this is practically the case, taxonomically it is not as "Streptococcus Group A" is not even a valid taxonomic name.
#'
#' The default is `FALSE`, which will return a note if outdated taxonomic names were processed. The default can be set with the package option [`AMR_keep_synonyms`][AMR-options], i.e. `options(AMR_keep_synonyms = TRUE)` or `options(AMR_keep_synonyms = FALSE)`.
#' @param reference_df A [data.frame] to be used for extra reference when translating `x` to a valid [`mo`]. See [set_mo_source()] and [get_mo_source()] to automate the usage of your own codes (e.g. used in your analysis or organisation). #' @param reference_df A [data.frame] to be used for extra reference when translating `x` to a valid [`mo`]. See [set_mo_source()] and [get_mo_source()] to automate the usage of your own codes (e.g. used in your analysis or organisation).
#' @param ignore_pattern A Perl-compatible [regular expression][base::regex] (case-insensitive) of which all matches in `x` must return `NA`. This can be convenient to exclude known non-relevant input and can also be set with the package option [`AMR_ignore_pattern`][AMR-options], e.g. `options(AMR_ignore_pattern = "(not reported|contaminated flora)")`. #' @param ignore_pattern A Perl-compatible [regular expression][base::regex] (case-insensitive) of which all matches in `x` must return `NA`. This can be convenient to exclude known non-relevant input and can also be set with the package option [`AMR_ignore_pattern`][AMR-options], e.g. `options(AMR_ignore_pattern = "(not reported|contaminated flora)")`.
#' @param cleaning_regex A Perl-compatible [regular expression][base::regex] (case-insensitive) to clean the input of `x`. Every matched part in `x` will be removed. At default, this is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar". The default can be set with the package option [`AMR_cleaning_regex`][AMR-options]. #' @param cleaning_regex A Perl-compatible [regular expression][base::regex] (case-insensitive) to clean the input of `x`. Every matched part in `x` will be removed. At default, this is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar". The default can be set with the package option [`AMR_cleaning_regex`][AMR-options].
#' @param only_fungi A [logical] to indicate if only fungi must be found, making sure that e.g. misspellings always return records from the kingdom of Fungi. This can be set globally for [all microorganism functions][mo_property()] with the package option [`AMR_only_fungi`][AMR-options], i.e. `options(AMR_only_fungi = TRUE)`. #' @param only_fungi A [logical] to indicate if only fungi must be found, making sure that e.g. misspellings always return records from the kingdom of Fungi. This can be set globally for [all microorganism functions][mo_property()] with the package option [`AMR_only_fungi`][AMR-options], i.e. `options(AMR_only_fungi = TRUE)`.
#' @param language Language to translate text like "no growth", which defaults to the system language (see [get_AMR_locale()]). #' @param language Language to translate text like "no growth", which defaults to the system language (see [get_AMR_locale()]).
#' @param info A [logical] to indicate that info must be printed, e.g. a progress bar when more than 25 items are to be coerced, or a list with old taxonomic names. The default is `TRUE` only in interactive mode. #' @param info A [logical] to indicate that info must be printed, e.g. a progress bar when more than 25 items are to be coerced, or a list with outdated taxonomic names. The default is `TRUE` only in interactive mode.
#' @param ... Other arguments passed on to functions. #' @param ... Other arguments passed on to functions.
#' @rdname as.mo #' @rdname as.mo
#' @aliases mo #' @aliases mo
@@ -82,7 +84,7 @@
#' There are three helper functions that can be run after using the [as.mo()] function: #' There are three helper functions that can be run after using the [as.mo()] function:
#' - Use [mo_uncertainties()] to get a [data.frame] that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see *Matching Score for Microorganisms* below). #' - Use [mo_uncertainties()] to get a [data.frame] that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see *Matching Score for Microorganisms* below).
#' - Use [mo_failures()] to get a [character] [vector] with all values that could not be coerced to a valid value. #' - Use [mo_failures()] to get a [character] [vector] with all values that could not be coerced to a valid value.
#' - Use [mo_renamed()] to get a [data.frame] with all values that could be coerced based on old, previously accepted taxonomic names. #' - Use [mo_renamed()] to get a [data.frame] with all values that could be coerced based on outdated, previously accepted taxonomic names.
#' #'
#' ### For Mycologists #' ### For Mycologists
#' #'
@@ -400,7 +402,12 @@ as.mo <- function(x,
top_hits <- mo_to_search[order(m, decreasing = TRUE, na.last = NA)] # na.last = NA will remove the NAs top_hits <- mo_to_search[order(m, decreasing = TRUE, na.last = NA)] # na.last = NA will remove the NAs
if (length(top_hits) == 0) { if (length(top_hits) == 0) {
warning_("No hits found for \"", x_search, "\" with minimum_matching_score = ", ifelse(is.null(minimum_matching_score), paste0("NULL (=", round(min(minimum_matching_score_current, na.rm = TRUE), 3), ")"), minimum_matching_score), ". Try setting this value lower or even to 0.", call = FALSE) warning_("No hits found for \"", x_search, "\" with minimum_matching_score = ",
ifelse(is.null(minimum_matching_score),
paste0("NULL (=", round(min(minimum_matching_score_current, na.rm = TRUE), 3), ")"),
minimum_matching_score
),
". Try setting this value lower or even to 0.", call = FALSE)
result_mo <- NA_character_ result_mo <- NA_character_
} else { } else {
result_mo <- MO_lookup_current$mo[match(top_hits[1], MO_lookup_current$fullname)] result_mo <- MO_lookup_current$mo[match(top_hits[1], MO_lookup_current$fullname)]
@@ -476,7 +483,7 @@ as.mo <- function(x,
} }
} else if (is.null(getOption("AMR_keep_synonyms")) && length(AMR_env$mo_renamed$old) > 0 && message_not_thrown_before("as.mo", "keep_synonyms_warning", entire_session = TRUE)) { } else if (is.null(getOption("AMR_keep_synonyms")) && length(AMR_env$mo_renamed$old) > 0 && message_not_thrown_before("as.mo", "keep_synonyms_warning", entire_session = TRUE)) {
# keep synonyms is TRUE, so check if any do have synonyms # keep synonyms is TRUE, so check if any do have synonyms
warning_("Function `as.mo()` returned ", nr2char(length(unique(AMR_env$mo_renamed$old))), " old taxonomic name", ifelse(length(unique(AMR_env$mo_renamed$old)) > 1, "s", ""), ". Use `as.mo(..., keep_synonyms = FALSE)` to clean the input to currently accepted taxonomic names, or set the R option `AMR_keep_synonyms` to `FALSE`. This warning will be shown once per session.", call = FALSE) warning_("{.help [{.fun as.mo}](AMR::as.mo)} returned ", nr2char(length(unique(AMR_env$mo_renamed$old))), " outdated taxonomic name", ifelse(length(unique(AMR_env$mo_renamed$old)) > 1, "s", ""), ". Use ", highlight_code("as.mo(..., keep_synonyms = FALSE)"), " to clean the input to currently accepted taxonomic names, or set the R option {.code AMR_keep_synonyms} to {.code FALSE}. This warning will be shown once per session.", call = FALSE)
} }
# Apply Becker ---- # Apply Becker ----
@@ -623,6 +630,14 @@ mo_cleaning_regex <- function() {
) )
} }
#' @rdname as.mo
#' @details `NA_mo_` is a missing value of the new `mo` class, analogous to e.g. base \R's [`NA_character_`][base::NA].
#' @format NULL
#' @export
NA_mo_ <- set_clean_class(NA_character_,
new_class = c("mo", "character")
)
# UNDOCUMENTED METHODS ---------------------------------------------------- # UNDOCUMENTED METHODS ----------------------------------------------------
# this prevents the requirement for putting the dependency in Imports: # this prevents the requirement for putting the dependency in Imports:
@@ -675,7 +690,7 @@ pillar_shaft.mo <- function(x, ...) {
} }
# add the names to the bugs as mouse-over! # add the names to the bugs as mouse-over!
if (tryCatch(isTRUE(getExportedValue("ansi_has_hyperlink_support", ns = asNamespace("cli"))()), error = function(e) FALSE)) { if (in_rstudio()) {
out[!x %in% c("UNKNOWN", NA)] <- font_url( out[!x %in% c("UNKNOWN", NA)] <- font_url(
url = paste0( url = paste0(
x[!x %in% c("UNKNOWN", NA)], ": ", x[!x %in% c("UNKNOWN", NA)], ": ",
@@ -747,13 +762,17 @@ freq.mo <- function(x, ...) {
# this prevents the requirement for putting the dependency in Imports: # this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, mo) #' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, mo)
get_skimmers.mo <- function(column) { get_skimmers.mo <- function(column) {
mo <- as.mo(column, keep_synonyms = TRUE, language = NULL, info = FALSE)
mo <- mo[!is.na(mo)]
spp <- mo[mo_species(mo, keep_synonyms = TRUE, language = NULL, info = FALSE) != ""]
skimr::sfl( skimr::sfl(
skim_type = "mo", skim_type = "mo",
unique_total = ~ length(unique(stats::na.omit(.))), n_unique = ~ length(unique(mo)),
gram_negative = ~ sum(mo_is_gram_negative(.), na.rm = TRUE), gram_negative = ~ sum(mo_is_gram_negative(mo, keep_synonyms = TRUE, language = NULL, info = FALSE), na.rm = TRUE),
gram_positive = ~ sum(mo_is_gram_positive(.), na.rm = TRUE), gram_positive = ~ sum(mo_is_gram_positive(mo, keep_synonyms = TRUE, language = NULL, info = FALSE), na.rm = TRUE),
top_genus = ~ names(sort(-table(mo_genus(stats::na.omit(.), language = NULL))))[1L], yeast = ~ sum(mo_is_yeast(mo, keep_synonyms = TRUE, language = NULL, info = FALSE), na.rm = TRUE),
top_species = ~ names(sort(-table(mo_name(stats::na.omit(.), language = NULL))))[1L] top_genus = ~ names(sort(-table(mo_genus(mo, keep_synonyms = TRUE, language = NULL, info = FALSE))))[1L],
top_species = ~ names(sort(-table(mo_name(spp, keep_synonyms = TRUE, language = NULL, info = FALSE))))[1L],
) )
} }
@@ -888,14 +907,14 @@ rep.mo <- function(x, ...) {
print.mo_uncertainties <- function(x, n = 10, ...) { print.mo_uncertainties <- function(x, n = 10, ...) {
more_than_50 <- FALSE more_than_50 <- FALSE
if (NROW(x) == 0) { if (NROW(x) == 0) {
cat(word_wrap("No uncertainties to show. Only uncertainties of the last call to `as.mo()` or any `mo_*()` function are stored.\n\n", add_fn = font_blue)) cat(font_blue(word_wrap("No uncertainties to show. Only uncertainties of the last call to {.help [{.fun as.mo}](AMR::as.mo)} or any mo_*() function are stored.\n\n")))
return(invisible(NULL)) return(invisible(NULL))
} else if (NROW(x) > 50) { } else if (NROW(x) > 50) {
more_than_50 <- TRUE more_than_50 <- TRUE
x <- x[1:50, , drop = FALSE] x <- x[1:50, , drop = FALSE]
} }
cat(word_wrap("Matching scores are based on the resemblance between the input and the full taxonomic name, and the pathogenicity in humans. See `?mo_matching_score`.\n\n", add_fn = font_blue)) cat(font_blue(word_wrap("Matching scores are based on the resemblance between the input and the full taxonomic name, and the pathogenicity in humans. See {.help [{.fun mo_matching_score}](AMR::mo_matching_score)}.\n\n")))
add_MO_lookup_to_AMR_env() add_MO_lookup_to_AMR_env()
@@ -905,13 +924,12 @@ print.mo_uncertainties <- function(x, n = 10, ...) {
col_green <- function(x) font_green_bg(x, collapse = NULL) col_green <- function(x) font_green_bg(x, collapse = NULL)
if (has_colour()) { if (has_colour()) {
cat(word_wrap("Colour keys: ", cat(font_blue(word_wrap("Colour keys: ",
col_red(" 0.000-0.549 "), col_red(" 0.000-0.549 "),
col_orange(" 0.550-0.649 "), col_orange(" 0.550-0.649 "),
col_yellow(" 0.650-0.749 "), col_yellow(" 0.650-0.749 "),
col_green(" 0.750-1.000"), col_green(" 0.750-1.000")
add_fn = font_blue )), font_green_bg(" "), "\n", sep = "")
), font_green_bg(" "), "\n", sep = "")
} }
score_set_colour <- function(text, scores) { score_set_colour <- function(text, scores) {
@@ -1014,7 +1032,7 @@ print.mo_uncertainties <- function(x, n = 10, ...) {
#' @noRd #' @noRd
print.mo_renamed <- function(x, extra_txt = "", n = 25, ...) { print.mo_renamed <- function(x, extra_txt = "", n = 25, ...) {
if (NROW(x) == 0) { if (NROW(x) == 0) {
cat(word_wrap("No renamed taxonomy to show. Only renamed taxonomy of the last call of `as.mo()` or any `mo_*()` function are stored.\n", add_fn = font_blue)) cat(font_blue(word_wrap("No renamed taxonomy to show. Only renamed taxonomy of the last call of {.help [{.fun as.mo}](AMR::as.mo)} or any mo_*() function are stored.\n")))
return(invisible(NULL)) return(invisible(NULL))
} }
@@ -1186,7 +1204,7 @@ parse_and_convert <- function(x) {
parsed <- gsub('"', "", parsed, fixed = TRUE) parsed <- gsub('"', "", parsed, fixed = TRUE)
parsed parsed
}, },
error = function(e) stop(e$message, call. = FALSE) error = function(e) stop(conditionMessage(e), call. = FALSE)
) # this will also be thrown when running `as.mo(no_existing_object)` ) # this will also be thrown when running `as.mo(no_existing_object)`
} }
out <- trimws2(out) out <- trimws2(out)
+3 -3
View File
@@ -974,7 +974,7 @@ mo_validate <- function(x, property, language, keep_synonyms = keep_synonyms, ..
# try to catch an error when inputting an invalid argument # try to catch an error when inputting an invalid argument
# so the 'call.' can be set to FALSE # so the 'call.' can be set to FALSE
tryCatch(x[1L] %in% unlist(AMR_env$MO_lookup[1, property, drop = TRUE]), tryCatch(x[1L] %in% unlist(AMR_env$MO_lookup[1, property, drop = TRUE]),
error = function(e) stop(e$message, call. = FALSE) error = function(e) stop(conditionMessage(e), call. = FALSE)
) )
dots <- list(...) dots <- list(...)
@@ -1043,10 +1043,10 @@ find_mo_col <- function(fn) {
) )
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) { if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
if (message_not_thrown_before(fn = fn)) { if (message_not_thrown_before(fn = fn)) {
message_("Using column '", font_bold(mo), "' as input for `", fn, "()`") message_("Using column '", font_bold(mo), "' as input for {.help [{.fun ", fn, "}](AMR::", fn, ")}")
} }
return(df[, mo, drop = TRUE]) return(df[, mo, drop = TRUE])
} else { } else {
stop_("argument `x` is missing and no column with info about microorganisms could be found.", call = -2) stop_("argument {.arg x} is missing and no column with info about microorganisms could be found.", call = -2)
} }
} }
+2 -3
View File
@@ -129,7 +129,7 @@ set_mo_source <- function(path, destination = getOption("AMR_mo_source", "~/mo_s
meet_criteria(path, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(path, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(destination, allow_class = "character", has_length = 1) meet_criteria(destination, allow_class = "character", has_length = 1)
stop_ifnot(destination %like% "[.]rds$", "the `destination` must be a file location with file extension .rds.") stop_ifnot(destination %like% "[.]rds$", "the {.arg destination} must be a file location with file extension .rds.")
mo_source_destination <- path.expand(destination) mo_source_destination <- path.expand(destination)
if (is.null(path) || path %in% c(FALSE, "")) { if (is.null(path) || path %in% c(FALSE, "")) {
@@ -137,7 +137,6 @@ set_mo_source <- function(path, destination = getOption("AMR_mo_source", "~/mo_s
if (file.exists(mo_source_destination)) { if (file.exists(mo_source_destination)) {
unlink(mo_source_destination) unlink(mo_source_destination)
message_("Removed mo_source file '", font_bold(mo_source_destination), "'", message_("Removed mo_source file '", font_bold(mo_source_destination), "'",
add_fn = font_red,
as_note = FALSE as_note = FALSE
) )
} }
@@ -250,7 +249,7 @@ get_mo_source <- function(destination = getOption("AMR_mo_source", "~/mo_source.
current_ext <- regexpr("\\.([[:alnum:]]+)$", destination) current_ext <- regexpr("\\.([[:alnum:]]+)$", destination)
current_ext <- ifelse(current_ext > -1L, substring(destination, current_ext + 1L), "") current_ext <- ifelse(current_ext > -1L, substring(destination, current_ext + 1L), "")
vowel <- ifelse(current_ext %like% "^[AEFHILMNORSX]", "n", "") vowel <- ifelse(current_ext %like% "^[AEFHILMNORSX]", "n", "")
stop_("The AMR mo source must be an RDS file, not a", vowel, " ", toupper(current_ext), " file. If `\"", basename(destination), "\"` was meant as your input file, use `set_mo_source()` on this file. In any case, the option `AMR_mo_source` must be set to another path.") stop_("The AMR mo source must be an RDS file, not a{vowel} {toupper(current_ext)} file. If \"{basename(destination)}\" was meant as your input file, use {.help [{.fun set_mo_source}](AMR::set_mo_source)} on this file. In any case, the option {.code AMR_mo_source} must be set to another path.")
} }
if (is.null(AMR_env$mo_source)) { if (is.null(AMR_env$mo_source)) {
AMR_env$mo_source <- readRDS_AMR(path.expand(destination)) AMR_env$mo_source <- readRDS_AMR(path.expand(destination))
+1 -1
View File
@@ -99,7 +99,7 @@ pca <- function(x,
new_list <- list(0) new_list <- list(0)
for (i in seq_len(length(dots) - 1)) { for (i in seq_len(length(dots) - 1)) {
new_list[[i]] <- tryCatch(eval(dots[[i + 1]], envir = x), new_list[[i]] <- tryCatch(eval(dots[[i + 1]], envir = x),
error = function(e) stop(e$message, call. = FALSE) error = function(e) stop(conditionMessage(e), call. = FALSE)
) )
if (length(new_list[[i]]) == 1) { if (length(new_list[[i]]) == 1) {
if (is.character(new_list[[i]]) && new_list[[i]] %in% colnames(x)) { if (is.character(new_list[[i]]) && new_list[[i]] %in% colnames(x)) {
+346 -176
View File
@@ -52,11 +52,19 @@
#' @details #' @details
#' ### The `scale_*_mic()` Functions #' ### The `scale_*_mic()` Functions
#' #'
#' The functions [scale_x_mic()], [scale_y_mic()], [scale_colour_mic()], and [scale_fill_mic()] functions allow to plot the [mic][as.mic()] class (MIC values) on a continuous, logarithmic scale. They also allow to rescale the MIC range with an 'inside' or 'outside' range if required, and retain the operators in MIC values (such as `>=`) if desired. Missing intermediate log2 levels will be plotted too. #' The functions [scale_x_mic()], [scale_y_mic()], [scale_colour_mic()], and [scale_fill_mic()] functions allow to plot the [mic][as.mic()] class (MIC values) on a continuous, logarithmic scale.
#'
#' There is normally no need to add these scale functions to your plot, as they are applied automatically when plotting values of class [mic][as.mic()].
#'
#' When manually added though, they allow to rescale the MIC range with an 'inside' or 'outside' range if required, and provide the option to retain the operators in MIC values (such as `>=`). Missing intermediate log2 levels will always be plotted too.
#' #'
#' ### The `scale_*_sir()` Functions #' ### The `scale_*_sir()` Functions
#' #'
#' The functions [scale_x_sir()], [scale_colour_sir()], and [scale_fill_sir()] functions allow to plot the [sir][as.sir()] class in the right order (`r paste(levels(NA_sir_), collapse = " < ")`). At default, they translate the S/I/R values to an interpretative text ("Susceptible", "Resistant", etc.) in any of the `r length(AMR:::LANGUAGES_SUPPORTED)` supported languages (use `language = NULL` to keep S/I/R). Also, except for [scale_x_sir()], they set colour-blind friendly colours to the `colour` and `fill` aesthetics. #' The functions [scale_x_sir()], [scale_colour_sir()], and [scale_fill_sir()] functions allow to plot the [sir][as.sir()] class in the right order (`r paste(levels(NA_sir_), collapse = " < ")`).
#'
#' There is normally no need to add these scale functions to your plot, as they are applied automatically when plotting values of class [sir][as.sir()].
#'
#' At default, they translate the S/I/R values to an interpretative text ("Susceptible", "Resistant", etc.) in any of the `r length(AMR:::LANGUAGES_SUPPORTED)` supported languages (use `language = NULL` to keep S/I/R). Also, except for [scale_x_sir()], they set colour-blind friendly colours to the `colour` and `fill` aesthetics.
#' #'
#' ### Additional `ggplot2` Functions #' ### Additional `ggplot2` Functions
#' #'
@@ -90,6 +98,10 @@
#' autoplot(some_mic_values, mo = "Escherichia coli", ab = "cipro") #' autoplot(some_mic_values, mo = "Escherichia coli", ab = "cipro")
#' } #' }
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' autoplot(some_mic_values, mo = "Staph aureus", ab = "Ceftaroline", guideline = "CLSI")
#' }
#'
#' if (require("ggplot2")) {
#' # support for 27 languages, various guidelines, and many options #' # support for 27 languages, various guidelines, and many options
#' autoplot(some_disk_values, #' autoplot(some_disk_values,
#' mo = "Escherichia coli", ab = "cipro", #' mo = "Escherichia coli", ab = "cipro",
@@ -110,17 +122,12 @@
#' ) + #' ) +
#' geom_col() #' geom_col()
#' mic_plot + #' mic_plot +
#' labs(title = "without scale_x_mic()") #' labs(title = "scale_x_mic() automatically applied")
#' } #' }
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' mic_plot + #' mic_plot +
#' scale_x_mic() + #' scale_x_mic(keep_operators = "none") +
#' labs(title = "with scale_x_mic()") #' labs(title = "with scale_x_mic() keeping no operators")
#' }
#' if (require("ggplot2")) {
#' mic_plot +
#' scale_x_mic(keep_operators = "all") +
#' labs(title = "with scale_x_mic() keeping all operators")
#' } #' }
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' mic_plot + #' mic_plot +
@@ -146,8 +153,8 @@
#' aes(group, mic) #' aes(group, mic)
#' ) + #' ) +
#' geom_boxplot() + #' geom_boxplot() +
#' geom_violin(linetype = 2, colour = "grey", fill = NA) + #' geom_violin(linetype = 2, colour = "grey30", fill = NA) +
#' scale_y_mic() #' labs(title = "scale_y_mic() automatically applied")
#' } #' }
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' ggplot( #' ggplot(
@@ -158,7 +165,7 @@
#' aes(group, mic) #' aes(group, mic)
#' ) + #' ) +
#' geom_boxplot() + #' geom_boxplot() +
#' geom_violin(linetype = 2, colour = "grey", fill = NA) + #' geom_violin(linetype = 2, colour = "grey30", fill = NA) +
#' scale_y_mic(mic_range = c(NA, 0.25)) #' scale_y_mic(mic_range = c(NA, 0.25))
#' } #' }
#' #'
@@ -179,7 +186,7 @@
#' #'
#' # Plotting using scale_y_mic() and scale_colour_sir() ------------------ #' # Plotting using scale_y_mic() and scale_colour_sir() ------------------
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' plain <- ggplot( #' mic_sir_plot <- ggplot(
#' data.frame( #' data.frame(
#' mic = some_mic_values, #' mic = some_mic_values,
#' group = some_groups, #' group = some_groups,
@@ -191,23 +198,18 @@
#' aes(x = group, y = mic, colour = sir) #' aes(x = group, y = mic, colour = sir)
#' ) + #' ) +
#' theme_minimal() + #' theme_minimal() +
#' geom_boxplot(fill = NA, colour = "grey") + #' geom_boxplot(fill = NA, colour = "grey30") +
#' geom_jitter(width = 0.25) #' geom_jitter(width = 0.25)
#' labs(title = "scale_y_mic()/scale_colour_sir() automatically applied")
#' #'
#' plain #' mic_sir_plot
#' } #' }
#' if (require("ggplot2")) { #' if (require("ggplot2")) {
#' # and now with our MIC and SIR scale functions: #' mic_sir_plot +
#' plain +
#' scale_y_mic() +
#' scale_colour_sir()
#' }
#' if (require("ggplot2")) {
#' plain +
#' scale_y_mic(mic_range = c(0.005, 32), name = "Our MICs!") + #' scale_y_mic(mic_range = c(0.005, 32), name = "Our MICs!") +
#' scale_colour_sir( #' scale_colour_sir(
#' language = "pt", #' language = "pt", # Portuguese
#' name = "Support in 27 languages" #' name = "Support in 28 languages"
#' ) #' )
#' } #' }
#' } #' }
@@ -225,6 +227,9 @@
#' plot(some_sir_values) #' plot(some_sir_values)
NULL NULL
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(ggplot2::scale_type, mic)
scale_type.mic <- function(x) c("mic", "discrete")
create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) { create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
ggplot_fn <- getExportedValue(paste0("scale_", aest, "_continuous"), ggplot_fn <- getExportedValue(paste0("scale_", aest, "_continuous"),
ns = asNamespace("ggplot2") ns = asNamespace("ggplot2")
@@ -243,6 +248,7 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
as.double(rescale_mic(x = as.double(as.mic(x)), keep_operators = keep_operators, mic_range = mic_range, as.mic = TRUE)) as.double(rescale_mic(x = as.double(as.mic(x)), keep_operators = keep_operators, mic_range = mic_range, as.mic = TRUE))
} }
scale$transform_df <- function(self, df) { scale$transform_df <- function(self, df) {
out <- list()
if (!aest %in% colnames(df)) { if (!aest %in% colnames(df)) {
# support for geom_hline(), geom_vline(), etc # support for geom_hline(), geom_vline(), etc
other_x <- c("xintercept", "xmin", "xmax", "xend", "width") other_x <- c("xintercept", "xmin", "xmax", "xend", "width")
@@ -254,11 +260,11 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
} else { } else {
stop_("No support for plotting df with `scale_", aest, "_mic()` with columns ", vector_and(colnames(df), sort = FALSE)) stop_("No support for plotting df with `scale_", aest, "_mic()` with columns ", vector_and(colnames(df), sort = FALSE))
} }
out <- rescale_mic(x = as.double(as.mic(df[[aest_val]])), keep_operators = "none", mic_range = NULL, as.mic = TRUE) mics <- rescale_mic(x = as.double(as.mic(df[[aest_val]])), keep_operators = "none", mic_range = NULL, as.mic = TRUE)
if (!is.null(self$mic_values_rescaled) && any(out < min(self$mic_values_rescaled, na.rm = TRUE) | out > max(self$mic_values_rescaled, na.rm = TRUE), na.rm = TRUE)) { if (!is.null(self$mic_values_rescaled) && any(mics < min(self$mic_values_rescaled, na.rm = TRUE) | mics > max(self$mic_values_rescaled, na.rm = TRUE), na.rm = TRUE)) {
warning_("The value for `", aest_val, "` is outside the plotted MIC range, consider using/updating the `mic_range` argument in `scale_", aest, "_mic()`.") warning_("The value for `", aest_val, "` is outside the plotted MIC range, consider using/updating the `mic_range` argument in `scale_", aest, "_mic()`.")
} }
df[[aest_val]] <- log2(as.double(out)) out[[aest_val]] <- log2(as.double(mics))
} else { } else {
self$mic_values_rescaled <- rescale_mic(x = as.double(as.mic(df[[aest]])), keep_operators = keep_operators, mic_range = mic_range, as.mic = TRUE) self$mic_values_rescaled <- rescale_mic(x = as.double(as.mic(df[[aest]])), keep_operators = keep_operators, mic_range = mic_range, as.mic = TRUE)
# create new breaks and labels here # create new breaks and labels here
@@ -279,14 +285,18 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
self$mic_values_levels[1] <- paste0("<=", self$mic_values_levels[1]) self$mic_values_levels[1] <- paste0("<=", self$mic_values_levels[1])
self$mic_values_levels[length(self$mic_values_levels)] <- paste0(">=", self$mic_values_levels[length(self$mic_values_levels)]) self$mic_values_levels[length(self$mic_values_levels)] <- paste0(">=", self$mic_values_levels[length(self$mic_values_levels)])
} }
self$mic_values_log <- log2(as.double(self$mic_values_rescaled)) self$mic_values_log <- log2(as.double(self$mic_values_rescaled))
if (aest == "y" && "group" %in% colnames(df) && "x" %in% colnames(df)) {
df$group <- as.integer(factor(df$x)) if (aest == "y" && "group" %in% colnames(df)) {
if (!"x" %in% colnames(df) || all(is.na(df$x))) {
out$group <- 1
} else {
out$group <- as.integer(factor(df$x))
}
} }
df[[aest]] <- self$mic_values_log out[[aest]] <- self$mic_values_log
} }
df out
} }
scale$breaks <- function(..., self) { scale$breaks <- function(..., self) {
@@ -313,7 +323,6 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
} }
} }
} }
scale$limits <- function(x, ..., self) { scale$limits <- function(x, ..., self) {
if (!is.null(self$mic_limits_set)) { if (!is.null(self$mic_limits_set)) {
if (is.function(self$mic_limits_set)) { if (is.function(self$mic_limits_set)) {
@@ -325,7 +334,7 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
rng <- range(log2(as.mic(self$mic_values_levels))) rng <- range(log2(as.mic(self$mic_values_levels)))
# add 0.5 extra space # add 0.5 extra space
rng <- c(rng[1] - 0.5, rng[2] + 0.5) rng <- c(rng[1] - 0.5, rng[2] + 0.5)
if (!is.na(x[1]) && x[1] == 0) { if (!is.null(x) && !is.na(x[1]) && x[1] == 0) {
# scale that start at 0 must remain so, e.g. in case of geom_col() # scale that start at 0 must remain so, e.g. in case of geom_col()
rng[1] <- 0 rng[1] <- 0
} }
@@ -373,10 +382,15 @@ scale_fill_mic <- function(keep_operators = "edges", mic_range = NULL, ...) {
create_scale_mic("fill", keep_operators = keep_operators, mic_range = mic_range, ...) create_scale_mic("fill", keep_operators = keep_operators, mic_range = mic_range, ...)
} }
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(ggplot2::scale_type, sir)
scale_type.sir <- function(x) c("sir", "discrete")
create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) { create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
args <- list(...) args <- list(...)
args[c("value", "labels", "limits")] <- NULL args[c("value", "labels", "limits")] <- NULL
colours_SIR <- expand_SIR_colours(colours_SIR, unname = FALSE)
if (identical(aesthetics, "x")) { if (identical(aesthetics, "x")) {
ggplot_fn <- ggplot2::scale_x_discrete ggplot_fn <- ggplot2::scale_x_discrete
} else { } else {
@@ -385,12 +399,11 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
args, args,
list( list(
aesthetics = aesthetics, aesthetics = aesthetics,
values = c( values = c(colours_SIR,
S = colours_SIR[1], NI = "grey30",
SDD = colours_SIR[2], WT = unname(colours_SIR[1]),
I = colours_SIR[2], NWT = unname(colours_SIR[4]),
R = colours_SIR[3], NS = unname(colours_SIR[4])
NI = "grey30"
) )
) )
) )
@@ -398,11 +411,12 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
scale <- do.call(ggplot_fn, args) scale <- do.call(ggplot_fn, args)
scale$labels <- function(x) { scale$labels <- function(x) {
stop_ifnot(all(x %in% c(levels(NA_sir_), NA)), stop_ifnot(all(x %in% c(levels(NA_sir_), "SI", "IR", NA)),
"Apply `scale_", aesthetics[1], "_sir()` to a variable of class 'sir', see `?as.sir`.", "Apply `scale_", aesthetics[1], "_sir()` to a variable of class 'sir', see {.help [{.fun as.sir}](AMR::as.sir)}.",
call = FALSE call = FALSE
) )
x <- as.character(as.sir(x)) x <- as.character(x)
x[!x %in% c("SI", "IR")] <- as.character(as.sir(x[!x %in% c("SI", "IR")]))
if (!is.null(language)) { if (!is.null(language)) {
x[x == "S"] <- "(S) Susceptible" x[x == "S"] <- "(S) Susceptible"
x[x == "SDD"] <- "(SDD) Susceptible dose-dependent" x[x == "SDD"] <- "(SDD) Susceptible dose-dependent"
@@ -412,14 +426,19 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
x[x == "I"] <- "(I) Intermediate" x[x == "I"] <- "(I) Intermediate"
} }
x[x == "R"] <- "(R) Resistant" x[x == "R"] <- "(R) Resistant"
x[x == "SI"] <- "(S/I) Susceptible"
x[x == "IR"] <- "(I/R) Non-susceptible"
x[x == "NI"] <- "(NI) Non-interpretable" x[x == "NI"] <- "(NI) Non-interpretable"
x[x == "WT"] <- "(WT) Wildtype"
x[x == "NWT"] <- "(NWT) Non-wildtype"
x[x == "NS"] <- "(NS) Non-susceptible"
x <- translate_AMR(x, language = language) x <- translate_AMR(x, language = language)
} }
x x
} }
scale$limits <- function(x, ...) { scale$limits <- function(x, ...) {
# force SIR in the right order # force SIR in the right order
as.character(sort(factor(x, levels = levels(NA_sir_)))) as.character(sort(factor(x, levels = c(levels(NA_sir_), "SI", "IR"))))
} }
scale scale
@@ -427,11 +446,16 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
#' @rdname plot #' @rdname plot
#' @export #' @export
scale_x_sir <- function(colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), scale_x_sir <- function(colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST",
...) { ...) {
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(eucast_I, allow_class = "logical", has_length = 1) meet_criteria(eucast_I, allow_class = "logical", has_length = 1)
create_scale_sir(aesthetics = "x", colours_SIR = colours_SIR, language = language, eucast_I = eucast_I) create_scale_sir(aesthetics = "x", colours_SIR = colours_SIR, language = language, eucast_I = eucast_I)
@@ -439,11 +463,16 @@ scale_x_sir <- function(colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
#' @rdname plot #' @rdname plot
#' @export #' @export
scale_colour_sir <- function(colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), scale_colour_sir <- function(colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST",
...) { ...) {
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(eucast_I, allow_class = "logical", has_length = 1) meet_criteria(eucast_I, allow_class = "logical", has_length = 1)
args <- list(...) args <- list(...)
@@ -463,11 +492,16 @@ scale_color_sir <- scale_colour_sir
#' @rdname plot #' @rdname plot
#' @export #' @export
scale_fill_sir <- function(colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), scale_fill_sir <- function(colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST",
...) { ...) {
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(eucast_I, allow_class = "logical", has_length = 1) meet_criteria(eucast_I, allow_class = "logical", has_length = 1)
args <- list(...) args <- list(...)
@@ -491,7 +525,12 @@ plot.mic <- function(x,
main = deparse(substitute(x)), main = deparse(substitute(x)),
ylab = translate_AMR("Frequency", language = language), ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language), xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE), include_PKPD = getOption("AMR_include_PKPD", TRUE),
@@ -503,16 +542,18 @@ plot.mic <- function(x,
meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(ylab, allow_class = "character", has_length = 1) meet_criteria(ylab, allow_class = "character", has_length = 1)
meet_criteria(xlab, allow_class = "character", has_length = 1) meet_criteria(xlab, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
meet_criteria(include_PKPD, allow_class = "logical", has_length = 1)
meet_criteria(breakpoint_type, allow_class = "character", is_in = AMR::clinical_breakpoints$type, has_length = 1)
x <- as.mic(x) # make sure that currently implemented MIC levels are used x <- as.mic(x) # make sure that currently implemented MIC levels are used
if (length(colours_SIR) == 1) {
colours_SIR <- rep(colours_SIR, 3)
}
main <- gsub(" +", " ", paste0(main, collapse = " ")) main <- gsub(" +", " ", paste0(main, collapse = " "))
colours_SIR <- expand_SIR_colours(colours_SIR)
# wildtype/Non-wildtype
is_wt_nwt <- identical(breakpoint_type, "ECOFF")
x <- plotrange_as_table(x, expand = expand) x <- plotrange_as_table(x, expand = expand)
cols_sub <- plot_colours_subtitle_guideline( cols_sub <- plot_colours_subtitle_guideline(
@@ -544,18 +585,30 @@ plot.mic <- function(x,
if (any(colours_SIR %in% cols_sub$cols)) { if (any(colours_SIR %in% cols_sub$cols)) {
legend_txt <- character(0) legend_txt <- character(0)
legend_col <- character(0) legend_col <- character(0)
if (any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) { if (!is_wt_nwt & any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(S) Susceptible") legend_txt <- c(legend_txt, "(S) Susceptible")
legend_col <- colours_SIR[1] legend_col <- colours_SIR[1]
} }
if (is_wt_nwt & any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(WT) Wildtype")
legend_col <- colours_SIR[1]
}
if (any(cols_sub$cols == colours_SIR[2] & cols_sub$count > 0)) { if (any(cols_sub$cols == colours_SIR[2] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline))) legend_txt <- c(legend_txt, "(SDD) Susceptible dose-dependent")
legend_col <- c(legend_col, colours_SIR[2]) legend_col <- c(legend_col, colours_SIR[2])
} }
if (any(cols_sub$cols == colours_SIR[3] & cols_sub$count > 0)) { if (any(cols_sub$cols == colours_SIR[3] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(R) Resistant") legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline)))
legend_col <- c(legend_col, colours_SIR[3]) legend_col <- c(legend_col, colours_SIR[3])
} }
if (!is_wt_nwt & any(cols_sub$cols == colours_SIR[4] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(R) Resistant")
legend_col <- c(legend_col, colours_SIR[4])
}
if (is_wt_nwt & any(cols_sub$cols == colours_SIR[4] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(NWT) Non-wildtype")
legend_col <- c(legend_col, colours_SIR[4])
}
legend("top", legend("top",
x.intersp = 0.5, x.intersp = 0.5,
@@ -580,7 +633,12 @@ barplot.mic <- function(height,
main = deparse(substitute(height)), main = deparse(substitute(height)),
ylab = translate_AMR("Frequency", language = language), ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language), xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
...) { ...) {
@@ -590,7 +648,7 @@ barplot.mic <- function(height,
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE) meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE) meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
meet_criteria(guideline, allow_class = "character", has_length = 1) meet_criteria(guideline, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
@@ -622,7 +680,12 @@ autoplot.mic <- function(object,
title = deparse(substitute(object)), title = deparse(substitute(object)),
ylab = translate_AMR("Frequency", language = language), ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language), xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE), include_PKPD = getOption("AMR_include_PKPD", TRUE),
@@ -635,9 +698,11 @@ autoplot.mic <- function(object,
meet_criteria(title, allow_class = "character", allow_NULL = TRUE) meet_criteria(title, allow_class = "character", allow_NULL = TRUE)
meet_criteria(ylab, allow_class = "character", has_length = 1) meet_criteria(ylab, allow_class = "character", has_length = 1)
meet_criteria(xlab, allow_class = "character", has_length = 1) meet_criteria(xlab, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
meet_criteria(include_PKPD, allow_class = "logical", has_length = 1)
meet_criteria(breakpoint_type, allow_class = "character", is_in = AMR::clinical_breakpoints$type, has_length = 1)
if ("main" %in% names(list(...))) { if ("main" %in% names(list(...))) {
title <- list(...)$main title <- list(...)$main
@@ -646,6 +711,11 @@ autoplot.mic <- function(object,
title <- gsub(" +", " ", paste0(title, collapse = " ")) title <- gsub(" +", " ", paste0(title, collapse = " "))
} }
colours_SIR <- expand_SIR_colours(colours_SIR)
# wildtype/Non-wildtype
is_wt_nwt <- identical(breakpoint_type, "ECOFF")
object <- as.mic(object) # make sure that currently implemented MIC levels are used object <- as.mic(object) # make sure that currently implemented MIC levels are used
x <- plotrange_as_table(object, expand = expand) x <- plotrange_as_table(object, expand = expand)
cols_sub <- plot_colours_subtitle_guideline( cols_sub <- plot_colours_subtitle_guideline(
@@ -664,15 +734,21 @@ autoplot.mic <- function(object,
df <- as.data.frame(x, stringsAsFactors = TRUE) df <- as.data.frame(x, stringsAsFactors = TRUE)
colnames(df) <- c("mic", "count") colnames(df) <- c("mic", "count")
df$cols <- cols_sub$cols df$cols <- cols_sub$cols
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible" df$cols[df$cols == colours_SIR[1] & !is_wt_nwt] <- "(S) Susceptible"
df$cols[df$cols == colours_SIR[2]] <- paste("(I)", plot_name_of_I(cols_sub$guideline)) df$cols[df$cols == colours_SIR[1] & is_wt_nwt] <- "(WT) Wildtype"
df$cols[df$cols == colours_SIR[3]] <- "(R) Resistant" df$cols[df$cols == colours_SIR[2]] <- "(SDD) Susceptible dose-dependent"
df$cols[df$cols == colours_SIR[3]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
df$cols[df$cols == colours_SIR[4] & !is_wt_nwt] <- "(R) Resistant"
df$cols[df$cols == colours_SIR[4] & is_wt_nwt] <- "(NWT) Non-wildtype"
df$cols <- factor(translate_into_language(df$cols, language = language), df$cols <- factor(translate_into_language(df$cols, language = language),
levels = translate_into_language( levels = translate_into_language(
c( c(
"(S) Susceptible", "(S) Susceptible",
"(SDD) Susceptible dose-dependent",
paste("(I)", plot_name_of_I(cols_sub$guideline)), paste("(I)", plot_name_of_I(cols_sub$guideline)),
"(R) Resistant" "(R) Resistant",
"(WT) Wildtype",
"(NWT) Non-wildtype"
), ),
language = language language = language
), ),
@@ -684,10 +760,12 @@ autoplot.mic <- function(object,
vals <- c( vals <- c(
"(S) Susceptible" = colours_SIR[1], "(S) Susceptible" = colours_SIR[1],
"(SDD) Susceptible dose-dependent" = colours_SIR[2], "(SDD) Susceptible dose-dependent" = colours_SIR[2],
"(I) Susceptible, incr. exp." = colours_SIR[2], "(I) Susceptible, incr. exp." = colours_SIR[3],
"(I) Intermediate" = colours_SIR[2], "(I) Intermediate" = colours_SIR[3],
"(R) Resistant" = colours_SIR[3], "(R) Resistant" = colours_SIR[4],
"(NI) Non-interpretable" = "grey" "(NI) Non-interpretable" = "grey30",
"(WT) Wildtype" = colours_SIR[1],
"(NWT) Non-wildtype" = colours_SIR[4]
) )
names(vals) <- translate_into_language(names(vals), language = language) names(vals) <- translate_into_language(names(vals), language = language)
p <- p + p <- p +
@@ -731,7 +809,12 @@ plot.disk <- function(x,
mo = NULL, mo = NULL,
ab = NULL, ab = NULL,
guideline = getOption("AMR_guideline", "EUCAST"), guideline = getOption("AMR_guideline", "EUCAST"),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE), include_PKPD = getOption("AMR_include_PKPD", TRUE),
@@ -743,14 +826,17 @@ plot.disk <- function(x,
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE) meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE) meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
meet_criteria(guideline, allow_class = "character", has_length = 1) meet_criteria(guideline, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
meet_criteria(include_PKPD, allow_class = "logical", has_length = 1)
meet_criteria(breakpoint_type, allow_class = "character", is_in = AMR::clinical_breakpoints$type, has_length = 1)
if (length(colours_SIR) == 1) {
colours_SIR <- rep(colours_SIR, 3)
}
main <- gsub(" +", " ", paste0(main, collapse = " ")) main <- gsub(" +", " ", paste0(main, collapse = " "))
colours_SIR <- expand_SIR_colours(colours_SIR)
# wildtype/Non-wildtype
is_wt_nwt <- identical(breakpoint_type, "ECOFF")
x <- plotrange_as_table(x, expand = expand) x <- plotrange_as_table(x, expand = expand)
cols_sub <- plot_colours_subtitle_guideline( cols_sub <- plot_colours_subtitle_guideline(
@@ -783,18 +869,30 @@ plot.disk <- function(x,
if (any(colours_SIR %in% cols_sub$cols)) { if (any(colours_SIR %in% cols_sub$cols)) {
legend_txt <- character(0) legend_txt <- character(0)
legend_col <- character(0) legend_col <- character(0)
if (any(cols_sub$cols == colours_SIR[3] & cols_sub$count > 0)) { if (!is_wt_nwt & any(cols_sub$cols == colours_SIR[4] & cols_sub$count > 0)) {
legend_txt <- "(R) Resistant" legend_txt <- "(R) Resistant"
legend_col <- colours_SIR[3] legend_col <- colours_SIR[4]
}
if (is_wt_nwt & any(cols_sub$cols == colours_SIR[4] & cols_sub$count > 0)) {
legend_txt <- "(NWT) Non-wildtype"
legend_col <- colours_SIR[4]
}
if (any(cols_sub$cols == colours_SIR[3] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline)))
legend_col <- c(legend_col, colours_SIR[3])
} }
if (any(cols_sub$cols == colours_SIR[2] & cols_sub$count > 0)) { if (any(cols_sub$cols == colours_SIR[2] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline))) legend_txt <- c(legend_txt, "(SDD) Susceptible dose-dependent")
legend_col <- c(legend_col, colours_SIR[2]) legend_col <- c(legend_col, colours_SIR[2])
} }
if (any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) { if (!is_wt_nwt & any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(S) Susceptible") legend_txt <- c(legend_txt, "(S) Susceptible")
legend_col <- c(legend_col, colours_SIR[1]) legend_col <- c(legend_col, colours_SIR[1])
} }
if (is_wt_nwt & any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) {
legend_txt <- c(legend_txt, "(WT) Wildtype")
legend_col <- c(legend_col, colours_SIR[1])
}
legend("top", legend("top",
x.intersp = 0.5, x.intersp = 0.5,
legend = translate_into_language(legend_txt, language = language), legend = translate_into_language(legend_txt, language = language),
@@ -818,9 +916,16 @@ barplot.disk <- function(height,
mo = NULL, mo = NULL,
ab = NULL, ab = NULL,
guideline = getOption("AMR_guideline", "EUCAST"), guideline = getOption("AMR_guideline", "EUCAST"),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
...) { ...) {
meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(ylab, allow_class = "character", has_length = 1) meet_criteria(ylab, allow_class = "character", has_length = 1)
@@ -828,9 +933,11 @@ barplot.disk <- function(height,
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE) meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE) meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
meet_criteria(guideline, allow_class = "character", has_length = 1) meet_criteria(guideline, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
meet_criteria(include_PKPD, allow_class = "logical", has_length = 1)
meet_criteria(breakpoint_type, allow_class = "character", is_in = AMR::clinical_breakpoints$type, has_length = 1)
main <- gsub(" +", " ", paste0(main, collapse = " ")) main <- gsub(" +", " ", paste0(main, collapse = " "))
@@ -843,6 +950,10 @@ barplot.disk <- function(height,
ab = ab, ab = ab,
guideline = guideline, guideline = guideline,
colours_SIR = colours_SIR, colours_SIR = colours_SIR,
language = language,
expand = expand,
include_PKPD = include_PKPD,
breakpoint_type = breakpoint_type,
... ...
) )
} }
@@ -858,7 +969,12 @@ autoplot.disk <- function(object,
ylab = translate_AMR("Frequency", language = language), ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Disk diffusion diameter (mm)", language = language), xlab = translate_AMR("Disk diffusion diameter (mm)", language = language),
guideline = getOption("AMR_guideline", "EUCAST"), guideline = getOption("AMR_guideline", "EUCAST"),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE), include_PKPD = getOption("AMR_include_PKPD", TRUE),
@@ -871,7 +987,7 @@ autoplot.disk <- function(object,
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE) meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE) meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
meet_criteria(guideline, allow_class = "character", has_length = 1) meet_criteria(guideline, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
@@ -882,6 +998,11 @@ autoplot.disk <- function(object,
title <- gsub(" +", " ", paste0(title, collapse = " ")) title <- gsub(" +", " ", paste0(title, collapse = " "))
} }
colours_SIR <- expand_SIR_colours(colours_SIR)
# wildtype/Non-wildtype
is_wt_nwt <- identical(breakpoint_type, "ECOFF")
x <- plotrange_as_table(object, expand = expand) x <- plotrange_as_table(object, expand = expand)
cols_sub <- plot_colours_subtitle_guideline( cols_sub <- plot_colours_subtitle_guideline(
x = x, x = x,
@@ -899,31 +1020,36 @@ autoplot.disk <- function(object,
df <- as.data.frame(x, stringsAsFactors = TRUE) df <- as.data.frame(x, stringsAsFactors = TRUE)
colnames(df) <- c("disk", "count") colnames(df) <- c("disk", "count")
df$cols <- cols_sub$cols df$cols <- cols_sub$cols
df$cols[df$cols == colours_SIR[1] & !is_wt_nwt] <- "(S) Susceptible"
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible" df$cols[df$cols == colours_SIR[1] & is_wt_nwt] <- "(WT) Wildtype"
df$cols[df$cols == colours_SIR[2]] <- paste("(I)", plot_name_of_I(cols_sub$guideline)) df$cols[df$cols == colours_SIR[2]] <- "(SDD) Susceptible dose-dependent"
df$cols[df$cols == colours_SIR[3]] <- "(R) Resistant" df$cols[df$cols == colours_SIR[3]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
df$cols[df$cols == colours_SIR[4] & !is_wt_nwt] <- "(R) Resistant"
df$cols[df$cols == colours_SIR[4] & is_wt_nwt] <- "(NWT) Non-wildtype"
df$cols <- factor(translate_into_language(df$cols, language = language), df$cols <- factor(translate_into_language(df$cols, language = language),
levels = translate_into_language( levels = translate_into_language(
c( c(
"(S) Susceptible", "(S) Susceptible",
paste("(I)", plot_name_of_I(cols_sub$guideline)), paste("(I)", plot_name_of_I(cols_sub$guideline)),
"(R) Resistant" "(R) Resistant",
"(WT) Wildtype",
"(NWT) Non-wildtype"
), ),
language = language language = language
), ),
ordered = TRUE ordered = TRUE
) )
p <- ggplot2::ggplot(df) p <- ggplot2::ggplot(df)
if (any(colours_SIR %in% cols_sub$cols)) { if (any(colours_SIR %in% cols_sub$cols)) {
vals <- c( vals <- c(
"(S) Susceptible" = colours_SIR[1], "(S) Susceptible" = colours_SIR[1],
"(SDD) Susceptible dose-dependent" = colours_SIR[2], "(SDD) Susceptible dose-dependent" = colours_SIR[2],
"(I) Susceptible, incr. exp." = colours_SIR[2], "(I) Susceptible, incr. exp." = colours_SIR[3],
"(I) Intermediate" = colours_SIR[2], "(I) Intermediate" = colours_SIR[3],
"(R) Resistant" = colours_SIR[3], "(R) Resistant" = colours_SIR[4],
"(NI) Non-interpretable" = "grey" "(NI) Non-interpretable" = "grey30",
"(WT) Wildtype" = colours_SIR[1],
"(NWT) Non-wildtype" = colours_SIR[4]
) )
names(vals) <- translate_into_language(names(vals), language = language) names(vals) <- translate_into_language(names(vals), language = language)
p <- p + p <- p +
@@ -971,25 +1097,25 @@ plot.sir <- function(x,
data <- as.data.frame(table(x), stringsAsFactors = FALSE) data <- as.data.frame(table(x), stringsAsFactors = FALSE)
colnames(data) <- c("x", "n") colnames(data) <- c("x", "n")
data$s <- round((data$n / sum(data$n)) * 100, 1) data$s <- round((data$n / sum(data$n)) * 100, 1)
data <- data[which(data$n > 0), ]
if (!"S" %in% data$x) { if (!all(data$x %in% c("WT", "NWT"), na.rm = TRUE)) {
data <- rbind_AMR(data, data.frame(x = "S", n = 0, s = 0, stringsAsFactors = FALSE)) # # be sure to have at least S, I, and R
} if (!"S" %in% data$x) {
if (!"SDD" %in% data$x) { data <- rbind_AMR(data, data.frame(x = "S", n = 0, s = 0, stringsAsFactors = FALSE))
data <- rbind_AMR(data, data.frame(x = "SDD", n = 0, s = 0, stringsAsFactors = FALSE)) }
} if (!"I" %in% data$x) {
if (!"I" %in% data$x) { data <- rbind_AMR(data, data.frame(x = "I", n = 0, s = 0, stringsAsFactors = FALSE))
data <- rbind_AMR(data, data.frame(x = "I", n = 0, s = 0, stringsAsFactors = FALSE)) }
} if (!"R" %in% data$x) {
if (!"R" %in% data$x) { data <- rbind_AMR(data, data.frame(x = "R", n = 0, s = 0, stringsAsFactors = FALSE))
data <- rbind_AMR(data, data.frame(x = "R", n = 0, s = 0, stringsAsFactors = FALSE)) }
} lvls <- VALID_SIR_LEVELS[VALID_SIR_LEVELS %in% c(data$x, c("S", "I", "R"))]
if (!"NI" %in% data$x) { } else {
data <- rbind_AMR(data, data.frame(x = "NI", n = 0, s = 0, stringsAsFactors = FALSE)) lvls <- c("WT", "NWT")
} }
data <- data[!(data$n == 0 & data$x %in% c("SDD", "I", "NI")), , drop = FALSE] data$x <- factor(data$x, levels = lvls, ordered = TRUE)
data$x <- factor(data$x, levels = intersect(unique(data$x), c("S", "SDD", "I", "R", "NI")), ordered = TRUE)
ymax <- pm_if_else(max(data$s) > 95, 105, 100) ymax <- pm_if_else(max(data$s) > 95, 105, 100)
@@ -1004,7 +1130,7 @@ plot.sir <- function(x,
axes = FALSE axes = FALSE
) )
# x axis # x axis
axis(side = 1, at = 1:pm_n_distinct(data$x), labels = levels(data$x), lwd = 0) axis(side = 1, at = seq_along(lvls), labels = lvls, lwd = 0)
# y axis, 0-100% # y axis, 0-100%
axis(side = 2, at = seq(0, 100, 5)) axis(side = 2, at = seq(0, 100, 5))
@@ -1024,28 +1150,37 @@ barplot.sir <- function(height,
main = deparse(substitute(height)), main = deparse(substitute(height)),
xlab = translate_AMR("Antimicrobial Interpretation", language = language), xlab = translate_AMR("Antimicrobial Interpretation", language = language),
ylab = translate_AMR("Frequency", language = language), ylab = translate_AMR("Frequency", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
expand = TRUE, expand = TRUE,
...) { ...) {
meet_criteria(xlab, allow_class = "character", has_length = 1) meet_criteria(xlab, allow_class = "character", has_length = 1)
meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(ylab, allow_class = "character", has_length = 1) meet_criteria(ylab, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
meet_criteria(expand, allow_class = "logical", has_length = 1) meet_criteria(expand, allow_class = "logical", has_length = 1)
if (length(colours_SIR) == 1) { colours_SIR <- expand_SIR_colours(colours_SIR)
colours_SIR <- rep(colours_SIR, 3)
}
# add SDD and N to colours # add SDD and N to colours
colours_SIR <- c(colours_SIR[1:2], colours_SIR[2], colours_SIR[3], "#888888") colours_SIR <- c(colours_SIR, "grey30")
main <- gsub(" +", " ", paste0(main, collapse = " ")) main <- gsub(" +", " ", paste0(main, collapse = " "))
x <- table(height) x <- table(height)
# remove missing I, SDD, and N if (all(height %in% c("WT", "NWT"), na.rm = TRUE)) {
colours_SIR <- colours_SIR[!(names(x) %in% c("SDD", "I", "NI") & x == 0)] colours_SIR <- colours_SIR[c(1, 4)]
x <- x[!(names(x) %in% c("SDD", "I", "NI") & x == 0)] x <- x[names(x) %in% c("WT", "NWT")]
} else {
# remove missing I, SDD, and N
colours_SIR <- colours_SIR[!(names(x) %in% c("SDD", "I", "NI") & x == 0)]
x <- x[!(names(x) %in% c("SDD", "I", "NI") & x == 0)]
}
# plot it # plot it
barplot(x, barplot(x,
col = colours_SIR, col = colours_SIR,
@@ -1065,14 +1200,19 @@ autoplot.sir <- function(object,
title = deparse(substitute(object)), title = deparse(substitute(object)),
xlab = translate_AMR("Antimicrobial Interpretation", language = language), xlab = translate_AMR("Antimicrobial Interpretation", language = language),
ylab = translate_AMR("Frequency", language = language), ylab = translate_AMR("Frequency", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"), colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
),
language = get_AMR_locale(), language = get_AMR_locale(),
...) { ...) {
stop_ifnot_installed("ggplot2") stop_ifnot_installed("ggplot2")
meet_criteria(title, allow_class = "character", allow_NULL = TRUE) meet_criteria(title, allow_class = "character", allow_NULL = TRUE)
meet_criteria(ylab, allow_class = "character", has_length = 1) meet_criteria(ylab, allow_class = "character", has_length = 1)
meet_criteria(xlab, allow_class = "character", has_length = 1) meet_criteria(xlab, allow_class = "character", has_length = 1)
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
if ("main" %in% names(list(...))) { if ("main" %in% names(list(...))) {
title <- list(...)$main title <- list(...)$main
@@ -1081,13 +1221,16 @@ autoplot.sir <- function(object,
title <- gsub(" +", " ", paste0(title, collapse = " ")) title <- gsub(" +", " ", paste0(title, collapse = " "))
} }
if (length(colours_SIR) == 1) { colours_SIR <- expand_SIR_colours(colours_SIR)
colours_SIR <- rep(colours_SIR, 3)
}
df <- as.data.frame(table(object), stringsAsFactors = TRUE) df <- as.data.frame(table(object), stringsAsFactors = TRUE)
colnames(df) <- c("x", "n") colnames(df) <- c("x", "n")
df <- df[!(df$n == 0 & df$x %in% c("SDD", "I", "NI")), , drop = FALSE] df <- df[!(df$n == 0 & df$x %in% c("SDD", "I", "NI")), , drop = FALSE]
if (all(object %in% c("WT", "NWT"), na.rm = TRUE)) {
df <- df[which(df$x %in% c("WT", "NWT")), ]
} else {
df <- df[which(!df$x %in% c("WT", "NWT", "NS")), ]
}
ggplot2::ggplot(df) + ggplot2::ggplot(df) +
ggplot2::geom_col(ggplot2::aes(x = x, y = n, fill = x)) + ggplot2::geom_col(ggplot2::aes(x = x, y = n, fill = x)) +
# limits = force is needed because of a ggplot2 >= 3.3.4 bug (#4511) # limits = force is needed because of a ggplot2 >= 3.3.4 bug (#4511)
@@ -1095,9 +1238,11 @@ autoplot.sir <- function(object,
values = c( values = c(
"S" = colours_SIR[1], "S" = colours_SIR[1],
"SDD" = colours_SIR[2], "SDD" = colours_SIR[2],
"I" = colours_SIR[2], "I" = colours_SIR[3],
"R" = colours_SIR[3], "R" = colours_SIR[4],
"NI" = "#888888" "NI" = "grey30",
"WT" = colours_SIR[1],
"NWT" = colours_SIR[4]
), ),
limits = force limits = force
) + ) +
@@ -1223,9 +1368,12 @@ plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, f
cols[is.na(sir)] <- "#BEBEBE" cols[is.na(sir)] <- "#BEBEBE"
cols[sir == "S"] <- colours_SIR[1] cols[sir == "S"] <- colours_SIR[1]
cols[sir == "SDD"] <- colours_SIR[2] cols[sir == "SDD"] <- colours_SIR[2]
cols[sir == "I"] <- colours_SIR[2] cols[sir == "I"] <- colours_SIR[3]
cols[sir == "R"] <- colours_SIR[3] cols[sir == "R"] <- colours_SIR[4]
cols[sir == "NI"] <- "#888888" cols[sir == "NI"] <- "grey30"
cols[sir == "WT"] <- colours_SIR[1]
cols[sir == "NWT"] <- colours_SIR[4]
cols[sir == "NS"] <- colours_SIR[4]
sub <- bquote(.(abname) ~ "-" ~ italic(.(moname)) ~ .(guideline_txt)) sub <- bquote(.(abname) ~ "-" ~ italic(.(moname)) ~ .(guideline_txt))
} else { } else {
cols <- "#BEBEBE" cols <- "#BEBEBE"
@@ -1284,10 +1432,15 @@ scale_y_percent <- function(breaks = function(x) seq(0, max(x, na.rm = TRUE), 0.
#' @export #' @export
scale_sir_colours <- function(..., scale_sir_colours <- function(...,
aesthetics, aesthetics,
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B")) { colours_SIR = c(
S = "#3CAEA3",
SDD = "#8FD6C4",
I = "#F6D55C",
R = "#ED553B"
)) {
stop_ifnot_installed("ggplot2") stop_ifnot_installed("ggplot2")
meet_criteria(aesthetics, allow_class = "character", is_in = c("alpha", "colour", "color", "fill", "linetype", "shape", "size")) meet_criteria(aesthetics, allow_class = "character", is_in = c("alpha", "colour", "color", "fill", "linetype", "shape", "size"))
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
if ("fill" %in% aesthetics && message_not_thrown_before("scale_sir_colours", "fill", entire_session = TRUE)) { if ("fill" %in% aesthetics && message_not_thrown_before("scale_sir_colours", "fill", entire_session = TRUE)) {
warning_("Using `scale_sir_colours()` for the `fill` aesthetic has been superseded by `scale_fill_sir()`, please use that instead. This warning will be shown once per session.") warning_("Using `scale_sir_colours()` for the `fill` aesthetic has been superseded by `scale_fill_sir()`, please use that instead. This warning will be shown once per session.")
@@ -1296,67 +1449,48 @@ scale_sir_colours <- function(...,
warning_("Using `scale_sir_colours()` for the `colour` aesthetic has been superseded by `scale_colour_sir()`, please use that instead. This warning will be shown once per session.") warning_("Using `scale_sir_colours()` for the `colour` aesthetic has been superseded by `scale_colour_sir()`, please use that instead. This warning will be shown once per session.")
} }
if (length(colours_SIR) == 1) {
colours_SIR <- rep(colours_SIR, 3)
}
# behaviour until AMR pkg v1.5.0 and also when coming from ggplot_sir()
if ("colours" %in% names(list(...))) { if ("colours" %in% names(list(...))) {
original_cols <- c( colours_SIR <- list(...)$colours
S = colours_SIR[1], }
SI = colours_SIR[1],
I = colours_SIR[2], colours_SIR <- expand_SIR_colours(colours_SIR, unname = FALSE)
IR = colours_SIR[3],
R = colours_SIR[3] # behaviour when coming from ggplot_sir()
) if ("colours" %in% names(list(...))) {
colours <- replace(original_cols, names(list(...)$colours), list(...)$colours)
# limits = force is needed in ggplot2 3.3.4 and 3.3.5, see here; # limits = force is needed in ggplot2 3.3.4 and 3.3.5, see here;
# https://github.com/tidyverse/ggplot2/issues/4511#issuecomment-866185530 # https://github.com/tidyverse/ggplot2/issues/4511#issuecomment-866185530
return(ggplot2::scale_fill_manual(values = colours, limits = force, aesthetics = aesthetics)) return(ggplot2::scale_fill_manual(values = colours_SIR, limits = force, aesthetics = aesthetics))
} }
if (identical(unlist(list(...)), FALSE)) { if (identical(unlist(list(...)), FALSE)) {
return(invisible()) return(invisible())
} }
names_susceptible <- c( colours_SIR <- unname(colours_SIR)
"S", "SI", "IS", "S+I", "I+S", "susceptible", "Susceptible",
unique(TRANSLATIONS[which(TRANSLATIONS$pattern == "Susceptible"), names_susceptible <- c("S", "SI", "IS", "S+I", "I+S", "susceptible", "Susceptible")
"replacement", names_susceptible_dose_dep <- c("SDD", "susceptible dose-dependent", "Susceptible dose-dependent")
drop = TRUE
])
)
names_incr_exposure <- c( names_incr_exposure <- c(
"I", "intermediate", "increased exposure", "incr. exposure", "I", "intermediate", "increased exposure", "incr. exposure",
"Increased exposure", "Incr. exposure", "Susceptible, incr. exp.", "Increased exposure", "Incr. exposure", "Susceptible, incr. exp."
unique(TRANSLATIONS[which(TRANSLATIONS$pattern == "Intermediate"),
"replacement",
drop = TRUE
]),
unique(TRANSLATIONS[which(TRANSLATIONS$pattern == "Susceptible, incr. exp."),
"replacement",
drop = TRUE
])
)
names_resistant <- c(
"R", "IR", "RI", "R+I", "I+R", "resistant", "Resistant",
unique(TRANSLATIONS[which(TRANSLATIONS$pattern == "Resistant"),
"replacement",
drop = TRUE
])
) )
names_resistant <- c("R", "IR", "RI", "R+I", "I+R", "resistant", "Resistant")
susceptible <- rep(colours_SIR[1], length(names_susceptible)) susceptible <- rep(colours_SIR[1], length(names_susceptible))
names(susceptible) <- names_susceptible names(susceptible) <- names_susceptible
incr_exposure <- rep(colours_SIR[2], length(names_incr_exposure)) susceptible_dose_dep <- rep(colours_SIR[2], length(names_susceptible_dose_dep))
names(susceptible_dose_dep) <- names_susceptible_dose_dep
incr_exposure <- rep(colours_SIR[3], length(names_incr_exposure))
names(incr_exposure) <- names_incr_exposure names(incr_exposure) <- names_incr_exposure
resistant <- rep(colours_SIR[3], length(names_resistant)) resistant <- rep(colours_SIR[4], length(names_resistant))
names(resistant) <- names_resistant names(resistant) <- names_resistant
original_cols <- c(susceptible, incr_exposure, resistant) original_cols <- c(susceptible, susceptible_dose_dep, incr_exposure, resistant)
dots <- c(...) dots <- c(...)
# replace S, I, R as colours: scale_sir_colours(mydatavalue = "S") # replace S, SDD, I, R as colours: scale_sir_colours(mydatavalue = "S")
dots[dots == "S"] <- colours_SIR[1] dots[dots == "S"] <- colours_SIR[1]
dots[dots == "I"] <- colours_SIR[2] dots[dots == "SDD"] <- colours_SIR[2]
dots[dots == "R"] <- colours_SIR[3] dots[dots == "I"] <- colours_SIR[3]
dots[dots == "R"] <- colours_SIR[4]
cols <- replace(original_cols, names(dots), dots) cols <- replace(original_cols, names(dots), dots)
# limits = force is needed in ggplot2 3.3.4 and 3.3.5, see here; # limits = force is needed in ggplot2 3.3.4 and 3.3.5, see here;
# https://github.com/tidyverse/ggplot2/issues/4511#issuecomment-866185530 # https://github.com/tidyverse/ggplot2/issues/4511#issuecomment-866185530
@@ -1435,3 +1569,39 @@ labels_sir_count <- function(position = NULL,
} }
) )
} }
expand_SIR_colours <- function(colours_SIR, unname = TRUE) {
sir_order <- c("S", "SDD", "I", "R", "SI", "IR")
if (is.null(names(colours_SIR))) {
if (length(colours_SIR) == 1) {
colours_SIR <- rep(colours_SIR, 4)
} else if (length(colours_SIR) == 3) {
# old method for AMR < 3.0.1 which allowed for 3 colours
# fill in green for SDD as extra colour
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
}
if (length(colours_SIR) == 4) {
# add colours for SI (same as S) and IR (same as R)
colours_SIR <- c(colours_SIR[1:4], colours_SIR[1], colours_SIR[4])
}
names(colours_SIR) <- sir_order
} else {
# named input: match and reorder
stop_ifnot(
all(names(colours_SIR) %in% sir_order),
"Unknown names in `colours_SIR`. Expected any of: ", vector_or(levels(NA_sir_), quotes = FALSE, sort = FALSE), "."
)
if (length(colours_SIR) == 4) {
# add colours for SI (same as S) and IR (same as R)
colours_SIR <- c(colours_SIR[1:4], SI = unname(colours_SIR[1]), IR = unname(colours_SIR[4]))
}
colours_SIR <- colours_SIR[sir_order]
}
if (unname) {
colours_SIR <- unname(colours_SIR)
}
return(colours_SIR)
}
+45 -20
View File
@@ -38,6 +38,11 @@
#' @param only_all_tested (for combination therapies, i.e. using more than one variable for `...`): a [logical] to indicate that isolates must be tested for all antimicrobials, see section *Combination Therapy* below. #' @param only_all_tested (for combination therapies, i.e. using more than one variable for `...`): a [logical] to indicate that isolates must be tested for all antimicrobials, see section *Combination Therapy* below.
#' @param data A [data.frame] containing columns with class [`sir`] (see [as.sir()]). #' @param data A [data.frame] containing columns with class [`sir`] (see [as.sir()]).
#' @param translate_ab A column name of the [antimicrobials] data set to translate the antibiotic abbreviations to, using [ab_property()]. #' @param translate_ab A column name of the [antimicrobials] data set to translate the antibiotic abbreviations to, using [ab_property()].
#' @param guideline Either `"EUCAST"` (default) or `"CLSI"`. With EUCAST, the 'I' category will be considered as susceptible (see [EUCAST website](https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/)), but with with CLSI, it will be considered resistant. Therefore:
#' * EUCAST: [susceptibility()] \eqn{= \%S + \%I}, [resistance()] \eqn{= \%R}
#' * CLSI: [susceptibility()] \eqn{= \%S + \%SDD}, [resistance()] \eqn{= \%I + \%R}
#'
#' You can also use e.g. [proportion_R()] or [proportion_S()] instead, to be explicit.
#' @inheritParams ab_property #' @inheritParams ab_property
#' @param combine_SI A [logical] to indicate whether all values of S, SDD, and I must be merged into one, so the output only consists of S+SDD+I vs. R (susceptible vs. resistant) - the default is `TRUE`. #' @param combine_SI A [logical] to indicate whether all values of S, SDD, and I must be merged into one, so the output only consists of S+SDD+I vs. R (susceptible vs. resistant) - the default is `TRUE`.
#' @param ab_result Antibiotic results to test against, must be one or more values of "S", "SDD", "I", or "R". #' @param ab_result Antibiotic results to test against, must be one or more values of "S", "SDD", "I", or "R".
@@ -228,16 +233,26 @@
resistance <- function(..., resistance <- function(...,
minimum = 30, minimum = 30,
as_percent = FALSE, as_percent = FALSE,
only_all_tested = FALSE) { only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc()
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("resistance", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun resistance}](AMR::resistance)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")
message_("This message will be shown once per session.")
}
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = "R", ab_result = c(
"R", "NWT", "NS",
if (identical(guideline, "CLSI")) "I"
),
minimum = minimum, minimum = minimum,
as_percent = as_percent, as_percent = as_percent,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -246,16 +261,26 @@ resistance <- function(...,
susceptibility <- function(..., susceptibility <- function(...,
minimum = 30, minimum = 30,
as_percent = FALSE, as_percent = FALSE,
only_all_tested = FALSE) { only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc()
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("susceptibility", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun susceptibility}](AMR::susceptibility)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")
message_("This message will be shown once per session.")
}
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("S", "SDD", "I"), ab_result = c(
"S", "SDD", "WT",
if (identical(guideline, "EUCAST")) "I"
),
minimum = minimum, minimum = minimum,
as_percent = as_percent, as_percent = as_percent,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -269,7 +294,7 @@ sir_confidence_interval <- function(...,
confidence_level = 0.95, confidence_level = 0.95,
side = "both", side = "both",
collapse = FALSE) { collapse = FALSE) {
meet_criteria(ab_result, allow_class = c("character", "sir"), has_length = c(1:5), is_in = c("S", "SDD", "I", "R", "NI")) meet_criteria(ab_result, allow_class = c("character", "sir"), has_length = seq_along(VALID_SIR_LEVELS), is_in = VALID_SIR_LEVELS)
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE) meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
meet_criteria(as_percent, allow_class = "logical", has_length = 1) meet_criteria(as_percent, allow_class = "logical", has_length = 1)
meet_criteria(only_all_tested, allow_class = "logical", has_length = 1) meet_criteria(only_all_tested, allow_class = "logical", has_length = 1)
@@ -283,15 +308,15 @@ sir_confidence_interval <- function(...,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
n <- tryCatch( n <- tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("S", "SDD", "I", "R", "NI"), ab_result = VALID_SIR_LEVELS,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = TRUE only_count = TRUE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
if (x == 0) { if (x == 0) {
@@ -341,13 +366,13 @@ proportion_R <- function(...,
only_all_tested = FALSE) { only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = "R", ab_result = c("R", "NWT", "NS"),
minimum = minimum, minimum = minimum,
as_percent = as_percent, as_percent = as_percent,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -359,13 +384,13 @@ proportion_IR <- function(...,
only_all_tested = FALSE) { only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("I", "SDD", "R"), ab_result = c("I", "SDD", "R", "NWT", "NS"),
minimum = minimum, minimum = minimum,
as_percent = as_percent, as_percent = as_percent,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -383,7 +408,7 @@ proportion_I <- function(...,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -395,13 +420,13 @@ proportion_SI <- function(...,
only_all_tested = FALSE) { only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = c("S", "I", "SDD"), ab_result = c("S", "I", "SDD", "WT"),
minimum = minimum, minimum = minimum,
as_percent = as_percent, as_percent = as_percent,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -413,13 +438,13 @@ proportion_S <- function(...,
only_all_tested = FALSE) { only_all_tested = FALSE) {
tryCatch( tryCatch(
sir_calc(..., sir_calc(...,
ab_result = "S", ab_result = c("S", "WT"),
minimum = minimum, minimum = minimum,
as_percent = as_percent, as_percent = as_percent,
only_all_tested = only_all_tested, only_all_tested = only_all_tested,
only_count = FALSE only_count = FALSE
), ),
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
@@ -443,6 +468,6 @@ proportion_df <- function(data,
combine_SI = combine_SI, combine_SI = combine_SI,
confidence_level = confidence_level confidence_level = confidence_level
), ),
error = function(e) stop_(gsub("in sir_calc_df(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc_df(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
+91 -65
View File
@@ -31,13 +31,17 @@
#' #'
#' These functions can be used for generating random MIC values and disk diffusion diameters, for AMR data analysis practice. By providing a microorganism and antimicrobial drug, the generated results will reflect reality as much as possible. #' These functions can be used for generating random MIC values and disk diffusion diameters, for AMR data analysis practice. By providing a microorganism and antimicrobial drug, the generated results will reflect reality as much as possible.
#' @param size Desired size of the returned vector. If used in a [data.frame] call or `dplyr` verb, will get the current (group) size if left blank. #' @param size Desired size of the returned vector. If used in a [data.frame] call or `dplyr` verb, will get the current (group) size if left blank.
#' @param mo Any [character] that can be coerced to a valid microorganism code with [as.mo()]. #' @param mo Any [character] that can be coerced to a valid microorganism code with [as.mo()]. Can be the same length as `size`.
#' @param ab Any [character] that can be coerced to a valid antimicrobial drug code with [as.ab()]. #' @param ab Any [character] that can be coerced to a valid antimicrobial drug code with [as.ab()].
#' @param prob_SIR A vector of length 3: the probabilities for "S" (1st value), "I" (2nd value) and "R" (3rd value). #' @param prob_SIR A vector of length 3: the probabilities for "S" (1st value), "I" (2nd value) and "R" (3rd value).
#' @param skew Direction of skew for MIC or disk values, either `"right"` or `"left"`. A left-skewed distribution has the majority of the data on the right.
#' @param severity Skew severity; higher values will increase the skewedness. Default is `2`; use `0` to prevent skewedness.
#' @param ... Ignored, only in place to allow future extensions. #' @param ... Ignored, only in place to allow future extensions.
#' @details The base \R function [sample()] is used for generating values. #' @details
#' #' Internally, MIC and disk zone values are sampled based on clinical breakpoints defined in the [clinical_breakpoints] data set. To create specific generated values per bug or drug, set the `mo` and/or `ab` argument. The MICs are sampled on a log2 scale and disks linearly, using weighted probabilities. The weights are based on the `skew` and `severity` arguments:
#' Generated values are based on the EUCAST `r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))` guideline as implemented in the [clinical_breakpoints] data set. To create specific generated values per bug or drug, set the `mo` and/or `ab` argument. #' * `skew = "right"` places more emphasis on lower MIC or higher disk values.
#' * `skew = "left"` places more emphasis on higher MIC or lower disk values.
#' * `severity` controls the exponential bias applied.
#' @return class `mic` for [random_mic()] (see [as.mic()]) and class `disk` for [random_disk()] (see [as.disk()]) #' @return class `mic` for [random_mic()] (see [as.mic()]) and class `disk` for [random_disk()] (see [as.disk()])
#' @name random #' @name random
#' @rdname random #' @rdname random
@@ -47,8 +51,13 @@
#' random_disk(25) #' random_disk(25)
#' random_sir(25) #' random_sir(25)
#' #'
#' # add more skewedness, make more realistic by setting a bug and/or drug:
#' disks <- random_disk(100, severity = 2, mo = "Escherichia coli", ab = "CIP")
#' plot(disks)
#' # `plot()` and `ggplot2::autoplot()` allow for coloured bars if `mo` and `ab` are set
#' plot(disks, mo = "Escherichia coli", ab = "CIP", guideline = "CLSI 2025")
#'
#' \donttest{ #' \donttest{
#' # make the random generation more realistic by setting a bug and/or drug:
#' random_mic(25, "Klebsiella pneumoniae") # range 0.0625-64 #' random_mic(25, "Klebsiella pneumoniae") # range 0.0625-64
#' random_mic(25, "Klebsiella pneumoniae", "meropenem") # range 0.0625-16 #' random_mic(25, "Klebsiella pneumoniae", "meropenem") # range 0.0625-16
#' random_mic(25, "Streptococcus pneumoniae", "meropenem") # range 0.0625-4 #' random_mic(25, "Streptococcus pneumoniae", "meropenem") # range 0.0625-4
@@ -57,26 +66,61 @@
#' random_disk(25, "Klebsiella pneumoniae", "ampicillin") # range 11-17 #' random_disk(25, "Klebsiella pneumoniae", "ampicillin") # range 11-17
#' random_disk(25, "Streptococcus pneumoniae", "ampicillin") # range 12-27 #' random_disk(25, "Streptococcus pneumoniae", "ampicillin") # range 12-27
#' } #' }
random_mic <- function(size = NULL, mo = NULL, ab = NULL, ...) { random_mic <- function(size = NULL, mo = NULL, ab = NULL, skew = "right", severity = 1, ...) {
meet_criteria(size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE, allow_NULL = TRUE) meet_criteria(size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE, allow_NULL = TRUE)
meet_criteria(mo, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(mo, allow_class = "character", has_length = c(1, size), allow_NULL = TRUE)
meet_criteria(ab, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(ab, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(skew, allow_class = "character", is_in = c("right", "left"), has_length = 1)
meet_criteria(severity, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
if (is.null(size)) { if (is.null(size)) {
size <- NROW(get_current_data(arg_name = "size", call = -3)) size <- NROW(get_current_data(arg_name = "size", call = -3))
} }
random_exec("MIC", size = size, mo = mo, ab = ab) if (length(mo) > 1) {
out <- rep(NA_mic_, length(size))
p <- progress_ticker(n = length(unique(mo)), n_min = 10, title = "Generating random MIC values")
for (mo_ in unique(mo)) {
p$tick()
out[which(mo == mo_)] <- random_exec("MIC", size = sum(mo == mo_), mo = mo_, ab = ab, skew = skew, severity = severity)
}
out <- as.mic(out, keep_operators = "none")
if (stats::runif(1) > 0.5 && length(unique(out)) > 1) {
out[out == min(out)] <- paste0("<=", out[out == min(out)])
}
if (stats::runif(1) > 0.5 && length(unique(out)) > 1) {
out[out == max(out) & out %unlike% "<="] <- paste0(">=", out[out == max(out) & out %unlike% "<="])
}
return(out)
} else {
random_exec("MIC", size = size, mo = mo, ab = ab, skew = skew, severity = severity)
}
} }
#' @rdname random #' @rdname random
#' @export #' @export
random_disk <- function(size = NULL, mo = NULL, ab = NULL, ...) { random_disk <- function(size = NULL, mo = NULL, ab = NULL, skew = "left", severity = 1, ...) {
meet_criteria(size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE, allow_NULL = TRUE) meet_criteria(size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE, allow_NULL = TRUE)
meet_criteria(mo, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(mo, allow_class = "character", has_length = c(1, size), allow_NULL = TRUE)
meet_criteria(ab, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(ab, allow_class = "character", has_length = 1, allow_NULL = TRUE)
meet_criteria(skew, allow_class = "character", is_in = c("right", "left"), has_length = 1)
meet_criteria(severity, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
if (is.null(size)) { if (is.null(size)) {
size <- NROW(get_current_data(arg_name = "size", call = -3)) size <- NROW(get_current_data(arg_name = "size", call = -3))
} }
random_exec("DISK", size = size, mo = mo, ab = ab) if (length(mo) > 1) {
out <- rep(NA_mic_, length(size))
p <- progress_ticker(n = length(unique(mo)), n_min = 10, title = "Generating random MIC values")
for (mo_ in unique(mo)) {
p$tick()
out[which(mo == mo_)] <- random_exec("DISK", size = sum(mo == mo_), mo = mo_, ab = ab, skew = skew, severity = severity)
}
out <- as.disk(out)
return(out)
} else {
random_exec("DISK", size = size, mo = mo, ab = ab, skew = skew, severity = severity)
}
} }
#' @rdname random #' @rdname random
@@ -90,78 +134,60 @@ random_sir <- function(size = NULL, prob_SIR = c(0.33, 0.33, 0.33), ...) {
sample(as.sir(c("S", "I", "R")), size = size, replace = TRUE, prob = prob_SIR) sample(as.sir(c("S", "I", "R")), size = size, replace = TRUE, prob = prob_SIR)
} }
random_exec <- function(method_type, size, mo = NULL, ab = NULL) {
df <- AMR::clinical_breakpoints %pm>% random_exec <- function(method_type, size, mo = NULL, ab = NULL, skew = "right", severity = 1) {
pm_filter(guideline %like% "EUCAST") %pm>% df <- AMR::clinical_breakpoints %pm>% subset(method == method_type & type == "human")
pm_arrange(pm_desc(guideline)) %pm>%
subset(guideline == max(guideline) &
method == method_type &
type == "human")
if (!is.null(mo)) { if (!is.null(mo)) {
mo_coerced <- as.mo(mo) mo_coerced <- as.mo(mo, info = FALSE)
mo_include <- c( mo_include <- c(mo_coerced, as.mo(mo_genus(mo_coerced)), as.mo(mo_family(mo_coerced)), as.mo(mo_order(mo_coerced)))
mo_coerced, df_new <- df %pm>% subset(mo %in% mo_include)
as.mo(mo_genus(mo_coerced)), if (nrow(df_new) > 0) df <- df_new
as.mo(mo_family(mo_coerced)),
as.mo(mo_order(mo_coerced))
)
df_new <- df %pm>%
subset(mo %in% mo_include)
if (nrow(df_new) > 0) {
df <- df_new
} else {
warning_("in `random_", tolower(method_type), "()`: no rows found that match mo '", mo, "', ignoring argument `mo`")
}
} }
if (!is.null(ab)) { if (!is.null(ab)) {
ab_coerced <- as.ab(ab) ab_coerced <- as.ab(ab)
df_new <- df %pm>% df_new <- df %pm>% subset(ab %in% ab_coerced)
subset(ab %in% ab_coerced) if (nrow(df_new) > 0) df <- df_new
if (nrow(df_new) > 0) {
df <- df_new
} else {
warning_("in `random_", tolower(method_type), "()`: no rows found that match ab '", ab, "' (", ab_name(ab_coerced, tolower = TRUE, language = NULL), "), ignoring argument `ab`")
}
} }
if (method_type == "MIC") { if (method_type == "MIC") {
# set range lowest_mic <- min(df$breakpoint_S, na.rm = TRUE)
mic_range <- c(0.001, 0.002, 0.005, 0.010, 0.025, 0.0625, 0.125, 0.250, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256) lowest_mic <- log2(lowest_mic) + sample(c(-3:2), 1)
lowest_mic <- 2^lowest_mic
highest_mic <- max(df$breakpoint_R, na.rm = TRUE)
highest_mic <- log2(highest_mic) + sample(c(-3:1), 1)
highest_mic <- max(lowest_mic * 2, 2^highest_mic)
# get highest/lowest +/- random 1 to 3 higher factors of two out <- skewed_values(COMMON_MIC_VALUES, size = size, min = lowest_mic, max = highest_mic, skew = skew, severity = severity)
max_range <- mic_range[min(
length(mic_range),
which(mic_range == max(df$breakpoint_R[!is.na(df$breakpoint_R)], na.rm = TRUE)) + sample(c(1:3), 1)
)]
min_range <- mic_range[max(
1,
which(mic_range == min(df$breakpoint_S, na.rm = TRUE)) - sample(c(1:3), 1)
)]
mic_range_new <- mic_range[mic_range <= max_range & mic_range >= min_range]
if (length(mic_range_new) == 0) {
mic_range_new <- mic_range
}
out <- as.mic(sample(mic_range_new, size = size, replace = TRUE))
# 50% chance that lowest will get <= and highest will get >=
if (stats::runif(1) > 0.5 && length(unique(out)) > 1) { if (stats::runif(1) > 0.5 && length(unique(out)) > 1) {
out[out == min(out)] <- paste0("<=", out[out == min(out)]) out[out == min(out)] <- paste0("<=", out[out == min(out)])
} }
if (stats::runif(1) > 0.5 && length(unique(out)) > 1) { if (stats::runif(1) > 0.5 && length(unique(out)) > 1) {
out[out == max(out)] <- paste0(">=", out[out == max(out)]) out[out == max(out) & out %unlike% "<="] <- paste0(">=", out[out == max(out) & out %unlike% "<="])
} }
return(out) return(as.mic(out))
} else if (method_type == "DISK") { } else if (method_type == "DISK") {
set_range <- seq( disk_range <- seq(
from = as.integer(min(df$breakpoint_R[!is.na(df$breakpoint_R)], na.rm = TRUE) / 1.25), from = floor(min(df$breakpoint_R[!is.na(df$breakpoint_R)], na.rm = TRUE) / 1.25),
to = as.integer(max(df$breakpoint_S, na.rm = TRUE) * 1.25), to = ceiling(max(df$breakpoint_S[df$breakpoint_S != 50], na.rm = TRUE) * 1.25),
by = 1 by = 1
) )
out <- sample(set_range, size = size, replace = TRUE) disk_range <- disk_range[disk_range >= 6 & disk_range <= 50]
out[out < 6] <- sample(c(6:10), length(out[out < 6]), replace = TRUE) out <- skewed_values(disk_range, size = size, min = min(disk_range), max = max(disk_range), skew = skew, severity = severity)
out[out > 50] <- sample(c(40:50), length(out[out > 50]), replace = TRUE)
return(as.disk(out)) return(as.disk(out))
} }
} }
skewed_values <- function(values, size, min, max, skew = c("right", "left"), severity = 1) {
skew <- match.arg(skew)
range_vals <- values[values >= min & values <= max]
if (length(range_vals) < 2) range_vals <- values
ranks <- seq_along(range_vals)
weights <- switch(skew,
right = rev(ranks)^severity,
left = ranks^severity
)
weights <- weights / sum(weights)
sample(range_vals, size = size, replace = TRUE, prob = weights)
}
+1 -1
View File
@@ -238,7 +238,7 @@ resistance_predict <- function(x,
prediction <- predictmodel$fit prediction <- predictmodel$fit
se <- predictmodel$se.fit se <- predictmodel$se.fit
} else { } else {
stop("no valid model selected. See `?resistance_predict`.") stop("no valid model selected. See {.help [{.fun resistance_predict}](AMR::resistance_predict)}.")
} }
# prepare the output dataframe # prepare the output dataframe
+282 -195
View File
@@ -27,6 +27,8 @@
# how to conduct AMR data analysis: https://amr-for-r.org # # how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== # # ==================================================================== #
VALID_SIR_LEVELS <- c("S", "SDD", "I", "R", "NI", "WT", "NWT", "NS")
#' Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data #' Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data
#' #'
#' @description Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. [as.sir()] transforms the input to a new class [`sir`], which is an ordered [factor] containing the levels `S`, `SDD`, `I`, `R`, `NI`. #' @description Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. [as.sir()] transforms the input to a new class [`sir`], which is an ordered [factor] containing the levels `S`, `SDD`, `I`, `R`, `NI`.
@@ -42,22 +44,23 @@
#' @param capped_mic_handling A [character] string that controls how MIC values with a cap (i.e., starting with `<`, `<=`, `>`, or `>=`) are interpreted. Supports the following options: #' @param capped_mic_handling A [character] string that controls how MIC values with a cap (i.e., starting with `<`, `<=`, `>`, or `>=`) are interpreted. Supports the following options:
#' #'
#' `"none"` #' `"none"`
#' * `<=` and `>=` are treated as-is. #' * `<=`, `<`, `>` and `>=` are ignored.
#' * `<` and `>` are treated as-is.
#' #'
#' `"conservative"` #' `"conservative"` (default)
#' * `<=` and `>=` return `"NI"` (non-interpretable) if the MIC is within the breakpoint guideline range. #' * `<=`, `<`, `>` and `>=` return `"NI"` (non-interpretable) if the *true* MIC could be at either side of the breakpoint.
#' * `<` always returns `"S"`, and `>` always returns `"R"`. #' * This is the only mode that preserves uncertainty for ECOFFs.
#' #'
#' `"standard"` (default) #' `"standard"`
#' * `<=` and `>=` return `"NI"` (non-interpretable) if the MIC is within the breakpoint guideline range. #' * `<=` and `>=` return `"NI"` (non-interpretable) if the *true* MIC could be at either side of the breakpoint.
#' * `<` and `>` are treated as-is. #' * `<` always returns `"S"`, regardless of the breakpoint.
#' * `>` always returns `"R"`, regardless of the breakpoint.
#' #'
#' `"inverse"` #' `"lenient"`
#' * `<=` and `>=` are treated as-is. #' * `<=` and `<` always return `"S"`, regardless of the breakpoint.
#' * `<` always returns `"S"`, and `>` always returns `"R"`. #' * `>=` and `>` always return `"R"`, regardless of the breakpoint.
#' #'
#' The default `"standard"` setting ensures cautious handling of uncertain values while preserving interpretability. This option can also be set with the package option [`AMR_capped_mic_handling`][AMR-options]. #' The default `"conservative"` setting ensures cautious handling of uncertain values while preserving interpretability. This option can also be set with the package option [`AMR_capped_mic_handling`][AMR-options].
#' @param as_wt_nwt A [logical] to return `"WT"`/`"NWT"` instead of `"S"`/`"R"`. Defaults to `TRUE` when using ECOFFs, i.e., when `breakpoint_type` is set to `"ECOFF"`.
#' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a [logical] to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on `r format_eucast_version_nr(3.3)`. #' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a [logical] to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on `r format_eucast_version_nr(3.3)`.
#' @param substitute_missing_r_breakpoint A [logical] to indicate that a missing clinical breakpoints for R (resistant) must be substituted with R - the default is `FALSE`. Some (especially CLSI) breakpoints only have a breakpoint for S, meaning that the outcome can only be `"S"` or `NA`. Setting this to `TRUE` will convert the `NA`s in these cases to `"R"`. Can also be set with the package option [`AMR_substitute_missing_r_breakpoint`][AMR-options]. #' @param substitute_missing_r_breakpoint A [logical] to indicate that a missing clinical breakpoints for R (resistant) must be substituted with R - the default is `FALSE`. Some (especially CLSI) breakpoints only have a breakpoint for S, meaning that the outcome can only be `"S"` or `NA`. Setting this to `TRUE` will convert the `NA`s in these cases to `"R"`. Can also be set with the package option [`AMR_substitute_missing_r_breakpoint`][AMR-options].
#' @param include_screening A [logical] to indicate that clinical breakpoints for screening are allowed - the default is `FALSE`. Can also be set with the package option [`AMR_include_screening`][AMR-options]. #' @param include_screening A [logical] to indicate that clinical breakpoints for screening are allowed - the default is `FALSE`. Can also be set with the package option [`AMR_include_screening`][AMR-options].
@@ -69,7 +72,9 @@
#' @param reference_data A [data.frame] to be used for interpretation, which defaults to the [clinical_breakpoints] data set. Changing this argument allows for using own interpretation guidelines. This argument must contain a data set that is equal in structure to the [clinical_breakpoints] data set (same column names and column types). Please note that the `guideline` argument will be ignored when `reference_data` is manually set. #' @param reference_data A [data.frame] to be used for interpretation, which defaults to the [clinical_breakpoints] data set. Changing this argument allows for using own interpretation guidelines. This argument must contain a data set that is equal in structure to the [clinical_breakpoints] data set (same column names and column types). Please note that the `guideline` argument will be ignored when `reference_data` is manually set.
#' @param threshold Maximum fraction of invalid antimicrobial interpretations of `x`, see *Examples*. #' @param threshold Maximum fraction of invalid antimicrobial interpretations of `x`, see *Examples*.
#' @param conserve_capped_values Deprecated, use `capped_mic_handling` instead. #' @param conserve_capped_values Deprecated, use `capped_mic_handling` instead.
#' @param ... For using on a [data.frame]: names of columns to apply [as.sir()] on (supports tidy selection such as `column1:column4`). Otherwise: arguments passed on to methods. #' @param ... For using on a [data.frame]: selection of columns to apply `as.sir()` to. Supports [tidyselect language][tidyselect::starts_with()] such as `where(is.mic)`, `starts_with(...)`, or `column1:column4`, and can thus also be [antimicrobial selectors][amr_selector()], e.g. `as.sir(df, penicillins())`.
#'
#' Otherwise: arguments passed on to methods.
#' @details #' @details
#' *Note: The clinical breakpoints in this package were validated through, and imported from, [WHONET](https://whonet.org). The public use of this `AMR` package has been endorsed by both CLSI and EUCAST. See [clinical_breakpoints] for more information.* #' *Note: The clinical breakpoints in this package were validated through, and imported from, [WHONET](https://whonet.org). The public use of this `AMR` package has been endorsed by both CLSI and EUCAST. See [clinical_breakpoints] for more information.*
#' #'
@@ -93,7 +98,7 @@
#' # fast processing with parallel computing: #' # fast processing with parallel computing:
#' as.sir(your_data, ..., parallel = TRUE) #' as.sir(your_data, ..., parallel = TRUE)
#' ``` #' ```
#' * Operators like "<=" will be stripped before interpretation. When using `capped_mic_handling = "conservative"`, an MIC value of e.g. ">2" will always return "R", even if the breakpoint according to the chosen guideline is ">=4". This is to prevent that capped values from raw laboratory data would not be treated conservatively. The default behaviour (`capped_mic_handling = "standard"`) considers ">2" to be lower than ">=4" and might in this case return "S" or "I". #' * Operators like "<=" will be considered according to the `capped_mic_handling` setting. At default, an MIC value of e.g. ">2" will return "NI" (non-interpretable) if the breakpoint is 4-8; the *true* MIC could be at either side of the breakpoint. This is to prevent that capped values from raw laboratory data would not be treated conservatively.
#' * **Note:** When using CLSI as the guideline, MIC values must be log2-based doubling dilutions. Values not in this format, will be automatically rounded up to the nearest log2 level as CLSI instructs, and a warning will be thrown. #' * **Note:** When using CLSI as the guideline, MIC values must be log2-based doubling dilutions. Values not in this format, will be automatically rounded up to the nearest log2 level as CLSI instructs, and a warning will be thrown.
#' #'
#' 3. For **interpreting disk diffusion diameters** according to EUCAST or CLSI. You must clean your disk zones first using [as.disk()], that also gives your columns the new data class [`disk`]. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the `mo` argument. #' 3. For **interpreting disk diffusion diameters** according to EUCAST or CLSI. You must clean your disk zones first using [as.disk()], that also gives your columns the new data class [`disk`]. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the `mo` argument.
@@ -151,19 +156,19 @@
#' #'
#' ### After Interpretation #' ### After Interpretation
#' #'
#' After using [as.sir()], you can use the [eucast_rules()] defined by EUCAST to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism. #' After using [as.sir()], you can use the [interpretive_rules()] to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.
#' #'
#' To determine which isolates are multi-drug resistant, be sure to run [mdro()] (which applies the MDR/PDR/XDR guideline from 2012 at default) on a data set that contains S/I/R values. Read more about [interpreting multidrug-resistant organisms here][mdro()]. #' To determine which isolates are multi-drug resistant, be sure to run [mdro()] (which applies the MDR/PDR/XDR guideline from 2012 at default) on a data set that contains S/I/R values. Read more about [detecting multidrug-resistant organisms here][mdro()].
#' #'
#' ### Other #' ### Other
#' #'
#' The function [is.sir()] detects if the input contains class `sir`. If the input is a [data.frame] or [list], it iterates over all columns/items and returns a [logical] vector. #' The function [is.sir()] detects if the input contains class `sir`. If the input is a [data.frame] or [list], it iterates over all columns/items and returns a [logical] vector.
#' #'
#' The base R function [as.double()] can be used to retrieve quantitative values from a `sir` object: `"S"` = 1, `"I"`/`"SDD"` = 2, `"R"` = 3. All other values are rendered `NA` . **Note:** Do not use `as.integer()`, since that (because of how R works internally) will return the factor level indices, and not these aforementioned quantitative values. #' The base R function [as.double()] can be used to retrieve quantitative values from a `sir` object: `"S"` = 1, `"I"`/`"SDD"` = 2, `"R"` = 3. All other values are rendered `NA`. **Note:** Do not use `as.integer()`, since that (because of how R works internally) will return the factor level indices, and not these aforementioned quantitative values.
#' #'
#' The function [is_sir_eligible()] returns `TRUE` when a column contains at most 5% potentially invalid antimicrobial interpretations, and `FALSE` otherwise. The threshold of 5% can be set with the `threshold` argument. If the input is a [data.frame], it iterates over all columns and returns a [logical] vector. #' The function [is_sir_eligible()] returns `TRUE` when a column contains at most 5% potentially invalid antimicrobial interpretations, and `FALSE` otherwise. The threshold of 5% can be set with the `threshold` argument. If the input is a [data.frame], it iterates over all columns and returns a [logical] vector.
#' @section Interpretation of SIR: #' @section 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 (<https://www.eucast.org/newsiandr>). #' In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I, and R (<https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/>).
#' #'
#' This AMR package follows insight; use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates. #' This AMR package follows insight; use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates.
#' @return Ordered [factor] with new class `sir` #' @return Ordered [factor] with new class `sir`
@@ -177,7 +182,7 @@
#' - **CLSI M100: Performance Standard for Antimicrobial Susceptibility Testing**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type != "animal")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type != "animal")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/microbiology/documents/m100/>. #' - **CLSI M100: Performance Standard for Antimicrobial Susceptibility Testing**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type != "animal")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type != "animal")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/microbiology/documents/m100/>.
#' - **CLSI VET01: Performance Standards for Antimicrobial Disk and Dilution Susceptibility Tests for Bacteria Isolated From Animals**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/veterinary-medicine/documents/vet01/>. #' - **CLSI VET01: Performance Standards for Antimicrobial Disk and Dilution Susceptibility Tests for Bacteria Isolated From Animals**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/veterinary-medicine/documents/vet01/>.
###### TODO - **CLSI VET09: Understanding Susceptibility Test Data as a Component of Antimicrobial Stewardship in Veterinary Settings**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/veterinary-medicine/documents/vet09/>. ###### TODO - **CLSI VET09: Understanding Susceptibility Test Data as a Component of Antimicrobial Stewardship in Veterinary Settings**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI" & type == "animal")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/veterinary-medicine/documents/vet09/>.
#' - **EUCAST Breakpoint tables for interpretation of MICs and zone diameters**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`, *European Committee on Antimicrobial Susceptibility Testing* (EUCAST). <https://www.eucast.org/clinical_breakpoints>. #' - **EUCAST Breakpoint tables for interpretation of MICs and zone diameters**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`, *European Committee on Antimicrobial Susceptibility Testing* (EUCAST). <https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/>.
#' - **WHONET** as a source for machine-reading the clinical breakpoints ([read more here](https://amr-for-r.org/reference/clinical_breakpoints.html#imported-from-whonet)), 1989-`r max(as.integer(gsub("[^0-9]", "", AMR::clinical_breakpoints$guideline)))`, *WHO Collaborating Centre for Surveillance of Antimicrobial Resistance*. <https://whonet.org/>. #' - **WHONET** as a source for machine-reading the clinical breakpoints ([read more here](https://amr-for-r.org/reference/clinical_breakpoints.html#imported-from-whonet)), 1989-`r max(as.integer(gsub("[^0-9]", "", AMR::clinical_breakpoints$guideline)))`, *WHO Collaborating Centre for Surveillance of Antimicrobial Resistance*. <https://whonet.org/>.
#' #'
#' @inheritSection AMR Download Our Reference Data #' @inheritSection AMR Download Our Reference Data
@@ -225,9 +230,12 @@
#' df_wide %>% mutate_if(is.mic, as.sir) #' df_wide %>% mutate_if(is.mic, as.sir)
#' df_wide %>% mutate_if(function(x) is.mic(x) | is.disk(x), as.sir) #' df_wide %>% mutate_if(function(x) is.mic(x) | is.disk(x), as.sir)
#' df_wide %>% mutate(across(where(is.mic), as.sir)) #' df_wide %>% mutate(across(where(is.mic), as.sir))
#'
#' df_wide %>% mutate_at(vars(amoxicillin:tobra), as.sir) #' df_wide %>% mutate_at(vars(amoxicillin:tobra), as.sir)
#' df_wide %>% mutate(across(amoxicillin:tobra, as.sir)) #' df_wide %>% mutate(across(amoxicillin:tobra, as.sir))
#' #'
#' df_wide %>% mutate(across(aminopenicillins(), as.sir))
#'
#' # approaches that all work with additional arguments: #' # approaches that all work with additional arguments:
#' df_long %>% #' df_long %>%
#' # given a certain data type, e.g. MIC values #' # given a certain data type, e.g. MIC values
@@ -348,6 +356,10 @@
#' #'
#' as.sir(c("S", "SDD", "I", "R", "NI", "A", "B", "C")) #' as.sir(c("S", "SDD", "I", "R", "NI", "A", "B", "C"))
#' as.sir("<= 0.002; S") # will return "S" #' as.sir("<= 0.002; S") # will return "S"
#'
#' as.sir(c(1, 2, 3))
#' as.sir(c(1, 2, 3), S = 3, I = 2, R = 1)
#'
#' sir_data <- as.sir(c(rep("S", 474), rep("I", 36), rep("R", 370))) #' sir_data <- as.sir(c(rep("S", 474), rep("I", 36), rep("R", 370)))
#' is.sir(sir_data) #' is.sir(sir_data)
#' plot(sir_data) # for percentages #' plot(sir_data) # for percentages
@@ -389,7 +401,7 @@ as_sir_structure <- function(x,
ref_breakpoints = NULL) { ref_breakpoints = NULL) {
structure( structure(
factor(as.character(unlist(unname(x))), factor(as.character(unlist(unname(x))),
levels = c("S", "SDD", "I", "R", "NI"), levels = VALID_SIR_LEVELS,
ordered = TRUE ordered = TRUE
), ),
# TODO for #170 # TODO for #170
@@ -429,7 +441,7 @@ is_sir_eligible <- function(x, threshold = 0.05) {
return(unname(vapply(FUN.VALUE = logical(1), x, is_sir_eligible))) return(unname(vapply(FUN.VALUE = logical(1), x, is_sir_eligible)))
} }
stop_if(NCOL(x) > 1, "`x` must be a one-dimensional vector.") stop_if(NCOL(x) > 1, "{.arg x} must be a one-dimensional vector.")
if (any(c( if (any(c(
"numeric", "numeric",
"integer", "integer",
@@ -445,9 +457,9 @@ is_sir_eligible <- function(x, threshold = 0.05) {
%in% class(x))) { %in% class(x))) {
# no transformation needed # no transformation needed
return(FALSE) return(FALSE)
} else if (!all(is.na(x)) && all(x %in% c("S", "SDD", "I", "R", "NI", NA, "s", "sdd", "i", "r", "ni"))) { } else if (!all(is.na(x)) && all(x %in% c(VALID_SIR_LEVELS, tolower(VALID_SIR_LEVELS), NA))) {
return(TRUE) return(TRUE)
} else if (!all(is.na(x)) && !any(c("S", "SDD", "I", "R", "NI") %in% gsub("([SIR])\\1+", "\\1", gsub("[^A-Z]", "", toupper(unique(x[1:10000])), perl = TRUE), perl = TRUE), na.rm = TRUE)) { } else if (!all(is.na(x)) && !any(VALID_SIR_LEVELS %in% gsub("([SIR])\\1+", "\\1", gsub("[^A-Z]", "", toupper(unique(x[1:10000])), perl = TRUE), perl = TRUE), na.rm = TRUE)) {
return(FALSE) return(FALSE)
} else { } else {
x <- x[!is.na(x) & !is.null(x) & !x %in% c("", "-", "NULL")] x <- x[!is.na(x) & !is.null(x) & !x %in% c("", "-", "NULL")]
@@ -477,22 +489,28 @@ is_sir_eligible <- function(x, threshold = 0.05) {
#' @rdname as.sir #' @rdname as.sir
#' @export #' @export
#' @param S,I,R,NI,SDD A case-independent [regular expression][base::regex] to translate input to this result. This regular expression will be run *after* all non-letters and whitespaces are removed from the input. #' @param S,I,R,NI,SDD,WT,NWT,NS A case-independent [regular expression][base::regex] to translate input to this result. This regular expression will be run *after* all non-letters and whitespaces are removed from the input.
#' @param info A [logical] to print information about the process, defaults to `TRUE` only in [interactive sessions][base::interactive()]. #' @param info A [logical] to print information about the process, defaults to `TRUE` only in [interactive sessions][base::interactive()].
# extra param: warn (logical, to never throw a warning) # extra param: warn (logical, to never throw a warning)
as.sir.default <- function(x, as.sir.default <- function(x,
S = "^(S|U)+$", S = "^(S|U|1)+$",
I = "^(I)+$", I = "^(I|2)+$",
R = "^(R)+$", R = "^(R|3)+$",
NI = "^(N|NI|V)+$", NI = "^(N|NI|V|4)+$",
SDD = "^(SDD|D|H)+$", SDD = "^(SDD|D|H|5)+$",
WT = "^(WT|6)+$",
NWT = "^(NWT|7)+$",
NS = "^(NS|8)+$",
info = interactive(), info = interactive(),
...) { ...) {
meet_criteria(S, allow_class = "character", has_length = 1) meet_criteria(S, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(I, allow_class = "character", has_length = 1) meet_criteria(I, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(R, allow_class = "character", has_length = 1) meet_criteria(R, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(NI, allow_class = "character", has_length = 1) meet_criteria(NI, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(SDD, allow_class = "character", has_length = 1) meet_criteria(SDD, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(WT, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(NWT, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(NS, allow_class = c("character", "numeric", "integer", "factor"), has_length = 1)
meet_criteria(info, allow_class = "logical", has_length = 1) meet_criteria(info, allow_class = "logical", has_length = 1)
if (inherits(x, "sir")) { if (inherits(x, "sir")) {
return(as_sir_structure(x)) return(as_sir_structure(x))
@@ -501,36 +519,20 @@ as.sir.default <- function(x,
x.bak <- x x.bak <- x
x <- as.character(x) # this is needed to prevent the vctrs pkg from throwing an error x <- as.character(x) # this is needed to prevent the vctrs pkg from throwing an error
if (inherits(x.bak, c("numeric", "integer")) && all(x %in% c(1:3, NA))) { lbls <- attr(x.bak, "labels", exact = TRUE)
if (inherits(x.bak, c("numeric", "integer")) && all(x %in% c(1:3, NA)) && !is.null(lbls) && all(c("S", "I", "R") %in% names(lbls)) && all(c(1:3) %in% lbls)) {
# support haven package for importing e.g., from SPSS - it adds the 'labels' attribute # support haven package for importing e.g., from SPSS - it adds the 'labels' attribute
lbls <- attributes(x.bak)$labels x[x.bak == 1] <- names(lbls[lbls == 1])
if (!is.null(lbls) && all(c("S", "I", "R") %in% names(lbls)) && all(c(1:3) %in% lbls)) { x[x.bak == 2] <- names(lbls[lbls == 2])
x[x.bak == 1] <- names(lbls[lbls == 1]) x[x.bak == 3] <- names(lbls[lbls == 3])
x[x.bak == 2] <- names(lbls[lbls == 2]) } else if (!all(is.na(x)) && !identical(levels(x), VALID_SIR_LEVELS) && !all(x %in% c(VALID_SIR_LEVELS, NA))) {
x[x.bak == 3] <- names(lbls[lbls == 3]) if (all(x %unlike% "(S|I|R)", na.rm = TRUE) && !all(x %in% c(1, 2, 3, 4, 5), na.rm = TRUE)) {
} else {
x[x.bak == 1] <- "S"
x[x.bak == 2] <- "I"
x[x.bak == 3] <- "R"
}
} else if (inherits(x.bak, "character") && all(x %in% c("1", "2", "3", "S", "I", "R", NA_character_))) {
x[x.bak == "1"] <- "S"
x[x.bak == "2"] <- "I"
x[x.bak == "3"] <- "R"
} else if (inherits(x.bak, "character") && all(x %in% c("1", "2", "3", "4", "5", "S", "SDD", "I", "R", "NI", NA_character_))) {
x[x.bak == "1"] <- "S"
x[x.bak == "2"] <- "SDD"
x[x.bak == "3"] <- "I"
x[x.bak == "4"] <- "R"
x[x.bak == "5"] <- "NI"
} else if (!all(is.na(x)) && !identical(levels(x), c("S", "SDD", "I", "R", "NI")) && !all(x %in% c("S", "SDD", "I", "R", "NI", NA))) {
if (all(x %unlike% "(S|I|R)", na.rm = TRUE)) {
# check if they are actually MICs or disks # check if they are actually MICs or disks
if (all_valid_mics(x)) { if (all_valid_mics(x)) {
warning_("in `as.sir()`: input values were guessed to be MIC values - preferably transform them with `as.mic()` before running `as.sir()`.") warning_("in {.help [{.fun as.sir}](AMR::as.sir)}: input values were guessed to be MIC values - preferably transform them with {.help [{.fun as.mic}](AMR::as.mic)} before running {.help [{.fun as.sir}](AMR::as.sir)}.")
return(as.sir(as.mic(x), ...)) return(as.sir(as.mic(x), ...))
} else if (all_valid_disks(x)) { } else if (all_valid_disks(x)) {
warning_("in `as.sir()`: input values were guessed to be disk diffusion values - preferably transform them with `as.disk()` before running `as.sir()`.") warning_("in {.help [{.fun as.sir}](AMR::as.sir)}: input values were guessed to be disk diffusion values - preferably transform them with {.help [{.fun as.disk}](AMR::as.disk)} before running {.help [{.fun as.sir}](AMR::as.sir)}.")
return(as.sir(as.disk(x), ...)) return(as.sir(as.disk(x), ...))
} }
} }
@@ -564,26 +566,53 @@ as.sir.default <- function(x,
x[x %like% "not|non"] <- "NI" x[x %like% "not|non"] <- "NI"
x[x %like% "([^a-z]|^)int(er(mediate)?)?|incr.*exp"] <- "I" x[x %like% "([^a-z]|^)int(er(mediate)?)?|incr.*exp"] <- "I"
x[x %like% "dose"] <- "SDD" x[x %like% "dose"] <- "SDD"
x <- gsub("[^A-Z]+", "", x, perl = TRUE) mtch <- grepl(paste0("(", S, "|", I, "|", R, "|", NI, "|", SDD, "|", WT, "|", NWT, "|", NS, "|[A-Z]+)"), x, perl = TRUE)
x[!mtch] <- ""
x[mtch & x %unlike% "^[0-9+]$"] <- trimws2(gsub("[^\\p{L}]", "", x[mtch & x %unlike% "^[0-9+]$"], perl = TRUE)) # \p{L} is the Unicode category for all letters, including those with diacritics
# apply regexes set by user # apply regexes set by user
x[x %like% S] <- "S" x[x %like% S] <- "S"
x[x %like% I] <- "I" x[x %like% I] <- "I"
x[x %like% R] <- "R" x[x %like% R] <- "R"
x[x %like% NI] <- "NI" x[x %like% NI] <- "NI"
x[x %like% SDD] <- "SDD" x[x %like% SDD] <- "SDD"
x[!x %in% c("S", "SDD", "I", "R", "NI")] <- NA_character_ x[x %like% WT] <- "WT"
x[x %like% NWT] <- "NWT"
x[x %like% NS] <- "NS"
x[!x %in% VALID_SIR_LEVELS] <- NA_character_
na_after <- length(x[is.na(x) | x == ""]) na_after <- length(x[is.na(x) | x == ""])
if (!isFALSE(list(...)$warn)) { # so as.sir(..., warn = FALSE) will never throw a warning if (!isFALSE(list(...)$warn)) { # so as.sir(..., warn = FALSE) will never throw a warning
if (all(x.bak %in% c(1:8), na.rm = TRUE) && message_not_thrown_before("as.sir", "numeric_interpretation", x, x.bak)) {
out1 <- unique(x[x.bak == 1])
out2 <- unique(x[x.bak == 2])
out3 <- unique(x[x.bak == 3])
out4 <- unique(x[x.bak == 4])
out5 <- unique(x[x.bak == 5])
out6 <- unique(x[x.bak == 6])
out7 <- unique(x[x.bak == 7])
out8 <- unique(x[x.bak == 8])
out <- c(
ifelse(length(out1) > 0, paste0("1 as \"", out1, "\""), NA_character_),
ifelse(length(out2) > 0, paste0("2 as \"", out2, "\""), NA_character_),
ifelse(length(out3) > 0, paste0("3 as \"", out3, "\""), NA_character_),
ifelse(length(out4) > 0, paste0("4 as \"", out4, "\""), NA_character_),
ifelse(length(out5) > 0, paste0("5 as \"", out5, "\""), NA_character_),
ifelse(length(out6) > 0, paste0("6 as \"", out6, "\""), NA_character_),
ifelse(length(out7) > 0, paste0("7 as \"", out7, "\""), NA_character_),
ifelse(length(out8) > 0, paste0("8 as \"", out8, "\""), NA_character_)
)
message_("in {.help [{.fun as.sir}](AMR::as.sir)}: Interpreting input value ", vector_and(out[!is.na(out)], quotes = FALSE, sort = FALSE))
}
if (na_before != na_after) { if (na_before != na_after) {
list_missing <- x.bak[is.na(x) & !is.na(x.bak) & x.bak != ""] %pm>% list_missing <- x.bak[is.na(x) & !is.na(x.bak) & x.bak != ""] %pm>%
unique() %pm>% unique() %pm>%
sort() %pm>% sort() %pm>%
vector_and(quotes = TRUE) vector_and(quotes = TRUE)
cur_col <- get_current_column() cur_col <- get_current_column()
warning_("in `as.sir()`: ", na_after - na_before, " result", warning_("in {.help [{.fun as.sir}](AMR::as.sir)}: ", na_after - na_before, " result",
ifelse(na_after - na_before > 1, "s", ""), ifelse(na_after - na_before > 1, "s", ""),
ifelse(is.null(cur_col), "", paste0(" in index '", cur_col, "'")), ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
" truncated (", " truncated (",
round(((na_after - na_before) / length(x)) * 100), round(((na_after - na_before) / length(x)) * 100),
"%) that were invalid antimicrobial interpretations: ", "%) that were invalid antimicrobial interpretations: ",
@@ -605,6 +634,7 @@ as.sir.mic <- function(x,
guideline = getOption("AMR_guideline", "EUCAST"), guideline = getOption("AMR_guideline", "EUCAST"),
uti = NULL, uti = NULL,
capped_mic_handling = getOption("AMR_capped_mic_handling", "standard"), capped_mic_handling = getOption("AMR_capped_mic_handling", "standard"),
as_wt_nwt = identical(breakpoint_type, "ECOFF"),
add_intrinsic_resistance = FALSE, add_intrinsic_resistance = FALSE,
reference_data = AMR::clinical_breakpoints, reference_data = AMR::clinical_breakpoints,
substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint", FALSE), substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint", FALSE),
@@ -626,6 +656,7 @@ as.sir.mic <- function(x,
guideline = guideline, guideline = guideline,
uti = uti, uti = uti,
capped_mic_handling = capped_mic_handling, capped_mic_handling = capped_mic_handling,
as_wt_nwt = as_wt_nwt,
add_intrinsic_resistance = add_intrinsic_resistance, add_intrinsic_resistance = add_intrinsic_resistance,
reference_data = reference_data, reference_data = reference_data,
substitute_missing_r_breakpoint = substitute_missing_r_breakpoint, substitute_missing_r_breakpoint = substitute_missing_r_breakpoint,
@@ -648,6 +679,7 @@ as.sir.disk <- function(x,
ab = deparse(substitute(x)), ab = deparse(substitute(x)),
guideline = getOption("AMR_guideline", "EUCAST"), guideline = getOption("AMR_guideline", "EUCAST"),
uti = NULL, uti = NULL,
as_wt_nwt = identical(breakpoint_type, "ECOFF"),
add_intrinsic_resistance = FALSE, add_intrinsic_resistance = FALSE,
reference_data = AMR::clinical_breakpoints, reference_data = AMR::clinical_breakpoints,
substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint", FALSE), substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint", FALSE),
@@ -668,6 +700,7 @@ as.sir.disk <- function(x,
guideline = guideline, guideline = guideline,
uti = uti, uti = uti,
capped_mic_handling = "standard", # will be ignored for non-MIC anyway capped_mic_handling = "standard", # will be ignored for non-MIC anyway
as_wt_nwt = as_wt_nwt,
add_intrinsic_resistance = add_intrinsic_resistance, add_intrinsic_resistance = add_intrinsic_resistance,
reference_data = reference_data, reference_data = reference_data,
substitute_missing_r_breakpoint = substitute_missing_r_breakpoint, substitute_missing_r_breakpoint = substitute_missing_r_breakpoint,
@@ -692,6 +725,7 @@ as.sir.data.frame <- function(x,
guideline = getOption("AMR_guideline", "EUCAST"), guideline = getOption("AMR_guideline", "EUCAST"),
uti = NULL, uti = NULL,
capped_mic_handling = getOption("AMR_capped_mic_handling", "standard"), capped_mic_handling = getOption("AMR_capped_mic_handling", "standard"),
as_wt_nwt = identical(breakpoint_type, "ECOFF"),
add_intrinsic_resistance = FALSE, add_intrinsic_resistance = FALSE,
reference_data = AMR::clinical_breakpoints, reference_data = AMR::clinical_breakpoints,
substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint", FALSE), substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint", FALSE),
@@ -709,7 +743,8 @@ as.sir.data.frame <- function(x,
meet_criteria(col_mo, allow_class = "character", is_in = colnames(x), allow_NULL = TRUE) meet_criteria(col_mo, allow_class = "character", is_in = colnames(x), allow_NULL = TRUE)
meet_criteria(guideline, allow_class = "character") meet_criteria(guideline, allow_class = "character")
meet_criteria(uti, allow_class = c("logical", "character"), allow_NULL = TRUE, allow_NA = TRUE) meet_criteria(uti, allow_class = c("logical", "character"), allow_NULL = TRUE, allow_NA = TRUE)
meet_criteria(capped_mic_handling, allow_class = "character", has_length = 1, is_in = c("standard", "conservative", "none", "inverse")) meet_criteria(capped_mic_handling, allow_class = "character", has_length = 1, is_in = c("none", "conservative", "standard", "lenient"))
meet_criteria(as_wt_nwt, allow_class = "logical", has_length = 1)
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1) meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1)
meet_criteria(reference_data, allow_class = "data.frame") meet_criteria(reference_data, allow_class = "data.frame")
meet_criteria(substitute_missing_r_breakpoint, allow_class = "logical", has_length = 1) meet_criteria(substitute_missing_r_breakpoint, allow_class = "logical", has_length = 1)
@@ -722,8 +757,17 @@ as.sir.data.frame <- function(x,
meet_criteria(info, allow_class = "logical", has_length = 1) meet_criteria(info, allow_class = "logical", has_length = 1)
meet_criteria(parallel, allow_class = "logical", has_length = 1) meet_criteria(parallel, allow_class = "logical", has_length = 1)
meet_criteria(max_cores, allow_class = c("numeric", "integer"), has_length = 1) meet_criteria(max_cores, allow_class = c("numeric", "integer"), has_length = 1)
x.bak <- x x.bak <- x
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
sel <- colnames(pm_select(x, ...))
} else {
sel <- colnames(x)
}
if (!is.null(col_mo)) {
sel <- sel[sel != col_mo]
}
for (i in seq_len(ncol(x))) { for (i in seq_len(ncol(x))) {
# don't keep factors, overwriting them is hard # don't keep factors, overwriting them is hard
if (is.factor(x[, i, drop = TRUE])) { if (is.factor(x[, i, drop = TRUE])) {
@@ -739,10 +783,10 @@ as.sir.data.frame <- function(x,
# -- host # -- host
if (missing(breakpoint_type) && any(host %in% clinical_breakpoints$host[!clinical_breakpoints$host %in% c("human", "ECOFF")], na.rm = TRUE)) { if (missing(breakpoint_type) && any(host %in% clinical_breakpoints$host[!clinical_breakpoints$host %in% c("human", "ECOFF")], na.rm = TRUE)) {
if (isTRUE(info)) message_("Assuming `breakpoint_type = \"animal\"` since `host` contains animal species.") if (isTRUE(info)) message_("Assuming {.code breakpoint_type = \"animal\"} since {.arg host} contains animal species.")
breakpoint_type <- "animal" breakpoint_type <- "animal"
} else if (any(!suppressMessages(convert_host(host, lang = language)) %in% c("human", "ECOFF"), na.rm = TRUE)) { } else if (any(!suppressMessages(convert_host(host, lang = language)) %in% c("human", "ECOFF"), na.rm = TRUE)) {
if (isTRUE(info)) message_("Assuming `breakpoint_type = \"animal\"`.") if (isTRUE(info)) message_("Assuming {.code breakpoint_type = \"animal\"}.")
breakpoint_type <- "animal" breakpoint_type <- "animal"
} }
if (breakpoint_type == "animal") { if (breakpoint_type == "animal") {
@@ -781,8 +825,8 @@ as.sir.data.frame <- function(x,
col_specimen <- suppressMessages(search_type_in_df(x = x, type = "specimen", info = info)) col_specimen <- suppressMessages(search_type_in_df(x = x, type = "specimen", info = info))
if (!is.null(col_specimen)) { if (!is.null(col_specimen)) {
uti <- x[, col_specimen, drop = TRUE] %like% "urin" uti <- x[, col_specimen, drop = TRUE] %like% "urin"
values <- sort(unique(x[uti, col_specimen, drop = TRUE])) col_values <- sort(unique(x[uti, col_specimen, drop = TRUE]))
if (length(values) > 1) { if (length(col_values) > 1) {
plural <- c("s", "", "") plural <- c("s", "", "")
} else { } else {
plural <- c("", "s", "a ") plural <- c("", "s", "a ")
@@ -790,7 +834,7 @@ as.sir.data.frame <- function(x,
if (isTRUE(info)) { if (isTRUE(info)) {
message_( message_(
"Assuming value", plural[1], " ", "Assuming value", plural[1], " ",
vector_and(values, quotes = TRUE), vector_and(col_values, quotes = TRUE),
" in column '", font_bold(col_specimen), " in column '", font_bold(col_specimen),
"' reflect", plural[2], " ", plural[3], "urinary tract infection", plural[1], "' reflect", plural[2], " ", plural[3], "urinary tract infection", plural[1],
".\n Use `as.sir(uti = FALSE)` to prevent this." ".\n Use `as.sir(uti = FALSE)` to prevent this."
@@ -803,15 +847,6 @@ as.sir.data.frame <- function(x,
} }
i <- 0 i <- 0
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
sel <- colnames(pm_select(x, ...))
} else {
sel <- colnames(x)
}
if (!is.null(col_mo)) {
sel <- sel[sel != col_mo]
}
ab_cols <- colnames(x)[vapply(FUN.VALUE = logical(1), x, function(y) { ab_cols <- colnames(x)[vapply(FUN.VALUE = logical(1), x, function(y) {
i <<- i + 1 i <<- i + 1
check <- is.mic(y) | is.disk(y) check <- is.mic(y) | is.disk(y)
@@ -848,7 +883,7 @@ as.sir.data.frame <- function(x,
types[types == "" & !vapply(FUN.VALUE = logical(1), x.bak[, ab_cols, drop = FALSE], is.sir)] <- "sir" types[types == "" & !vapply(FUN.VALUE = logical(1), x.bak[, ab_cols, drop = FALSE], is.sir)] <- "sir"
if (any(types %in% c("mic", "disk"), na.rm = TRUE)) { if (any(types %in% c("mic", "disk"), na.rm = TRUE)) {
# now we need an mo column # now we need an mo column
stop_if(is.null(col_mo), "`col_mo` must be set") stop_if(is.null(col_mo), "{.arg col_mo} must be set")
# if not null, we already found it, now find again so a message will show # if not null, we already found it, now find again so a message will show
if (is.null(col_mo.bak)) { if (is.null(col_mo.bak)) {
col_mo <- search_type_in_df(x = x, type = "mo", info = info) col_mo <- search_type_in_df(x = x, type = "mo", info = info)
@@ -863,7 +898,7 @@ as.sir.data.frame <- function(x,
cl <- tryCatch(parallel::makeCluster(n_cores, type = "PSOCK"), cl <- tryCatch(parallel::makeCluster(n_cores, type = "PSOCK"),
error = function(e) { error = function(e) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("Could not create parallel cluster, using single-core computation. Error message: ", e$message, add_fn = font_red) message_("Could not create parallel cluster, using single-core computation. Error message: ", conditionMessage(e))
} }
return(NULL) return(NULL)
} }
@@ -889,6 +924,7 @@ as.sir.data.frame <- function(x,
guideline = guideline, guideline = guideline,
uti = uti, uti = uti,
capped_mic_handling = capped_mic_handling, capped_mic_handling = capped_mic_handling,
as_wt_nwt = as_wt_nwt,
add_intrinsic_resistance = add_intrinsic_resistance, add_intrinsic_resistance = add_intrinsic_resistance,
reference_data = reference_data, reference_data = reference_data,
substitute_missing_r_breakpoint = substitute_missing_r_breakpoint, substitute_missing_r_breakpoint = substitute_missing_r_breakpoint,
@@ -916,6 +952,7 @@ as.sir.data.frame <- function(x,
ab = ab_col, ab = ab_col,
guideline = guideline, guideline = guideline,
uti = uti, uti = uti,
as_wt_nwt = as_wt_nwt,
add_intrinsic_resistance = add_intrinsic_resistance, add_intrinsic_resistance = add_intrinsic_resistance,
reference_data = reference_data, reference_data = reference_data,
substitute_missing_r_breakpoint = substitute_missing_r_breakpoint, substitute_missing_r_breakpoint = substitute_missing_r_breakpoint,
@@ -978,7 +1015,7 @@ as.sir.data.frame <- function(x,
on.exit(parallel::stopCluster(cl), add = TRUE) on.exit(parallel::stopCluster(cl), add = TRUE)
parallel::clusterExport(cl, varlist = c( parallel::clusterExport(cl, varlist = c(
"x", "x.bak", "x_mo", "ab_cols", "types", "x", "x.bak", "x_mo", "ab_cols", "types",
"capped_mic_handling", "add_intrinsic_resistance", "capped_mic_handling", "as_wt_nwt", "add_intrinsic_resistance",
"reference_data", "substitute_missing_r_breakpoint", "include_screening", "include_PKPD", "reference_data", "substitute_missing_r_breakpoint", "include_screening", "include_PKPD",
"breakpoint_type", "guideline", "host", "uti", "info", "verbose", "breakpoint_type", "guideline", "host", "uti", "info", "verbose",
"col_mo", "AMR_env", "conserve_capped_values", "col_mo", "AMR_env", "conserve_capped_values",
@@ -992,14 +1029,14 @@ as.sir.data.frame <- function(x,
if (isTRUE(info)) { if (isTRUE(info)) {
message_(font_green_bg(" DONE "), as_note = FALSE) message_(font_green_bg(" DONE "), as_note = FALSE)
message() message()
message_("Run `sir_interpretation_history()` to retrieve a logbook with all details of the breakpoint interpretations.", add_fn = font_green) message_("Run {.help [{.fun sir_interpretation_history}](AMR::sir_interpretation_history)} to retrieve a logbook with all details of the breakpoint interpretations.")
} }
} else { } else {
# sequential mode (non-parallel) # sequential mode (non-parallel)
if (isTRUE(info) && n_cores > 1 && NROW(x) * NCOL(x) > 10000) { if (isTRUE(info) && n_cores > 1 && NROW(x) * NCOL(x) > 10000) {
# give a note that parallel mode might be better # give a note that parallel mode might be better
message() message()
message_("Running in sequential mode. Consider setting `parallel = TRUE` to speed up processing on multiple cores.\n", add_fn = font_red) message_("Running in sequential mode. Consider setting {.arg parallel} to {.code TRUE} to speed up processing on multiple cores.\n")
} }
# this will contain a progress bar already # this will contain a progress bar already
result_list <- lapply(seq_along(ab_cols), run_as_sir_column) result_list <- lapply(seq_along(ab_cols), run_as_sir_column)
@@ -1091,6 +1128,7 @@ as_sir_method <- function(method_short,
guideline, guideline,
uti, uti,
capped_mic_handling, capped_mic_handling,
as_wt_nwt,
add_intrinsic_resistance, add_intrinsic_resistance,
reference_data, reference_data,
substitute_missing_r_breakpoint, substitute_missing_r_breakpoint,
@@ -1112,7 +1150,8 @@ as_sir_method <- function(method_short,
meet_criteria(ab, allow_class = c("ab", "character"), has_length = c(1, length(x)), .call_depth = -2) meet_criteria(ab, allow_class = c("ab", "character"), has_length = c(1, length(x)), .call_depth = -2)
meet_criteria(guideline, allow_class = "character", has_length = c(1, length(x)), .call_depth = -2) meet_criteria(guideline, allow_class = "character", has_length = c(1, length(x)), .call_depth = -2)
meet_criteria(uti, allow_class = c("logical", "character"), has_length = c(1, length(x)), allow_NULL = TRUE, allow_NA = TRUE, .call_depth = -2) meet_criteria(uti, allow_class = c("logical", "character"), has_length = c(1, length(x)), allow_NULL = TRUE, allow_NA = TRUE, .call_depth = -2)
meet_criteria(capped_mic_handling, allow_class = "character", has_length = 1, is_in = c("standard", "conservative", "none", "inverse"), .call_depth = -2) meet_criteria(capped_mic_handling, allow_class = "character", has_length = 1, is_in = c("none", "conservative", "standard", "lenient"), .call_depth = -2)
meet_criteria(as_wt_nwt, allow_class = "logical", has_length = 1, .call_depth = -2)
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1, .call_depth = -2) meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1, .call_depth = -2)
meet_criteria(reference_data, allow_class = "data.frame", .call_depth = -2) meet_criteria(reference_data, allow_class = "data.frame", .call_depth = -2)
meet_criteria(substitute_missing_r_breakpoint, allow_class = "logical", has_length = 1, .call_depth = -2) meet_criteria(substitute_missing_r_breakpoint, allow_class = "logical", has_length = 1, .call_depth = -2)
@@ -1129,14 +1168,13 @@ as_sir_method <- function(method_short,
dots <- list(...) dots <- list(...)
dots <- dots[which(!names(dots) %in% c("warn", "mo.bak", "is_data.frame"))] dots <- dots[which(!names(dots) %in% c("warn", "mo.bak", "is_data.frame"))]
if (length(dots) != 0) { if (length(dots) != 0) {
warning_("These arguments in `as.sir()` are no longer used: ", vector_and(names(dots), quotes = "`"), ".", call = FALSE) warning_("These arguments in {.help [{.fun as.sir}](AMR::as.sir)} are no longer used: ", vector_and(names(dots), quotes = "`"), ".", call = FALSE)
} }
current_sir_interpretation_history <- NROW(AMR_env$sir_interpretation_history) current_sir_interpretation_history <- NROW(AMR_env$sir_interpretation_history)
if (isTRUE(info) && message_not_thrown_before("as.sir", "sir_interpretation_history")) { if (isTRUE(info) && message_not_thrown_before("as.sir", "sir_interpretation_history")) {
message() message_("Run {.help [{.fun sir_interpretation_history}](AMR::sir_interpretation_history)} afterwards to retrieve a logbook with all details of the breakpoint interpretations.\n\n")
message_("Run `sir_interpretation_history()` afterwards to retrieve a logbook with all details of the breakpoint interpretations.\n\n", add_fn = font_green)
} }
current_df <- tryCatch(get_current_data(NA, 0), error = function(e) NULL) current_df <- tryCatch(get_current_data(NA, 0), error = function(e) NULL)
@@ -1152,13 +1190,13 @@ as_sir_method <- function(method_short,
if (is.null(host)) { if (is.null(host)) {
host <- "dogs" host <- "dogs"
if (isTRUE(info) && message_not_thrown_before("as.sir", "host_missing")) { if (isTRUE(info) && message_not_thrown_before("as.sir", "host_missing")) {
message_("Animal hosts not set in `host`, assuming `host = \"dogs\"`, since these have the highest breakpoint availability.\n\n") message_("Animal hosts not set in {.arg host}, assuming {.code host = \"dogs\"}, since these have the highest breakpoint availability.\n\n")
} }
} }
} else { } else {
if (!is.null(host) && !all(toupper(as.character(host)) %in% c("HUMAN", "ECOFF"))) { if (!is.null(host) && !all(toupper(as.character(host)) %in% c("HUMAN", "ECOFF"))) {
if (isTRUE(info) && message_not_thrown_before("as.sir", "assumed_breakpoint_animal")) { if (isTRUE(info) && message_not_thrown_before("as.sir", "assumed_breakpoint_animal")) {
message_("Assuming `breakpoint_type = \"animal\"`, since `host` is set.", ifelse(guideline_coerced %like% "EUCAST", " Do you also need to set `guideline = \"CLSI\"`?", ""), "\n\n") message_("Assuming {.code breakpoint_type = \"animal\"}, since {.arg host} is set.", ifelse(guideline_coerced %like% "EUCAST", " Do you also need to set {.code guideline = \"CLSI\"}?", ""), "\n\n")
} }
breakpoint_type <- "animal" breakpoint_type <- "animal"
} else { } else {
@@ -1238,9 +1276,9 @@ as_sir_method <- function(method_short,
mo_var_found <- "" mo_var_found <- ""
} }
if (is.null(mo)) { if (is.null(mo)) {
stop_("No information was supplied about the microorganisms (missing argument `mo` and no column of class 'mo' found). See ?as.sir.\n\n", stop_("No information was supplied about the microorganisms (missing argument {.arg mo} and no column of class 'mo' found). See {.help [{.fun as.sir}](AMR::as.sir)}.\n\n",
"To transform certain columns with e.g. mutate(), use `data %>% mutate(across(..., as.sir, mo = x))`, where x is your column with microorganisms.\n", "To transform certain columns with e.g. mutate(), use ", highlight_code("data %>% mutate(across(..., as.sir, mo = x))"), ", where x is your column with microorganisms.\n",
"To transform all ", method_long, " in a data set, use `data %>% as.sir()` or `data %>% mutate_if(is.", method_short, ", as.sir)`.", "To transform all ", method_long, " in a data set, use ", highlight_code("data %>% as.sir()"), " or ", highlight_code(paste0("data %>% mutate_if(is.", method_short, ", as.sir)")), ".",
call = FALSE call = FALSE
) )
} }
@@ -1274,7 +1312,7 @@ as_sir_method <- function(method_short,
if (length(ab) == 1 && ab %like% paste0("as.", method_short)) { if (length(ab) == 1 && ab %like% paste0("as.", method_short)) {
stop_("No unambiguous name was supplied about the antibiotic (argument `ab`). See ?as.sir.", call = FALSE) stop_("No unambiguous name was supplied about the antibiotic (argument {.arg ab}). See {.help [{.fun as.sir}](AMR::as.sir)}.", call = FALSE)
} }
ab.bak <- trimws2(ab) ab.bak <- trimws2(ab)
@@ -1290,8 +1328,7 @@ as_sir_method <- function(method_short,
if (all(is.na(ab))) { if (all(is.na(ab))) {
if (isTRUE(info)) { if (isTRUE(info)) {
message_("Returning NAs for unknown antibiotic: ", vector_and(ab.bak, sort = FALSE, quotes = TRUE), message_("Returning NAs for unknown antibiotic: ", vector_and(ab.bak, sort = FALSE, quotes = TRUE),
". Rename this column to a valid name or code, and check the output with `as.ab()`.", ". Rename this column to a valid name or code, and check the output with {.help [{.fun as.ab}](AMR::as.ab)}.",
add_fn = font_red,
as_note = FALSE as_note = FALSE
) )
} }
@@ -1315,9 +1352,7 @@ as_sir_method <- function(method_short,
} }
if (isTRUE(add_intrinsic_resistance) && guideline_coerced %unlike% "EUCAST") { if (isTRUE(add_intrinsic_resistance) && guideline_coerced %unlike% "EUCAST") {
if (isTRUE(info) && message_not_thrown_before("as.sir", "intrinsic")) { if (isTRUE(info) && message_not_thrown_before("as.sir", "intrinsic")) {
message_("in `as.sir()`: using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.", message_("in {.help [{.fun as.sir}](AMR::as.sir)}: using {.arg add_intrinsic_resistance} is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.")
add_fn = font_red
)
} }
} }
@@ -1374,8 +1409,8 @@ as_sir_method <- function(method_short,
# create the unique data frame to be filled to save time # create the unique data frame to be filled to save time
df <- data.frame( df <- data.frame(
values = x, input_clean = x,
values_bak = x, input_original = x,
guideline = guideline_coerced, guideline = guideline_coerced,
mo = mo, mo = mo,
ab = ab, ab = ab,
@@ -1389,7 +1424,7 @@ as_sir_method <- function(method_short,
# CLSI in log 2 ---- # CLSI in log 2 ----
# CLSI says: if MIC is not a log2 value it must be rounded up to the nearest log2 value # CLSI says: if MIC is not a log2 value it must be rounded up to the nearest log2 value
log2_levels <- as.double(VALID_MIC_LEVELS[which(VALID_MIC_LEVELS %in% 2^c(-20:20))]) log2_levels <- as.double(VALID_MIC_LEVELS[which(VALID_MIC_LEVELS %in% 2^c(-20:20))])
test_values <- df$values test_values <- df$input_clean
test_values_dbl <- as.double(test_values) test_values_dbl <- as.double(test_values)
test_values_dbl[test_values %like% "^>[0-9]"] <- test_values_dbl[test_values %like% "^>[0-9]"] + 0.0000001 test_values_dbl[test_values %like% "^>[0-9]"] <- test_values_dbl[test_values %like% "^>[0-9]"] + 0.0000001
test_values_dbl[test_values %like% "^<[0-9]"] <- test_values_dbl[test_values %like% "^<[0-9]"] - 0.0000001 test_values_dbl[test_values %like% "^<[0-9]"] <- test_values_dbl[test_values %like% "^<[0-9]"] - 0.0000001
@@ -1400,8 +1435,7 @@ as_sir_method <- function(method_short,
if (is.na(mic_val)) { if (is.na(mic_val)) {
return(NA_real_) return(NA_real_)
} else { } else {
# find the smallest log2 level that is >= mic_val log2_val <- COMMON_MIC_VALUES[which(COMMON_MIC_VALUES >= as.double(mic_val))][1]
log2_val <- log2_levels[which(log2_levels >= as.double(mic_val))][1]
if (!is.na(log2_val) && as.double(mic_val) != log2_val) { if (!is.na(log2_val) && as.double(mic_val) != log2_val) {
if (message_not_thrown_before("as.sir", "CLSI", "MICupscaling")) { if (message_not_thrown_before("as.sir", "CLSI", "MICupscaling")) {
warning_("Some MICs were converted to the nearest higher log2 level, following the CLSI interpretation guideline.") warning_("Some MICs were converted to the nearest higher log2 level, following the CLSI interpretation guideline.")
@@ -1413,12 +1447,12 @@ as_sir_method <- function(method_short,
} }
} }
) )
df$values[which(df$guideline %like% "CLSI" & test_values != test_outcome)] <- test_outcome[which(df$guideline %like% "CLSI" & test_values != test_outcome)] df$input_clean[which(df$guideline %like% "CLSI" & test_values != test_outcome)] <- test_outcome[which(df$guideline %like% "CLSI" & test_values != test_outcome)]
} }
df$values <- as.mic(df$values) df$input_clean <- as.mic(df$input_clean)
} else if (method == "disk") { } else if (method == "disk") {
# when as.sir.disk is called directly # when as.sir.disk is called directly
df$values <- as.disk(df$values) df$input_clean <- as.disk(df$input_clean)
} }
df_unique <- unique(df[, c("guideline", "mo", "ab", "uti", "host"), drop = FALSE]) df_unique <- unique(df[, c("guideline", "mo", "ab", "uti", "host"), drop = FALSE])
@@ -1496,8 +1530,8 @@ as_sir_method <- function(method_short,
# this can happen if a host is unavailable, just continue with the next one, since a note about hosts having NA are already given at this point # this can happen if a host is unavailable, just continue with the next one, since a note about hosts having NA are already given at this point
next next
} }
values <- df[rows, "values", drop = TRUE] input_clean <- df[rows, "input_clean", drop = TRUE]
values_bak <- df[rows, "values_bak", drop = TRUE] input_original <- df[rows, "input_original", drop = TRUE]
notes_current <- rep("", length(rows)) notes_current <- rep("", length(rows))
new_sir <- rep(NA_sir_, length(rows)) new_sir <- rep(NA_sir_, length(rows))
@@ -1553,7 +1587,7 @@ as_sir_method <- function(method_short,
)) ))
if (breakpoint_type == "animal") { if (breakpoint_type == "animal") {
# 2025-03-13 for now, only strictly follow guideline for current host, no extrapolation # 2025-03-13/ for now, only strictly follow guideline for current host, no extrapolation
breakpoints_current <- breakpoints_current[which(breakpoints_current$host == host_current), , drop = FALSE] breakpoints_current <- breakpoints_current[which(breakpoints_current$host == host_current), , drop = FALSE]
} }
@@ -1632,11 +1666,11 @@ as_sir_method <- function(method_short,
ab_given = vectorise_log_entry(ab.bak[match(ab_current, df$ab)][1], length(rows)), ab_given = vectorise_log_entry(ab.bak[match(ab_current, df$ab)][1], length(rows)),
mo_given = vectorise_log_entry(mo.bak[match(mo_current, df$mo)][1], length(rows)), mo_given = vectorise_log_entry(mo.bak[match(mo_current, df$mo)][1], length(rows)),
host_given = vectorise_log_entry(host.bak[match(host_current, df$host)][1], length(rows)), host_given = vectorise_log_entry(host.bak[match(host_current, df$host)][1], length(rows)),
input_given = vectorise_log_entry(as.character(values_bak), length(rows)), input_given = vectorise_log_entry(as.character(input_original), length(rows)),
ab = vectorise_log_entry(ab_current, length(rows)), ab = vectorise_log_entry(ab_current, length(rows)),
mo = vectorise_log_entry(mo_current, length(rows)), mo = vectorise_log_entry(mo_current, length(rows)),
host = vectorise_log_entry(host_current, length(rows)), host = vectorise_log_entry(host_current, length(rows)),
input = vectorise_log_entry(as.character(values), length(rows)), input = vectorise_log_entry(as.character(input_clean), length(rows)),
outcome = vectorise_log_entry(NA_sir_, length(rows)), outcome = vectorise_log_entry(NA_sir_, length(rows)),
notes = vectorise_log_entry("No breakpoint available", length(rows)), notes = vectorise_log_entry("No breakpoint available", length(rows)),
guideline = vectorise_log_entry(guideline_current, length(rows)), guideline = vectorise_log_entry(guideline_current, length(rows)),
@@ -1651,26 +1685,23 @@ as_sir_method <- function(method_short,
next next
} }
# sort on host and taxonomic rank # if the user explicitly set uti, keep only those rows
# (this will e.g. prefer 'species' breakpoints over 'order' breakpoints) if (!is.na(uti_current)) {
if (is.na(uti_current)) { breakpoints_current <- breakpoints_current[breakpoints_current$uti == uti_current, , drop = FALSE]
breakpoints_current <- breakpoints_current %pm>%
# `uti` is a column in the data set
# this will put UTI = FALSE first, then UTI = NA, then UTI = TRUE
pm_mutate(uti_index = ifelse(!is.na(uti) & uti == FALSE, 1,
ifelse(is.na(uti), 2,
3
)
)) %pm>%
# be as specific as possible (i.e. prefer species over genus):
pm_arrange(rank_index, uti_index)
} else if (uti_current == TRUE) {
breakpoints_current <- breakpoints_current %pm>%
subset(uti == TRUE) %pm>%
# be as specific as possible (i.e. prefer species over genus):
pm_arrange(rank_index)
} }
# build a helper factor so FALSE < NA < TRUE
uti_index <- factor(
ifelse(is.na(breakpoints_current$uti), "NA",
as.character(breakpoints_current$uti)
),
levels = c("FALSE", "NA", "TRUE")
)
# sort on host and taxonomic rank first, then by UTI
# (this will e.g. prefer 'species' breakpoints over 'order' breakpoints)
breakpoints_current <- breakpoints_current[order(breakpoints_current$rank_index, uti_index), , drop = FALSE]
# throw messages for different body sites # throw messages for different body sites
site <- breakpoints_current[1L, "site", drop = FALSE] # this is the one we'll take site <- breakpoints_current[1L, "site", drop = FALSE] # this is the one we'll take
if (is.na(site)) { if (is.na(site)) {
@@ -1682,7 +1713,7 @@ as_sir_method <- function(method_short,
# only UTI breakpoints available # only UTI breakpoints available
notes_current <- paste0( notes_current <- paste0(
notes_current, "\n", notes_current, "\n",
paste0("Breakpoints for ", font_bold(ab_formatted), " in ", mo_formatted, " are only available for (uncomplicated) urinary tract infections (UTI); assuming `uti = TRUE`.") paste0("Breakpoints for ", font_bold(ab_formatted), " in ", mo_formatted, " are only available for (uncomplicated) urinary tract infections (UTI) - assuming `uti = TRUE`.")
) )
} else if (nrow(breakpoints_current) > 1 && length(unique(breakpoints_current$site)) > 1 && any(is.na(uti_current)) && all(c(TRUE, FALSE) %in% breakpoints_current$uti, na.rm = TRUE) && message_not_thrown_before("as.sir", "siteUTI", mo_current, ab_current)) { } else if (nrow(breakpoints_current) > 1 && length(unique(breakpoints_current$site)) > 1 && any(is.na(uti_current)) && all(c(TRUE, FALSE) %in% breakpoints_current$uti, na.rm = TRUE) && message_not_thrown_before("as.sir", "siteUTI", mo_current, ab_current)) {
# both UTI and Non-UTI breakpoints available # both UTI and Non-UTI breakpoints available
@@ -1690,7 +1721,7 @@ as_sir_method <- function(method_short,
pm_filter(uti == FALSE) pm_filter(uti == FALSE)
notes_current <- paste0( notes_current <- paste0(
notes_current, "\n", notes_current, "\n",
paste0("Breakpoints for UTI ", font_bold("and"), " non-UTI available for ", ab_formatted, " in ", mo_formatted, " - assuming ", site, ". Use argument `uti` to set which isolates are from urine. See `?as.sir`.") paste0("Breakpoints for UTI ", font_bold("and"), " non-UTI available for ", ab_formatted, " in ", mo_formatted, " - assuming ", site, ". Use argument `uti` to set which isolates are from urine. See {.help [{.fun as.sir}](AMR::as.sir)}.")
) )
} else if (nrow(breakpoints_current) > 1 && length(unique(breakpoints_current$site)) > 1 && all(breakpoints_current$uti == FALSE, na.rm = TRUE) && message_not_thrown_before("as.sir", "siteOther", mo_current, ab_current)) { } else if (nrow(breakpoints_current) > 1 && length(unique(breakpoints_current$site)) > 1 && all(breakpoints_current$uti == FALSE, na.rm = TRUE) && message_not_thrown_before("as.sir", "siteOther", mo_current, ab_current)) {
# breakpoints for multiple body sites available # breakpoints for multiple body sites available
@@ -1705,7 +1736,7 @@ as_sir_method <- function(method_short,
new_sir <- rep(as.sir("R"), length(rows)) new_sir <- rep(as.sir("R"), length(rows))
notes_current <- paste0( notes_current <- paste0(
notes_current, "\n", notes_current, "\n",
paste0("Intrinsic resistance applied for ", ab_formatted, " in ", mo_formatted, "") paste0("Intrinsic resistance applied for ", ab_formatted, " in ", mo_formatted, ".")
) )
} else if (nrow(breakpoints_current) == 0) { } else if (nrow(breakpoints_current) == 0) {
# no rules available # no rules available
@@ -1713,51 +1744,78 @@ as_sir_method <- function(method_short,
} else { } else {
# then run the rules # then run the rules
breakpoints_current <- breakpoints_current[1L, , drop = FALSE] breakpoints_current <- breakpoints_current[1L, , drop = FALSE]
if (breakpoints_current$rank_index > 3) {
# we resort to a high-level taxonomic record since there are no breakpoint on genus (rank_index = 3) or lower, so note this
notes_current <- paste0(
"No genus- or species-level breakpoint available - applying higher taxonomic level instead.\n",
notes_current
)
}
notes_current <- paste0( notes_current <- paste0(
notes_current, "\n", notes_current, "\n",
ifelse(breakpoints_current$mo == "UNKNOWN" | breakpoints_current$ref_tbl %like% "PK.*PD", ifelse(breakpoints_current$mo == "UNKNOWN" | breakpoints_current$ref_tbl %like% "PK.*PD",
"Some PK/PD breakpoints were applied - use `include_PKPD = FALSE` to prevent this", "Some PK/PD breakpoints were applied - use `include_PKPD = FALSE` to prevent this.",
"" ""
), ),
"\n", "\n",
ifelse(breakpoints_current$site %like% "screen" | breakpoints_current$ref_tbl %like% "screen", ifelse(breakpoints_current$site %like% "screen" | breakpoints_current$ref_tbl %like% "screen",
"Some screening breakpoints were applied - use `include_screening = FALSE` to prevent this", "Some screening breakpoints were applied - use `include_screening = FALSE` to prevent this.",
"" ""
), ),
"\n", "\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "inverse") & as.character(values_bak) %like% "^[<][0-9]", ifelse(method == "mic" & capped_mic_handling == "none" & as.character(input_original) %like% "^[<>][0-9]" &
paste0("MIC values with the operator '<' are all considered 'S' since capped_mic_handling = \"", capped_mic_handling, "\""), ((as.character(input_original) %like% "^<" & as.double(input_clean) > breakpoints_current$breakpoint_S) |
(as.character(input_original) %like% "^>" & as.double(input_clean) < breakpoints_current$breakpoint_R)),
paste0("Operators such as '<' and '>' were ignored since capped_mic_handling = \"", capped_mic_handling, "\"."),
""
),
"\n",
ifelse(method == "mic" & capped_mic_handling == "standard" & as.character(input_original) %like% "^[<][0-9]",
paste0("MIC values with the operator '<' are considered 'S' since capped_mic_handling = \"", capped_mic_handling, "\"."),
"" ""
), ),
"\n", "\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "inverse") & as.character(values_bak) %like% "^[>][0-9]", ifelse(method == "mic" & capped_mic_handling == "standard" & as.character(input_original) %like% "^[>][0-9]",
paste0("MIC values with the operator '>' are all considered 'R' since capped_mic_handling = \"", capped_mic_handling, "\""), paste0("MIC values with the operator '>' are considered 'R' since capped_mic_handling = \"", capped_mic_handling, "\"."),
"" ""
), ),
"\n", "\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "standard") & as.character(values_bak) %like% "^[><]=[0-9]" & as.double(values) > breakpoints_current$breakpoint_S & as.double(values) < breakpoints_current$breakpoint_R, ifelse(method == "mic" & capped_mic_handling == "lenient" & as.character(input_original) %like% "^[<]=?[0-9]",
paste0("MIC values within the breakpoint guideline range with the operator '<=' or '>=' are considered 'NI' (non-interpretable) since capped_mic_handling = \"", capped_mic_handling, "\""), paste0("MIC values with the operator '<' or '<=' are considered 'S' since capped_mic_handling = \"", capped_mic_handling, "\"."),
"" ""
), ),
"\n", "\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "standard") & as.character(values_bak) %like% "^<=[0-9]" & as.double(values) == breakpoints_current$breakpoint_R, ifelse(method == "mic" & capped_mic_handling == "lenient" & as.character(input_original) %like% "^[>]=?[0-9]",
paste0("MIC values at the R breakpoint with the operator '<=' are considered 'NI' (non-interpretable) since capped_mic_handling = \"", capped_mic_handling, "\""), paste0("MIC values with the operator '>' or '>=' are considered 'R' since capped_mic_handling = \"", capped_mic_handling, "\"."),
"" ""
), ),
"\n", "\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "standard") & as.character(values_bak) %like% "^>=[0-9]" & as.double(values) == breakpoints_current$breakpoint_S, ifelse(method == "mic" & capped_mic_handling == "conservative" & as.character(input_original) %like% "^[<>][0-9]" &
paste0("MIC values at the S breakpoint with the operator '>=' are considered 'NI' (non-interpretable) since capped_mic_handling = \"", capped_mic_handling, "\""), ((as.character(input_original) %like% "^<" & as.double(input_clean) > breakpoints_current$breakpoint_S) |
(as.character(input_original) %like% "^>" & as.double(input_clean) < breakpoints_current$breakpoint_R)),
paste0("MIC values are considered 'NI' (non-interpretable) if the true MIC could be at either side of the breakpoint and capped_mic_handling = \"", capped_mic_handling, "\"."),
""
),
"\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "standard") & as.character(input_original) %like% "^<=[0-9]" & as.double(input_clean) > breakpoints_current$breakpoint_S,
paste0("MIC values are considered 'NI' (non-interpretable) if the true MIC could be at either side of the breakpoint and capped_mic_handling = \"", capped_mic_handling, "\"."),
""
),
"\n",
ifelse(method == "mic" & capped_mic_handling %in% c("conservative", "standard") & as.character(input_original) %like% "^>=[0-9]" & as.double(input_clean) <= breakpoints_current$breakpoint_R,
paste0("MIC values are considered 'NI' (non-interpretable) if the true MIC could be at either side of the breakpoint and capped_mic_handling = \"", capped_mic_handling, "\"."),
"" ""
) )
) )
if (isTRUE(substitute_missing_r_breakpoint) && !is.na(breakpoints_current$breakpoint_S) && is.na(breakpoints_current$breakpoint_R)) { if (isTRUE(substitute_missing_r_breakpoint) && !is.na(breakpoints_current$breakpoint_S) && is.na(breakpoints_current$breakpoint_R)) {
# breakpoints_current only has 1 row at this moment # breakpoints_current only has 1 row at this moment
breakpoints_current$breakpoint_R <- breakpoints_current$breakpoint_S breakpoints_current$breakpoint_R <- breakpoints_current$breakpoint_S
notes_current <- paste0( notes_current <- paste0(
notes_current, "\n", notes_current, "\n",
ifelse(!is.na(breakpoints_current$breakpoint_S) & is.na(breakpoints_current$breakpoint_R), ifelse(!is.na(breakpoints_current$breakpoint_S) & is.na(breakpoints_current$breakpoint_R),
"NAs because of missing R breakpoints were substituted with R since substitute_missing_r_breakpoint = TRUE", "NAs because of missing R breakpoints were substituted with R since substitute_missing_r_breakpoint = TRUE.",
"" ""
) )
) )
@@ -1766,27 +1824,62 @@ as_sir_method <- function(method_short,
## actual interpretation ---- ## actual interpretation ----
if (method == "mic") { if (method == "mic") {
new_sir <- case_when_AMR( new_sir <- case_when_AMR(
is.na(values) ~ NA_sir_, is.na(input_clean) ~ NA_sir_,
capped_mic_handling %in% c("conservative", "inverse") & as.character(values_bak) %like% "^[<][0-9]" ~ as.sir("S"),
capped_mic_handling %in% c("conservative", "inverse") & as.character(values_bak) %like% "^[>][0-9]" ~ as.sir("R"), # "lenient" for any cap: force S/R
capped_mic_handling %in% c("conservative", "standard") & as.character(values_bak) %like% "^[><]=[0-9]" & as.double(values) > breakpoints_current$breakpoint_S & as.double(values) < breakpoints_current$breakpoint_R ~ as.sir("NI"), capped_mic_handling == "lenient" &
capped_mic_handling %in% c("conservative", "standard") & as.character(values_bak) %like% "^<=[0-9]" & as.double(values) == breakpoints_current$breakpoint_R ~ as.sir("NI"), as.character(input_original) %like% "^[<]=?[0-9]"
capped_mic_handling %in% c("conservative", "standard") & as.character(values_bak) %like% "^>=[0-9]" & as.double(values) == breakpoints_current$breakpoint_S ~ as.sir("NI"), ~ as.sir("S"),
values <= breakpoints_current$breakpoint_S ~ as.sir("S"), capped_mic_handling == "lenient" &
guideline_current %like% "EUCAST" & values > breakpoints_current$breakpoint_R ~ as.sir("R"), as.character(input_original) %like% "^[>]=?[0-9]"
guideline_current %like% "CLSI" & values >= breakpoints_current$breakpoint_R ~ as.sir("R"), ~ as.sir("R"),
# "standard" for < and >: force S/R
capped_mic_handling == "standard" &
as.character(input_original) %like% "^[<][0-9]"
~ as.sir("S"),
capped_mic_handling == "standard" &
as.character(input_original) %like% "^[>][0-9]"
~ as.sir("R"),
# "conservative" for < and >: NI if the true MIC could be on either side of a breakpoint
capped_mic_handling == "conservative" &
as.character(input_original) %like% "^[<][0-9]" &
as.double(input_clean) > breakpoints_current$breakpoint_S
~ as.sir("NI"),
capped_mic_handling == "conservative" &
as.character(input_original) %like% "^[>][0-9]" &
as.double(input_clean) < breakpoints_current$breakpoint_R
~ as.sir("NI"),
# both "conservative" and standard": only NI for <= and >= when the true MIC could be at either side of a breakpoint
capped_mic_handling %in% c("conservative", "standard") &
as.character(input_original) %like% "^<=[0-9]" &
as.double(input_clean) > breakpoints_current$breakpoint_S
~ as.sir("NI"),
capped_mic_handling %in% c("conservative", "standard") &
as.character(input_original) %like% "^>=[0-9]" &
as.double(input_clean) <= breakpoints_current$breakpoint_R
~ as.sir("NI"),
# otherwise: the normal (uncapped or ignored) interpretation
input_clean <= breakpoints_current$breakpoint_S ~ as.sir("S"),
guideline_current %like% "EUCAST" & input_clean > breakpoints_current$breakpoint_R ~ as.sir("R"),
guideline_current %like% "CLSI" & input_clean >= breakpoints_current$breakpoint_R ~ as.sir("R"),
# return "I" or "SDD" when breakpoints are in the middle # return "I" or "SDD" when breakpoints are in the middle
!is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == TRUE ~ as.sir("SDD"), !is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == TRUE ~ as.sir("SDD"),
!is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == FALSE ~ as.sir("I"), !is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == FALSE ~ as.sir("I"),
# and NA otherwise # and NA otherwise
TRUE ~ NA_sir_ TRUE ~ NA_sir_
) )
} else if (method == "disk") { } else if (method == "disk") {
new_sir <- case_when_AMR( new_sir <- case_when_AMR(
is.na(values) ~ NA_sir_, is.na(input_clean) ~ NA_sir_,
as.double(values) >= as.double(breakpoints_current$breakpoint_S) ~ as.sir("S"), as.double(input_clean) >= as.double(breakpoints_current$breakpoint_S) ~ as.sir("S"),
guideline_current %like% "EUCAST" & as.double(values) < as.double(breakpoints_current$breakpoint_R) ~ as.sir("R"), guideline_current %like% "EUCAST" & as.double(input_clean) < as.double(breakpoints_current$breakpoint_R) ~ as.sir("R"),
guideline_current %like% "CLSI" & as.double(values) <= as.double(breakpoints_current$breakpoint_R) ~ as.sir("R"), guideline_current %like% "CLSI" & as.double(input_clean) <= as.double(breakpoints_current$breakpoint_R) ~ as.sir("R"),
# return "I" or "SDD" when breakpoints are in the middle # return "I" or "SDD" when breakpoints are in the middle
!is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == TRUE ~ as.sir("SDD"), !is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == TRUE ~ as.sir("SDD"),
!is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == FALSE ~ as.sir("I"), !is.na(breakpoints_current$breakpoint_S) & !is.na(breakpoints_current$breakpoint_R) & breakpoints_current$is_SDD == FALSE ~ as.sir("I"),
@@ -1795,8 +1888,14 @@ as_sir_method <- function(method_short,
) )
} }
# rewrite S/R to WT/NWT if needed
if (isTRUE(as_wt_nwt)) {
new_sir[new_sir == "S"] <- "WT"
new_sir[new_sir == "R"] <- "NWT"
}
# write to verbose output # write to verbose output
notes_current <- trimws2(notes_current) notes_current <- gsub("\n\n", "\n", trimws2(notes_current), fixed = TRUE)
notes_current[notes_current == ""] <- NA_character_ notes_current[notes_current == ""] <- NA_character_
out <- data.frame( out <- data.frame(
# recycling 1 to 2 rows does not always seem to work, which is why vectorise_log_entry() was added # recycling 1 to 2 rows does not always seem to work, which is why vectorise_log_entry() was added
@@ -1806,11 +1905,11 @@ as_sir_method <- function(method_short,
ab_given = vectorise_log_entry(ab.bak[match(ab_current, df$ab)][1], length(rows)), ab_given = vectorise_log_entry(ab.bak[match(ab_current, df$ab)][1], length(rows)),
mo_given = vectorise_log_entry(mo.bak[match(mo_current, df$mo)][1], length(rows)), mo_given = vectorise_log_entry(mo.bak[match(mo_current, df$mo)][1], length(rows)),
host_given = vectorise_log_entry(host.bak[match(host_current, df$host)][1], length(rows)), host_given = vectorise_log_entry(host.bak[match(host_current, df$host)][1], length(rows)),
input_given = vectorise_log_entry(as.character(values_bak), length(rows)), input_given = vectorise_log_entry(as.character(input_original), length(rows)),
ab = vectorise_log_entry(breakpoints_current[, "ab", drop = TRUE], length(rows)), ab = vectorise_log_entry(breakpoints_current[, "ab", drop = TRUE], length(rows)),
mo = vectorise_log_entry(breakpoints_current[, "mo", drop = TRUE], length(rows)), mo = vectorise_log_entry(breakpoints_current[, "mo", drop = TRUE], length(rows)),
host = vectorise_log_entry(breakpoints_current[, "host", drop = TRUE], length(rows)), host = vectorise_log_entry(breakpoints_current[, "host", drop = TRUE], length(rows)),
input = vectorise_log_entry(as.character(values), length(rows)), input = vectorise_log_entry(as.character(input_clean), length(rows)),
outcome = vectorise_log_entry(as.sir(new_sir), length(rows)), outcome = vectorise_log_entry(as.sir(new_sir), length(rows)),
notes = font_stripstyle(notes_current), # vectorise_log_entry(paste0(font_stripstyle(notes_current), collapse = "\n"), length(rows)), notes = font_stripstyle(notes_current), # vectorise_log_entry(paste0(font_stripstyle(notes_current), collapse = "\n"), length(rows)),
guideline = vectorise_log_entry(guideline_current, length(rows)), guideline = vectorise_log_entry(guideline_current, length(rows)),
@@ -1845,7 +1944,7 @@ as_sir_method <- function(method_short,
# if (isTRUE(verbose) || length(notes) == 1 || NROW(AMR_env$sir_interpretation_history) == 0) { # if (isTRUE(verbose) || length(notes) == 1 || NROW(AMR_env$sir_interpretation_history) == 0) {
if (isTRUE(verbose)) { if (isTRUE(verbose)) {
for (i in seq_along(notes)) { for (i in seq_along(notes)) {
message(word_wrap(" ", AMR_env$bullet_icon, " ", notes[i], add_fn = font_black)) message(word_wrap(" ", AMR_env$bullet_icon, " ", notes[i]))
} }
} else { } else {
# message(word_wrap(" ", AMR_env$bullet_icon, " There were multiple notes. Print or View `sir_interpretation_history()` to examine them, or use `as.sir(..., verbose = TRUE)` next time to directly print them here.", add_fn = font_black)) # message(word_wrap(" ", AMR_env$bullet_icon, " There were multiple notes. Print or View `sir_interpretation_history()` to examine them, or use `as.sir(..., verbose = TRUE)` next time to directly print them here.", add_fn = font_black))
@@ -1889,7 +1988,7 @@ sir_interpretation_history <- function(clean = FALSE) {
#' @noRd #' @noRd
print.sir_log <- function(x, ...) { print.sir_log <- function(x, ...) {
if (NROW(x) == 0) { if (NROW(x) == 0) {
message_("No results to print. First run `as.sir()` on MIC values or disk diffusion zones (or on a `data.frame` containing any of these) to print a 'logbook' data set here.") message_("No results to print. First run {.help [{.fun as.sir}](AMR::as.sir)} on MIC values or disk diffusion zones (or on a {.cls data.frame} containing any of these) to print a 'logbook' data set here.")
return(invisible(NULL)) return(invisible(NULL))
} }
class(x) <- class(x)[class(x) != "sir_log"] class(x) <- class(x)[class(x) != "sir_log"]
@@ -1904,11 +2003,14 @@ pillar_shaft.sir <- function(x, ...) {
# colours will anyway not work when has_colour() == FALSE, # colours will anyway not work when has_colour() == FALSE,
# but then the indentation should also not be applied # but then the indentation should also not be applied
out[is.na(x)] <- font_grey(" NA") out[is.na(x)] <- font_grey(" NA")
out[x == "NI"] <- font_grey_bg(font_black(" NI "))
out[x == "S"] <- font_green_bg(" S ") out[x == "S"] <- font_green_bg(" S ")
out[x == "SDD"] <- font_green_lighter_bg(" SDD ")
out[x == "I"] <- font_orange_bg(" I ") out[x == "I"] <- font_orange_bg(" I ")
out[x == "SDD"] <- font_orange_bg(" SDD ")
out[x == "R"] <- font_rose_bg(" R ") out[x == "R"] <- font_rose_bg(" R ")
out[x == "NI"] <- font_grey_bg(font_black(" NI "))
out[x == "WT"] <- font_green_bg(font_black(" WT "))
out[x == "NWT"] <- font_rose_bg(font_black(" NWT "))
out[x == "NS"] <- font_rose_bg(font_black(" NS "))
} }
create_pillar_column(out, align = "left", width = 5) create_pillar_column(out, align = "left", width = 5)
} }
@@ -1966,33 +2068,18 @@ freq.sir <- function(x, ...) {
# this prevents the requirement for putting the dependency in Imports: # this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, sir) #' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, sir)
get_skimmers.sir <- function(column) { get_skimmers.sir <- function(column) {
# get the variable name 'skim_variable' # TODO add here in AMR 3.1.0 details about guideline
name_call <- function(.data) {
calls <- sys.calls()
frms <- sys.frames()
calls_txt <- vapply(calls, function(x) paste(deparse(x), collapse = ""), FUN.VALUE = character(1))
if (any(calls_txt %like% "skim_variable", na.rm = TRUE)) {
ind <- which(calls_txt %like% "skim_variable")[1L]
vars <- tryCatch(eval(parse(text = ".data$skim_variable$sir"), envir = frms[[ind]]),
error = function(e) NULL
)
tryCatch(ab_name(as.character(calls[[length(calls)]][[2]]), language = NULL, info = FALSE),
error = function(e) NA_character_
)
} else {
NA_character_
}
}
skimr::sfl( skimr::sfl(
skim_type = "sir", skim_type = "sir",
ab_name = name_call, # guideline = function(x) "EUCAST 2025", # or "Multiple"
count_R = count_R, # origin = function(x) "MIC", # or "Multiple"
count_S = count_susceptible, count_S = count_S,
count_I = count_I, count_I = count_I,
prop_R = ~ proportion_R(., minimum = 0), count_R = count_R,
prop_S = ~ susceptibility(., minimum = 0), prop_S = ~ round(proportion_S(., minimum = 0) * 100, 1),
prop_I = ~ proportion_I(., minimum = 0) prop_I = ~ round(proportion_I(., minimum = 0) * 100, 1),
prop_R = ~ round(proportion_R(., minimum = 0) * 100, 1),
hist = ~ skimr::inline_hist(as.double(stats::na.omit(.)), 3)
) )
} }
@@ -2020,9 +2107,9 @@ print.sir <- function(x, ...) {
#' @export #' @export
as.double.sir <- function(x, ...) { as.double.sir <- function(x, ...) {
dbls <- rep(NA_real_, length(x)) dbls <- rep(NA_real_, length(x))
dbls[x == "S"] <- 1 dbls[x %in% c("S", "WT")] <- 1
dbls[x %in% c("SDD", "I")] <- 2 dbls[x %in% c("I", "SDD")] <- 2
dbls[x == "R"] <- 3 dbls[x %in% c("R", "NWT", "NS")] <- 3
dbls dbls
} }
@@ -2140,10 +2227,10 @@ check_reference_data <- function(reference_data, .call_depth) {
class_sir <- vapply(FUN.VALUE = character(1), AMR::clinical_breakpoints, function(x) paste0("<", class(x), ">", collapse = " and ")) class_sir <- vapply(FUN.VALUE = character(1), AMR::clinical_breakpoints, function(x) paste0("<", class(x), ">", collapse = " and "))
class_ref <- vapply(FUN.VALUE = character(1), reference_data, function(x) paste0("<", class(x), ">", collapse = " and ")) class_ref <- vapply(FUN.VALUE = character(1), reference_data, function(x) paste0("<", class(x), ">", collapse = " and "))
if (!all(names(class_sir) == names(class_ref))) { if (!all(names(class_sir) == names(class_ref))) {
stop_("`reference_data` must have the same column names as the 'clinical_breakpoints' data set.", call = .call_depth) stop_("{.arg reference_data} must have the same column names as the 'clinical_breakpoints' data set.", call = .call_depth)
} }
if (!all(class_sir == class_ref)) { if (!all(class_sir == class_ref)) {
stop_("`reference_data` must be the same structure as the 'clinical_breakpoints' data set. Column '", names(class_ref[class_sir != class_ref][1]), "' is of class ", class_ref[class_sir != class_ref][1], ", but should be of class ", class_sir[class_sir != class_ref][1], ".", call = .call_depth) stop_("{.arg reference_data} must be the same structure as the 'clinical_breakpoints' data set. Column '", names(class_ref[class_sir != class_ref][1]), "' is of class ", class_ref[class_sir != class_ref][1], ", but should be of class ", class_sir[class_sir != class_ref][1], ".", call = .call_depth)
} }
} }
} }
+18 -14
View File
@@ -41,7 +41,7 @@ sir_calc <- function(...,
as_percent = FALSE, as_percent = FALSE,
only_all_tested = FALSE, only_all_tested = FALSE,
only_count = FALSE) { only_count = FALSE) {
meet_criteria(ab_result, allow_class = c("character", "numeric", "integer"), has_length = c(1:5)) meet_criteria(ab_result, allow_class = c("character", "sir"), has_length = seq_along(VALID_SIR_LEVELS), is_in = VALID_SIR_LEVELS)
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE) meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
meet_criteria(as_percent, allow_class = "logical", has_length = 1) meet_criteria(as_percent, allow_class = "logical", has_length = 1)
meet_criteria(only_all_tested, allow_class = "logical", has_length = 1) meet_criteria(only_all_tested, allow_class = "logical", has_length = 1)
@@ -117,6 +117,8 @@ sir_calc <- function(...,
print_warning <- FALSE print_warning <- FALSE
ab_result <- as.sir(ab_result) ab_result <- as.sir(ab_result)
denominator_vals <- levels(ab_result)
denominator_vals <- denominator_vals[denominator_vals != "NI"]
if (is.data.frame(x)) { if (is.data.frame(x)) {
sir_integrity_check <- character(0) sir_integrity_check <- character(0)
@@ -148,7 +150,7 @@ sir_calc <- function(...,
denominator <- sum(vapply(FUN.VALUE = logical(1), x_transposed, function(y) !(anyNA(y)))) denominator <- sum(vapply(FUN.VALUE = logical(1), x_transposed, function(y) !(anyNA(y))))
} else { } else {
# may contain NAs in any column # may contain NAs in any column
other_values <- setdiff(c(NA, levels(ab_result)), ab_result) other_values <- setdiff(c(NA, denominator_vals), ab_result)
if ("SDD" %in% ab_result && "SDD" %in% unlist(x_transposed) && message_not_thrown_before("sir_calc", only_count, ab_result, entire_session = TRUE)) { if ("SDD" %in% ab_result && "SDD" %in% unlist(x_transposed) && message_not_thrown_before("sir_calc", only_count, ab_result, entire_session = TRUE)) {
message_("Note that `", ifelse(only_count, "count", "proportion"), "_", ifelse("S" %in% ab_result, "S", ""), "I", ifelse("R" %in% ab_result, "R", ""), "()` will also include dose-dependent susceptibility, 'SDD'. This note will be shown once for this session.", as_note = FALSE) message_("Note that `", ifelse(only_count, "count", "proportion"), "_", ifelse("S" %in% ab_result, "S", ""), "I", ifelse("R" %in% ab_result, "R", ""), "()` will also include dose-dependent susceptibility, 'SDD'. This note will be shown once for this session.", as_note = FALSE)
} }
@@ -165,13 +167,13 @@ sir_calc <- function(...,
message_("Note that `", ifelse(only_count, "count", "proportion"), "_", ifelse("S" %in% ab_result, "S", ""), "I", ifelse("R" %in% ab_result, "R", ""), "()` will also include dose-dependent susceptibility, 'SDD'. This note will be shown once for this session.", as_note = FALSE) message_("Note that `", ifelse(only_count, "count", "proportion"), "_", ifelse("S" %in% ab_result, "S", ""), "I", ifelse("R" %in% ab_result, "R", ""), "()` will also include dose-dependent susceptibility, 'SDD'. This note will be shown once for this session.", as_note = FALSE)
} }
numerator <- sum(x %in% ab_result, na.rm = TRUE) numerator <- sum(x %in% ab_result, na.rm = TRUE)
denominator <- sum(x %in% levels(ab_result), na.rm = TRUE) denominator <- sum(x %in% denominator_vals, na.rm = TRUE)
} }
if (print_warning == TRUE) { if (print_warning == TRUE) {
if (message_not_thrown_before("sir_calc")) { if (message_not_thrown_before("sir_calc")) {
warning_("Increase speed by transforming to class 'sir' on beforehand:\n", warning_("Increase speed by transforming to class 'sir' on beforehand:\n",
" your_data %>% mutate_if(is_sir_eligible, as.sir)", highlight_code(" your_data %>% mutate_if(is_sir_eligible, as.sir)"),
call = FALSE call = FALSE
) )
} }
@@ -244,7 +246,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
translate_ab <- get_translate_ab(translate_ab) translate_ab <- get_translate_ab(translate_ab)
data.bak <- data data.bak <- data
# select only groups and antimicrobials # select only groups and antibiotics
if (is_null_or_grouped_tbl(data)) { if (is_null_or_grouped_tbl(data)) {
data_has_groups <- TRUE data_has_groups <- TRUE
groups <- get_group_names(data) groups <- get_group_names(data)
@@ -255,15 +257,17 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
} }
data <- as.data.frame(data, stringsAsFactors = FALSE) data <- as.data.frame(data, stringsAsFactors = FALSE)
if (isTRUE(combine_SI)) {
for (i in seq_len(ncol(data))) { for (i in seq_len(ncol(data))) {
if (is.sir(data[, i, drop = TRUE])) { # transform SIR columns
data[, i] <- as.character(data[, i, drop = TRUE]) if (is.sir(data[, i, drop = TRUE])) {
if ("SDD" %in% data[, i, drop = TRUE] && message_not_thrown_before("sir_calc_df", combine_SI, entire_session = TRUE)) { data[, i] <- as.character(as.sir(data[, i, drop = TRUE]))
message_("Note that `sir_calc_df()` will also count dose-dependent susceptibility, 'SDD', as 'SI' when `combine_SI = TRUE`. This note will be shown once for this session.", as_note = FALSE) data[which(data[, i, drop = TRUE] %in% c("S", "SDD", "WT")), i] <- "S"
} data[which(data[, i, drop = TRUE] %in% c("R", "NWT", "NS")), i] <- "R"
data[, i] <- gsub("(I|S|SDD)", "SI", data[, i, drop = TRUE]) if (isTRUE(combine_SI)) {
data[which(data[, i, drop = TRUE] %in% c("I", "S")), i] <- "SI"
} }
data[which(!data[, i, drop = TRUE] %in% c("S", "SI", "I", "R")), i] <- NA_character_
} }
} }
@@ -364,7 +368,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
} else { } else {
# don't use as.sir() here, as it would add the class 'sir' and we would like # don't use as.sir() here, as it would add the class 'sir' and we would like
# the same data structure as output, regardless of input # the same data structure as output, regardless of input
if (out$value[out$interpretation == "SDD"] > 0) { if (any(out$value[out$interpretation == "SDD"] > 0, na.rm = TRUE)) {
out$interpretation <- factor(out$interpretation, levels = c("S", "SDD", "I", "R"), ordered = TRUE) out$interpretation <- factor(out$interpretation, levels = c("S", "SDD", "I", "R"), ordered = TRUE)
} else { } else {
out$interpretation <- factor(out$interpretation, levels = c("S", "I", "R"), ordered = TRUE) out$interpretation <- factor(out$interpretation, levels = c("S", "I", "R"), ordered = TRUE)
+1 -1
View File
@@ -47,6 +47,6 @@ sir_df <- function(data,
combine_SI = combine_SI, combine_SI = combine_SI,
confidence_level = confidence_level confidence_level = confidence_level
), ),
error = function(e) stop_(gsub("in sir_calc_df(): ", "", e$message, fixed = TRUE), call = -5) error = function(e) stop_(gsub("in sir_calc_df(): ", "", conditionMessage(e), fixed = TRUE), call = -5)
) )
} }
BIN
View File
Binary file not shown.
+284
View File
@@ -0,0 +1,284 @@
#' AMR Extensions for Tidymodels
#'
#' This family of functions allows using AMR-specific data types such as `<sir>` and `<mic>` inside `tidymodels` pipelines.
#' @inheritParams recipes::step_center
#' @details
#' You can read more in our online [AMR with tidymodels introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
#'
#' Tidyselect helpers include:
#' - [all_sir()] and [all_sir_predictors()] to select [`<sir>`][as.sir()] columns
#' - [all_mic()] and [all_mic_predictors()] to select [`<mic>`][as.mic()] columns
#' - [all_disk()] and [all_disk_predictors()] to select [`<disk>`][as.disk()] columns
#'
#' Pre-processing pipeline steps include:
#' - [step_sir_numeric()] to convert SIR columns to numeric (via `as.numeric()`), to be used with [all_sir_predictors()]: `"S"` = 1, `"I"`/`"SDD"` = 2, `"R"` = 3. All other values are rendered `NA`. Keep this in mind for further processing, especially if the model does not allow for `NA` values.
#' - [step_mic_log2()] to convert MIC columns to numeric (via `as.numeric()`) and apply a log2 transform, to be used with [all_mic_predictors()]
#'
#' These steps integrate with `recipes::recipe()` and work like standard preprocessing steps. They are useful for preparing data for modelling, especially with classification models.
#' @seealso [recipes::recipe()], [as.sir()], [as.mic()], [as.disk()]
#' @name amr-tidymodels
#' @keywords internal
#' @export
#' @examples
#' if (require("tidymodels")) {
#'
#' # The below approach formed the basis for this paper: DOI 10.3389/fmicb.2025.1582703
#' # Presence of ESBL genes was predicted based on raw MIC values.
#'
#'
#' # example data set in the AMR package
#' esbl_isolates
#'
#' # Prepare a binary outcome and convert to ordered factor
#' data <- esbl_isolates %>%
#' mutate(esbl = factor(esbl, levels = c(FALSE, TRUE), ordered = TRUE))
#'
#' # Split into training and testing sets
#' split <- initial_split(data)
#' training_data <- training(split)
#' testing_data <- testing(split)
#'
#' # Create and prep a recipe with MIC log2 transformation
#' mic_recipe <- recipe(esbl ~ ., data = training_data) %>%
#'
#' # Optionally remove non-predictive variables
#' remove_role(genus, old_role = "predictor") %>%
#'
#' # Apply the log2 transformation to all MIC predictors
#' step_mic_log2(all_mic_predictors()) %>%
#'
#' # And apply the preparation steps
#' prep()
#'
#' # View prepped recipe
#' mic_recipe
#'
#' # Apply the recipe to training and testing data
#' out_training <- bake(mic_recipe, new_data = NULL)
#' out_testing <- bake(mic_recipe, new_data = testing_data)
#'
#' # Fit a logistic regression model
#' fitted <- logistic_reg(mode = "classification") %>%
#' set_engine("glm") %>%
#' fit(esbl ~ ., data = out_training)
#'
#' # Generate predictions on the test set
#' predictions <- predict(fitted, out_testing) %>%
#' bind_cols(out_testing)
#'
#' # Evaluate predictions using standard classification metrics
#' our_metrics <- metric_set(accuracy,
#' recall,
#' precision,
#' sensitivity,
#' specificity,
#' ppv,
#' npv)
#' metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
#'
#' # Show performance
#' metrics
#' }
all_sir <- function() {
x <- tidymodels_amr_select(class = "sir")
names(x)
}
#' @rdname amr-tidymodels
#' @export
all_sir_predictors <- function() {
x <- tidymodels_amr_select(class = "sir")
intersect(x, recipes::has_role("predictor"))
}
#' @rdname amr-tidymodels
#' @export
all_mic <- function() {
x <- tidymodels_amr_select(class = "mic")
names(x)
}
#' @rdname amr-tidymodels
#' @export
all_mic_predictors <- function() {
x <- tidymodels_amr_select(class = "mic")
intersect(x, recipes::has_role("predictor"))
}
#' @rdname amr-tidymodels
#' @export
all_disk <- function() {
x <- tidymodels_amr_select(class = "disk")
names(x)
}
#' @rdname amr-tidymodels
#' @export
all_disk_predictors <- function() {
x <- tidymodels_amr_select(class = "disk")
intersect(x, recipes::has_role("predictor"))
}
#' @rdname amr-tidymodels
#' @export
step_mic_log2 <- function(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
skip = FALSE,
id = recipes::rand_id("mic_log2")) {
recipes::add_step(
recipe,
step_mic_log2_new(
terms = rlang::enquos(...),
role = role,
trained = trained,
columns = columns,
skip = skip,
id = id
)
)
}
step_mic_log2_new <- function(terms, role, trained, columns, skip, id) {
recipes::step(
subclass = "mic_log2",
terms = terms,
role = role,
trained = trained,
columns = columns,
skip = skip,
id = id
)
}
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::prep, step_mic_log2)
prep.step_mic_log2 <- function(x, training, info = NULL, ...) {
col_names <- recipes::recipes_eval_select(x$terms, training, info)
recipes::check_type(training[, col_names], types = "ordered")
step_mic_log2_new(
terms = x$terms,
role = x$role,
trained = TRUE,
columns = col_names,
skip = x$skip,
id = x$id
)
}
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::bake, step_mic_log2)
bake.step_mic_log2 <- function(object, new_data, ...) {
recipes::check_new_data(object$columns, object, new_data)
for (col in object$columns) {
new_data[[col]] <- log2(as.numeric(as.mic(new_data[[col]])))
}
new_data
}
#' @export
print.step_mic_log2 <- function(x, width = max(20, options()$width - 35), ...) {
title <- "Log2 transformation of MIC columns"
recipes::print_step(x$columns, x$terms, x$trained, title, width)
}
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_mic_log2)
tidy.step_mic_log2 <- function(x, ...) {
if (recipes::is_trained(x)) {
res <- tibble::tibble(terms = x$columns)
} else {
res <- tibble::tibble(terms = recipes::sel2char(x$terms))
}
res$id <- x$id
res
}
#' @rdname amr-tidymodels
#' @export
step_sir_numeric <- function(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
skip = FALSE,
id = recipes::rand_id("sir_numeric")) {
recipes::add_step(
recipe,
step_sir_numeric_new(
terms = rlang::enquos(...),
role = role,
trained = trained,
columns = columns,
skip = skip,
id = id
)
)
}
step_sir_numeric_new <- function(terms, role, trained, columns, skip, id) {
recipes::step(
subclass = "sir_numeric",
terms = terms,
role = role,
trained = trained,
columns = columns,
skip = skip,
id = id
)
}
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::prep, step_sir_numeric)
prep.step_sir_numeric <- function(x, training, info = NULL, ...) {
col_names <- recipes::recipes_eval_select(x$terms, training, info)
recipes::check_type(training[, col_names], types = "ordered")
step_sir_numeric_new(
terms = x$terms,
role = x$role,
trained = TRUE,
columns = col_names,
skip = x$skip,
id = x$id
)
}
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::bake, step_sir_numeric)
bake.step_sir_numeric <- function(object, new_data, ...) {
recipes::check_new_data(object$columns, object, new_data)
for (col in object$columns) {
new_data[[col]] <- as.numeric(as.sir(new_data[[col]]))
}
new_data
}
#' @export
print.step_sir_numeric <- function(x, width = max(20, options()$width - 35), ...) {
title <- "Numeric transformation of SIR columns"
recipes::print_step(x$columns, x$terms, x$trained, title, width)
}
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_sir_numeric)
tidy.step_sir_numeric <- function(x, ...) {
if (recipes::is_trained(x)) {
res <- tibble::tibble(terms = x$columns)
} else {
res <- tibble::tibble(terms = recipes::sel2char(x$terms))
}
res$id <- x$id
res
}
tidymodels_amr_select <- function(class) {
df <- get_current_data()
ind <- which(
vapply(
FUN.VALUE = logical(1),
df,
function(x) inherits(x, class),
USE.NAMES = TRUE
),
useNames = TRUE
)
ind
}
+28 -15
View File
@@ -249,7 +249,7 @@ translate_into_language <- function(from,
any_form_in_patterns <- tryCatch( any_form_in_patterns <- tryCatch(
any(from_unique %like% paste0("(", paste(gsub(" +\\(.*", "", df_trans$pattern), collapse = "|"), ")")), any(from_unique %like% paste0("(", paste(gsub(" +\\(.*", "", df_trans$pattern), collapse = "|"), ")")),
error = function(e) { error = function(e) {
warning_("Translation not possible. Please create an issue at ", font_url("https://github.com/msberends/AMR/issues"), ". Many thanks!") warning_("Translation not possible. Please create an issue at {.url https://github.com/msberends/AMR/issues}. Many thanks!")
return(FALSE) return(FALSE)
} }
) )
@@ -258,19 +258,32 @@ translate_into_language <- function(from,
return(from) return(from)
} }
lapply( if (only_affect_ab_names == TRUE) {
# starting with longest pattern, since more general translations are shorter, such as 'Group' df_trans$pattern[df_trans$regular_expr == TRUE] <- paste0(df_trans$pattern[df_trans$regular_expr == TRUE], "$")
order(nchar(df_trans$pattern), decreasing = TRUE), df_trans$pattern[df_trans$regular_expr == TRUE] <- gsub("$$", "$", df_trans$pattern[df_trans$regular_expr == TRUE], fixed = TRUE)
function(i) { }
from_unique_translated <<- gsub(
pattern = df_trans$pattern[i], # non-regex part
replacement = df_trans[i, lang, drop = TRUE], translate_exec <- function(term) {
x = from_unique_translated, # sort trans file on length of pattern
ignore.case = !df_trans$case_sensitive[i] & df_trans$regular_expr[i], trns <- df_trans[order(nchar(df_trans$pattern), decreasing = TRUE), ]
fixed = !df_trans$regular_expr[i], for (i in seq_len(nrow(trns))) {
perl = df_trans$regular_expr[i] term <- gsub(
pattern = trns$pattern[i],
replacement = trns[i, lang, drop = TRUE],
x = term,
ignore.case = !trns$case_sensitive[i] & trns$regular_expr[i],
fixed = !trns$regular_expr[i],
perl = trns$regular_expr[i],
) )
} }
term
}
from_unique_translated[order(nchar(from_unique_translated), decreasing = TRUE)] <- vapply(
FUN.VALUE = character(1),
USE.NAMES = FALSE,
from_unique_translated[order(nchar(from_unique_translated), decreasing = TRUE)],
translate_exec
) )
# force UTF-8 for diacritics # force UTF-8 for diacritics
@@ -280,11 +293,11 @@ translate_into_language <- function(from,
out <- from_unique_translated[match(from.bak, from_unique)] out <- from_unique_translated[match(from.bak, from_unique)]
if (!identical(from.bak, out) && get_AMR_locale() == lang && is.null(getOption("AMR_locale", default = NULL)) && message_not_thrown_before("translation", entire_session = TRUE) && interactive()) { if (!identical(from.bak, out) && get_AMR_locale() == lang && is.null(getOption("AMR_locale", default = NULL)) && message_not_thrown_before("translation", entire_session = TRUE) && interactive()) {
message(word_wrap( message(font_blue(word_wrap(
"Assuming the ", LANGUAGES_SUPPORTED_NAMES[[lang]]$exonym, " language (", "Assuming the ", LANGUAGES_SUPPORTED_NAMES[[lang]]$exonym, " language (",
LANGUAGES_SUPPORTED_NAMES[[lang]]$endonym, ") for the AMR package. See `set_AMR_locale()` to change this or to silence this once-per-session note.", LANGUAGES_SUPPORTED_NAMES[[lang]]$endonym, ") for the AMR package. See `set_AMR_locale()` to change this or to silence this once-per-session note.",
add_fn = list(font_blue), as_note = TRUE as_note = TRUE
)) )))
} }
out out
-1
View File
@@ -30,7 +30,6 @@
# These are all S3 implementations for the vctrs package, # These are all S3 implementations for the vctrs package,
# that is used internally by tidyverse packages such as dplyr. # that is used internally by tidyverse packages such as dplyr.
# They are to convert AMR-specific classes to bare characters and integers. # They are to convert AMR-specific classes to bare characters and integers.
# All of them will be exported using s3_register() in R/zzz.R when loading the package.
# see https://github.com/tidyverse/dplyr/issues/5955 why this is required # see https://github.com/tidyverse/dplyr/issues/5955 why this is required
+1 -1
View File
@@ -124,7 +124,7 @@ deprecation_warning <- function(old = NULL, new = NULL, fn = NULL, extra_msg = N
". The old name will be removed in future version, so please update your code.", ". The old name will be removed in future version, so please update your code.",
ifelse(type == "argument", ifelse(type == "argument",
". While the old argument still works, it will be removed in a future version, so please update your code.", ". While the old argument still works, it will be removed in a future version, so please update your code.",
" and will be removed in a future version, see `?AMR-deprecated`." " and will be removed in a future version, see {.topic [AMR-deprecated](AMR::AMR-deprecated)}."
) )
), ),
ifelse(!is.null(extra_msg), ifelse(!is.null(extra_msg),
+10 -2
View File
@@ -115,6 +115,14 @@ AMR_env$cross_icon <- if (isTRUE(base::l10n_info()$`UTF-8`)) "\u00d7" else "x"
} }
.onAttach <- function(libname, pkgname) { .onAttach <- function(libname, pkgname) {
if (interactive() && is.null(getOption("AMR_guideline"))) {
packageStartupMessage(
word_wrap(
"Assuming ", AMR::clinical_breakpoints$guideline[1], " as the default AMR guideline, see `?AMR-options` to change this."
)
)
}
# if custom ab option is available, load it # if custom ab option is available, load it
if (!is.null(getOption("AMR_custom_ab")) && file.exists(getOption("AMR_custom_ab", default = ""))) { if (!is.null(getOption("AMR_custom_ab")) && file.exists(getOption("AMR_custom_ab", default = ""))) {
if (getOption("AMR_custom_ab") %unlike% "[.]rds$") { if (getOption("AMR_custom_ab") %unlike% "[.]rds$") {
@@ -127,7 +135,7 @@ AMR_env$cross_icon <- if (isTRUE(base::l10n_info()$`UTF-8`)) "\u00d7" else "x"
suppressWarnings(suppressMessages(add_custom_antimicrobials(x))) suppressWarnings(suppressMessages(add_custom_antimicrobials(x)))
packageStartupMessage("OK.") packageStartupMessage("OK.")
}, },
error = function(e) packageStartupMessage("Failed: ", e$message) error = function(e) packageStartupMessage("Failed: ", conditionMessage(e))
) )
} }
} }
@@ -143,7 +151,7 @@ AMR_env$cross_icon <- if (isTRUE(base::l10n_info()$`UTF-8`)) "\u00d7" else "x"
suppressWarnings(suppressMessages(add_custom_microorganisms(x))) suppressWarnings(suppressMessages(add_custom_microorganisms(x)))
packageStartupMessage("OK.") packageStartupMessage("OK.")
}, },
error = function(e) packageStartupMessage("Failed: ", e$message) error = function(e) packageStartupMessage("Failed: ", conditionMessage(e))
) )
} }
} }
+4 -1
View File
@@ -49,8 +49,11 @@ To install the latest 'beta' version:
```{r, eval = FALSE} ```{r, eval = FALSE}
install.packages("AMR", repos = "beta.amr-for-r.org") install.packages("AMR", repos = "beta.amr-for-r.org")
```
# if this does not work, try to install directly from GitHub using the 'remotes' package: If this does not work, try to install directly from GitHub using the `remotes` package:
```{r, eval = FALSE}
remotes::install_github("msberends/AMR") remotes::install_github("msberends/AMR")
``` ```
+5 -1
View File
@@ -58,8 +58,12 @@ To install the latest beta version:
``` r ``` r
install.packages("AMR", repos = "beta.amr-for-r.org") install.packages("AMR", repos = "beta.amr-for-r.org")
```
# if this does not work, try to install directly from GitHub using the 'remotes' package: If this does not work, try to install directly from GitHub using the
`remotes` package:
``` r
remotes::install_github("msberends/AMR") remotes::install_github("msberends/AMR")
``` ```
+6 -3
View File
@@ -234,6 +234,7 @@ reference:
- "`antimicrobials`" - "`antimicrobials`"
- "`clinical_breakpoints`" - "`clinical_breakpoints`"
- "`example_isolates`" - "`example_isolates`"
- "`esbl_isolates`"
- "`microorganisms.codes`" - "`microorganisms.codes`"
- "`microorganisms.groups`" - "`microorganisms.groups`"
- "`intrinsic_resistant`" - "`intrinsic_resistant`"
@@ -244,12 +245,14 @@ reference:
- title: "Other: miscellaneous functions" - title: "Other: miscellaneous functions"
desc: > desc: >
These functions are mostly for internal use, but some of Miscellaneous functions that support various parts of an AMR analysis,
them may also be suitable for your analysis. Especially the such as working with ages, joining tables, principal component analysis,
'like' function can be useful: `if (x %like% y) {...}`. and other utilities. Especially the 'like' function can be useful:
`if (x %like% y) {...}`.
contents: contents:
- "`age_groups`" - "`age_groups`"
- "`age`" - "`age`"
- "`amr_course`"
- "`export_ncbi_biosample`" - "`export_ncbi_biosample`"
- "`availability`" - "`availability`"
- "`get_AMR_locale`" - "`get_AMR_locale`"
+2
View File
@@ -1,3 +1,5 @@
This version is a bugfix release (v3.0.1) following the release of v3.0.0 in June 2025.
As with all previous >20 releases, some CHECKs on `oldrel` may return a `NOTE` for narrowly exceeding the installation size limit. This has been reduced to a minimum in prior coordination with CRAN maintainers and currently returns only an `INFO` on `release` and `devel`. As with all previous >20 releases, some CHECKs on `oldrel` may return a `NOTE` for narrowly exceeding the installation size limit. This has been reduced to a minimum in prior coordination with CRAN maintainers and currently returns only an `INFO` on `release` and `devel`.
We treat this as a high-impact package: it was published in the *Journal of Statistical Software* (2022), is listed in the CRAN Task View "Epidemiology", and (based on cranlogs download statistics) is used globally. If there is anything to address, we would appreciate being informed before archiving the current version. We conduct extensive automated unit testing and have no indication of unresolved issues. We treat this as a high-impact package: it was published in the *Journal of Statistical Software* (2022), is listed in the CRAN Task View "Epidemiology", and (based on cranlogs download statistics) is used globally. If there is anything to address, we would appreciate being informed before archiving the current version. We conduct extensive automated unit testing and have no indication of unresolved issues.
+40 -33
View File
@@ -56,7 +56,8 @@ os.makedirs(r_lib_path, exist_ok=True)
os.environ['R_LIBS_SITE'] = r_lib_path os.environ['R_LIBS_SITE'] = r_lib_path
from rpy2 import robjects from rpy2 import robjects
from rpy2.robjects import pandas2ri from rpy2.robjects.conversion import localconverter
from rpy2.robjects import default_converter, numpy2ri, pandas2ri
from rpy2.robjects.packages import importr, isinstalled from rpy2.robjects.packages import importr, isinstalled
# Import base and utils # Import base and utils
@@ -94,27 +95,26 @@ if r_amr_version != python_amr_version:
print(f"AMR: Setting up R environment and AMR datasets...", flush=True) print(f"AMR: Setting up R environment and AMR datasets...", flush=True)
# Activate the automatic conversion between R and pandas DataFrames # Activate the automatic conversion between R and pandas DataFrames
pandas2ri.activate() with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
# example_isolates
example_isolates = robjects.r('''
df <- AMR::example_isolates
df[] <- lapply(df, function(x) {
if (inherits(x, c("Date", "POSIXt", "factor"))) {
as.character(x)
} else {
x
}
})
df <- df[, !sapply(df, is.list)]
df
''')
example_isolates['date'] = pd.to_datetime(example_isolates['date'])
# example_isolates # microorganisms
example_isolates = pandas2ri.rpy2py(robjects.r(''' microorganisms = robjects.r('AMR::microorganisms[, !sapply(AMR::microorganisms, is.list)]')
df <- AMR::example_isolates antimicrobials = robjects.r('AMR::antimicrobials[, !sapply(AMR::antimicrobials, is.list)]')
df[] <- lapply(df, function(x) { clinical_breakpoints = robjects.r('AMR::clinical_breakpoints[, !sapply(AMR::clinical_breakpoints, is.list)]')
if (inherits(x, c("Date", "POSIXt", "factor"))) {
as.character(x)
} else {
x
}
})
df <- df[, !sapply(df, is.list)]
df
'''))
example_isolates['date'] = pd.to_datetime(example_isolates['date'])
# microorganisms
microorganisms = pandas2ri.rpy2py(robjects.r('AMR::microorganisms[, !sapply(AMR::microorganisms, is.list)]'))
antimicrobials = pandas2ri.rpy2py(robjects.r('AMR::antimicrobials[, !sapply(AMR::antimicrobials, is.list)]'))
clinical_breakpoints = pandas2ri.rpy2py(robjects.r('AMR::clinical_breakpoints[, !sapply(AMR::clinical_breakpoints, is.list)]'))
base.options(warn = 0) base.options(warn = 0)
@@ -129,16 +129,15 @@ echo "from .datasets import clinical_breakpoints" >> $init_file
# Write header to the functions Python file, including the convert_to_python function # Write header to the functions Python file, including the convert_to_python function
cat <<EOL > "$functions_file" cat <<EOL > "$functions_file"
import functools
import rpy2.robjects as robjects import rpy2.robjects as robjects
from rpy2.robjects.packages import importr from rpy2.robjects.packages import importr
from rpy2.robjects.vectors import StrVector, FactorVector, IntVector, FloatVector, DataFrame from rpy2.robjects.vectors import StrVector, FactorVector, IntVector, FloatVector, DataFrame
from rpy2.robjects import pandas2ri from rpy2.robjects.conversion import localconverter
from rpy2.robjects import default_converter, numpy2ri, pandas2ri
import pandas as pd import pandas as pd
import numpy as np import numpy as np
# Activate automatic conversion between R data frames and pandas data frames
pandas2ri.activate()
# Import the AMR R package # Import the AMR R package
amr_r = importr('AMR') amr_r = importr('AMR')
@@ -156,10 +155,8 @@ def convert_to_python(r_output):
return list(r_output) # Convert to a Python list of integers or floats return list(r_output) # Convert to a Python list of integers or floats
# Check if it's a pandas-compatible R data frame # Check if it's a pandas-compatible R data frame
elif isinstance(r_output, pd.DataFrame): elif isinstance(r_output, (pd.DataFrame, DataFrame)):
return r_output # Return as pandas DataFrame (already converted by pandas2ri) return r_output # Return as pandas DataFrame (already converted by pandas2ri)
elif isinstance(r_output, DataFrame):
return pandas2ri.rpy2py(r_output) # Return as pandas DataFrame
# Check if the input is a NumPy array and has a string data type # Check if the input is a NumPy array and has a string data type
if isinstance(r_output, np.ndarray) and np.issubdtype(r_output.dtype, np.str_): if isinstance(r_output, np.ndarray) and np.issubdtype(r_output.dtype, np.str_):
@@ -167,6 +164,15 @@ def convert_to_python(r_output):
# Fall-back # Fall-back
return r_output return r_output
def r_to_python(r_func):
"""Decorator that runs an rpy2 function under a localconverter
and then applies convert_to_python to its output."""
@functools.wraps(r_func)
def wrapper(*args, **kwargs):
with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
return convert_to_python(r_func(*args, **kwargs))
return wrapper
EOL EOL
# Directory where the .Rd files are stored (update path as needed) # Directory where the .Rd files are stored (update path as needed)
@@ -246,11 +252,12 @@ for rd_file in "$rd_dir"/*.Rd; do
gsub("FALSE", "False", func_args) gsub("FALSE", "False", func_args)
gsub("NULL", "None", func_args) gsub("NULL", "None", func_args)
# Write the Python function definition to the output file # Write the Python function definition to the output file, using decorator
print "def " func_name_py "(" func_args "):" >> "'"$functions_file"'" print "@r_to_python" >> "'"$functions_file"'"
print " \"\"\"Please see our website of the R package for the full manual: https://amr-for-r.org\"\"\"" >> "'"$functions_file"'" print "def " func_name_py "(" func_args "):" >> "'"$functions_file"'"
print " return convert_to_python(amr_r." func_name_py "(" func_args "))" >> "'"$functions_file"'" print " \"\"\"Please see our website of the R package for the full manual: https://amr-for-r.org\"\"\"" >> "'"$functions_file"'"
print " return amr_r." func_name_py "(" func_args ")" >> "'"$functions_file"'"
print "from .functions import " func_name_py >> "'"$init_file"'" print "from .functions import " func_name_py >> "'"$init_file"'"
} }
' "$rd_file" ' "$rd_file"
+170 -18
View File
@@ -366,9 +366,12 @@ pre_commit_lst$MO_RELEVANT_GENERA <- c(
# antibiotic groups # antibiotic groups
# (these will also be used for eucast_rules() and understanding data-raw/eucast_rules.tsv) # (these will also be used for eucast_rules() and understanding data-raw/eucast_rules.tsv)
pre_commit_lst$AB_AMINOGLYCOSIDES <- antimicrobials %>% pre_commit_lst$AB_AMINOGLYCOSIDES <- antimicrobials %>%
filter(group %like% "aminoglycoside") %>% filter(group %like% "aminoglycoside|paromomycin|spectinomycin") %>%
pull(ab)
pre_commit_lst$AB_AMINOPENICILLINS <- as.ab(c("AMP", "AMX", "AMC"))
pre_commit_lst$AB_AMINOCOUMARINS <- antimicrobials %>%
filter(name %like% "novobiocin|clorobiocin") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_AMINOPENICILLINS <- as.ab(c("AMP", "AMX"))
pre_commit_lst$AB_ANTIFUNGALS <- antimicrobials %>% pre_commit_lst$AB_ANTIFUNGALS <- antimicrobials %>%
filter(group %like% "antifungal") %>% filter(group %like% "antifungal") %>%
pull(ab) pull(ab)
@@ -397,26 +400,28 @@ pre_commit_lst$AB_CEPHALOSPORINS_5TH <- antimicrobials %>%
filter(group %like% "cephalosporin.*5") %>% filter(group %like% "cephalosporin.*5") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_CEPHALOSPORINS_EXCEPT_CAZ <- pre_commit_lst$AB_CEPHALOSPORINS[pre_commit_lst$AB_CEPHALOSPORINS != "CAZ"] pre_commit_lst$AB_CEPHALOSPORINS_EXCEPT_CAZ <- pre_commit_lst$AB_CEPHALOSPORINS[pre_commit_lst$AB_CEPHALOSPORINS != "CAZ"]
pre_commit_lst$AB_FLUOROQUINOLONES <- antimicrobials %>%
# see DOI 10.23937/2378-3656/1410369, more specifically this table: https://www.clinmedjournals.org/articles/cmrcr/cmrcr-8-369-table1.html
filter((group %like% "quinolone" | atc_group1 %like% "quinolone" | atc_group2 %like% "quinolone") & name %unlike% " acid|nalidixic|cinoxacin|flumequine|oxolinic|piromidic|pipemidic|rosoxacin") %>%
pull(ab)
pre_commit_lst$AB_GLYCOPEPTIDES <- antimicrobials %>% pre_commit_lst$AB_GLYCOPEPTIDES <- antimicrobials %>%
filter(group %like% "glycopeptide") %>% filter(group %like% "glycopeptide") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_FUSIDANES <- antimicrobials %>%
filter(name %like% "fusi") %>%
pull(ab)
pre_commit_lst$AB_IONOPHORES<- antimicrobials %>%
filter(name %like% "alamethicin|beauvericin|calcimycin|chloroquine|clioquinol|diiodohydroxyquinoline|dithiocarbamates|enniatin|epigallocatechin|gramicidin|hinokitiol|ionomycin|laidlomycin|lasalocid|maduramicin|monensin|narasin|nigericin|nonactin|nystatin|pyrazole|pyrithione|quercetin|salinomycin|semduramicin|valinomycin|zincophorin") %>%
pull(ab)
pre_commit_lst$AB_ISOXAZOLYLPENICILLINS <- antimicrobials %>% pre_commit_lst$AB_ISOXAZOLYLPENICILLINS <- antimicrobials %>%
filter(name %like% "oxacillin|cloxacillin|dicloxacillin|flucloxacillin|meth?icillin") %>% filter(name %like% "oxacillin|cloxacillin|dicloxacillin|flucloxacillin|meth?icillin") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_LIPOGLYCOPEPTIDES <- as.ab(c("DAL", "ORI", "TLV")) # dalba/orita/tela pre_commit_lst$AB_LIPOGLYCOPEPTIDES <- as.ab(c("DAL", "ORI", "TLV")) # dalba/orita/tela
pre_commit_lst$AB_GLYCOPEPTIDES_EXCEPT_LIPO <- pre_commit_lst$AB_GLYCOPEPTIDES[!pre_commit_lst$AB_GLYCOPEPTIDES %in% pre_commit_lst$AB_LIPOGLYCOPEPTIDES] pre_commit_lst$AB_GLYCOPEPTIDES_EXCEPT_LIPO <- pre_commit_lst$AB_GLYCOPEPTIDES[!pre_commit_lst$AB_GLYCOPEPTIDES %in% pre_commit_lst$AB_LIPOGLYCOPEPTIDES]
pre_commit_lst$AB_LINCOSAMIDES <- antimicrobials %>% pre_commit_lst$AB_LINCOSAMIDES <- antimicrobials %>%
filter(atc_group2 %like% "lincosamide" | (group %like% "lincosamide" & is.na(atc_group2) & name %like% "^(pirlimycin)" & name %unlike% "screening|inducible")) %>% filter(atc_group2 %like% "lincosamide" | (group %like% "lincosamide" & is.na(atc_group2) & name %like% "^(pirlimycin|clinda)")) %>%
pull(ab) pull(ab)
pre_commit_lst$AB_MACROLIDES <- antimicrobials %>% pre_commit_lst$AB_MACROLIDES <- antimicrobials %>%
filter(atc_group2 %like% "macrolide" | (group %like% "macrolide" & is.na(atc_group2) & name %like% "^(acetylmidecamycin|acetylspiramycin|gamith?romycin|kitasamycin|meleumycin|nafith?romycin|solith?romycin|tildipirosin|tilmicosin|tulath?romycin|tylosin|tylvalosin)" & name %unlike% "screening|inducible")) %>% filter(atc_group2 %like% "macrolide" | (group %like% "macrolide" & is.na(atc_group2)) | name %like% "^(acetylmidecamycin|acetylspiramycin|gamith?romycin|kitasamycin|meleumycin|nafith?romycin|primycin|solith?romycin|tildipirosin|tilmicosin|tulath?romycin|tylosin|tylvalosin)") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_MONOBACTAMS <- antimicrobials %>% pre_commit_lst$AB_MONOBACTAMS <- antimicrobials %>%
filter(group %like% "monobactam") %>% filter(group %like% "monobactam" | name %like% "aztreonam|carumonam|tigemonam") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_NITROFURANS <- antimicrobials %>% pre_commit_lst$AB_NITROFURANS <- antimicrobials %>%
filter(name %like% "^furaz|nitrofura" | atc_group2 %like% "nitrofuran") %>% filter(name %like% "^furaz|nitrofura" | atc_group2 %like% "nitrofuran") %>%
@@ -427,39 +432,157 @@ pre_commit_lst$AB_OXAZOLIDINONES <- antimicrobials %>%
pre_commit_lst$AB_PENICILLINS <- antimicrobials %>% pre_commit_lst$AB_PENICILLINS <- antimicrobials %>%
filter(group %like% "penicillin" & !(name %unlike% "/" & name %like% ".*bactam$")) %>% filter(group %like% "penicillin" & !(name %unlike% "/" & name %like% ".*bactam$")) %>%
pull(ab) pull(ab)
pre_commit_lst$AB_PEPTIDES <- antimicrobials %>%
filter(ab %in% pre_commit_lst$AB_GLYCOPEPTIDES | name %like% "thiostrepton|actinomycin|bacitracin|daptomycin|vancomycin|teixobactin|tyrocidine|gramicidin|zwittermicin|epothilone|fabclavine|bleomycin|ciclosporin|cyclosporine|siderophores|pyoverdine|enterobactin|myxochelin") %>%
pull(ab)
pre_commit_lst$AB_PHENICOLS <- antimicrobials %>% pre_commit_lst$AB_PHENICOLS <- antimicrobials %>%
filter(group %like% "phenicol" | atc_group1 %like% "phenicol" | atc_group2 %like% "phenicol") %>% filter(group %like% "phenicol" | atc_group1 %like% "phenicol" | atc_group2 %like% "phenicol") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_PHOSPHONICS <- antimicrobials %>%
filter(group %like% "phosphonic" | name %like% "fosfo") %>%
pull(ab)
pre_commit_lst$AB_PLEUROMUTILINS <- antimicrobials %>%
filter(name %like% "retapamulin|tiamulin|pleuromutilin") %>%
pull(ab)
pre_commit_lst$AB_POLYMYXINS <- antimicrobials %>% pre_commit_lst$AB_POLYMYXINS <- antimicrobials %>%
filter(group %like% "polymyxin") %>% filter(group %like% "polymyxin") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_QUINOLONES <- antimicrobials %>% pre_commit_lst$AB_QUINOLONES <- antimicrobials %>%
filter(group %like% "quinolone" | atc_group1 %like% "quinolone" | atc_group2 %like% "quinolone") %>% filter(group %like% "quinolone" | atc_group1 %like% "quinolone" | atc_group2 %like% "quinolone" | name %like% "ozenoxacin") %>%
pull(ab)
pre_commit_lst$AB_FLUOROQUINOLONES <- antimicrobials %>%
# see DOI 10.23937/2378-3656/1410369, more specifically this table: https://www.clinmedjournals.org/articles/cmrcr/cmrcr-8-369-table1.html
filter(ab %in% pre_commit_lst$AB_QUINOLONES & name %unlike% " acid|nalidixic|cinoxacin|flumequine|oxolinic|ozenoxacin|piromidic|pipemidic|rosoxacin") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_RIFAMYCINS <- antimicrobials %>% pre_commit_lst$AB_RIFAMYCINS <- antimicrobials %>%
filter(name %like% "Rifampi|Rifabutin|Rifapentine|rifamy") %>% filter(name %like% "Rifampi|Rifabutin|Rifapentine|rifamy") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_SPIROPYRIMIDINETRIONES <- antimicrobials %>%
filter(name %like% "zoliflodacin") %>%
pull(ab)
pre_commit_lst$AB_STREPTOGRAMINS <- antimicrobials %>% pre_commit_lst$AB_STREPTOGRAMINS <- antimicrobials %>%
filter(atc_group2 %like% "streptogramin") %>% filter(atc_group2 %like% "streptogramin" | name %like% "streptogramin|virginiamycin|ostreogrycin") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_TETRACYCLINES <- antimicrobials %>% pre_commit_lst$AB_TETRACYCLINES <- antimicrobials %>%
filter(group %like% "tetracycline") %>% filter(atc_group1 %like% "tetracycline" | atc_group2 %like% "tetracycline" | name %like% "chlortetracycline|cetocycline|demeclocycline|doxycycline|eravacycline|lymecycline|meclocycline|meth?acycline|minocycline|omadacycline|oxytetracycline|rolitetracycline|sarecycline|tetracycline|tigecycline") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_TETRACYCLINES_EXCEPT_TGC <- pre_commit_lst$AB_TETRACYCLINES[pre_commit_lst$AB_TETRACYCLINES != "TGC"] pre_commit_lst$AB_TETRACYCLINES_EXCEPT_TGC <- pre_commit_lst$AB_TETRACYCLINES[pre_commit_lst$AB_TETRACYCLINES != "TGC"]
pre_commit_lst$AB_TRIMETHOPRIMS <- antimicrobials %>% pre_commit_lst$AB_TRIMETHOPRIMS <- antimicrobials %>%
filter(group %like% "trimethoprim") %>% filter(atc_group1 %like% "trimethoprim" | atc_group2 %like% "trimethoprim" | name %like% "trimethoprim|ormetroprim|iclaprim") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_SULFONAMIDES <- antimicrobials %>% pre_commit_lst$AB_SULFONAMIDES <- antimicrobials %>%
filter(group %like% "trimethoprim" & name %unlike% "trimethoprim") %>% filter(name %like% "(^|/)sulf[oai]") %>%
pull(ab) pull(ab)
pre_commit_lst$AB_UREIDOPENICILLINS <- as.ab(c("PIP", "TZP", "AZL", "MEZ")) pre_commit_lst$AB_UREIDOPENICILLINS <- as.ab(c("PIP", "TZP", "AZL", "MEZ"))
pre_commit_lst$AB_BETALACTAMS <- sort(c(pre_commit_lst$AB_PENICILLINS, pre_commit_lst$AB_CEPHALOSPORINS, pre_commit_lst$AB_CARBAPENEMS, pre_commit_lst$AB_MONOBACTAMS)) pre_commit_lst$AB_BETALACTAMS <- sort(c(
pre_commit_lst$AB_PENICILLINS,
pre_commit_lst$AB_CEPHALOSPORINS,
pre_commit_lst$AB_CARBAPENEMS,
pre_commit_lst$AB_MONOBACTAMS))
pre_commit_lst$AB_BETALACTAMASE_INHIBITORS <- antimicrobials %>%
filter(atc_group2 %like% "Beta-lactamase inhibitors" | name %like% "bactam") %>%
pull(ab)
# for EUCAST:
pre_commit_lst$AB_BETALACTAMS_WITH_INHIBITOR <- antimicrobials %>% pre_commit_lst$AB_BETALACTAMS_WITH_INHIBITOR <- antimicrobials %>%
filter(name %like% "/" & name %unlike% "EDTA" & ab %in% pre_commit_lst$AB_BETALACTAMS) %>% filter(ab %in% pre_commit_lst$AB_BETALACTAMS & name %like% "/" & name %unlike% "EDTA") %>%
pull(ab) pull(ab)
# this will be used for documentation: # this will be used for documentation:
pre_commit_lst$DEFINED_AB_GROUPS <- sort(names(pre_commit_lst)[names(pre_commit_lst) %like% "^AB_" & names(pre_commit_lst) != "AB_LOOKUP"]) pre_commit_lst$DEFINED_AB_GROUPS <- sort(names(pre_commit_lst)[names(pre_commit_lst) %like% "^AB_" & names(pre_commit_lst) != "AB_LOOKUP"])
# Check that all AB_* groups with >= 4 members have a corresponding function
for (grp in pre_commit_lst$DEFINED_AB_GROUPS[pre_commit_lst$DEFINED_AB_GROUPS %unlike% "BETALACTAMASE_INHIBITORS|EXCEPT"]) {
if (length(pre_commit_lst[[grp]]) >= 4) {
fn_name <- tolower(gsub("^AB_", "", grp))
if (!fn_name %in% ls(envir = asNamespace("AMR"))) {
stop("Group '", grp, "' has ", length(pre_commit_lst[[grp]]),
" members (", toString(ab_name(pre_commit_lst[[grp]], tolower = T)), ") but no corresponding function '", fn_name, "()' exists in the AMR namespace.",
call. = FALSE)
}
}
}
# Update the antimicrobials$group column
usethis::ui_info("Updating 'group' column in antimicrobials data set from AB_* vectors")
prettify_group_name <- function(name) {
raw <- gsub("^AB_", "", name)
pretty <- tools::toTitleCase(gsub("_", " ", tolower(raw)))
pretty[pretty %like% " (except|with) "] <- ""
pretty <- gsub(" (1st|2nd|3rd|4th|5th|6th)", " (\\1 gen.)", pretty)
pretty <- gsub("([Bb])eta[-]?", "\\1eta-", pretty)
pretty <- gsub(" Inhibitor", " inhibitor", pretty)
pretty <- pretty[pretty != ""]
return(pretty)
}
group_map <- vector("list", length = nrow(antimicrobials))
names(group_map) <- antimicrobials$ab
for (group_name in pre_commit_lst$DEFINED_AB_GROUPS) {
ab_vector <- pre_commit_lst[[group_name]]
pretty_name <- prettify_group_name(group_name)
for (ab in ab_vector) {
ab_chr <- as.character(ab)
group_map[[ab_chr]] <- sort(unique(c(group_map[[ab_chr]], pretty_name)))
}
}
for (i in seq_along(group_map)) {
if (is.null(group_map[[i]])) {
group_map[[i]] <- "Other"
if (antimicrobials$group[i] %unlike% "other") {
usethis::ui_warn(paste0("AB had a group but not anymore: ", antimicrobials$name[i], " (", antimicrobials$ab[i], "), was ", toString(antimicrobials$group[i])))
}
}
group_map[[i]] <- group_map[[i]][order(nchar(group_map[[i]]))]
}
# create priority list for ab_group()
pre_commit_lst$ABX_PRIORITY_LIST <- c("Aminopenicillins",
"Isoxazolylpenicillins",
"Ureidopenicillins",
"Oxazolidinones",
"Carbapenems",
"Cephalosporins (1st gen.)",
"Cephalosporins (2nd gen.)",
"Cephalosporins (3rd gen.)",
"Cephalosporins (4th gen.)",
"Cephalosporins (5th gen.)",
"Cephalosporins",
"Penicillins",
"Monobactams",
"Aminoglycosides",
"Lipoglycopeptides",
"Glycopeptides",
"Peptides",
"Lincosamides",
"Streptogramins",
"Macrolides",
"Nitrofurans",
"Phenicols",
"Phosphonics",
"Polymyxins",
"Fluoroquinolones",
"Quinolones",
"Rifamycins",
"Spiropyrimidinetriones",
"Trimethoprims",
"Sulfonamides",
"Tetracyclines",
"Ionophores",
"Antifungals",
"Antimycobacterials",
"Fusidanes",
"Beta-lactams",
"Beta-lactamase inhibitors",
"Pleuromutilins",
"Aminocoumarins",
"Other")
if (!all(unlist(antimicrobials$group) %in% pre_commit_lst$ABX_PRIORITY_LIST)) {
stop("Missing group(s) in priority list: ", paste(setdiff(unlist(antimicrobials$group), pre_commit_lst$ABX_PRIORITY_LIST), collapse = ", "))
}
for (i in seq_along(group_map)) {
group_map[[i]] <- intersect(pre_commit_lst$ABX_PRIORITY_LIST, group_map[[i]])
}
antimicrobials$group <- unname(group_map)
usethis::use_data(antimicrobials, overwrite = TRUE, version = 2, compress = "xz")
pre_commit_lst$AB_LOOKUP <- create_AB_AV_lookup(antimicrobials) pre_commit_lst$AB_LOOKUP <- create_AB_AV_lookup(antimicrobials)
pre_commit_lst$AV_LOOKUP <- create_AB_AV_lookup(antivirals) pre_commit_lst$AV_LOOKUP <- create_AB_AV_lookup(antivirals)
@@ -646,7 +769,33 @@ files_changed <- function(paths = "^(R|data)/") {
# Update URLs ------------------------------------------------------------- # Update URLs -------------------------------------------------------------
if (files_changed()) { if (files_changed()) {
usethis::ui_info("Checking URLs for redirects") usethis::ui_info("Checking URLs for redirects")
invisible(urlchecker::url_update(".")) # Step 1: Get sources from tools (excluding man/)
sources <- tools:::url_db_from_package_sources(".")
sources <- sources[!grepl("^man/", sources$Parent), ]
# Step 2: Get URLs from .R files in R/
r_files <- list.files("R", pattern = "\\.R$", full.names = TRUE)
# Function to extract URLs from a file
extract_urls_from_file <- function(file_path) {
lines <- readLines(file_path, warn = FALSE)
urls <- stringr::str_extract_all(lines, "https?://[^\\s)\"'>]+")
urls <- unlist(urls)
if (length(urls) == 0) {
return(NULL)
}
# Remove trailing punctuation (e.g., .,), etc.)
urls <- stringr::str_replace(urls, "[\\.,;)]+$", "")
data.frame(
URL = urls,
Parent = gsub("^\\./", "", file_path),
stringsAsFactors = FALSE
)
}
r_file_urls <- do.call(rbind, lapply(r_files, extract_urls_from_file))
# Step 3: Combine the two sources
total <- rbind(sources, r_file_urls)
# Step 4: Check URLs and update
results <- urlchecker::url_check(db = total)
invisible(urlchecker::url_update(results = results))
} }
# Style pkg --------------------------------------------------------------- # Style pkg ---------------------------------------------------------------
@@ -663,7 +812,9 @@ if (files_changed()) {
} }
# Update index.md and README.md ------------------------------------------- # Update index.md and README.md -------------------------------------------
if (files_changed("man/microorganisms.Rd") || if (files_changed("README.Rmd") ||
files_changed("index.Rmd") ||
files_changed("man/microorganisms.Rd") ||
files_changed("man/antimicrobials.Rd") || files_changed("man/antimicrobials.Rd") ||
files_changed("man/clinical_breakpoints.Rd") || files_changed("man/clinical_breakpoints.Rd") ||
files_changed("man/antibiogram.Rd") || files_changed("man/antibiogram.Rd") ||
@@ -677,5 +828,6 @@ if (files_changed("man/microorganisms.Rd") ||
} }
# Finished ---------------------------------------------------------------- # Finished ----------------------------------------------------------------
rm(antimicrobials)
usethis::ui_done("All done") usethis::ui_done("All done")
suppressMessages(reset_AMR_locale()) suppressMessages(reset_AMR_locale())
@@ -912,7 +912,76 @@ antimicrobials <- antimicrobials %>%
oral_ddd = NA_real_ oral_ddd = NA_real_
)) ))
# add Taniborbactam and Cefepime/taniborbactam
antimicrobials <- antimicrobials |>
mutate(ab = as.character(ab)) |>
bind_rows(
antimicrobials |>
filter(ab == "FPE") |>
mutate(ab = as.character(ab)) |>
mutate(ab = "FTA",
name = "Cefepime/taniborbactam",
cid = NA_real_),
antimicrobials |>
filter(ab == "TBP") |>
mutate(ab = as.character(ab)) |>
mutate(ab = "TAN",
name = "Taniborbactam",
cid = 76902493,
abbreviations = list("VNRX-5133"))
)
antimicrobials <- antimicrobials |>
mutate(ab = as.character(ab)) |>
bind_rows(
antimicrobials |>
filter(ab == "CTB") |>
mutate(ab = "CTA",
cid = NA_real_,
name = "Ceftibuten/avibactam") |>
select(1:4),
antimicrobials |>
filter(ab == "KAC") |>
mutate(ab = "KAS",
cid = NA_real_,
name = "Kasugamycin") |>
select(1:4),
antimicrobials |>
filter(ab == "PRI") |>
mutate(ab = "OST",
cid = NA_real_,
name = "Ostreogrycin") |>
select(1:4),
antimicrobials |>
filter(ab == "PRI") |>
mutate(ab = "THS",
cid = NA_real_,
name = "Thiostrepton") |>
select(1, 3),
antimicrobials |>
filter(ab == "CLA1") |>
mutate(ab = "XER",
cid = NA_real_,
name = "Xeruborbactam") |>
select(1:4),
antimicrobials |>
filter(ab == "BLM") |>
mutate(ab = "ZOR",
cid = NA_real_,
name = "Zorbamycin") |>
select(1:4),
)
antimicrobials <- antimicrobials |>
mutate(ab = as.character(ab)) |>
bind_rows(
antimicrobials |>
filter(ab == "NOV") |>
mutate(ab = "CLB",
cid = 54706138,
name = "Clorobiocin") |>
select(1:4),
)
# update ATC codes from WHOCC website ------------------------------------- # update ATC codes from WHOCC website -------------------------------------
@@ -1089,13 +1158,14 @@ for (i in 1:nrow(antimicrobials)) {
syn <- as.character(sort(unique(tolower(unname(unlist(antimicrobials[i, "synonyms", drop = TRUE])))))) syn <- as.character(sort(unique(tolower(unname(unlist(antimicrobials[i, "synonyms", drop = TRUE]))))))
syn <- gsub("[^a-z]", "", syn) syn <- gsub("[^a-z]", "", syn)
syn <- gsub(" +", " ", syn) syn <- gsub(" +", " ", syn)
pharm_terms <- "(pa?ediatric|injection|oral|inhale|otic|sulfate|sulphate|sodium|base|anhydrous|anhydrate|stearate|syrup|natrium|hydrate|x?hcl|gsalt|vet[.]?)" pharm_terms <- "(antibiotic|pa?ediatric|injection|oral|inhale|otic|sulfate|sulphate|sodium|base|anhydrous|anhydrate|stearate|syrup|natrium|hydrate|x?hcl|gsalt|vet[.]?)"
syn <- gsub(paste0(" ", pharm_terms, "$"), "", syn) syn <- gsub(paste0(" ", pharm_terms, "$"), "", syn)
syn <- gsub(paste0("^", pharm_terms, " "), "", syn) syn <- gsub(paste0("^", pharm_terms, " "), "", syn)
syn <- trimws(syn) syn <- trimws(syn)
syn <- gsub(" [a-z]{1,3}$", "", syn, perl = TRUE) syn <- gsub(" [a-z]{1,3}$", "", syn, perl = TRUE)
syn <- trimws(syn) syn <- trimws(syn)
syn <- syn[syn != "" & syn %unlike% ":" & !syn %in% tolower(antimicrobials$name)] syn <- syn[syn != "" & syn %unlike% ":" & !syn %in% tolower(antimicrobials$name)]
syn <- syn[!syn %in% c("antibiotic", "antimicrobial")]
# remove synonyms that are names in the data set # remove synonyms that are names in the data set
syn <- syn[!sapply(syn, function(s) any(grepl(transform_syn(s), antimicrobials$name)))] syn <- syn[!sapply(syn, function(s) any(grepl(transform_syn(s), antimicrobials$name)))]
syn <- unique(syn) syn <- unique(syn)
@@ -1112,6 +1182,11 @@ for (i in 1:nrow(antimicrobials)) {
antimicrobials[i, "loinc"][[1]] <- ifelse(length(loinc) == 0, list(NA_character_), list(loinc)) antimicrobials[i, "loinc"][[1]] <- ifelse(length(loinc) == 0, list(NA_character_), list(loinc))
} }
} }
antimicrobials$group <- unname(antimicrobials$group)
antimicrobials$atc <- unname(antimicrobials$atc)
antimicrobials$abbreviations <- unname(antimicrobials$abbreviations)
antimicrobials$synonyms <- unname(antimicrobials$synonyms)
antimicrobials$loinc <- unname(antimicrobials$loinc)
usethis::use_data(antimicrobials, overwrite = TRUE, version = 2, compress = "xz") usethis::use_data(antimicrobials, overwrite = TRUE, version = 2, compress = "xz")
@@ -35,24 +35,26 @@ library(readr)
library(tidyr) library(tidyr)
devtools::load_all() devtools::load_all()
# Install the WHONET software on Windows (http://www.whonet.org/software.html),
# and copy the folder C:\WHONET\Resources to the data-raw/WHONET/ folder
# (for ASIARS-Net update, also copy C:\WHONET\Codes to the data-raw/WHONET/ folder)
# BE SURE TO RUN data-raw/_reproduction_scripts/reproduction_of_microorganisms.groups.R FIRST TO GET THE GROUPS! # BE SURE TO RUN data-raw/_reproduction_scripts/reproduction_of_microorganisms.groups.R FIRST TO GET THE GROUPS!
# READ DATA ---- # READ DATA ----
whonet_organisms <- read_tsv("data-raw/WHONET/Resources/Organisms.txt", na = c("", "NA", "-"), show_col_types = FALSE) |> # files are retrieved from https://github.com/AClark-WHONET/AMRIE
github_repo <- "https://raw.github.com/AClark-WHONET/AMRIE/main/Interpretation%20Engine/Resources"
file_organisms <- file.path(github_repo, "Organisms.txt")
file_breakpoints <- file.path(github_repo, "Breakpoints.txt")
file_antibiotics <- file.path(github_repo, "Antibiotics.txt")
whonet_organisms <- read_tsv(file_organisms, na = c("", "NA", "-"), show_col_types = FALSE, guess_max = Inf) |>
# remove old taxonomic names # remove old taxonomic names
filter(TAXONOMIC_STATUS == "C") |> filter(TAXONOMIC_STATUS == "C") |>
mutate(ORGANISM_CODE = toupper(WHONET_ORG_CODE)) mutate(ORGANISM_CODE = toupper(WHONET_ORG_CODE))
whonet_breakpoints <- read_tsv("data-raw/WHONET/Resources/Breakpoints.txt", na = c("", "NA", "-"), whonet_breakpoints <- read_tsv(file_breakpoints, na = c("", "NA", "-"), show_col_types = FALSE, guess_max = Inf) |>
show_col_types = FALSE, guess_max = Inf) |>
filter(GUIDELINES %in% c("CLSI", "EUCAST")) filter(GUIDELINES %in% c("CLSI", "EUCAST"))
whonet_antibiotics <- read_tsv("data-raw/WHONET/Resources/Antibiotics.txt", na = c("", "NA", "-"), show_col_types = FALSE) |> whonet_antibiotics <- read_tsv(file_antibiotics, na = c("", "NA", "-"), show_col_types = FALSE, guess_max = Inf) |>
arrange(WHONET_ABX_CODE) |> arrange(WHONET_ABX_CODE) |>
distinct(WHONET_ABX_CODE, .keep_all = TRUE) distinct(WHONET_ABX_CODE, .keep_all = TRUE)
File diff suppressed because it is too large Load Diff
@@ -27,7 +27,7 @@
# how to conduct AMR data analysis: https://amr-for-r.org # # how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== # # ==================================================================== #
# This data set is being used in the clinical_breakpoints data set, and thus by as.sir(). # This data set is being referenced from in the clinical_breakpoints data set, and also by as.sir().
# It prevents the breakpoints table from being extremely long for species that are part of a species group. # It prevents the breakpoints table from being extremely long for species that are part of a species group.
# Also used by eucast_rules() to expand group names. # Also used by eucast_rules() to expand group names.
@@ -36,10 +36,6 @@ library(readr)
library(tidyr) library(tidyr)
devtools::load_all() devtools::load_all()
# Install the WHONET software on Windows (http://www.whonet.org/software.html),
# and copy the folder C:\WHONET\Resources to the data-raw/WHONET/ folder
# BACTERIAL COMPLEXES # BACTERIAL COMPLEXES
# find all bacterial complex in the NCBI Taxonomy Browser here: # find all bacterial complex in the NCBI Taxonomy Browser here:
# https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Undef&id=2&lvl=6&lin=f&keep=1&srchmode=1&unlock # https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Undef&id=2&lvl=6&lin=f&keep=1&srchmode=1&unlock
@@ -48,9 +44,14 @@ devtools::load_all()
# READ DATA ---- # READ DATA ----
whonet_organisms <- read_tsv("data-raw/WHONET/Resources/Organisms.txt", na = c("", "NA", "-"), show_col_types = FALSE) %>% # files are retrieved from https://github.com/AClark-WHONET/AMRIE
github_repo <- "https://raw.github.com/AClark-WHONET/AMRIE/main/Interpretation%20Engine/Resources"
file_organisms <- file.path(github_repo, "Organisms.txt")
whonet_organisms <- read_tsv(file_organisms, na = c("", "NA", "-"), show_col_types = FALSE, guess_max = Inf) |>
# remove old taxonomic names # remove old taxonomic names
filter(TAXONOMIC_STATUS == "C") %>% filter(TAXONOMIC_STATUS == "C") |>
mutate(ORGANISM_CODE = toupper(WHONET_ORG_CODE)) mutate(ORGANISM_CODE = toupper(WHONET_ORG_CODE))
whonet_organisms <- whonet_organisms %>% whonet_organisms <- whonet_organisms %>%
@@ -87,7 +88,7 @@ microorganisms.groups <- whonet_organisms %>%
mo = ifelse(is.na(mo), mo = ifelse(is.na(mo),
as.character(as.mo(ORGANISM, keep_synonyms = TRUE, minimum_matching_score = 0)), as.character(as.mo(ORGANISM, keep_synonyms = TRUE, minimum_matching_score = 0)),
mo)) %>% mo)) %>%
# add our own CoNS and CoPS, WHONET does not strictly follow Becker et al (2014, 2019, 2020) # add our own CoNS and CoPS, WHONET does not strictly follow Becker et al. (2014, 2019, 2020)
filter(mo_group != as.mo("CoNS")) %>% filter(mo_group != as.mo("CoNS")) %>%
bind_rows(tibble(mo_group = as.mo("CoNS"), mo = MO_CONS)) %>% bind_rows(tibble(mo_group = as.mo("CoNS"), mo = MO_CONS)) %>%
filter(mo_group != as.mo("CoPS")) %>% filter(mo_group != as.mo("CoPS")) %>%
@@ -153,7 +154,7 @@ microorganisms.groups <- whonet_organisms %>%
filter(mo_group != "B_YERSN_PSDT-C") %>% filter(mo_group != "B_YERSN_PSDT-C") %>%
bind_rows(tibble(mo_group = as.mo("B_YERSN_PSDT-C"), bind_rows(tibble(mo_group = as.mo("B_YERSN_PSDT-C"),
mo = paste("Yersinia", c("pseudotuberculosis", "pestis", "similis", "wautersii")) %>% as.mo(keep_synonyms = TRUE))) %>% mo = paste("Yersinia", c("pseudotuberculosis", "pestis", "similis", "wautersii")) %>% as.mo(keep_synonyms = TRUE))) %>%
# RGM are Rapidly-grwoing Mycobacteria, see https://pubmed.ncbi.nlm.nih.gov/28084211/ # RGM are Rapidly-growing Mycobacteria, see https://pubmed.ncbi.nlm.nih.gov/28084211/
filter(mo_group != "B_MYCBC_RGM") %>% filter(mo_group != "B_MYCBC_RGM") %>%
bind_rows(tibble(mo_group = as.mo("B_MYCBC_RGM"), bind_rows(tibble(mo_group = as.mo("B_MYCBC_RGM"),
mo = paste("Mycobacterium", c( "abscessus abscessus", "abscessus bolletii", "abscessus massiliense", "agri", "aichiense", "algericum", "alvei", "anyangense", "arabiense", "aromaticivorans", "aubagnense", "aubagnense", "aurum", "austroafricanum", "bacteremicum", "boenickei", "bourgelatii", "brisbanense", "brumae", "canariasense", "celeriflavum", "chelonae", "chitae", "chlorophenolicum", "chubuense", "confluentis", "cosmeticum", "crocinum", "diernhoferi", "duvalii", "elephantis", "fallax", "flavescens", "fluoranthenivorans", "fortuitum", "franklinii", "frederiksbergense", "gadium", "gilvum", "goodii", "hassiacum", "hippocampi", "hodleri", "holsaticum", "houstonense", "immunogenum", "insubricum", "iranicum", "komossense", "litorale", "llatzerense", "madagascariense", "mageritense", "monacense", "moriokaense", "mucogenicum", "mucogenicum", "murale", "neoaurum", "neworleansense", "novocastrense", "obuense", "pallens", "parafortuitum", "peregrinum", "phlei", "phocaicum", "phocaicum", "porcinum", "poriferae", "psychrotolerans", "pyrenivorans", "rhodesiae", "rufum", "rutilum", "salmoniphilum", "sediminis", "senegalense", "septicum", "setense", "smegmatis", "sphagni", "thermoresistibile", "tokaiense", "vaccae", "vanbaalenii", "wolinskyi")) %>% as.mo(keep_synonyms = TRUE))) mo = paste("Mycobacterium", c( "abscessus abscessus", "abscessus bolletii", "abscessus massiliense", "agri", "aichiense", "algericum", "alvei", "anyangense", "arabiense", "aromaticivorans", "aubagnense", "aubagnense", "aurum", "austroafricanum", "bacteremicum", "boenickei", "bourgelatii", "brisbanense", "brumae", "canariasense", "celeriflavum", "chelonae", "chitae", "chlorophenolicum", "chubuense", "confluentis", "cosmeticum", "crocinum", "diernhoferi", "duvalii", "elephantis", "fallax", "flavescens", "fluoranthenivorans", "fortuitum", "franklinii", "frederiksbergense", "gadium", "gilvum", "goodii", "hassiacum", "hippocampi", "hodleri", "holsaticum", "houstonense", "immunogenum", "insubricum", "iranicum", "komossense", "litorale", "llatzerense", "madagascariense", "mageritense", "monacense", "moriokaense", "mucogenicum", "mucogenicum", "murale", "neoaurum", "neworleansense", "novocastrense", "obuense", "pallens", "parafortuitum", "peregrinum", "phlei", "phocaicum", "phocaicum", "porcinum", "poriferae", "psychrotolerans", "pyrenivorans", "rhodesiae", "rufum", "rutilum", "salmoniphilum", "sediminis", "senegalense", "septicum", "setense", "smegmatis", "sphagni", "thermoresistibile", "tokaiense", "vaccae", "vanbaalenii", "wolinskyi")) %>% as.mo(keep_synonyms = TRUE)))
@@ -108,3 +108,18 @@ writeLines(contents, "R/aa_helper_pm_functions.R")
# note: pm_left_join() will be overwritten by aaa_helper_functions.R, which contains a faster implementation # note: pm_left_join() will be overwritten by aaa_helper_functions.R, which contains a faster implementation
# replace `res <- as.data.frame(res)` with `res <- as.data.frame(res, stringsAsFactors = FALSE)` # replace `res <- as.data.frame(res)` with `res <- as.data.frame(res, stringsAsFactors = FALSE)`
# after running, pm_select must be altered. The line:
# col_pos <- pm_select_positions(.data, ..., .group_pos = TRUE)
# ... must be replaced with this to support tidyselect functionality such as `starts_with()`:
# col_pos <- tryCatch(pm_select_positions(.data, ..., .group_pos = TRUE), error = function(e) NULL)
# if (is.null(col_pos)) {
# # try with tidyverse
# select_dplyr <- import_fn("select", "dplyr", error_on_fail = FALSE)
# if (!is.null(select_dplyr)) {
# col_pos <- which(colnames(.data) %in% colnames(select_dplyr(.data, ...)))
# } else {
# # this will throw an error as it did, but dplyr is not available, so no other option
# col_pos <- pm_select_positions(.data, ..., .group_pos = TRUE)
# }
# }
+1 -1
View File
@@ -1 +1 @@
228840b3941753c4adee2b781d901590 11aade8a39bfdff02d01fb52b04eacdc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+416 -408
View File
@@ -1,498 +1,506 @@
"ab" "cid" "name" "group" "atc" "atc_group1" "atc_group2" "abbreviations" "synonyms" "oral_ddd" "oral_units" "iv_ddd" "iv_units" "loinc" "ab" "cid" "name" "group" "atc" "atc_group1" "atc_group2" "abbreviations" "synonyms" "oral_ddd" "oral_units" "iv_ddd" "iv_units" "loinc"
"AMA" 4649 "4-aminosalicylic acid" "Antimycobacterials" "J04AA01" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "aminacyl,aminopar,aminosalyl,aminox,apacil,deapasil,entepas,gabbropas,granupas,helipidyl,hellipidyl,nemasol,nippas,osacyl,pamacyl,pamisyl,paramisan,paramycin,parasal,parasalicil,parasalindon,pasade,pasalon,pasara,pascorbic,pasdium,pasem,paser,pasmed,pasnal,pasnodia,pasolac,passodico,pharmakon,propasa,rezipas,salvis,sanipirol,sanipriol,sodiopas,spectrum" 12 "g" "NA" "AMA" 4649 "4-aminosalicylic acid" "Antimycobacterials" "J04AA01" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "aminacyl,aminopar,aminosalyl,aminox,apacil,deapasil,entepas,gabbropas,granupas,helipidyl,hellipidyl,nemasol,nippas,osacyl,pamacyl,pamisyl,paramisan,paramycin,parasal,parasalicil,parasalindon,pasade,pasalon,pasara,pascorbic,pasdium,pasem,paser,pasmed,pasnal,pasnodia,pasolac,passodico,pharmakon,propasa,rezipas,salvis,sanipirol,sanipriol,sodiopas,spectrum" 12 "g" "NA"
"ACM" 6450012 "Acetylmidecamycin" "Macrolides/lincosamides" "NA" "NA" "NA" "NA" "ACM" 6450012 "Acetylmidecamycin" "Macrolides" "NA" "NA" "NA" "NA"
"ASP" 49787020 "Acetylspiramycin" "Macrolides/lincosamides" "NA" "NA" "antibiotic,espiramicin,espiramicina,foromacidin,provamycin,rovamicina,rovamycin,rovamycine,selectomycin,sequamycin,spiramycine,spiramycinum" "NA" "ASP" 49787020 "Acetylspiramycin" "Macrolides" "NA" "NA" "espiramicin,espiramicina,foromacidin,provamycin,rovamicina,rovamycin,rovamycine,selectomycin,sequamycin,spiramycine,spiramycinum" "NA"
"ALS" 8954 "Aldesulfone sodium" "Other antibacterials" "J04BA03" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "NA" "adesulfone,aldapsone,aldesulfone,aldesulphone,diamidin,diason,diasone,diasoneenterab,diazon,didimethanesulfinate,novotrone,sulfoxone" 0.33 "g" "NA" "ALS" 8954 "Aldesulfone sodium" "Other" "J04BA03" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "NA" "adesulfone,aldapsone,aldesulfone,aldesulphone,diamidin,diason,diasone,diasoneenterab,diazon,didimethanesulfinate,novotrone,sulfoxone" 0.33 "g" "NA"
"AMK" 37768 "Amikacin" "Aminoglycosides" "D06AX12,J01GB06,QD06AX12,QJ01GB06,QS01AA21,S01AA21" "Aminoglycoside antibacterials" "Other aminoglycosides" "ak,ami,amik,amikac,amk,an" "amikacillin,amikacina,amikacine,amikacinum,amikavet,amikin,amikozit,amukin,arikace,briclin,butirosins,kaminax,lukadin,mikavir,potentox,prestwick" 1 "g" "101493-5,11-7,12-5,13-3,13546-7,14-1,15098-7,17798-0,18860-7,20373-7,23624-0,25174-4,25175-1,25176-9,25177-7,25178-5,25179-3,31097-9,31098-7,31099-5,3319-1,3320-9,3321-7,35669-1,42642-9,48169-7,50802-8,50803-6,56628-1,59378-0,60564-2,60565-9,6975-7,80972-3,89484-0" "AMK" 37768 "Amikacin" "Aminoglycosides" "D06AX12,J01GB06,QD06AX12,QJ01GB06,QS01AA21,S01AA21" "Aminoglycoside antibacterials" "Other aminoglycosides" "ak,ami,amik,amikac,amk,an" "amikacillin,amikacina,amikacine,amikacinum,amikavet,amikin,amikozit,amukin,arikace,briclin,butirosins,kaminax,lukadin,mikavir,potentox,prestwick" 1 "g" "101493-5,11-7,12-5,13-3,13546-7,14-1,15098-7,17798-0,18860-7,20373-7,23624-0,25174-4,25175-1,25176-9,25177-7,25178-5,25179-3,31097-9,31098-7,31099-5,3319-1,3320-9,3321-7,35669-1,42642-9,48169-7,50802-8,50803-6,56628-1,59378-0,60564-2,60565-9,6975-7,80972-3,89484-0"
"AKF" "Amikacin/fosfomycin" "Aminoglycosides" "NA" "NA" "NA" "NA" "AKF" "Amikacin/fosfomycin" "Aminoglycosides,Phosphonics" "NA" "NA" "NA" "NA"
"AMO" 54260 "Amorolfine" "Antifungals/antimycotics" "D01AE16,QD01AE16" "Antifungals for topical use" "Other antifungals for topical use" "amor" "amorolfina,amorolfinum,bekiron,corbel,curanail,fenpropemorph,fenpropimorph,fenpropimorphe,forbel,funbas,loceryl,locetar,mildofix,mistral,morpholine,odenil,omicur,pekiron" "NA" "AMO" 54260 "Amorolfine" "Antifungals" "D01AE16,QD01AE16" "Antifungals for topical use" "Other antifungals for topical use" "amor" "amorolfina,amorolfinum,bekiron,corbel,curanail,fenpropemorph,fenpropimorph,fenpropimorphe,forbel,funbas,loceryl,locetar,mildofix,mistral,morpholine,odenil,omicur,pekiron" "NA"
"AMX" 33613 "Amoxicillin" "Beta-lactams/penicillins" "J01CA04,QG51AA03,QJ01CA04" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "ac,amox,amoxic,amx" "acuotricina,alfamox,alfida,amitron,amoclen,amodex,amoksicillin,amolin,amopen,amopenixin,amophar,amoran,amoxi,amoxicaps,amoxicilina,amoxicilline,amoxicillinum,amoxidal,amoxiden,amoxil,amoxillat,amoxina,amoxine,amoxipen,amoxivet,amoxycillin,amoxycillinsalt,amoxyke,anemolin,aspenil,atoksilin,bristamox,cemoxin,ciblor,clamoxyl,damoxy,danoxillin,delacillin,demoksil,dispermox,efpenix,eupen,flemoxin,flemoxine,galenamox,gramidil,hiconcil,himinomax,histocillin,ibiamox,imacillin,izoltil,kentrocyllin,lamoxy,largopen,larotid,matasedrin,metifarma,moksilin,moxacin,moxal,moxaline,moxatag,neotetranase,novabritine,ospamox,pacetocin,pamocil,paradroxil,pasetocin,penamox,piramox,promoxil,quimiopen,remoxil,riotapen,robamox,sawacillin,siganopen,simplamox,sintopen,sumox,topramoxin,trifamox,trimox,unicillin,utimox,velamox,vetramox,wymox,zamocillin,zamocilline,zimox" 1.5 "g" 3 "g" "101498-4,15-8,16-6,16365-9,17-4,18-2,18861-5,18862-3,19-0,20-8,21-6,22-4,25274-2,25310-4,3344-9,55614-2,55615-9,55616-7,6976-5,6977-3,80133-2" "AMX" 33613 "Amoxicillin" "Aminopenicillins,Penicillins,Beta-lactams" "J01CA04,QG51AA03,QJ01CA04" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "ac,amox,amoxic,amx" "acuotricina,alfamox,alfida,amitron,amoclen,amodex,amoksicillin,amolin,amopen,amopenixin,amophar,amoran,amoxi,amoxicaps,amoxicilina,amoxicilline,amoxicillinum,amoxidal,amoxiden,amoxil,amoxillat,amoxina,amoxine,amoxipen,amoxivet,amoxycillin,amoxycillinsalt,amoxyke,anemolin,aspenil,atoksilin,bristamox,cemoxin,ciblor,clamoxyl,damoxy,danoxillin,delacillin,demoksil,dispermox,efpenix,eupen,flemoxin,flemoxine,galenamox,gramidil,hiconcil,himinomax,histocillin,ibiamox,imacillin,izoltil,kentrocyllin,lamoxy,largopen,larotid,matasedrin,metifarma,moksilin,moxacin,moxal,moxaline,moxatag,neotetranase,novabritine,ospamox,pacetocin,pamocil,paradroxil,pasetocin,penamox,piramox,promoxil,quimiopen,remoxil,riotapen,robamox,sawacillin,siganopen,simplamox,sintopen,sumox,topramoxin,trifamox,trimox,unicillin,utimox,velamox,vetramox,wymox,zamocillin,zamocilline,zimox" 1.5 "g" 3 "g" "101498-4,15-8,16-6,16365-9,17-4,18-2,18861-5,18862-3,19-0,20-8,21-6,22-4,25274-2,25310-4,3344-9,55614-2,55615-9,55616-7,6976-5,6977-3,80133-2"
"AMC" 23665637 "Amoxicillin/clavulanic acid" "Beta-lactams/penicillins" "J01CR02,QJ01CR02" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "a/c,amcl,aml,amocla,aug,xl" "amocla,amoclan,amoclav,amoksiclav,amoxsiklav,amoxyclav,ancla,augmentan,augmentin,augmentine,auspilic,clamentin,clamobit,clavam,clavamox,clavinex,clavumox,coamoxiclav,curam,eumetinex,kesium,kmoxilin,spectramox,synulox,viaclav,xiclav" 1.5 "g" 3 "g" "NA" "AMC" 23665637 "Amoxicillin/clavulanic acid" "Aminopenicillins,Penicillins,Beta-lactams,Beta-lactamase inhibitors" "J01CR02,QJ01CR02" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "a/c,amcl,aml,amocla,aug,xl" "amocla,amoclan,amoclav,amoksiclav,amoxsiklav,amoxyclav,ancla,augmentan,augmentin,augmentine,auspilic,clamentin,clamobit,clavam,clavamox,clavinex,clavumox,coamoxiclav,curam,eumetinex,kesium,kmoxilin,spectramox,synulox,viaclav,xiclav" 1.5 "g" 3 "g" "NA"
"AXS" 465441 "Amoxicillin/sulbactam" "Beta-lactams/penicillins" "J01CR02,QJ01CR02" "NA" "NA" 1.5 "g" 3 "g" "55614-2,55615-9,55616-7" "AXS" 465441 "Amoxicillin/sulbactam" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "J01CR02,QJ01CR02" "NA" "NA" 1.5 "g" 3 "g" "55614-2,55615-9,55616-7"
"AMB" 5280965 "Amphotericin B" "Antifungals/antimycotics" "A01AB04,A07AA07,G01AA03,J02AA01,QA01AB04,QA07AA07,QG01AA03,QJ02AA01" "Antimycotics for systemic use" "Antibiotics" "amf,amfb,amph,amphot" "abelcet,abelecet,ambil,ambisome,amphocin,amphomoronal,amphotec,amphotericin,amphotocerin,amphozone,funganiline,fungilin,fungisome,fungisone,fungizone,halizon,nystatine,nystatinum,terrastatin" 40 "mg" 210 "mg" "16370-9,18863-1,23-2,24-0,25-7,26-5,3353-0,3354-8,40707-2,40757-7,49859-2,6978-1" "AMB" 5280965 "Amphotericin B" "Antifungals" "A01AB04,A07AA07,G01AA03,J02AA01,QA01AB04,QA07AA07,QG01AA03,QJ02AA01" "Antimycotics for systemic use" "Antibiotics" "amf,amfb,amph,amphot" "abelcet,abelecet,ambil,ambisome,amphocin,amphomoronal,amphotec,amphotericin,amphotocerin,amphozone,funganiline,fungilin,fungisome,fungisone,fungizone,halizon,nystatine,nystatinum,terrastatin" 40 "mg" 210 "mg" "16370-9,18863-1,23-2,24-0,25-7,26-5,3353-0,3354-8,40707-2,40757-7,49859-2,6978-1"
"AMH" "Amphotericin B-high" "Antifungals/antimycotics" "NA" "amfo b high,amhl,ampho b high,amphotericin high" "NA" "NA" "AMH" "Amphotericin B-high" "Antifungals" "NA" "amfo b high,amhl,ampho b high,amphotericin high" "NA" "NA"
"AMP" 6249 "Ampicillin" "Beta-lactams/penicillins" "J01CA01,QJ01CA01,QJ51CA01,QS01AA19,S01AA19" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "am,amp,amp100,amp200,ampi,ampici" "adobacillin,alpen,amblosin,amcap,amcill,amfipen,ampen,amperil,ampichel,ampicilina,ampicillina,ampicilline,ampicillinesalt,ampicillinsalt,ampicillinum,ampifarm,ampikel,ampimed,ampinova,ampipenin,ampiscel,ampisyn,ampivax,ampivet,amplacilina,amplin,amplipenyl,amplisom,amplital,austrapen,bayer,binotal,bonapicillin,britacil,cimex,citteral,copharcilin,cymbi,delcillin,deripen,divercillin,doktacillin,domicillin,duphacillin,grampenil,guicitrina,guicitrine,lifeampil,marcillin,morepen,norobrittin,nuvapen,omnipen,orbicilina,penbristol,penbritin,penbrock,penialmen,penicline,penimic,penizillin,pensyn,pentrex,pentrexl,pentrexyl,pentritin,ponecil,princillin,principen,racenacillin,redicilin,rosampline,roscillin,semicillin,servicillin,sumipanto,supen,synpenin,texcillin,tokiocillin,tolomol,totacillin,totalciclina,totapen,trafarbiot,trifacilina,ukapen,ultrabion,ultrabron,vampen,viccillin,vidocillin,wypicil" 2 "g" 6 "g" "101477-8,101478-6,18864-9,18865-6,20374-5,21066-6,23618-2,27-3,28-1,29-9,30-7,31-5,32-3,33-1,3355-5,33562-0,33919-2,34-9,43883-8,43884-6,6979-9,6980-7,87604-5" "AMP" 6249 "Ampicillin" "Aminopenicillins,Penicillins,Beta-lactams" "J01CA01,QJ01CA01,QJ51CA01,QS01AA19,S01AA19" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "am,amp,amp100,amp200,ampi,ampici" "adobacillin,alpen,amblosin,amcap,amcill,amfipen,ampen,amperil,ampichel,ampicilina,ampicillina,ampicilline,ampicillinesalt,ampicillinsalt,ampicillinum,ampifarm,ampikel,ampimed,ampinova,ampipenin,ampiscel,ampisyn,ampivax,ampivet,amplacilina,amplin,amplipenyl,amplisom,amplital,austrapen,bayer,binotal,bonapicillin,britacil,cimex,citteral,copharcilin,cymbi,delcillin,deripen,divercillin,doktacillin,domicillin,duphacillin,grampenil,guicitrina,guicitrine,lifeampil,marcillin,morepen,norobrittin,nuvapen,omnipen,orbicilina,penbristol,penbritin,penbrock,penialmen,penicline,penimic,penizillin,pensyn,pentrex,pentrexl,pentrexyl,pentritin,ponecil,princillin,principen,racenacillin,redicilin,rosampline,roscillin,semicillin,servicillin,sumipanto,supen,synpenin,texcillin,tokiocillin,tolomol,totacillin,totalciclina,totapen,trafarbiot,trifacilina,ukapen,ultrabion,ultrabron,vampen,viccillin,vidocillin,wypicil" 2 "g" 6 "g" "101477-8,101478-6,18864-9,18865-6,20374-5,21066-6,23618-2,27-3,28-1,29-9,30-7,31-5,32-3,33-1,3355-5,33562-0,33919-2,34-9,43883-8,43884-6,6979-9,6980-7,87604-5"
"SAM" 119561 "Ampicillin/sulbactam" "Beta-lactams/penicillins" "J01CR01,QJ01CR01" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "a/s,ab,ampsul,ams,amsu,apsu,sam" "sulacillin" 6 "g" "101478-6,18865-6,20374-5,23618-2,31-5,32-3,33-1,34-9,6980-7" "SAM" 119561 "Ampicillin/sulbactam" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "J01CR01,QJ01CR01" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "a/s,ab,ampsul,ams,amsu,apsu,sam" "sulacillin" 6 "g" "101478-6,18865-6,20374-5,23618-2,31-5,32-3,33-1,34-9,6980-7"
"AMR" 73341 "Amprolium" "Other antibacterials" "QP51BX02" "NA" "amprol,amprolio,amprovine,anticoccid,cocciprol,corid,mepyrium,picolinium,pyridinium,thiacoccid" "NA" "AMR" 73341 "Amprolium" "Other" "QP51BX02" "NA" "amprol,amprolio,amprovine,anticoccid,cocciprol,corid,mepyrium,picolinium,pyridinium,thiacoccid" "NA"
"ANI" 166548 "Anidulafungin" "Antifungals/antimycotics" "J02AX06,QJ02AX06" "Antimycotics for systemic use" "Other antimycotics for systemic use" "anid,anidul" "anidulafungina,anidulafungine,anidulafunginum,biafungin,ecalta,eraxis" 0.1 "g" "55343-8,57095-2,58420-1,77162-6" "ANI" 166548 "Anidulafungin" "Antifungals" "J02AX06,QJ02AX06" "Antimycotics for systemic use" "Other antimycotics for systemic use" "anid,anidul" "anidulafungina,anidulafungine,anidulafunginum,biafungin,ecalta,eraxis" 0.1 "g" "55343-8,57095-2,58420-1,77162-6"
"APL" 6602341 "Apalcillin" "Beta-lactams/penicillins" "NA" "apalci" "apalcilina,apalcilline,apalcillinsalt,apalcillinum,lumota" "NA" "APL" 6602341 "Apalcillin" "Penicillins,Beta-lactams" "NA" "apalci" "apalcilina,apalcilline,apalcillinsalt,apalcillinum,lumota" "NA"
"APR" 3081545 "Apramycin" "Aminoglycosides" "QA07AA92,QJ01GB90,QJ51GB90" "apramy" "ambylan,apralan,apramicina,apramycine,apramycinum" "23659-6,73652-0,73653-8" "APR" 3081545 "Apramycin" "Aminoglycosides" "QA07AA92,QJ01GB90,QJ51GB90" "apramy" "ambylan,apralan,apramicina,apramycine,apramycinum" "23659-6,73652-0,73653-8"
"ARB" 68682 "Arbekacin" "Aminoglycosides" "J01GB12,QJ01GB12" "arbeka" "arbekacina,arbekacine,arbekacinum,haberacin" 0.2 "g" "32373-3,53818-1,54173-0" "ARB" 68682 "Arbekacin" "Aminoglycosides" "J01GB12,QJ01GB12" "arbeka" "arbekacina,arbekacine,arbekacinum,haberacin" 0.2 "g" "32373-3,53818-1,54173-0"
"APX" 71961 "Aspoxicillin" "Beta-lactams/penicillins" "J01CA19,QJ01CA19" "apoxic,aspoxi" "aspoxicilina,aspoxicillan,aspoxicilline,aspoxicillinum,doyle" 4 "g" "NA" "APX" 71961 "Aspoxicillin" "Penicillins,Beta-lactams" "J01CA19,QJ01CA19" "apoxic,aspoxi" "aspoxicilina,aspoxicillan,aspoxicilline,aspoxicillinum,doyle" 4 "g" "NA"
"AST" 5284517 "Astromicin" "Aminoglycosides" "NA" "astrom" "abbott,astromicina,astromicine,astromicinum,fortimicin,istamycin,istamycins" "NA" "AST" 5284517 "Astromicin" "Aminoglycosides" "NA" "astrom" "abbott,astromicina,astromicine,astromicinum,fortimicin,istamycin,istamycins" "NA"
"AVB" 9835049 "Avibactam" "Beta-lactams/penicillins" "NA" "NA" "avibactamfreeacid" "NA" "AVB" 9835049 "Avibactam" "Beta-lactamase inhibitors" "NA" "NA" "avibactamfreeacid" "NA"
"AVI" 71674 "Avilamycin" "Other antibacterials" "QA07AA95" "avilam" "avilamycina,avilamycine,avilamycinum,inteprity,kavault,surmax" "35754-1,35755-8,35756-6,55619-1" "AVI" 71674 "Avilamycin" "Other" "QA07AA95" "avilam" "avilamycina,avilamycine,avilamycinum,inteprity,kavault,surmax" "35754-1,35755-8,35756-6,55619-1"
"AVO" 16131159 "Avoparcin" "Glycopeptides" "NA" "NA" "firvanq,tagocid,targocid,targosid,tecoplanina,tecoplanine,tecoplaninum,teichomycin,teicoplanina,teicoplanine,teicoplaninum,teikoplanin,ticocin" "NA" "AVO" 16131159 "Avoparcin" "Glycopeptides,Peptides" "NA" "NA" "firvanq,tagocid,targocid,targosid,tecoplanina,tecoplanine,tecoplaninum,teichomycin,teicoplanina,teicoplanine,teicoplaninum,teikoplanin,ticocin" "NA"
"AZD" 15574941 "Azidocillin" "Beta-lactams/penicillins" "J01CE04,QJ01CE04" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "azidocilina,azidocillina,azidocilline,azidocillinum" 1.5 "g" "NA" "AZD" 15574941 "Azidocillin" "Penicillins,Beta-lactams" "J01CE04,QJ01CE04" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "azidocilina,azidocillina,azidocilline,azidocillinum" 1.5 "g" "NA"
"AZM" 447043 "Azithromycin" "Macrolides/lincosamides" "J01FA10,QJ01FA10,QS01AA26,S01AA26" "Macrolides, lincosamides and streptogramins" "Macrolides" "az,azi,azit,azithr,azm" "aritromicina,aruzilina,azasite,azenil,azifast,azigram,azimakrol,azithramycine,azithrocin,azithromycine,azithromycinum,azitrocin,azitromax,azitromicina,azitromicine,azitromin,aziwin,aziwok,aztrin,azyter,hemomycin,macrozit,misultina,mixoterin,setron,sumamed,tobil,toraseptol,tromix,trozocina,trulimax,xithrone,zentavion,zifin,zithrax,zithromac,zithromax,zitrim,zitromax,zitrotek,zythromax" 0.3 "g" 0.5 "g" "100043-9,16420-2,16421-0,18866-4,23612-5,25233-8,35-6,36-4,37-2,38-0,6981-5,89480-8" "AZM" 447043 "Azithromycin" "Macrolides" "J01FA10,QJ01FA10,QS01AA26,S01AA26" "Macrolides, lincosamides and streptogramins" "Macrolides" "az,azi,azit,azithr,azm" "aritromicina,aruzilina,azasite,azenil,azifast,azigram,azimakrol,azithramycine,azithrocin,azithromycine,azithromycinum,azitrocin,azitromax,azitromicina,azitromicine,azitromin,aziwin,aziwok,aztrin,azyter,hemomycin,macrozit,misultina,mixoterin,setron,sumamed,tobil,toraseptol,tromix,trozocina,trulimax,xithrone,zentavion,zifin,zithrax,zithromac,zithromax,zitrim,zitromax,zitrotek,zythromax" 0.3 "g" 0.5 "g" "100043-9,16420-2,16421-0,18866-4,23612-5,25233-8,35-6,36-4,37-2,38-0,6981-5,89480-8"
"AFC" "Azithromycin/fluconazole/secnidazole" "Other antibacterials" "J01RA07,QJ01RA07" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "AFC" "Azithromycin/fluconazole/secnidazole" "Other" "J01RA07,QJ01RA07" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"AZL" 6479523 "Azlocillin" "Beta-lactams/penicillins" "J01CA09,QJ01CA09" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "az,azl,azlo,azloci" "azlin,azlocilina,azlocilline,azlocillinsalt,azlocillinum,securopen" 12 "g" "16422-8,18867-2,3368-8,39-8,40-6,41-4,41661-0,42-2" "AZL" 6479523 "Azlocillin" "Ureidopenicillins,Penicillins,Beta-lactams" "J01CA09,QJ01CA09" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "az,azl,azlo,azloci" "azlin,azlocilina,azlocilline,azlocillinsalt,azlocillinum,securopen" 12 "g" "16422-8,18867-2,3368-8,39-8,40-6,41-4,41661-0,42-2"
"ATM" 5742832 "Aztreonam" "Monobactams" "J01DF01,QJ01DF01" "Other beta-lactam antibacterials" "Monobactams" "at,atm,azm,azt,azt1,aztr,aztreo" "azactam,azetreonam,azonam,azthreonam,aztreon,aztreonamum,cayston,dynabiotic,nebactam,primbactam,squibb" 4 "g" "101497-6,16423-6,18868-0,25234-6,3369-6,41662-8,41663-6,41664-4,41727-9,43-0,44-8,45-5,46-3,6982-3" "ATM" 5742832 "Aztreonam" "Monobactams,Beta-lactams" "J01DF01,QJ01DF01" "Other beta-lactam antibacterials" "Monobactams" "at,atm,azm,azt,azt1,aztr,aztreo" "azactam,azetreonam,azonam,azthreonam,aztreon,aztreonamum,cayston,dynabiotic,nebactam,primbactam,squibb" 4 "g" "101497-6,16423-6,18868-0,25234-6,3369-6,41662-8,41663-6,41664-4,41727-9,43-0,44-8,45-5,46-3,6982-3"
"AZA" "Aztreonam/avibactam" "Monobactams" "J01DF51,QJ01DF51" "NA" "NA" "NA" "AZA" "Aztreonam/avibactam" "Monobactams,Beta-lactams,Beta-lactamase inhibitors" "J01DF51,QJ01DF51" "NA" "NA" "NA"
"ANC" "Aztreonam/nacubactam" "Monobactams" "J01DF51,QJ01DF51" "NA" "NA" "NA" "ANC" "Aztreonam/nacubactam" "Monobactams,Beta-lactams,Beta-lactamase inhibitors" "J01DF51,QJ01DF51" "NA" "NA" "NA"
"BAM" 441397 "Bacampicillin" "Beta-lactams/penicillins" "J01CA06,QJ01CA06" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "bacamp" "alphacilina,alphacillin,ambacamp,ambaxin,bacacil,bacampicilina,bacampicilline,bacampicillinum,bacampicine,berocillin,centurina,devonium,diancina,inacilin,maxifen,penglobe,pivatil,pondocil,pondocillin,pondocillina,sanguicillin,spectrobid,velbacil" 1.2 "g" "18869-8,47-1,48-9,49-7,50-5,55620-9" "BAM" 441397 "Bacampicillin" "Penicillins,Beta-lactams" "J01CA06,QJ01CA06" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "bacamp" "alphacilina,alphacillin,ambacamp,ambaxin,bacacil,bacampicilina,bacampicilline,bacampicillinum,bacampicine,berocillin,centurina,devonium,diancina,inacilin,maxifen,penglobe,pivatil,pondocil,pondocillin,pondocillina,sanguicillin,spectrobid,velbacil" 1.2 "g" "18869-8,47-1,48-9,49-7,50-5,55620-9"
"BAC" 78358334 "Bacitracin" "Other antibacterials" "D06AX05,J01XX10,QA07AA93,QD06AX05,QJ01XX10,QR02AB04,QS01AA32,R02AB04,S01AA32" "baci,bacitr" "albac,altracin,ayfivin,baciferm,baciguent,baciim,baciliquin,bacilliquin,baciquent,bacitracina,bacitracine,bacitracinum,fortracin,mycitracin,parentracin,penitracin,septa,topitracin,topitrasin,tropitracin,zutracin" "10868-8,16428-5,18870-6,6827-0,6983-1,87603-7" "BAC" 78358334 "Bacitracin" "Peptides" "D06AX05,J01XX10,QA07AA93,QD06AX05,QJ01XX10,QR02AB04,QS01AA32,R02AB04,S01AA32" "baci,bacitr" "albac,altracin,ayfivin,baciferm,baciguent,baciim,baciliquin,bacilliquin,baciquent,bacitracina,bacitracine,bacitracinum,fortracin,mycitracin,parentracin,penitracin,septa,topitracin,topitrasin,tropitracin,zutracin" "10868-8,16428-5,18870-6,6827-0,6983-1,87603-7"
"BDQ" 5388906 "Bedaquiline" "Other antibacterials" "J04AK05,QJ04AK05" "NA" "NA" 86 "mg" "80637-2,88703-4,88704-2,94274-8,96107-8" "BDQ" 5388906 "Bedaquiline" "Other" "J04AK05,QJ04AK05" "NA" "NA" 86 "mg" "80637-2,88703-4,88704-2,94274-8,96107-8"
"BEK" 439318 "Bekanamycin" "Aminoglycosides" "J01GB13,QJ01GB13" "NA" "aminodeoxykanamycin,becanamicina,bekanamicina,bekanamycine,bekanamycinum" 0.6 "g" "NA" "BEK" 439318 "Bekanamycin" "Aminoglycosides" "J01GB13,QJ01GB13" "NA" "aminodeoxykanamycin,becanamicina,bekanamicina,bekanamycine,bekanamycinum" 0.6 "g" "NA"
"BNB" "Benzathine benzylpenicillin" "Beta-lactams/penicillins" "J01CE08,QJ01CE08" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "NA" 3.6 "g" "NA" "BNB" "Benzathine benzylpenicillin" "Penicillins,Beta-lactams" "J01CE08,QJ01CE08" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "NA" 3.6 "g" "NA"
"BNP" 64725 "Benzathine phenoxymethylpenicillin" "Beta-lactams/penicillins" "J01CE10,QJ01CE10" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "bicillin,biphecillin" 2 "g" "NA" "BNP" 64725 "Benzathine phenoxymethylpenicillin" "Penicillins,Beta-lactams" "J01CE10,QJ01CE10" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "bicillin,biphecillin" 2 "g" "NA"
"PEN" 5904 "Benzylpenicillin" "Beta-lactams/penicillins" "J01CE01,QJ01CE01,QJ51CE01,QS01AA14,S01AA14" "Combinations of antibacterials" "Combinations of antibacterials" "bepe,pen,peni,peni g,penic8,penica,penici,penicillin,penicillin g,penora,pg" "bencilpenicilina,benzopenicillin,benzylpenicilline,benzylpenicillinum,capicillin,cillora,cilloral,cilopen,cintrisul,cosmopen,cristapen,crystapen,dropcillin,eskacillin,falapen,forpen,galofak,gelacillin,hipercilina,hyasorb,hylenta,lemopen,liquacillin,liquapen,monocillin,monopen,mycofarm,novocillin,penalev,penicillinum,penilaryn,penisem,pentid,pentids,pfizerpen,pharmacillin,pradupen,scotcil,sugracillin,sugracillinsalt,tabilin,ursopen,veticillin" 3.6 "g" "NA" "PEN" 5904 "Benzylpenicillin" "Penicillins,Beta-lactams" "J01CE01,QJ01CE01,QJ51CE01,QS01AA14,S01AA14" "Combinations of antibacterials" "Combinations of antibacterials" "bepe,pen,peni,peni g,penic8,penica,penici,penicillin,penicillin g,penora,pg" "bencilpenicilina,benzopenicillin,benzylpenicilline,benzylpenicillinum,capicillin,cillora,cilloral,cilopen,cintrisul,cosmopen,cristapen,crystapen,dropcillin,eskacillin,falapen,forpen,galofak,gelacillin,hipercilina,hyasorb,hylenta,lemopen,liquacillin,liquapen,monocillin,monopen,mycofarm,novocillin,penalev,penicillinum,penilaryn,penisem,pentid,pentids,pfizerpen,pharmacillin,pradupen,scotcil,sugracillin,sugracillinsalt,tabilin,ursopen,veticillin" 3.6 "g" "NA"
"PEN-S" "Benzylpenicillin screening test" "Beta-lactams/penicillins" "NA" "pen screen" "NA" "NA" "PEN-S" "Benzylpenicillin screening test" "Penicillins,Beta-lactams" "NA" "pen screen" "NA" "NA"
"BES" 10178705 "Besifloxacin" "Fluoroquinolones" "QS01AE08,S01AE08" "besifl" "besivance" "73606-6,73628-0,73651-2" "BES" 10178705 "Besifloxacin" "Fluoroquinolones,Quinolones" "QS01AE08,S01AE08" "besifl" "besivance" "73606-6,73628-0,73651-2"
"BLA-S" "Beta-lactamase screening test" "Other" "NA" "beta-lactamase,betalactamase,bl screen,blt screen" "NA" "NA" "BLA-S" "Beta-lactamase screening test" "Other" "NA" "beta-lactamase,betalactamase,bl screen,blt screen" "NA" "NA"
"BIA" 71339 "Biapenem" "Carbapenems" "J01DH05,QJ01DH05" "biapen" "biapenern,omegacin" 1.2 "g" "41665-1,41666-9,41667-7,41728-7" "BIA" 71339 "Biapenem" "Carbapenems,Beta-lactams" "J01DH05,QJ01DH05" "biapen" "biapenern,omegacin" 1.2 "g" "41665-1,41666-9,41667-7,41728-7"
"BCZ" 65807 "Bicyclomycin" "Other antibacterials" "NA" "bicozamycin" "aizumycin,bacfeed,bacteron,bicozamicina,bicozamycin,bicozamycine,bicozamycinum" "NA" "BCZ" 65807 "Bicyclomycin" "Other" "NA" "bicozamycin" "aizumycin,bacfeed,bacteron,bicozamicina,bicozamycin,bicozamycine,bicozamycinum" "NA"
"BLM" 5360373 "Bleomycin" "Glycopeptides" "L01DC01,QL01DC01" "NA" "blenamax,blenoxane,bleocin,bleomicin,bleomicina,bleomycine,bleomycins,bleomycinum,blexane,nbleomycinamide" "NA" "BLM" 5360373 "Bleomycin" "Glycopeptides,Peptides" "L01DC01,QL01DC01" "NA" "blenamax,blenoxane,bleocin,bleomicin,bleomicina,bleomycine,bleomycins,bleomycinum,blexane,nbleomycinamide" "NA"
"BDP" 68760 "Brodimoprim" "Trimethoprims" "J01EA02,QJ01EA02" "Sulfonamides and trimethoprim" "Trimethoprim and derivatives" "NA" "brodimoprima,brodimoprime,brodimoprimum,bromdimoprim,hyprim,unitrim" 0.2 "g" "NA" "BDP" 68760 "Brodimoprim" "Trimethoprims" "J01EA02,QJ01EA02" "Sulfonamides and trimethoprim" "Trimethoprim and derivatives" "NA" "brodimoprima,brodimoprime,brodimoprimum,bromdimoprim,hyprim,unitrim" 0.2 "g" "NA"
"BUT" 47472 "Butoconazole" "Antifungals/antimycotics" "G01AF15,QG01AF15" "NA" "butaconazole,butoconazol,butoconazolum,gynofort" "NA" "BUT" 47472 "Butoconazole" "Antifungals" "G01AF15,QG01AF15" "NA" "butaconazole,butoconazol,butoconazolum,gynofort" "NA"
"CDZ" 44242317 "Cadazolid" "Oxazolidinones" "NA" "NA" "NA" "NA" "CDZ" 44242317 "Cadazolid" "Oxazolidinones" "NA" "NA" "NA" "NA"
"CLA" "Calcium aminosalicylate" "Antimycobacterials" "J04AA03,QJ04AA03" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "NA" 15 "g" "NA" "CLA" "Calcium aminosalicylate" "Antimycobacterials" "J04AA03,QJ04AA03" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "NA" 15 "g" "NA"
"CAP" 135565060 "Capreomycin" "Antimycobacterials" "J04AB30,QJ04AB30" "Drugs for treatment of tuberculosis" "Antibiotics" "capr,capreo" "NA" 1 "g" "16545-6,18872-2,23607-5,25210-6,25211-4,25212-2,42643-7,48170-5,55-4,55623-3,56-2,57-0,58-8,61355-4,89483-2" "CAP" 135565060 "Capreomycin" "Antimycobacterials" "J04AB30,QJ04AB30" "Drugs for treatment of tuberculosis" "Antibiotics" "capr,capreo" "NA" 1 "g" "16545-6,18872-2,23607-5,25210-6,25211-4,25212-2,42643-7,48170-5,55-4,55623-3,56-2,57-0,58-8,61355-4,89483-2"
"CRB" 20824 "Carbenicillin" "Beta-lactams/penicillins" "J01CA03,QJ01CA03" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "bar,carb,carben,cb" "anabactyl,carbecin,carbenicilina,carbenicillina,carbenicilline,carbenicillinum,dicarbenicillin,dipenicillin,fugacillin,geopen,gripenin,hyoper,microcillin,piopen,pyocianil,pyoclox,pyopan,pyopen,pyopene" 12 "g" "18873-0,3434-8,41668-5,59-6,60-4,61-2,62-0" "CRB" 20824 "Carbenicillin" "Penicillins,Beta-lactams" "J01CA03,QJ01CA03" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "bar,carb,carben,cb" "anabactyl,carbecin,carbenicilina,carbenicillina,carbenicilline,carbenicillinum,dicarbenicillin,dipenicillin,fugacillin,geopen,gripenin,hyoper,microcillin,piopen,pyocianil,pyoclox,pyopan,pyopen,pyopene" 12 "g" "18873-0,3434-8,41668-5,59-6,60-4,61-2,62-0"
"CRN" 93184 "Carindacillin" "Beta-lactams/penicillins" "J01CA05,QJ01CA05" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "carindacilina,carindacilline,carindacillinsalt,carindacillinum,geocillin,indanylcarbinicillin,urobac" 4 "g" "NA" "CRN" 93184 "Carindacillin" "Penicillins,Beta-lactams" "J01CA05,QJ01CA05" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "carindacilina,carindacilline,carindacillinsalt,carindacillinum,geocillin,indanylcarbinicillin,urobac" 4 "g" "NA"
"CAR" 6540466 "Carumonam" "Monobactams" "J01DF02,QJ01DF02" "NA" "carumonamum" 2 "g" "51694-8" "CAR" 6540466 "Carumonam" "Monobactams,Beta-lactams" "J01DF02,QJ01DF02" "NA" "carumonamum" 2 "g" "51694-8"
"CAS" 2826718 "Caspofungin" "Antifungals/antimycotics" "J02AX04,QJ02AX04" "Antimycotics for systemic use" "Other antimycotics for systemic use" "casp,caspof" "cancidas,caspofungina" 50 "mg" "32378-2,54175-5,54176-3,54185-4,58419-3" "CAS" 2826718 "Caspofungin" "Antifungals" "J02AX04,QJ02AX04" "Antimycotics for systemic use" "Other antimycotics for systemic use" "casp,caspof" "cancidas,caspofungina" 50 "mg" "32378-2,54175-5,54176-3,54185-4,58419-3"
"CAC" 91562 "Cefacetrile" "Cephalosporins (1st gen.)" "J01DB10,QJ01DB10,QJ51DB10" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephac" "cefacetril,cefacetrilo,cefacetrilum,celospor,cephacetrile,vetrimast" "55624-1,55625-8,55626-6,55627-4" "CAC" 91562 "Cefacetrile" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB10,QJ01DB10,QJ51DB10" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephac" "cefacetril,cefacetrilo,cefacetrilum,celospor,cephacetrile,vetrimast" "55624-1,55625-8,55626-6,55627-4"
"CEC" 51039 "Cefaclor" "Cephalosporins (2nd gen.)" "J01DC04,QJ01DC04" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "ccl,cec,cefacl,cf,cfac,cfc,cfcl,cfr,fac" "alenfral,alfacet,alfatil,ceclor,cefachlor,cefaclorum,cefeaclor,cephaclor,compound,distaclor,keflor,kefolor,kefral,keftab,keftid,lilly,lopac,panacef,panoral,raniclor" 1 "g" "16564-7,18874-8,21149-0,6986-4,83-6,84-4,85-1,86-9" "CEC" 51039 "Cefaclor" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC04,QJ01DC04" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "ccl,cec,cefacl,cf,cfac,cfc,cfcl,cfr,fac" "alenfral,alfacet,alfatil,ceclor,cefachlor,cefaclorum,cefeaclor,cephaclor,compound,distaclor,keflor,kefolor,kefral,keftab,keftid,lilly,lopac,panacef,panoral,raniclor" 1 "g" "16564-7,18874-8,21149-0,6986-4,83-6,84-4,85-1,86-9"
"CFR" 47965 "Cefadroxil" "Cephalosporins (1st gen.)" "J01DB05,QJ01DB05" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefadr,cfdx,cfr,fad" "bidocel,cefadrops,cefadroxilo,cefadroxilum,cefradroxil,cefzil,cephadroxil,duracef,duricef,kefroxil,sumacef,ultracef" 2 "g" "16565-4,18875-5,55628-2,63-8,64-6,65-3,66-1" "CFR" 47965 "Cefadroxil" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB05,QJ01DB05" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefadr,cfdx,cfr,fad" "bidocel,cefadrops,cefadroxilo,cefadroxilum,cefradroxil,cefzil,cephadroxil,duracef,duricef,kefroxil,sumacef,ultracef" 2 "g" "16565-4,18875-5,55628-2,63-8,64-6,65-3,66-1"
"LEX" 27447 "Cefalexin" "Cephalosporins (1st gen.)" "J01DB01,QJ01DB01,QJ51DB01" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cepale,cflx" "adcadina,alcephin,alsporin,ambal,amplex,aristosporin,azabort,bactopenor,beliam,biocef,carnosporin,cefablan,cefacet,cefadal,cefadin,cefadina,cefalekey,cefaleksin,cefalessina,cefalexgobens,cefalexina,cefalexine,cefalexinum,cefalin,cefalival,cefaloto,cefanex,cefaseptin,cefax,ceffanex,cefibacter,ceflax,ceforal,cefovit,celexin,cepastar,cepexin,cephacillin,cephalexine,cephalexinum,cephalobene,cephanasten,cephaxin,cephin,cepol,ceporex,ceporexin,ceporexine,cerexin,cerexins,check,cophalexin,domucef,doriman,durantel,efemida,erocetin,factagard,felexin,fexin,ibilex,ibrexin,inphalex,karilexina,kefalospes,keflet,keflex,kefolan,keforal,kekrinal,kidolex,lafarine,larixin,lenocef,lexibiotico,loisine,lonflex,lopilexin,losporal,madlexin,maksipor,mamalexin,mamlexin,medolexin,medoxine,neokef,neolexina,noveol,novolexin,nufex,optocef,oracef,oriphex,oroxin,ortisporina,ospexin,palitrex,panixine,pectril,prindex,pyassan,rilexine,roceph,rogevil,sanaxin,sartosona,sencephalin,sepexin,servicef,servispor,sialexin,sinthecillin,sintolexyn,sporicef,sporidex,syncl,syncle,synecl,taicelexin,tepaxin,theratrex,tokiolexin,uphalexin,viosporine,voxxim,winlex,zabytrex,zozarine" 2 "g" "NA" "LEX" 27447 "Cefalexin" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB01,QJ01DB01,QJ51DB01" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cepale,cflx" "adcadina,alcephin,alsporin,ambal,amplex,aristosporin,azabort,bactopenor,beliam,biocef,carnosporin,cefablan,cefacet,cefadal,cefadin,cefadina,cefalekey,cefaleksin,cefalessina,cefalexgobens,cefalexina,cefalexine,cefalexinum,cefalin,cefalival,cefaloto,cefanex,cefaseptin,cefax,ceffanex,cefibacter,ceflax,ceforal,cefovit,celexin,cepastar,cepexin,cephacillin,cephalexine,cephalexinum,cephalobene,cephanasten,cephaxin,cephin,cepol,ceporex,ceporexin,ceporexine,cerexin,cerexins,check,cophalexin,domucef,doriman,durantel,efemida,erocetin,factagard,felexin,fexin,ibilex,ibrexin,inphalex,karilexina,kefalospes,keflet,keflex,kefolan,keforal,kekrinal,kidolex,lafarine,larixin,lenocef,lexibiotico,loisine,lonflex,lopilexin,losporal,madlexin,maksipor,mamalexin,mamlexin,medolexin,medoxine,neokef,neolexina,noveol,novolexin,nufex,optocef,oracef,oriphex,oroxin,ortisporina,ospexin,palitrex,panixine,pectril,prindex,pyassan,rilexine,roceph,rogevil,sanaxin,sartosona,sencephalin,sepexin,servicef,servispor,sialexin,sinthecillin,sintolexyn,sporicef,sporidex,syncl,syncle,synecl,taicelexin,tepaxin,theratrex,tokiolexin,uphalexin,viosporine,voxxim,winlex,zabytrex,zozarine" 2 "g" "NA"
"RID" 5773 "Cefaloridine" "Cephalosporins (1st gen.)" "J01DB02,QJ01DB02" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefa,ceplor" "aliporina,ampligram,cefaloridin,cefaloridina,cefaloridinum,cefalorizin,ceflorin,cepaloridin,cepalorin,cephalomycine,cephaloridin,cephaloridine,cephaloridinum,ceporan,ceporin,ceporine,cilifor,deflorin,faredina,floridin,glaxoridin,intrasporin,keflodin,keflordin,kefloridin,kefspor,lloncefal,sasperin,sefacin,verolgin,vioviantine" 3 "g" "NA" "RID" 5773 "Cefaloridine" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB02,QJ01DB02" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefa,ceplor" "aliporina,ampligram,cefaloridin,cefaloridina,cefaloridinum,cefalorizin,ceflorin,cepaloridin,cepalorin,cephalomycine,cephaloridin,cephaloridine,cephaloridinum,ceporan,ceporin,ceporine,cilifor,deflorin,faredina,floridin,glaxoridin,intrasporin,keflodin,keflordin,kefloridin,kefspor,lloncefal,sasperin,sefacin,verolgin,vioviantine" 3 "g" "NA"
"CEP" 6024 "Cefalotin" "Cephalosporins (1st gen.)" "J01DB03,QJ01DB03" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephal,cfal,cflt" "averon,cefalothin,cefalothine,cefalothinsalt,cefalotina,cefalotine,cefalotinsalt,cefalotinum,cemastin,cephalothin,cephalothinsalt,cephalothinum,cephalotin,cephalotinsalt,ceporacin,cepovenin,coaxin,keflin,lospoven,microtin,seffin,synclotin,toricelocin" 4 "g" "NA" "CEP" 6024 "Cefalotin" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB03,QJ01DB03" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephal,cfal,cflt" "averon,cefalothin,cefalothine,cefalothinsalt,cefalotina,cefalotine,cefalotinsalt,cefalotinum,cemastin,cephalothin,cephalothinsalt,cephalothinum,cephalotin,cephalotinsalt,ceporacin,cepovenin,coaxin,keflin,lospoven,microtin,seffin,synclotin,toricelocin" 4 "g" "NA"
"MAN" 456255 "Cefamandole" "Cephalosporins (2nd gen.)" "J01DC03,QJ01DC03" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefama,cfam,cfmn" "cefadole,cefamandol,cefamandolum,cephadole,kefamandol,kefdole,mancef" 6 "g" "18876-3,3441-3,41669-3,55634-0,55635-7,55636-5,55637-3,67-9,68-7,69-5,70-3" "MAN" 456255 "Cefamandole" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC03,QJ01DC03" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefama,cfam,cfmn" "cefadole,cefamandol,cefamandolum,cephadole,kefamandol,kefdole,mancef" 6 "g" "18876-3,3441-3,41669-3,55634-0,55635-7,55636-5,55637-3,67-9,68-7,69-5,70-3"
"HAP" 30699 "Cefapirin" "Cephalosporins (1st gen.)" "J01DB08,QG51AA05,QJ01DB08,QJ51DB08" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephap" "ambrocef,brisfirina,brisporin,bristocef,cefadyl,cefalak,cefaloject,cefapirina,cefapirine,cefapirinsalt,cefapirinum,cefaprin,cefatrex,cefatrexyl,cephapirin,cephapirine,cephapirinsalt,cephatrexil,cephatrexyl,metricure" 4 "g" "NA" "HAP" 30699 "Cefapirin" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB08,QG51AA05,QJ01DB08,QJ51DB08" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephap" "ambrocef,brisfirina,brisporin,bristocef,cefadyl,cefalak,cefaloject,cefapirina,cefapirine,cefapirinsalt,cefapirinum,cefaprin,cefatrex,cefatrexyl,cephapirin,cephapirine,cephapirinsalt,cephatrexil,cephatrexyl,metricure" 4 "g" "NA"
"CTZ" 6410758 "Cefatrizine" "Cephalosporins (1st gen.)" "J01DB07,QJ01DB07" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefatr" "bricef,cefathiamidine,cefatrix,cefatrizino,cefatrizinum,cephatriazine,cepticol,cetrazil,latocef,orosporina,orotric,seapuron,trizina" 1 "g" "18877-1,55639-9,71-1,72-9,73-7,74-5" "CTZ" 6410758 "Cefatrizine" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB07,QJ01DB07" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefatr" "bricef,cefathiamidine,cefatrix,cefatrizino,cefatrizinum,cephatriazine,cepticol,cetrazil,latocef,orosporina,orotric,seapuron,trizina" 1 "g" "18877-1,55639-9,71-1,72-9,73-7,74-5"
"CZD" 71736 "Cefazedone" "Cephalosporins (1st gen.)" "J01DB06,QJ01DB06" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefaze" "cefazedon,cefazedona,cefazedonesalt,cefazedonum,refosporen,refosporene,refosporin,refosporinsalt" 3 "g" "NA" "CZD" 71736 "Cefazedone" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB06,QJ01DB06" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefaze" "cefazedon,cefazedona,cefazedonesalt,cefazedonum,refosporen,refosporene,refosporin,refosporinsalt" 3 "g" "NA"
"CZO" 33255 "Cefazolin" "Cephalosporins (1st gen.)" "J01DB04,QJ01DB04,QJ51DB04" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefazo,cfz,cfzl,cz,czol,faz,kz" "ancef,atirin,biazolina,cefabiozim,cefacidal,cefalomicina,cefamedin,cefamezin,cefazil,cefazina,cefazolina,cefazoline,cefazolinsalt,cefazolinum,cephamezine,cephazolidin,cephazolin,cephazoline,elzogram,firmacef,gramaxin,kefzol,lampocef,liviclina,neofazol,oprea,recef,totacef,zolicef,zolisint" 3 "g" "16566-2,18878-9,25235-3,3442-1,3443-9,41670-1,75-2,76-0,77-8,78-6,80962-4,85422-4" "CZO" 33255 "Cefazolin" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB04,QJ01DB04,QJ51DB04" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cefazo,cfz,cfzl,cz,czol,faz,kz" "ancef,atirin,biazolina,cefabiozim,cefacidal,cefalomicina,cefamedin,cefamezin,cefazil,cefazina,cefazolina,cefazoline,cefazolinsalt,cefazolinum,cephamezine,cephazolidin,cephazolin,cephazoline,elzogram,firmacef,gramaxin,kefzol,lampocef,liviclina,neofazol,oprea,recef,totacef,zolicef,zolisint" 3 "g" "16566-2,18878-9,25235-3,3442-1,3443-9,41670-1,75-2,76-0,77-8,78-6,80962-4,85422-4"
"CFB" 127527 "Cefbuperazone" "Other antibacterials" "J01DC13,QJ01DC13" "cefbup" "cefbuperazona,cefbuperazonesalt,cefbuperazonum,cefbuperzaone,cerbuperazone,keiperazon,tomiporan" 2 "g" "NA" "CFB" 127527 "Cefbuperazone" "Other" "J01DC13,QJ01DC13" "cefbup" "cefbuperazona,cefbuperazonesalt,cefbuperazonum,cefbuperzaone,cerbuperazone,keiperazon,tomiporan" 2 "g" "NA"
"CCP" 6436055 "Cefcapene" "Cephalosporins (3rd gen.)" "J01DD17,QJ01DD17" "cefcap" "flomox" 0.45 "g" "100044-7,76143-7" "CCP" 6436055 "Cefcapene" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD17,QJ01DD17" "cefcap" "flomox" 0.45 "g" "100044-7,76143-7"
"CCX" 5282438 "Cefcapene pivoxil" "Cephalosporins (3rd gen.)" "NA" "NA" "cefcamate,flumax" "NA" "CCX" 5282438 "Cefcapene pivoxil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "cefcamate,flumax" "NA"
"CDR" 6915944 "Cefdinir" "Cephalosporins (3rd gen.)" "J01DD15,QJ01DD15" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cd,cdn,cdr,cefdin,cfd,din" "cefdinirum,cefdinyl,cefdirnir,ceftinex,cefzon,omnicef" 0.6 "g" "23636-4,23637-2,35757-4,35758-2" "CDR" 6915944 "Cefdinir" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD15,QJ01DD15" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cd,cdn,cdr,cefdin,cfd,din" "cefdinirum,cefdinyl,cefdirnir,ceftinex,cefzon,omnicef" 0.6 "g" "23636-4,23637-2,35757-4,35758-2"
"DIT" 9870843 "Cefditoren" "Cephalosporins (3rd gen.)" "J01DD16,QJ01DD16" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cdn,cefdit" "cefditoreno,spectracef" 0.4 "g" "35759-0,35760-8,35761-6,35762-4" "DIT" 9870843 "Cefditoren" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD16,QJ01DD16" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cdn,cefdit" "cefditoreno,spectracef" 0.4 "g" "35759-0,35760-8,35761-6,35762-4"
"DIX" 6437877 "Cefditoren pivoxil" "Cephalosporins (3rd gen.)" "NA" "NA" "cefditorin,meiact,pivaloyloxymethyl" "NA" "DIX" 6437877 "Cefditoren pivoxil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "cefditorin,meiact,pivaloyloxymethyl" "NA"
"FEP" 5479537 "Cefepime" "Cephalosporins (4th gen.)" "J01DE01,QJ01DE01" "Other beta-lactam antibacterials" "Fourth-generation cephalosporins" "cefep4,cefepi,cfep,cfpi,cpe,cpm,fep,pm,xpm" "anticefepime,axepim,cefepima,cefepimum,maxipime,pyrrolidinium,renapime" 4 "g" "101502-3,18879-7,31142-3,31143-1,35763-2,38363-8,42350-9,42351-7,42353-3,50631-1,58412-8,6643-1,6644-9,6645-7,6646-5,6987-2,8272-7,8273-5" "FEP" 5479537 "Cefepime" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "J01DE01,QJ01DE01" "Other beta-lactam antibacterials" "Fourth-generation cephalosporins" "cefep4,cefepi,cfep,cfpi,cpe,cpm,fep,pm,xpm" "anticefepime,axepim,cefepima,cefepimum,maxipime,pyrrolidinium,renapime" 4 "g" "101502-3,18879-7,31142-3,31143-1,35763-2,38363-8,42350-9,42351-7,42353-3,50631-1,58412-8,6643-1,6644-9,6645-7,6646-5,6987-2,8272-7,8273-5"
"CFA" "Cefepime/amikacin" "Cephalosporins (4th gen.)" "J01DE51,QJ01DE51" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "CFA" "Cefepime/amikacin" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "J01DE51,QJ01DE51" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"CPC" 9567559 "Cefepime/clavulanic acid" "Cephalosporins (4th gen.)" "J01DE51,QJ01DE51" "cefcla,cicl,xpml" "NA" "NA" "CPC" 9567559 "Cefepime/clavulanic acid" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "J01DE51,QJ01DE51" "cefcla,cicl,xpml" "NA" "NA"
"FPE" 23653540 "Cefepime/enmetazobactam" "Cephalosporins (4th gen.)" "J01DE51,QJ01DE51" "NA" "NA" "NA" "FPE" 23653540 "Cefepime/enmetazobactam" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DE51,QJ01DE51" "NA" "NA" "NA"
"FNC" "Cefepime/nacubactam" "Cephalosporins (4th gen.)" "J01DE51,QJ01DE51" "NA" "NA" "NA" "FNC" "Cefepime/nacubactam" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DE51,QJ01DE51" "NA" "NA" "NA"
"FPT" 9567558 "Cefepime/tazobactam" "Cephalosporins (4th gen.)" "J01DE51,QJ01DE51" "NA" "NA" "NA" "FTA" "Cefepime/taniborbactam" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DE51,QJ01DE51" "NA" "NA" "NA"
"FPZ" "Cefepime/zidebactam" "Cephalosporins (4th gen.)" "J01DE51,QJ01DE51" "NA" "NA" "NA" "FPT" 9567558 "Cefepime/tazobactam" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DE51,QJ01DE51" "NA" "NA" "NA"
"CAT" 5487888 "Cefetamet" "Cephalosporins (3rd gen.)" "J01DD10,QJ01DD10" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefeta,cefmtm" "cefetametum,deacetoxycefotaxime,epocelin" 1 "g" "32377-4,35764-0,35765-7,55640-7" "FPZ" "Cefepime/zidebactam" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DE51,QJ01DE51" "NA" "NA" "NA"
"CPI" 5486182 "Cefetamet pivoxil" "Cephalosporins (3rd gen.)" "NA" "NA" "cefetametpivoxil,cefyl,globocef" "NA" "CAT" 5487888 "Cefetamet" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD10,QJ01DD10" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefeta,cefmtm" "cefetametum,deacetoxycefotaxime,epocelin" 1 "g" "32377-4,35764-0,35765-7,55640-7"
"CCL" 71719688 "Cefetecol" "Cephalosporins (4th gen.)" "NA" "cefcatacol" "NA" "NA" "CPI" 5486182 "Cefetamet pivoxil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "cefetametpivoxil,cefyl,globocef" "NA"
"CZL" 193956 "Cefetrizole" "Cephalosporins (unclassified gen.)" "NA" "NA" "cefetrizolum" "NA" "CCL" 71719688 "Cefetecol" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "NA" "cefcatacol" "NA" "NA"
"FDC" 77843966 "Cefiderocol" "Cephalosporins (unclassified gen.)" "J01DI04,QJ01DI04" "NA" "fetcroja" 6 "g" "95767-0,99280-0,99503-5" "CZL" 193956 "Cefetrizole" "Cephalosporins,Beta-lactams" "NA" "NA" "cefetrizolum" "NA"
"CFM" 5362065 "Cefixime" "Cephalosporins (3rd gen.)" "J01DD08,QJ01DD08" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefixi,cfe,cfix,cfxm,dcfm,fix,ix" "cefixim,cefixima,cefiximum,cefixoral,cefspan,cephoral,citropen,denvar,necopen,oraken,oroken,suprax,tricef,unixime" 0.4 "g" "16567-0,18880-5,25236-1,35766-5,79-4,80-2,81-0,82-8" "FDC" 77843966 "Cefiderocol" "Cephalosporins,Beta-lactams" "J01DI04,QJ01DI04" "NA" "fetcroja" 6 "g" "95767-0,99280-0,99503-5"
"CEO" "Cefixime/ornidazole" "Other antibacterials" "J01DD58,QJ01DD58" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "CFM" 5362065 "Cefixime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD08,QJ01DD08" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefixi,cfe,cfix,cfxm,dcfm,fix,ix" "cefixim,cefixima,cefiximum,cefixoral,cefspan,cephoral,citropen,denvar,necopen,oraken,oroken,suprax,tricef,unixime" 0.4 "g" "16567-0,18880-5,25236-1,35766-5,79-4,80-2,81-0,82-8"
"CMX" 9570757 "Cefmenoxime" "Cephalosporins (3rd gen.)" "J01DD05,QJ01DD05,QS01AA31,QS02AA18,S01AA31,S02AA18" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefmen" "bestron,cefmenoxima,cefmenoximum,tacef" 2 "g" "32375-8,54174-8,54203-5,55641-5" "CEO" "Cefixime/ornidazole" "Other" "J01DD58,QJ01DD58" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"CMZ" 42008 "Cefmetazole" "Cephalosporins (2nd gen.)" "J01DC09,QJ01DC09" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefmet" "cefmetazol,cefmetazolo,cefmetazolum,cefmetazon,metafar,zefazone" 4 "g" "11575-8,18881-3,25222-1,87-7,88-5,89-3,90-1" "CMX" 9570757 "Cefmenoxime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD05,QJ01DD05,QS01AA31,QS02AA18,S01AA31,S02AA18" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefmen" "bestron,cefmenoxima,cefmenoximum,tacef" 2 "g" "32375-8,54174-8,54203-5,55641-5"
"CNX" 71141 "Cefminox" "Other antibacterials" "J01DC12,QJ01DC12" "cefmin" "alteporina,cefminoxhydrate,cefminoxum,meicelin,tencef" 4 "g" "54908-9" "CMZ" 42008 "Cefmetazole" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC09,QJ01DC09" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefmet" "cefmetazol,cefmetazolo,cefmetazolum,cefmetazon,metafar,zefazone" 4 "g" "11575-8,18881-3,25222-1,87-7,88-5,89-3,90-1"
"DIZ" 5361871 "Cefodizime" "Cephalosporins (3rd gen.)" "J01DD09,QJ01DD09" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "NA" "cefodizima,cefodizimum,cefodizme,diezime,kenicef,modivid,neucef,timecef" 2 "g" "18882-1,6988-0,91-9,92-7,93-5,94-3" "CNX" 71141 "Cefminox" "Other" "J01DC12,QJ01DC12" "cefmin" "alteporina,cefminoxhydrate,cefminoxum,meicelin,tencef" 4 "g" "54908-9"
"CID" 43594 "Cefonicid" "Cephalosporins (2nd gen.)" "J01DC06,QJ01DC06" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefoni" "cefonicide,cefonicido,cefonicidsalt,cefonicidum,monocef,monocid" 1 "g" "18883-9,25237-9,3444-7,55642-3,95-0,96-8,97-6,98-4" "DIZ" 5361871 "Cefodizime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD09,QJ01DD09" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "NA" "cefodizima,cefodizimum,cefodizme,diezime,kenicef,modivid,neucef,timecef" 2 "g" "18882-1,6988-0,91-9,92-7,93-5,94-3"
"CFP" 44187 "Cefoperazone" "Cephalosporins (3rd gen.)" "J01DD12,QJ01DD12,QJ51DD12" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefope,cfp,cfpz,cp,cpz,fop,per" "bioperazone,cefob,cefobid,cefobis,cefoneg,cefoper,cefoperazin,cefoperazine,cefoperazon,cefoperazona,cefoperazonesalt,cefoperazono,cefoperazonum,cefozon,medocef,myticef,pathozone,peracef,tomabef" 4 "g" "100-8,101-6,102-4,18884-7,3445-4,35767-3,35768-1,54166-4,54167-2,54168-0,99-2" "CID" 43594 "Cefonicid" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC06,QJ01DC06" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefoni" "cefonicide,cefonicido,cefonicidsalt,cefonicidum,monocef,monocid" 1 "g" "18883-9,25237-9,3444-7,55642-3,95-0,96-8,97-6,98-4"
"CSL" "Cefoperazone/sulbactam" "Cephalosporins (3rd gen.)" "J01DD62,QJ01DD62" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "fopsul" "NA" 4 "g" "35768-1,54166-4,54167-2,54168-0" "CFP" 44187 "Cefoperazone" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD12,QJ01DD12,QJ51DD12" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefope,cfp,cfpz,cp,cpz,fop,per" "bioperazone,cefob,cefobid,cefobis,cefoneg,cefoper,cefoperazin,cefoperazine,cefoperazon,cefoperazona,cefoperazonesalt,cefoperazono,cefoperazonum,cefozon,medocef,myticef,pathozone,peracef,tomabef" 4 "g" "100-8,101-6,102-4,18884-7,3445-4,35767-3,35768-1,54166-4,54167-2,54168-0,99-2"
"CND" 43507 "Ceforanide" "Cephalosporins (2nd gen.)" "J01DC11,QJ01DC11" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefora" "ceforanido,ceforanidum,precef" 4 "g" "103-2,104-0,105-7,106-5,18885-4,55643-1" "CSL" "Cefoperazone/sulbactam" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DD62,QJ01DD62" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "fopsul" "NA" 4 "g" "35768-1,54166-4,54167-2,54168-0"
"CSE" 9830519 "Cefoselis" "Cephalosporins (4th gen.)" "NA" "cefose" "winsef" "NA" "CND" 43507 "Ceforanide" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC11,QJ01DC11" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefora" "ceforanido,ceforanidum,precef" 4 "g" "103-2,104-0,105-7,106-5,18885-4,55643-1"
"CTX" 5742673 "Cefotaxime" "Cephalosporins (3rd gen.)" "J01DD01,QJ01DD01" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefo32,cefota,cfot,cft,cftx,ct,ctx,fot,fot1,tax,taxmen,taxnme,xct" "anticefotaxime,cefotax,cefotaxim,cefotaxima,cefotaximesalt,cefotaximsalt,cefotaximum,cephotaxim,cephotaxime,claforan,kefotex,omnatax,pretor,ralopar,tolycar,tolycor,zariviz" 4 "g" "101479-4,101480-2,107-3,108-1,109-9,110-7,18886-2,25238-7,31138-1,31139-9,3446-2,35769-9,35770-7,35771-5,41671-9,50632-9,52128-6,54191-2,54192-0,54193-8,55189-5,55644-9,6989-8,80961-6" "CSE" 9830519 "Cefoselis" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "NA" "cefose" "winsef" "NA"
"CTX-S" "Cefotaxime screening test" "Cephalosporins (3rd gen.)" "NA" "ctx screen" "NA" "NA" "CTX" 5742673 "Cefotaxime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD01,QJ01DD01" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefo32,cefota,cfot,cft,cftx,ct,ctx,fot,fot1,tax,taxmen,taxnme,xct" "anticefotaxime,cefotax,cefotaxim,cefotaxima,cefotaximesalt,cefotaximsalt,cefotaximum,cephotaxim,cephotaxime,claforan,kefotex,omnatax,pretor,ralopar,tolycar,tolycor,zariviz" 4 "g" "101479-4,101480-2,107-3,108-1,109-9,110-7,18886-2,25238-7,31138-1,31139-9,3446-2,35769-9,35770-7,35771-5,41671-9,50632-9,52128-6,54191-2,54192-0,54193-8,55189-5,55644-9,6989-8,80961-6"
"CTC" 9575353 "Cefotaxime/clavulanic acid" "Cephalosporins (3rd gen.)" "J01DD51,QJ01DD51" "cxcl,taxcla,xctl" "NA" "NA" "CTX-S" "Cefotaxime screening test" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "ctx screen" "NA" "NA"
"CTS" 9574753 "Cefotaxime/sulbactam" "Cephalosporins (3rd gen.)" "J01DD51,QJ01DD51" "NA" "NA" "54191-2,54192-0,54193-8,55644-9" "CTC" 9575353 "Cefotaxime/clavulanic acid" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD51,QJ01DD51" "cxcl,taxcla,xctl" "NA" "NA"
"CTT" 53025 "Cefotetan" "Cephalosporins (2nd gen.)" "J01DC05,QJ01DC05" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefote,cftt,cn,cte,ctn,ctt,tans" "apacef,apatef,cefotetanum" 4 "g" "111-5,112-3,113-1,114-9,18887-0,25239-5,3447-0,41672-7,41673-5,41674-3,41729-5,6990-6" "CTS" 9574753 "Cefotaxime/sulbactam" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DD51,QJ01DD51" "NA" "NA" "54191-2,54192-0,54193-8,55644-9"
"CTF" 43708 "Cefotiam" "Cephalosporins (2nd gen.)" "J01DC07,QJ01DC07" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefoti" "aspil,cefotiamum,ceradon,halospor,pansporin,pansporine,spizef" 1.2 "g" 4 "g" "32374-1,35772-3,35773-1,55645-6,55737-1,55738-9,55739-7,55740-5" "CTT" 53025 "Cefotetan" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC05,QJ01DC05" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefote,cftt,cn,cte,ctn,ctt,tans" "apacef,apatef,cefotetanum" 4 "g" "111-5,112-3,113-1,114-9,18887-0,25239-5,3447-0,41672-7,41673-5,41674-3,41729-5,6990-6"
"CHE" 125846 "Cefotiam hexetil" "Cephalosporins (3rd gen.)" "NA" "NA" "taketiam,texodil" "55737-1,55738-9,55739-7,55740-5" "CTF" 43708 "Cefotiam" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC07,QJ01DC07" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefoti" "aspil,cefotiamum,ceradon,halospor,pansporin,pansporine,spizef" 1.2 "g" 4 "g" "32374-1,35772-3,35773-1,55645-6,55737-1,55738-9,55739-7,55740-5"
"FOV" 9578573 "Cefovecin" "Cephalosporins (3rd gen.)" "QJ01DD91" "cefove" "cefovecinsalt,convenia" "76147-8,87792-8" "CHE" 125846 "Cefotiam hexetil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "taketiam,texodil" "55737-1,55738-9,55739-7,55740-5"
"FOX" 441199 "Cefoxitin" "Cephalosporins (2nd gen.)" "J01DC01,QJ01DC01" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefoxi,cfox,cfx,cfxt,cx,fox,fx" "betacef,cefoxil,cefoxitina,cefoxitine,cefoxitinsalt,cefoxitinum,cefoxotin,cenomycin,farmoxin,mefoxin,mefoxithin,mefoxitin,merxin,rephoxitin" 6 "g" "101492-7,115-6,116-4,117-2,118-0,18888-8,25220-5,25240-3,25366-6,3448-8,41675-0,41676-8,41677-6,41730-3,6991-4" "FOV" 9578573 "Cefovecin" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "QJ01DD91" "cefove" "cefovecinsalt,convenia" "76147-8,87792-8"
"FOX-S" "Cefoxitin screening test" "Cephalosporins (2nd gen.)" "NA" "cfsc,fox1" "NA" "NA" "FOX" 441199 "Cefoxitin" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC01,QJ01DC01" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefoxi,cfox,cfx,cfxt,cx,fox,fx" "betacef,cefoxil,cefoxitina,cefoxitine,cefoxitinsalt,cefoxitinum,cefoxotin,cenomycin,farmoxin,mefoxin,mefoxithin,mefoxitin,merxin,rephoxitin" 6 "g" "101492-7,115-6,116-4,117-2,118-0,18888-8,25220-5,25240-3,25366-6,3448-8,41675-0,41676-8,41677-6,41730-3,6991-4"
"ZOP" 9571080 "Cefozopran" "Cephalosporins (4th gen.)" "J01DE03,QJ01DE03" "cefozo" "firstcin,imidazo" 4 "g" "100045-4,53820-7" "FOX-S" "Cefoxitin screening test" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "NA" "cfsc,fox1" "NA" "NA"
"CFZ" 68597 "Cefpimizole" "Cephalosporins (3rd gen.)" "NA" "cefpim" "ajicef,cefpimizol,cefpimizolesalt,cefpimizolum,renilan" "NA" "ZOP" 9571080 "Cefozopran" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "J01DE03,QJ01DE03" "cefozo" "firstcin,imidazo" 4 "g" "100045-4,53820-7"
"CPM" 636405 "Cefpiramide" "Cephalosporins (3rd gen.)" "J01DD11,QJ01DD11" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefpam" "cefpiramida,cefpiramidesalt,cefpiramido,cefpiramidum,sepatren,suncefal" 2 "g" "NA" "CFZ" 68597 "Cefpimizole" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "cefpim" "ajicef,cefpimizol,cefpimizolesalt,cefpimizolum,renilan" "NA"
"CPO" 5479539 "Cefpirome" "Cephalosporins (4th gen.)" "J01DE02,QJ01DE02" "Other beta-lactam antibacterials" "Fourth-generation cephalosporins" "cefpom,cfpr" "broact,cefir,cefpiroma,cefpiromum,cefrom,keiten,romecef" 4 "g" "18889-6,6647-3,6648-1,6649-9,6650-6,6992-2,8274-3,8275-0,8276-8" "CPM" 636405 "Cefpiramide" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD11,QJ01DD11" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefpam" "cefpiramida,cefpiramidesalt,cefpiramido,cefpiramidum,sepatren,suncefal" 2 "g" "NA"
"CPD" 6335986 "Cefpodoxime" "Cephalosporins (3rd gen.)" "J01DD13,QJ01DD13" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefpod,cfpd,cfpo,cpd,pod,pod4,px" "cefpodoxima,cefpodoximum,epoxim" 0.4 "g" "119-8,120-6,121-4,122-2,18890-4,25241-1,41678-4,41679-2,41680-0,41731-1,6993-0,90849-1" "CPO" 5479539 "Cefpirome" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "J01DE02,QJ01DE02" "Other beta-lactam antibacterials" "Fourth-generation cephalosporins" "cefpom,cfpr" "broact,cefir,cefpiroma,cefpiromum,cefrom,keiten,romecef" 4 "g" "18889-6,6647-3,6648-1,6649-9,6650-6,6992-2,8274-3,8275-0,8276-8"
"CPX" 6526396 "Cefpodoxime proxetil" "Cephalosporins (3rd gen.)" "NA" "NA" "banan,cefodox,cefoprox,cefpoderm,cefpodoximproxetil,cepodem,doxef,orelox,otreon,podomexef,simplicef,vantin" "NA" "CPD" 6335986 "Cefpodoxime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD13,QJ01DD13" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefpod,cfpd,cfpo,cpd,pod,pod4,px" "cefpodoxima,cefpodoximum,epoxim" 0.4 "g" "119-8,120-6,121-4,122-2,18890-4,25241-1,41678-4,41679-2,41680-0,41731-1,6993-0,90849-1"
"CDC" "Cefpodoxime/clavulanic acid" "Cephalosporins (3rd gen.)" "J01DD64,QJ01DD64" "cecl,podcla" "NA" 0.4 "g" "NA" "CPX" 6526396 "Cefpodoxime proxetil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "banan,cefodox,cefoprox,cefpoderm,cefpodoximproxetil,cepodem,doxef,orelox,otreon,podomexef,simplicef,vantin" "NA"
"CPR" 5281006 "Cefprozil" "Cephalosporins (2nd gen.)" "J01DC10,QJ01DC10" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefpro,cpr,cpz,fp" "arzimol,brisoral,cefprozilo,cefprozilum,cronocef,procef,serozil" 1 "g" "123-0,124-8,125-5,126-3,18891-2,6994-8" "CDC" "Cefpodoxime/clavulanic acid" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD64,QJ01DD64" "cecl,podcla" "NA" 0.4 "g" "NA"
"CEQ" 5464355 "Cefquinome" "Cephalosporins (4th gen.)" "QG51AA07,QJ01DE90,QJ51DE90" "cefqui" "cefquinoma,cefquinomum,cobactan,quinolinium" "100046-2,76150-2" "CPR" 5281006 "Cefprozil" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC10,QJ01DC10" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefpro,cpr,cpz,fp" "arzimol,brisoral,cefprozilo,cefprozilum,cronocef,procef,serozil" 1 "g" "123-0,124-8,125-5,126-3,18891-2,6994-8"
"CRD" 5284529 "Cefroxadine" "Cephalosporins (1st gen.)" "J01DB11,QJ01DB11" "Other beta-lactam antibacterials" "First-generation cephalosporins" "ceftix" "cefroxadin,cefroxadino,cefroxadinum,oraspor" 2.1 "g" "NA" "CEQ" 5464355 "Cefquinome" "Cephalosporins (4th gen.),Cephalosporins,Beta-lactams" "QG51AA07,QJ01DE90,QJ51DE90" "cefqui" "cefquinoma,cefquinomum,cobactan,quinolinium" "100046-2,76150-2"
"CFS" 656575 "Cefsulodin" "Cephalosporins (3rd gen.)" "J01DD03,QJ01DD03" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefsul,cfsl,cfsu" "cefomonil,cefonomil,cefsulodine,cefsulodinhydrate,cefsulodino,cefsulodinum,pseudocef,pseudomonil,pyocefal,sulcephalosporin,takesulin,tilmapor,ulfaret" 4 "g" "127-1,128-9,129-7,130-5,131-3,18892-0,25242-9,55647-2" "CRD" 5284529 "Cefroxadine" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB11,QJ01DB11" "Other beta-lactam antibacterials" "First-generation cephalosporins" "ceftix" "cefroxadin,cefroxadino,cefroxadinum,oraspor" 2.1 "g" "NA"
"CSU" 68718 "Cefsumide" "Cephalosporins (unclassified gen.)" "NA" "NA" "cefsulmid,cefsumido,cefsumidum" "NA" "CFS" 656575 "Cefsulodin" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD03,QJ01DD03" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cefsul,cfsl,cfsu" "cefomonil,cefonomil,cefsulodine,cefsulodinhydrate,cefsulodino,cefsulodinum,pseudocef,pseudomonil,pyocefal,sulcephalosporin,takesulin,tilmapor,ulfaret" 4 "g" "127-1,128-9,129-7,130-5,131-3,18892-0,25242-9,55647-2"
"CPT" 56841980 "Ceftaroline" "Cephalosporins (5th gen.)" "J01DI02,QJ01DI02" "ceftar,cfro" "ceftaroine,teflaro,zinforo" "73604-1,73605-8,73626-4,73627-2,73649-6,73650-4,74170-2" "CSU" 68718 "Cefsumide" "Cephalosporins,Beta-lactams" "NA" "NA" "cefsulmid,cefsumido,cefsumidum" "NA"
"CPA" "Ceftaroline/avibactam" "Cephalosporins (5th gen.)" "NA" "NA" "NA" "73604-1,73626-4,73649-6" "CPT" 56841980 "Ceftaroline" "Cephalosporins (5th gen.),Cephalosporins,Beta-lactams" "J01DI02,QJ01DI02" "ceftar,cfro" "ceftaroine,teflaro,zinforo" "73604-1,73605-8,73626-4,73627-2,73649-6,73650-4,74170-2"
"CAZ" 5481173 "Ceftazidime" "Cephalosporins (3rd gen.)" "J01DD02,QJ01DD02" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "caz,cefta,ceftaz,cfta,cftz,taz,tz,xtz" "ceftazimide,ceptaz,fortam,fortaz,fortum,glazidim,kefazim,modacin,pentacef,tazicef,tizime" 4 "g" "101481-0,101482-8,101483-6,132-1,133-9,134-7,135-4,18893-8,21151-6,3449-6,35774-9,35775-6,35776-4,42352-5,55648-0,55649-8,55650-6,55651-4,58705-5,6995-5,73603-3,73625-6,73648-8,80960-8,87734-0,90850-9" "CPA" "Ceftaroline/avibactam" "Cephalosporins (5th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "NA" "NA" "NA" "73604-1,73626-4,73649-6"
"CZA" 90643431 "Ceftazidime/avibactam" "Cephalosporins (3rd gen.)" "J01DD52,QJ01DD52" "cfav" "avycaz,zavicefta" 6 "g" "101483-6,73603-3,73625-6,73648-8,87734-0" "CAZ" 5481173 "Ceftazidime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD02,QJ01DD02" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "caz,cef,cefta,ceftaz,cfta,cftz,taz,tz,xtz" "ceftazimide,ceptaz,fortam,fortaz,fortum,glazidim,kefazim,modacin,pentacef,tazicef,tizime" 4 "g" "101481-0,101482-8,101483-6,132-1,133-9,134-7,135-4,18893-8,21151-6,3449-6,35774-9,35775-6,35776-4,42352-5,55648-0,55649-8,55650-6,55651-4,58705-5,6995-5,73603-3,73625-6,73648-8,80960-8,87734-0,90850-9"
"CCV" 9575352 "Ceftazidime/clavulanic acid" "Cephalosporins (3rd gen.)" "J01DD52,QJ01DD52" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "czcl,tazcla,xtzl" "NA" 6 "g" "NA" "CZA" 90643431 "Ceftazidime/avibactam" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DD52,QJ01DD52" "cfav" "avycaz,zavicefta" 6 "g" "101483-6,73603-3,73625-6,73648-8,87734-0"
"CEM" 6537431 "Cefteram" "Cephalosporins (3rd gen.)" "J01DD18,QJ01DD18" "cefter" "cefterame,cefteramum,ceftetrame" 0.4 "g" "100047-0,76144-5" "CCV" 9575352 "Ceftazidime/clavulanic acid" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD52,QJ01DD52" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "czcl,tazcla,xtzl" "NA" 6 "g" "NA"
"CPL" 5362114 "Cefteram pivoxil" "Cephalosporins (3rd gen.)" "NA" "NA" "cefterampivoxil,tomiron" "NA" "CEM" 6537431 "Cefteram" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD18,QJ01DD18" "cefter" "cefterame,cefteramum,ceftetrame" 0.4 "g" "100047-0,76144-5"
"CTL" 65755 "Ceftezole" "Cephalosporins (1st gen.)" "J01DB12,QJ01DB12" "Other beta-lactam antibacterials" "First-generation cephalosporins" "ceftez" "alomen,ceftezol,ceftezolesalt,ceftezolo,ceftezolum,celoslin,demethylcefazolin,falomesin" 3 "g" "NA" "CPL" 5362114 "Cefteram pivoxil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "cefterampivoxil,tomiron" "NA"
"CTB" 5282242 "Ceftibuten" "Cephalosporins (3rd gen.)" "J01DD14,QJ01DD14" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cb,ceftib,cfbu,ctb,tib" "cedax,ceftem,ceftibutene,ceftibuteno,ceftibutenum,ceftibutin,ceprifran,isocef,keimax,seftem" 0.4 "g" "35777-2,35778-0,35779-8,6996-3" "CTL" 65755 "Ceftezole" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "J01DB12,QJ01DB12" "Other beta-lactam antibacterials" "First-generation cephalosporins" "ceftez" "alomen,ceftezol,ceftezolesalt,ceftezolo,ceftezolum,celoslin,demethylcefazolin,falomesin" 3 "g" "NA"
"TIO" 6328657 "Ceftiofur" "Cephalosporins (3rd gen.)" "QJ01DD90,QJ51DD90" "ceftif" "ceftiofurum,excenel,naxcel" "23709-9,35780-6,35781-4,55652-2" "CTB" 5282242 "Ceftibuten" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD14,QJ01DD14" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "cb,ceftib,cfbu,ctb,tib" "cedax,ceftem,ceftibutene,ceftibuteno,ceftibutenum,ceftibutin,ceprifran,isocef,keimax,seftem" 0.4 "g" "35777-2,35778-0,35779-8,6996-3"
"CZX" 6533629 "Ceftizoxime" "Cephalosporins (3rd gen.)" "J01DD07,QJ01DD07" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "ceftiz,cfzx,ctz,cz,czx,tiz,zox" "cefizox,ceftix,ceftizoxima,ceftizoximesalt,ceftizoximum,eposerin" 4 "g" "136-2,137-0,138-8,139-6,18894-6,20378-6,23622-4,25243-7,3450-4,6997-1" "CTA" "Ceftibuten/avibactam" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "NA" "NA" "NA" "NA"
"CZP" 9578661 "Ceftizoxime alapivoxil" "Cephalosporins (3rd gen.)" "NA" "NA" "NA" "NA" "TIO" 6328657 "Ceftiofur" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "QJ01DD90,QJ51DD90" "ceftif" "ceftiofurum,excenel,naxcel" "23709-9,35780-6,35781-4,55652-2"
"BPR" 135413542 "Ceftobiprole" "Cephalosporins (5th gen.)" "NA" "ceftob" "NA" "43269-0,43270-8,43271-6,43272-4,85052-9" "CZX" 6533629 "Ceftizoxime" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD07,QJ01DD07" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "ceftiz,cfzx,ctz,cz,czx,tiz,zox" "cefizox,ceftix,ceftizoxima,ceftizoximesalt,ceftizoximum,eposerin" 4 "g" "136-2,137-0,138-8,139-6,18894-6,20378-6,23622-4,25243-7,3450-4,6997-1"
"CFM1" 135413544 "Ceftobiprole medocaril" "Cephalosporins (5th gen.)" "J01DI01,QJ01DI01" "Other beta-lactam antibacterials" "Other cephalosporins and penems" "NA" "zevtera" 1.5 "g" "NA" "CZP" 9578661 "Ceftizoxime alapivoxil" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "NA" "NA" "NA" "NA"
"CZT" 86291594 "Ceftolozane/tazobactam" "Cephalosporins (5th gen.)" "J01DI54,QJ01DI54" "Other beta-lactam antibacterials" "Other cephalosporins and penems" "cei" "zerbaxa" 3 "g" "101484-4,73602-5,73624-9,73647-0,87735-7" "BPR" 135413542 "Ceftobiprole" "Cephalosporins (5th gen.),Cephalosporins,Beta-lactams" "NA" "ceftob" "NA" "43269-0,43270-8,43271-6,43272-4,85052-9"
"CRO" 5479530 "Ceftriaxone" "Cephalosporins (3rd gen.)" "J01DD04,QJ01DD04" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "axo,cax,ceftri,cftr,cro,ctr,frx,trimen,trinme,tx" "biotrakson,ceftriaxon,ceftriaxona,ceftriaxonum,ceftriazone,rocefin,rocephalin,rocephin,rocephine,rophex" 2 "g" "101485-1,140-4,141-2,142-0,143-8,18895-3,25244-5,25367-4,31140-7,31141-5,3451-2,41681-8,41682-6,41683-4,41732-9,50633-7,55190-3,6998-9,80957-4" "CFM1" 135413544 "Ceftobiprole medocaril" "Cephalosporins (5th gen.),Cephalosporins,Beta-lactams" "J01DI01,QJ01DI01" "Other beta-lactam antibacterials" "Other cephalosporins and penems" "NA" "zevtera" 1.5 "g" "NA"
"CEB" "Ceftriaxone/beta-lactamase inhibitor" "Cephalosporins (3rd gen.)" "J01DD63,QJ01DD63" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "NA" "NA" 2 "g" "NA" "CZT" 86291594 "Ceftolozane/tazobactam" "Cephalosporins (5th gen.),Cephalosporins,Beta-lactams,Beta-lactamase inhibitors" "J01DI54,QJ01DI54" "Other beta-lactam antibacterials" "Other cephalosporins and penems" "cei" "zerbaxa" 3 "g" "101484-4,73602-5,73624-9,73647-0,87735-7"
"CXM" 5479529 "Cefuroxime" "Cephalosporins (2nd gen.)" "J01DC02,QJ01DC02,QJ51DC02,QS01AA27,S01AA27" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefaxe,cefrox,cefuro,cfrx,cfur,cfx,crm,cxm,fur,rox,xm" "anaptivan,biociclin,biofuroksym,bioxima,cefofix,cefumax,cefurex,cefuril,cefurox,cefuroxim,cefuroxima,cefuroximesalt,cefuroximine,cefuroximo,cefuroximum,cephuroxime,cetroxil,colifossim,curoxim,curoxima,curoxime,froxal,furoxil,kefurox,kesint,ketocef,lifurox,medoxim,sharox,spectrazolr,ultroxim,zinacef,zinnat" 0.5 "g" 3 "g" "101503-1,144-6,145-3,146-1,147-9,18896-1,20460-2,25245-2,3452-0,35782-2,35783-0,51724-3,51774-8,55653-0,55654-8,6999-7,74699-0,80608-3,80617-4" "CRO" 5479530 "Ceftriaxone" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD04,QJ01DD04" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "axo,cax,ceftri,cftr,cro,ctr,frx,trimen,trinme,tx" "biotrakson,ceftriaxon,ceftriaxona,ceftriaxonum,ceftriazone,rocefin,rocephalin,rocephin,rocephine,rophex" 2 "g" "101485-1,140-4,141-2,142-0,143-8,18895-3,25244-5,25367-4,31140-7,31141-5,3451-2,41681-8,41682-6,41683-4,41732-9,50633-7,55190-3,6998-9,80957-4"
"CXA" 6321416 "Cefuroxime axetil" "Cephalosporins (2nd gen.)" "NA" "cfax" "bioracef,ceftin,cefurax,cefuroximaxetil,celocid,cepazine,cethixim,cetoxil,coliofossim,curocef,elobact,kalcef,maxitil,medoxm,nivador,novador,novocef,oraxim,zinat,zoref" "NA" "CEB" "Ceftriaxone/beta-lactamase inhibitor" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD63,QJ01DD63" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "NA" "NA" 2 "g" "NA"
"CFM2" "Cefuroxime/metronidazole" "Other antibacterials" "J01DC52,QJ01DC52" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" 0.5 "g" "NA" "CXM" 5479529 "Cefuroxime" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC02,QJ01DC02,QJ51DC02,QS01AA27,S01AA27" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "cefaxe,cefrox,cefuro,cfrx,cfur,cfx,crm,cxm,fur,rox,xm" "anaptivan,biociclin,biofuroksym,bioxima,cefofix,cefumax,cefurex,cefuril,cefurox,cefuroxim,cefuroxima,cefuroximesalt,cefuroximine,cefuroximo,cefuroximum,cephuroxime,cetroxil,colifossim,curoxim,curoxima,curoxime,froxal,furoxil,kefurox,kesint,ketocef,lifurox,medoxim,sharox,spectrazolr,ultroxim,zinacef,zinnat" 0.5 "g" 3 "g" "101503-1,144-6,145-3,146-1,147-9,18896-1,20460-2,25245-2,3452-0,35782-2,35783-0,51724-3,51774-8,55653-0,55654-8,6999-7,74699-0,80608-3,80617-4"
"ZON" 6336505 "Cefuzonam" "Other antibacterials" "NA" "cefuzo" "cefuzoname,cefuzonamum,cefzoname,cosmosin" "NA" "CXA" 6321416 "Cefuroxime axetil" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "NA" "cfax" "bioracef,ceftin,cefurax,cefuroximaxetil,celocid,cepazine,cethixim,cetoxil,coliofossim,curocef,elobact,kalcef,maxitil,medoxm,nivador,novador,novocef,oraxim,zinat,zoref" "NA"
"CED" 38103 "Cephradine" "Cephalosporins (1st gen.)" "NA" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephra,cfra,cfrd" "anspor,cefradin,cefradina,cefradine,cefradinum,cekodin,cephradin,ecosporina,eskacef,infexin,megacef,sefril,velocef,velosef" "168-5,169-3,170-1,171-9,18902-7,55646-4" "CFM2" "Cefuroxime/metronidazole" "Other" "J01DC52,QJ01DC52" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" 0.5 "g" "NA"
"ZON" 6336505 "Cefuzonam" "Other" "NA" "cefuzo" "cefuzoname,cefuzonamum,cefzoname,cosmosin" "NA"
"CED" 38103 "Cephradine" "Cephalosporins (1st gen.),Cephalosporins,Beta-lactams" "NA" "Other beta-lactam antibacterials" "First-generation cephalosporins" "cephra,cfra,cfrd" "anspor,cefradin,cefradina,cefradine,cefradinum,cekodin,cephradin,ecosporina,eskacef,infexin,megacef,sefril,velocef,velosef" "168-5,169-3,170-1,171-9,18902-7,55646-4"
"CTO" 71402 "Cetocycline" "Tetracyclines" "NA" "NA" "cetocyline,cetotetrine,chelocardin" "NA" "CTO" 71402 "Cetocycline" "Tetracyclines" "NA" "NA" "cetocyline,cetotetrine,chelocardin" "NA"
"CHL" 5959 "Chloramphenicol" "Phenicols" "D06AX02,D10AF03,G01AA05,J01BA01,QD06AX02,QD10AF03,QG01AA05,QJ01BA01,QJ51BA01,QS01AA01,QS02AA01,QS03AA08,S01AA01,S02AA01,S03AA08" "Amphenicols" "Amphenicols" "c,chl,chlo,chlora,cl" "alficetyn,ambofen,amphicol,amseclor,anacetin,aquamycetin,austracil,austracol,biocetin,biophenicol,catilan,chemicetin,chemicetina,chlomin,chlomycol,chloramex,chloramfenikol,chloramficin,chloramfilin,chloramphenicole,chloramphenicolum,chloramsaar,chlorasol,chlorbiotic,chloricol,chlornitromycin,chloroamphenicol,chlorocaps,chlorocid,chlorocide,chlorocin,chlorocol,chlorofair,chloromax,chloromycetin,chloromycetny,chloromyxin,chloronitrin,chloroptic,chlorovules,cidocetine,ciplamycetin,cloramfen,cloramfenicol,cloramfenicolo,cloramficin,cloramicol,cloramidina,cloranfenicol,cloroamfenicolo,clorocyn,cloromisan,clorosintex,comycetin,cylphenicol,desphen,detreomycin,detreomycine,dextramycin,dextromycetin,doctamicina,econochlor,embacetin,emetren,enteromycetin,erbaplast,ertilen,farmicetina,globenicol,glorous,gloveticol,halcetin,halomycetin,hortfenicol,intramycetin,isicetin,ismicetina,isophenicol,juvamycetin,kamaver,kemicetina,kemicetine,kloramfenikol,klorita,laevomycetinum,leukamycin,leukomyan,leukomycin,levocin,levomicetina,levomitsetin,levomycetin,levoplast,levosin,levovetin,loromisan,loromisin,mastiphen,maybridge,mediamycetine,medichol,micloretin,micochlorine,micoclorina,microcetina,mychel,mycinol,myclocin,mycochlorin,novochlorocap,novomycetin,novophenicol,ocuphenicol,oftalent,oleomycetin,opclor,opelor,ophthochlor,ophthocort,ophtochlor,optomycin,otachron,otophen,pantovernil,paraxin,pentamycetin,petnamycetin,quemicetina,rivomycin,romphenil,ronphenil,septicol,sificetina,sintomicetin,sintomicetina,soluthor,stanomycetin,synthomycetin,synthomycetine,synthomycine,syntomycin,tevcocin,tevcosin,tifomycin,tifomycine,tiromycetin,treomicetina,tyfomycine,unimycetin,veticol,viceton" 3 "g" 3 "g" "15101-9,16603-3,16604-1,172-7,173-5,174-3,175-0,18903-5,25247-8,29214-4,29346-4,29347-2,3455-3,7001-1" "CHL" 5959 "Chloramphenicol" "Phenicols" "D06AX02,D10AF03,G01AA05,J01BA01,QD06AX02,QD10AF03,QG01AA05,QJ01BA01,QJ51BA01,QS01AA01,QS02AA01,QS03AA08,S01AA01,S02AA01,S03AA08" "Amphenicols" "Amphenicols" "c,chl,chlo,chlora,cl" "alficetyn,ambofen,amphicol,amseclor,anacetin,aquamycetin,austracil,austracol,biocetin,biophenicol,catilan,chemicetin,chemicetina,chlomin,chlomycol,chloramex,chloramfenikol,chloramficin,chloramfilin,chloramphenicole,chloramphenicolum,chloramsaar,chlorasol,chlorbiotic,chloricol,chlornitromycin,chloroamphenicol,chlorocaps,chlorocid,chlorocide,chlorocin,chlorocol,chlorofair,chloromax,chloromycetin,chloromycetny,chloromyxin,chloronitrin,chloroptic,chlorovules,cidocetine,ciplamycetin,cloramfen,cloramfenicol,cloramfenicolo,cloramficin,cloramicol,cloramidina,cloranfenicol,cloroamfenicolo,clorocyn,cloromisan,clorosintex,comycetin,cylphenicol,desphen,detreomycin,detreomycine,dextramycin,dextromycetin,doctamicina,econochlor,embacetin,emetren,enteromycetin,erbaplast,ertilen,farmicetina,globenicol,glorous,gloveticol,halcetin,halomycetin,hortfenicol,intramycetin,isicetin,ismicetina,isophenicol,juvamycetin,kamaver,kemicetina,kemicetine,kloramfenikol,klorita,laevomycetinum,leukamycin,leukomyan,leukomycin,levocin,levomicetina,levomitsetin,levomycetin,levoplast,levosin,levovetin,loromisan,loromisin,mastiphen,maybridge,mediamycetine,medichol,micloretin,micochlorine,micoclorina,microcetina,mychel,mycinol,myclocin,mycochlorin,novochlorocap,novomycetin,novophenicol,ocuphenicol,oftalent,oleomycetin,opclor,opelor,ophthochlor,ophthocort,ophtochlor,optomycin,otachron,otophen,pantovernil,paraxin,pentamycetin,petnamycetin,quemicetina,rivomycin,romphenil,ronphenil,septicol,sificetina,sintomicetin,sintomicetina,soluthor,stanomycetin,synthomycetin,synthomycetine,synthomycine,syntomycin,tevcocin,tevcosin,tifomycin,tifomycine,tiromycetin,treomicetina,tyfomycine,unimycetin,veticol,viceton" 3 "g" 3 "g" "15101-9,16603-3,16604-1,172-7,173-5,174-3,175-0,18903-5,25247-8,29214-4,29346-4,29347-2,3455-3,7001-1"
"CTE" 54675777 "Chlortetracycline" "Tetracyclines" "A01AB21,D06AA02,J01AA03,QA01AB21,QD06AA02,QG51AA08,QJ01AA03,QJ51AA03,QS01AA02,S01AA02" "Tetracyclines" "Tetracyclines" "chltet" "acronize,alexomycin,aueromycin,aureocarmyl,aureociclina,aureocina,aureocycline,aureomycin,aureomykoin,aurofac,auxeomycin,biomitsin,biomycin,chlormax,chlorotetracycline,chlortetracyclinum,chrysomykine,clorocipan,clortetraciclina,clortetrin,declomycin,declostatin,deganol,demeclor,demeplus,demetraciclina,demetraclin,detracin,detravis,diuciclin,duomycin,elkamicina,flamycin,isphamycin,ledermicina,ledermycin,ledermycine,mexocine,novotriclina,pennchlor,perciclina,periciclina,sumaclina,uromycin,veraciclina" 1 "g" "176-8,177-6,178-4,179-2,18904-3,55655-5,87600-3" "CTE" 54675777 "Chlortetracycline" "Tetracyclines" "A01AB21,D06AA02,J01AA03,QA01AB21,QD06AA02,QG51AA08,QJ01AA03,QJ51AA03,QS01AA02,S01AA02" "Tetracyclines" "Tetracyclines" "chltet" "acronize,alexomycin,aueromycin,aureocarmyl,aureociclina,aureocina,aureocycline,aureomycin,aureomykoin,aurofac,auxeomycin,biomitsin,biomycin,chlormax,chlorotetracycline,chlortetracyclinum,chrysomykine,clorocipan,clortetraciclina,clortetrin,declomycin,declostatin,deganol,demeclor,demeplus,demetraciclina,demetraclin,detracin,detravis,diuciclin,duomycin,elkamicina,flamycin,isphamycin,ledermicina,ledermycin,ledermycine,mexocine,novotriclina,pennchlor,perciclina,periciclina,sumaclina,uromycin,veraciclina" 1 "g" "176-8,177-6,178-4,179-2,18904-3,55655-5,87600-3"
"CIC" 19003 "Ciclacillin" "Beta-lactams/penicillins" "NA" "cyclac" "bastcillin,calthor,ciclacilina,ciclacilline,ciclacillinum,ciclacillum,citosarin,cyclacillin,cyclapen,noblicil,orfilina,peamezin,syngacillin,ultracillin,vastcillin,vipicil,wyvital" "NA" "CIC" 19003 "Ciclacillin" "Penicillins,Beta-lactams" "NA" "cyclac" "bastcillin,calthor,ciclacilina,ciclacilline,ciclacillinum,ciclacillum,citosarin,cyclacillin,cyclapen,noblicil,orfilina,peamezin,syngacillin,ultracillin,vastcillin,vipicil,wyvital" "NA"
"CIX" 47472 "Ciclopirox" "Antifungals/antimycotics" "D01AE14,G01AX12,QD01AE14,QG01AX12" "Antifungals for topical use" "Other antifungals for topical use" "cipx" "NA" "NA" "CIX" "Ciclopirox" "Antifungals" "D01AE14,G01AX12,QD01AE14,QG01AX12" "Antifungals for topical use" "Other antifungals for topical use" "cipx" "NA" "NA"
"CIN" 2762 "Cinoxacin" "Quinolones" "J01MB06,QJ01MB06" "Quinolone antibacterials" "Other quinolones" "cino,cinoxa,cnox" "cinobac,cinobactin,cinoxacine,cinoxacino,cinoxacinum,clinoxacin,noxigram,uronorm" 1 "g" "180-0,181-8,182-6,183-4,18905-0,55656-3" "CIN" 2762 "Cinoxacin" "Quinolones" "J01MB06,QJ01MB06" "Quinolone antibacterials" "Other quinolones" "cino,cinoxa,cnox" "cinobac,cinobactin,cinoxacine,cinoxacino,cinoxacinum,clinoxacin,noxigram,uronorm" 1 "g" "180-0,181-8,182-6,183-4,18905-0,55656-3"
"CIP" 2764 "Ciprofloxacin" "Fluoroquinolones" "J01MA02,QJ01MA02,QS01AE03,QS02AA15,QS03AA07,S01AE03,S02AA15,S03AA07" "Quinolone antibacterials" "Fluoroquinolones" "ci,cip,cipr,ciprof,cp" "alcipro,bacquinor,baflox,belmacina,bernoflox,catex,cenin,ceprimax,cetraxal,ciflan,ciflosin,cifloxin,cilab,cilox,ciloxan,cipad,ciplus,ciprecu,ciprenit,ciprine,ciprinol,cipro,ciprobay,ciprocinal,ciprocinol,ciprodar,ciproflox,ciprofloxacina,ciprofloxacine,ciprofloxacino,ciprofloxacinum,ciprofur,ciprogis,ciproktan,ciprolin,ciprolon,cipromycin,cipronex,ciprooxacin,cipropol,ciproquinol,ciprowin,ciproxan,ciproxin,ciproxina,ciproxine,ciriax,citeral,citopcin,cixan,corsacin,cunesin,cycin,cyprobay,cyproxan,disfabac,felixene,fimoflox,flociprin,floxacipron,flunas,globuce,inkamil,ipiflox,italnik,keefloxin,linhaliq,loxacid,loxan,lypro,megaflox,microgan,nixin,novidat,novoquin,ofitin,oftacilox,ophaflox,otiprio,phaproxin,piprol,plenolyt,probiox,proflaxin,proksi,proquin,proxacin,quinoflox,quinolid,quintor,quipro,rancif,renator,roflazin,roxytal,sepcen,septicide,septocipro,siprogut,sophixin,spitacin,strox,suiflox,superocin,supraflox,uritent,utiminx,velmonit,zumaflox" 1 "g" 0.8 "g" "101500-7,14031-9,14032-7,14058-2,14059-0,184-2,185-9,186-7,187-5,18906-8,20377-8,23621-6,25180-1,25181-9,25188-4,25189-2,25248-6,34636-1,3484-3,42644-5,55194-5,7002-9" "CIP" 2764 "Ciprofloxacin" "Fluoroquinolones,Quinolones" "J01MA02,QJ01MA02,QS01AE03,QS02AA15,QS03AA07,S01AE03,S02AA15,S03AA07" "Quinolone antibacterials" "Fluoroquinolones" "ci,cip,cipr,ciprof,cp" "alcipro,bacquinor,baflox,belmacina,bernoflox,catex,cenin,ceprimax,cetraxal,ciflan,ciflosin,cifloxin,cilab,cilox,ciloxan,cipad,ciplus,ciprecu,ciprenit,ciprine,ciprinol,cipro,ciprobay,ciprocinal,ciprocinol,ciprodar,ciproflox,ciprofloxacina,ciprofloxacine,ciprofloxacino,ciprofloxacinum,ciprofur,ciprogis,ciproktan,ciprolin,ciprolon,cipromycin,cipronex,ciprooxacin,cipropol,ciproquinol,ciprowin,ciproxan,ciproxin,ciproxina,ciproxine,ciriax,citeral,citopcin,cixan,corsacin,cunesin,cycin,cyprobay,cyproxan,disfabac,felixene,fimoflox,flociprin,floxacipron,flunas,globuce,inkamil,ipiflox,italnik,keefloxin,linhaliq,loxacid,loxan,lypro,megaflox,microgan,nixin,novidat,novoquin,ofitin,oftacilox,ophaflox,otiprio,phaproxin,piprol,plenolyt,probiox,proflaxin,proksi,proquin,proxacin,quinoflox,quinolid,quintor,quipro,rancif,renator,roflazin,roxytal,sepcen,septicide,septocipro,siprogut,sophixin,spitacin,strox,suiflox,superocin,supraflox,uritent,utiminx,velmonit,zumaflox" 1 "g" 0.8 "g" "101500-7,14031-9,14032-7,14058-2,14059-0,184-2,185-9,186-7,187-5,18906-8,20377-8,23621-6,25180-1,25181-9,25188-4,25189-2,25248-6,34636-1,3484-3,42644-5,55194-5,7002-9"
"CIM" "Ciprofloxacin/metronidazole" "Fluoroquinolones" "J01RA10,QJ01RA10" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "CIM" "Ciprofloxacin/metronidazole" "Fluoroquinolones,Quinolones" "J01RA10,QJ01RA10" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"CIO" "Ciprofloxacin/ornidazole" "Fluoroquinolones" "J01RA12,QJ01RA12" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "CIO" "Ciprofloxacin/ornidazole" "Fluoroquinolones,Quinolones" "J01RA12,QJ01RA12" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"CIT" "Ciprofloxacin/tinidazole" "Fluoroquinolones" "J01RA11,QJ01RA11" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "CIT" "Ciprofloxacin/tinidazole" "Fluoroquinolones,Quinolones" "J01RA11,QJ01RA11" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"CLR" 84029 "Clarithromycin" "Macrolides/lincosamides" "J01FA09,QJ01FA09" "Macrolides, lincosamides and streptogramins" "Macrolides" "ch,cla,clar,claryt,clm,clr" "abbotic,abboticine,astromen,biaxin,bicrolid,bristamycin,clacee,clacid,clacine,clambiotic,clarem,claribid,claricide,claridar,claripen,clarith,clarithromycine,clarithromycinum,claritromicina,clarosip,clathromycin,crixan,cyllid,cyllind,eratrex,esinol,fromilid,gallimycin,helas,heliclar,klabax,klacid,klaciped,klaricid,klarid,klarin,kofron,mabicrol,macladin,maclar,mavid,meberyt,pediamycin,qidmycin,veclam,wyamycin,zeclar" 0.5 "g" 1 "g" "100048-8,16619-9,16620-7,188-3,189-1,18907-6,190-9,191-7,20375-2,23619-0,25190-0,25191-8,25192-6,25253-6,34638-7,43987-7,43990-1,43991-9,7003-7,80559-8,89485-7" "CLR" 84029 "Clarithromycin" "Macrolides" "J01FA09,QJ01FA09" "Macrolides, lincosamides and streptogramins" "Macrolides" "ch,cla,clar,claryt,clm,clr" "abbotic,abboticine,astromen,biaxin,bicrolid,bristamycin,clacee,clacid,clacine,clambiotic,clarem,claribid,claricide,claridar,claripen,clarith,clarithromycine,clarithromycinum,claritromicina,clarosip,clathromycin,crixan,cyllid,cyllind,eratrex,esinol,fromilid,gallimycin,helas,heliclar,klabax,klacid,klaciped,klaricid,klarid,klarin,kofron,mabicrol,macladin,maclar,mavid,meberyt,pediamycin,qidmycin,veclam,wyamycin,zeclar" 0.5 "g" 1 "g" "100048-8,16619-9,16620-7,188-3,189-1,18907-6,190-9,191-7,20375-2,23619-0,25190-0,25191-8,25192-6,25253-6,34638-7,43987-7,43990-1,43991-9,7003-7,80559-8,89485-7"
"CLA1" 5280980 "Clavulanic acid" "Other antibacterials" "NA" "NA" "amonate,clavulanate,clavulanateacid,clavulansaeure,clavulansaure,clavulox,serdaxin" "NA" "CLA1" 5280980 "Clavulanic acid" "Other" "NA" "NA" "amonate,clavulanate,clavulanateacid,clavulansaeure,clavulansaure,clavulox,serdaxin" "NA"
"CLX" 60063 "Clinafloxacin" "Fluoroquinolones" "NA" "clinaf" "NA" "32376-6,33284-1,35785-5,35786-3,7004-5" "CLX" 60063 "Clinafloxacin" "Fluoroquinolones,Quinolones" "NA" "clinaf" "NA" "32376-6,33284-1,35785-5,35786-3,7004-5"
"CLI" 446598 "Clindamycin" "Macrolides/lincosamides" "D10AF01,G01AA10,J01FF01,QD10AF01,QG01AA10,QJ01FF01" "Macrolides, lincosamides and streptogramins" "Lincosamides" "cc,cd,cli,clin,clin32,clinda,cm,da" "antirobe,chlolincocin,chlorlincocin,cleocin,clindamicina,clindamycine,clindamycinum,clinimycin,clinsol,clintabs,dalacine,klimicin,klindan,sobelin" 1.2 "g" 1.8 "g" "16621-5,16622-3,18908-4,192-5,193-3,194-1,195-8,25249-4,3486-8,42720-3,55657-1,55658-9,55659-7,55660-5,61188-9,7005-2" "CLI" 446598 "Clindamycin" "Lincosamides" "D10AF01,G01AA10,J01FF01,QD10AF01,QG01AA10,QJ01FF01" "Macrolides, lincosamides and streptogramins" "Lincosamides" "cc,cd,cli,clin,clin32,clinda,cm,da" "antirobe,chlolincocin,chlorlincocin,cleocin,clindamicina,clindamycine,clindamycinum,clinimycin,clinsol,clintabs,dalacine,klimicin,klindan,sobelin" 1.2 "g" 1.8 "g" "16621-5,16622-3,18908-4,192-5,193-3,194-1,195-8,25249-4,3486-8,42720-3,55657-1,55658-9,55659-7,55660-5,61188-9,7005-2"
"CLI-S" "Clindamycin inducible screening test" "Macrolides/lincosamides" "NA" "clin inducible,clinda inducible,clindamycin inducible" "NA" "NA" "CLI-S" "Clindamycin inducible screening test" "Lincosamides,Macrolides" "NA" "clin inducible,clinda inducible,clindamycin inducible" "NA" "NA"
"CLF" 2794 "Clofazimine" "Antimycobacterials" "J04BA01,QJ04BA01" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "clof,clofam" "chlofazimine,clofazimina,clofaziminum,colfazimine,lampren,lamprene,phenazine,riminophenazine" 0.1 "g" "16623-1,20376-0,23620-8,23627-3,43986-9,43988-5,43989-3,55661-3,55662-1,96108-6" "CLF" 2794 "Clofazimine" "Antimycobacterials" "J04BA01,QJ04BA01" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "clof,clofam" "chlofazimine,clofazimina,clofaziminum,colfazimine,lampren,lamprene,phenazine,riminophenazine" 0.1 "g" "16623-1,20376-0,23620-8,23627-3,43986-9,43988-5,43989-3,55661-3,55662-1,96108-6"
"CLF1" 2799 "Clofoctol" "Other antibacterials" "J01XX03,QJ01XX03" "Other antibacterials" "Other antibacterials" "NA" "clofoctolo,clofoctolum,gramplus,octofene,phenol" "NA" "CLF1" 2799 "Clofoctol" "Other" "J01XX03,QJ01XX03" "Other antibacterials" "Other antibacterials" "NA" "clofoctolo,clofoctolum,gramplus,octofene,phenol" "NA"
"CLM" 71807 "Clometocillin" "Beta-lactams/penicillins" "J01CE07,QJ01CE07" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "chlomethocillin,clometacillin,clomethacillin,clomethocillin,clometocilina,clometocilline,clometocillinsalt,clometocillinum,penicilline,rixapen" 1 "g" "NA" "CLM" 71807 "Clometocillin" "Penicillins,Beta-lactams" "J01CE07,QJ01CE07" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "chlomethocillin,clometacillin,clomethacillin,clomethocillin,clometocilina,clometocilline,clometocillinsalt,clometocillinum,penicilline,rixapen" 1 "g" "NA"
"CLM1" 54680675 "Clomocycline" "Tetracyclines" "J01AA11,QJ01AA11" "Tetracyclines" "Tetracyclines" "NA" "clomociclina,clomocyclinum,megaclor" 1 "g" "NA" "CLM1" 54680675 "Clomocycline" "Tetracyclines" "J01AA11,QJ01AA11" "Tetracyclines" "Tetracyclines" "NA" "clomociclina,clomocyclinum,megaclor" 1 "g" "NA"
"CTR" 2812 "Clotrimazole" "Antifungals/antimycotics" "A01AB18,D01AC01,G01AF02,QA01AB18,QD01AC01,QG01AF02,QJ02AB90" "clot" "alevazol,bisphenyl,canesten,canestene,canestine,canifug,chlotrimazole,clomatin,clotrimaderm,clotrimazol,clotrimazolum,coltrimazole,cutistad,diphenylmethane,empecid,esparol,femmesil,footlogix,fortinia,gynix,imidazole,jidesheng,klotrimazole,lakesia,lombazol,lombazole,lombazolum,lotrimax,lotrimin,monobaycuten,mycelax,mycelex,mycofug,mycosporin,mykosporin,nalbix,otomax,pedesil,pedisafe,ringworm,stiemazol,tibatin,trimysten,trivagizole" "10653-4,10654-2,18909-2,54177-1,55663-9" "CLB" 54706138 "Clorobiocin" "Aminocoumarins" "NA" "NA" "chlorobiocin" "NA"
"CLO" 6098 "Cloxacillin" "Beta-lactams/penicillins" "J01CF02,QJ01CF02,QJ51CF02,QS01AA90" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "clox,cloxac" "ankerbin,austrastaph,biocloxin,brispen,chloroxacillin,ciclex,clocil,clossacillina,cloxacilina,cloxacillinanhydrous,cloxacilline,cloxacillinsalt,cloxacillinum,cloxapen,constaphyl,dariclox,dichlorstapenor,diclocil,dicloxacillinhydrate,diflor,digloxilline,dynapen,ekvacillin,gelstaph,novapen,noxaben,orbenin,pathocil,stampen,staphybiotic,syntarpen,syntarpensalt,tegopen" 2 "g" 2 "g" "16628-0,18910-0,196-6,197-4,198-2,199-0,25250-2,55664-7" "CTR" 2812 "Clotrimazole" "Antifungals" "A01AB18,D01AC01,G01AF02,QA01AB18,QD01AC01,QG01AF02,QJ02AB90" "clot" "alevazol,bisphenyl,canesten,canestene,canestine,canifug,chlotrimazole,clomatin,clotrimaderm,clotrimazol,clotrimazolum,coltrimazole,cutistad,diphenylmethane,empecid,esparol,femmesil,footlogix,fortinia,gynix,imidazole,jidesheng,klotrimazole,lakesia,lombazol,lombazole,lombazolum,lotrimax,lotrimin,monobaycuten,mycelax,mycelex,mycofug,mycosporin,mykosporin,nalbix,otomax,pedesil,pedisafe,ringworm,stiemazol,tibatin,trimysten,trivagizole" "10653-4,10654-2,18909-2,54177-1,55663-9"
"CLO" 6098 "Cloxacillin" "Isoxazolylpenicillins,Penicillins,Beta-lactams" "J01CF02,QJ01CF02,QJ51CF02,QS01AA90" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "clox,cloxac" "ankerbin,austrastaph,biocloxin,brispen,chloroxacillin,ciclex,clocil,clossacillina,cloxacilina,cloxacillinanhydrous,cloxacilline,cloxacillinsalt,cloxacillinum,cloxapen,constaphyl,dariclox,dichlorstapenor,diclocil,dicloxacillinhydrate,diflor,digloxilline,dynapen,ekvacillin,gelstaph,novapen,noxaben,orbenin,pathocil,stampen,staphybiotic,syntarpen,syntarpensalt,tegopen" 2 "g" 2 "g" "16628-0,18910-0,196-6,197-4,198-2,199-0,25250-2,55664-7"
"COL" 5311054 "Colistin" "Polymyxins" "A07AA10,J01XB01,QA07AA10,QJ01XB01,QJ51XB01" "Other antibacterials" "Polymyxins" "cl,coli,colist,cs,cst,ct" "colimycin,colisticin,colisticina,colistina,colistine,colistinum,colobreathe,colomycin,kangdisu,kolimitsin,kolimycin,promixin,sogecoli,totazina" 9 "MU" 9 "MU" "16645-4,18912-6,204-8,205-5,206-3,207-1,29493-4,33333-6" "COL" 5311054 "Colistin" "Polymyxins" "A07AA10,J01XB01,QA07AA10,QJ01XB01,QJ51XB01" "Other antibacterials" "Polymyxins" "cl,coli,colist,cs,cst,ct" "colimycin,colisticin,colisticina,colistina,colistine,colistinum,colobreathe,colomycin,kangdisu,kolimitsin,kolimycin,promixin,sogecoli,totazina" 9 "MU" 9 "MU" "16645-4,18912-6,204-8,205-5,206-3,207-1,29493-4,33333-6"
"COP" "Colistin/polysorbate" "Other antibacterials" "NA" "NA" "NA" "NA" "COP" "Colistin/polysorbate" "Other" "NA" "NA" "NA" "NA"
"CYC" 6234 "Cycloserine" "Oxazolidinones" "J04AB01,QJ04AB01" "Drugs for treatment of tuberculosis" "Antibiotics" "cycl,cyclos" "cicloserina,closina,cyclorin,cycloserin,cycloserinum,farmiserina,levcicloserina,levcycloserine,levcycloserinum,micoserina,miroserina,miroseryn,novoserin,oxamicina,oxamycin,seromycin,tebemicina,wasserina" 0.75 "g" "16702-3,18914-2,212-1,213-9,214-7,215-4,23608-3,25207-2,25208-0,25209-8,25251-0,3519-6,55667-0" "CYC" 6234 "Cycloserine" "Oxazolidinones" "J04AB01,QJ04AB01" "Drugs for treatment of tuberculosis" "Antibiotics" "cycl,cyclos" "cicloserina,closina,cyclorin,cycloserin,cycloserinum,farmiserina,levcicloserina,levcycloserine,levcycloserinum,micoserina,miroserina,miroseryn,novoserin,oxamicina,oxamycin,seromycin,tebemicina,wasserina" 0.75 "g" "16702-3,18914-2,212-1,213-9,214-7,215-4,23608-3,25207-2,25208-0,25209-8,25251-0,3519-6,55667-0"
"DAL" 23724878 "Dalbavancin" "Glycopeptides" "J01XA04,QJ01XA04" "Other antibacterials" "Glycopeptide antibacterials" "dalb,dalbav" "dalbavancina,dalvance,xydalba,zeven" 1.5 "g" "41688-3,41689-1,41690-9,41734-5" "DAL" 23724878 "Dalbavancin" "Lipoglycopeptides,Glycopeptides,Peptides" "J01XA04,QJ01XA04" "Other antibacterials" "Glycopeptide antibacterials" "dalb,dalbav" "dalbavancina,dalvance,xydalba,zeven" 1.5 "g" "41688-3,41689-1,41690-9,41734-5"
"DAN" 71335 "Danofloxacin" "Fluoroquinolones" "QJ01MA92" "danofl" "advocin,danofloxacine,danofloxacino,danofloxacinum" "73601-7,73623-1,73646-2" "DAN" 71335 "Danofloxacin" "Fluoroquinolones,Quinolones" "QJ01MA92" "danofl" "advocin,danofloxacine,danofloxacino,danofloxacinum" "73601-7,73623-1,73646-2"
"DPS" 2955 "Dapsone" "Other antibacterials" "D10AX05,J04BA02,QD10AX05,QJ04BA02" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "NA" "aczone,atrisone,avlosulfon,avlosulfone,avlosulphone,benzenamide,benzenamine,bissulfone,bissulphone,croysulfone,croysulphone,dapson,dapsona,dapsonum,daspone,diaphenylsulfon,diaphenylsulfone,diaphenylsulphon,diaphenylsulphone,diphenasone,diphone,disulfone,disulone,disulphone,dubronax,dumitone,eporal,medapsol,novophone,servidapson,sulfadione,sulfona,sulfonyldianiline,sulphadione,sulphonyldianiline,tarimyl,udolac,undolac" 50 "mg" "51698-9,9747-7" "DPS" 2955 "Dapsone" "Other" "D10AX05,J04BA02,QD10AX05,QJ04BA02" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "dao" "aczone,atrisone,avlosulfon,avlosulfone,avlosulphone,benzenamide,benzenamine,bissulfone,bissulphone,croysulfone,croysulphone,dapson,dapsona,dapsonum,daspone,diaphenylsulfon,diaphenylsulfone,diaphenylsulphon,diaphenylsulphone,diphenasone,diphone,disulfone,disulone,disulphone,dubronax,dumitone,eporal,medapsol,novophone,servidapson,sulfadione,sulfona,sulfonyldianiline,sulphadione,sulphonyldianiline,tarimyl,udolac,undolac" 50 "mg" "51698-9,9747-7"
"DAP" 16134395 "Daptomycin" "Other antibacterials" "J01XX09,QJ01XX09" "Other antibacterials" "Other antibacterials" "dap,dapt,dapt25,dapt50,daptom" "cidecin,cubicin,dapcin,daptomicina,daptomycine,daptomycinum,deptomycin" 0.28 "g" "35787-1,35788-9,35789-7,41691-7" "DAP" 16134395 "Daptomycin" "Peptides" "J01XX09,QJ01XX09" "Other antibacterials" "Other antibacterials" "dap,dapt,dapt25,dapt50,daptom" "cidecin,cubicin,dapcin,daptomicina,daptomycine,daptomycinum,deptomycin" 0.28 "g" "35787-1,35788-9,35789-7,41691-7"
"DFX" 487101 "Delafloxacin" "Fluoroquinolones" "J01MA23,QJ01MA23" "NA" "baxdela,delafloxacinum,quofenix" 0.9 "g" 0.6 "g" "88885-9,90447-4,93790-4" "DFX" 487101 "Delafloxacin" "Fluoroquinolones,Quinolones" "J01MA23,QJ01MA23" "NA" "baxdela,delafloxacinum,quofenix" 0.9 "g" 0.6 "g" "88885-9,90447-4,93790-4"
"DLM" 6480466 "Delamanid" "Antimycobacterials" "J04AK06,QJ04AK06" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "dela" "deltyba" 0.2 "g" "93851-4,96109-4" "DLM" 6480466 "Delamanid" "Antimycobacterials" "J04AK06,QJ04AK06" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "dela" "deltyba" 0.2 "g" "93851-4,96109-4"
"DEM" 54680690 "Demeclocycline" "Tetracyclines" "D06AA01,J01AA01,QD06AA01,QJ01AA01" "Tetracyclines" "Tetracyclines" "demecy" "demeclociclina,demeclocyclinum" 0.6 "g" "10982-7,18915-9,216-2,217-0,218-8,219-6,29494-2,7006-0" "DEM" 54680690 "Demeclocycline" "Tetracyclines" "D06AA01,J01AA01,QD06AA01,QJ01AA01" "Tetracyclines" "Tetracyclines" "demecy" "demeclociclina,demeclocyclinum" 0.6 "g" "10982-7,18915-9,216-2,217-0,218-8,219-6,29494-2,7006-0"
"DKB" 470999 "Dibekacin" "Aminoglycosides" "J01GB09,QJ01GB09,QS01AA29,S01AA29" "Aminoglycoside antibacterials" "Other aminoglycosides" "dibeka" "debecacin,dibekacina,dibekacine,dibekacinum,kappati,panamicin" 0.14 "g" "55669-6,55670-4,55671-2,55672-0" "DKB" 470999 "Dibekacin" "Aminoglycosides" "J01GB09,QJ01GB09,QS01AA29,S01AA29" "Aminoglycoside antibacterials" "Other aminoglycosides" "dibeka" "debecacin,dibekacina,dibekacine,dibekacinum,kappati,panamicin" 0.14 "g" "55669-6,55670-4,55671-2,55672-0"
"DIC" 18381 "Dicloxacillin" "Beta-lactams/penicillins" "J01CF01,QJ01CF01,QJ51CF01" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "dicl,diclox" "dichloroxacillin,diclossacillina,dicloxaciclin,dicloxacilin,dicloxacilina,dicloxacillina,dicloxacilline,dicloxacillinum,dicloxacycline,maclicine" 2 "g" 2 "g" "10984-3,16769-2,18916-7,220-4,221-2,222-0,223-8,25252-8,32380-8,55668-8" "DIC" 18381 "Dicloxacillin" "Isoxazolylpenicillins,Penicillins,Beta-lactams" "J01CF01,QJ01CF01,QJ51CF01" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "dicl,diclox" "dichloroxacillin,diclossacillina,dicloxaciclin,dicloxacilin,dicloxacilina,dicloxacillina,dicloxacilline,dicloxacillinum,dicloxacycline,maclicine" 2 "g" 2 "g" "10984-3,16769-2,18916-7,220-4,221-2,222-0,223-8,25252-8,32380-8,55668-8"
"DIF" 56206 "Difloxacin" "Fluoroquinolones" "QJ01MA94" "diflox" "dicural,difloxacine,pulsaflox" "35790-5,35791-3,35792-1" "DIF" 56206 "Difloxacin" "Fluoroquinolones,Quinolones" "QJ01MA94" "diflox" "dicural,difloxacine,pulsaflox" "35790-5,35791-3,35792-1"
"DIR" 6473883 "Dirithromycin" "Macrolides/lincosamides" "J01FA13,QJ01FA13" "Macrolides, lincosamides and streptogramins" "Macrolides" "dirith" "dirithromycine,dirithromycinum,diritromicina,divitross,dynabac,noriclan,valodin" 0.5 "g" "35793-9,35794-7,35795-4,7007-8" "DIR" 6473883 "Dirithromycin" "Macrolides" "J01FA13,QJ01FA13" "Macrolides, lincosamides and streptogramins" "Macrolides" "dirith" "dirithromycine,dirithromycinum,diritromicina,divitross,dynabac,noriclan,valodin" 0.5 "g" "35793-9,35794-7,35795-4,7007-8"
"DOR" 73303 "Doripenem" "Carbapenems" "J01DH04,QJ01DH04" "Other beta-lactam antibacterials" "Carbapenems" "dori,doripe" "doribax,dripenem,finibax" 1.5 "g" "56031-8,58711-3,60535-2,72893-1" "DOR" 73303 "Doripenem" "Carbapenems,Beta-lactams" "J01DH04,QJ01DH04" "Other beta-lactam antibacterials" "Carbapenems" "dori,doripe" "doribax,dripenem,finibax" 1.5 "g" "56031-8,58711-3,60535-2,72893-1"
"DOX" 54671203 "Doxycycline" "Tetracyclines" "A01AB22,J01AA02,QA01AB22,QJ01AA02" "Tetracyclines" "Tetracyclines" "dox,doxy,doxycy" "abbocin,alamycin,aquacycline,biosolvomycin,biotet,bisolvomycin,chrysocin,dalimycin,dalinmycin,deoxymykoin,dossiciclina,doxiciclina,doxirobe,doxitard,doxivetin,doxycen,doxychel,doxycin,doxycyclin,doxycyclinum,doxylin,doxysol,doxytetracycline,elinton,engemycin,hydrocyclin,imperacin,intaloxin,investin,jenacyclin,liquachel,liviatin,macodyn,mepatar,microdox,mondoxyne,monodox,morgidox,ocudox,okebo,oracea,otetryn,oxacycline,oxamycen,oxatet,oxlopar,oxybiocycline,oxydon,oxyject,oxymykoin,oxysteclin,oxytet,oxytetral,oxytetrin,oxytracyl,oxyvet,stecsolin,supracyclin,terraject,terramycin,toxinal,unimycin,vendarcin,vibramycin,vibramycine,vivox,zenavod" 0.1 "g" 0.1 "g" "10986-8,18917-5,20379-4,21250-6,224-6,225-3,226-1,227-9,23623-2,25223-9,26902-7,7008-6" "DOX" 54671203 "Doxycycline" "Tetracyclines" "A01AB22,J01AA02,QA01AB22,QJ01AA02" "Tetracyclines" "Tetracyclines" "dox,doxy,doxycy" "abbocin,alamycin,aquacycline,biosolvomycin,biotet,bisolvomycin,chrysocin,dalimycin,dalinmycin,deoxymykoin,dossiciclina,doxiciclina,doxirobe,doxitard,doxivetin,doxycen,doxychel,doxycin,doxycyclin,doxycyclinum,doxylin,doxysol,doxytetracycline,elinton,engemycin,hydrocyclin,imperacin,intaloxin,investin,jenacyclin,liquachel,liviatin,macodyn,mepatar,microdox,mondoxyne,monodox,morgidox,ocudox,okebo,oracea,otetryn,oxacycline,oxamycen,oxatet,oxlopar,oxybiocycline,oxydon,oxyject,oxymykoin,oxysteclin,oxytet,oxytetral,oxytetrin,oxytracyl,oxyvet,stecsolin,supracyclin,terraject,terramycin,toxinal,unimycin,vendarcin,vibramycin,vibramycine,vivox,zenavod" 0.1 "g" 0.1 "g" "10986-8,18917-5,20379-4,21250-6,224-6,225-3,226-1,227-9,23623-2,25223-9,26902-7,7008-6"
"ECO" 3198 "Econazole" "Antifungals/antimycotics" "D01AC03,G01AF05,QD01AC03,QG01AF05" "Antifungals for topical use" "Imidazole and triazole derivatives" "econ" "bromazil,chloramizol,clinafarm,deccosil,deccozil,econazolum,ecostatin,ekonazole,enilconazol,enilconazole,eniloconazol,fecundal,florasan,freshgard,freshguard,fungaflor,fungazil,imaverol,imaversol,imazalil,magnate,spectazole" "25595-0,25637-0,54178-9,55673-8" "ECO" 3198 "Econazole" "Antifungals" "D01AC03,G01AF05,QD01AC03,QG01AF05" "Antifungals for topical use" "Imidazole and triazole derivatives" "econ" "bromazil,chloramizol,clinafarm,deccosil,deccozil,econazolum,ecostatin,ekonazole,enilconazol,enilconazole,eniloconazol,fecundal,florasan,freshgard,freshguard,fungaflor,fungazil,imaverol,imaversol,imazalil,magnate,spectazole" "25595-0,25637-0,54178-9,55673-8"
"EFF" "Efflux" "Other" "NA" "effflux pump" "NA" "NA" "EFF" "Efflux" "Other" "NA" "effflux pump" "NA" "NA"
"ENX" 3229 "Enoxacin" "Fluoroquinolones" "J01MA04,QJ01MA04" "Quinolone antibacterials" "Fluoroquinolones" "enox,enoxa" "abenox,almitil,bactidan,bactidron,comprecin,enofloxacine,enoksetin,enoram,enoxacina,enoxacine,enoxacino,enoxacinum,enoxen,enoxin,enoxor,flumark,penetrex" 0.8 "g" "16816-1,18918-3,228-7,229-5,230-3,231-1,3590-7,41692-5" "ENX" 3229 "Enoxacin" "Fluoroquinolones,Quinolones" "J01MA04,QJ01MA04" "Quinolone antibacterials" "Fluoroquinolones" "enox,enoxa" "abenox,almitil,bactidan,bactidron,comprecin,enofloxacine,enoksetin,enoram,enoxacina,enoxacine,enoxacino,enoxacinum,enoxen,enoxin,enoxor,flumark,penetrex" 0.8 "g" "16816-1,18918-3,228-7,229-5,230-3,231-1,3590-7,41692-5"
"ENR" 71188 "Enrofloxacin" "Fluoroquinolones" "QJ01MA90" "enrofl" "baytril,enroflox,enrofloxacine,enrofloxacino,enrofloxacinum,enroquin,enrosite,enroxil,quellaxcin,tenotryl,zobuxa" "23712-3,35796-2,35797-0,35798-8" "ENR" 71188 "Enrofloxacin" "Fluoroquinolones,Quinolones" "QJ01MA90" "enrofl" "baytril,enroflox,enrofloxacine,enrofloxacino,enrofloxacinum,enroquin,enrosite,enroxil,quellaxcin,tenotryl,zobuxa" "23712-3,35796-2,35797-0,35798-8"
"ENV" 135565326 "Enviomycin" "Antimycobacterials" "J04AB06,QJ04AB06" "tuberactinomycin" "enviomicina,enviomycina,enviomycine,enviomycinum,tuberactin" 1 "g" "NA" "ENV" 135565326 "Enviomycin" "Antimycobacterials" "J04AB06,QJ04AB06" "tuberactinomycin" "enviomicina,enviomycina,enviomycine,enviomycinum,tuberactin" 1 "g" "NA"
"EPE" "Eperozolid" "Other antibacterials" "NA" "NA" "NA" "NA" "EPE" "Eperozolid" "Other" "NA" "NA" "NA" "NA"
"EPC" 71392 "Epicillin" "Beta-lactams/penicillins" "J01CA07,QJ01CA07" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "dexacillin,dihydroampicillin,epicilina,epicilline,epicillinum,spectacillin" 2 "g" 2 "g" "NA" "EPC" 71392 "Epicillin" "Penicillins,Beta-lactams" "J01CA07,QJ01CA07" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "dexacillin,dihydroampicillin,epicilina,epicilline,epicillinum,spectacillin" 2 "g" 2 "g" "NA"
"EPP" 68916 "Epiroprim" "Other antibacterials" "NA" "NA" "epiroprima,epiroprime,epiroprimum" "NA" "EPP" 68916 "Epiroprim" "Other" "NA" "NA" "epiroprima,epiroprime,epiroprimum" "NA"
"ERV" 54726192 "Eravacycline" "Tetracyclines" "J01AA13,QJ01AA13" "Tetracyclines" "Tetracyclines" "erav" "xerava" 0.14 "g" "100049-6,85423-2,93767-2" "ERV" 54726192 "Eravacycline" "Tetracyclines" "J01AA13,QJ01AA13" "Tetracyclines" "Tetracyclines" "erav" "xerava" 0.14 "g" "100049-6,85423-2,93767-2"
"ETP" 150610 "Ertapenem" "Carbapenems" "J01DH03,QJ01DH03" "Other beta-lactam antibacterials" "Carbapenems" "erta,ertape,etp" "ertapenemsalt,invanz" 1 "g" "101486-9,35799-6,35800-2,35801-0,35802-8" "ETP" 150610 "Ertapenem" "Carbapenems,Beta-lactams" "J01DH03,QJ01DH03" "Other beta-lactam antibacterials" "Carbapenems" "erta,ertape,etp" "ertapenemsalt,invanz" 1 "g" "101486-9,35799-6,35800-2,35801-0,35802-8"
"ERY" 12560 "Erythromycin" "Macrolides/lincosamides" "D10AF02,J01FA01,QD10AF02,QJ01FA01,QJ51FA01,QS01AA17,S01AA17" "Macrolides, lincosamides and streptogramins" "Macrolides" "e,em,ery,ery32,eryt,eryth" "abboticin,abomacetin,acneryne,acnesol,aknemycin,aknin,benzamycin,derimer,deripil,dotycin,dumotrycin,emgel,emuvin,emycin,endoeritrin,erecin,erisone,eritomicina,eritrocina,eritromicina,ermycin,eryacne,eryacnen,erycen,erycette,erycinum,eryderm,erydermer,erygel,eryhexal,erymax,erymed,erysafe,erytab,erythro,erythroderm,erythrogran,erythroguent,erythromast,erythromid,erythromycine,erythromycinum,erytop,erytrociclin,ilocaps,ilosone,iloticina,ilotycin,inderm,latotryd,lederpax,mephamycin,mercina,oftamolets,pantoderm,pantodrin,pantomicina,pharyngocin,primacine,propiocine,proterytrin,retcin,robimycin,sansac,spotex,staticin,stiemicyn,stiemycin,tiprocin,torlamicina,wemid" 2 "g" 1 "g" "100050-4,11576-6,12298-6,16829-4,16830-2,18919-1,18920-9,20380-2,232-9,233-7,234-5,235-2,236-0,23633-1,237-8,238-6,239-4,25224-7,25275-9,3597-2,7009-4" "ERY" 12560 "Erythromycin" "Macrolides" "D10AF02,J01FA01,QD10AF02,QJ01FA01,QJ51FA01,QS01AA17,S01AA17" "Macrolides, lincosamides and streptogramins" "Macrolides" "e,em,ery,ery32,eryt,eryth" "abboticin,abomacetin,acneryne,acnesol,aknemycin,aknin,benzamycin,derimer,deripil,dotycin,dumotrycin,emgel,emuvin,emycin,endoeritrin,erecin,erisone,eritomicina,eritrocina,eritromicina,ermycin,eryacne,eryacnen,erycen,erycette,erycinum,eryderm,erydermer,erygel,eryhexal,erymax,erymed,erysafe,erytab,erythro,erythroderm,erythrogran,erythroguent,erythromast,erythromid,erythromycine,erythromycinum,erytop,erytrociclin,ilocaps,ilosone,iloticina,ilotycin,inderm,latotryd,lederpax,mephamycin,mercina,oftamolets,pantoderm,pantodrin,pantomicina,pharyngocin,primacine,propiocine,proterytrin,retcin,robimycin,sansac,spotex,staticin,stiemicyn,stiemycin,tiprocin,torlamicina,wemid" 2 "g" 1 "g" "100050-4,11576-6,12298-6,16829-4,16830-2,18919-1,18920-9,20380-2,232-9,233-7,234-5,235-2,236-0,23633-1,237-8,238-6,239-4,25224-7,25275-9,3597-2,7009-4"
"ETH" 14052 "Ethambutol" "Antimycobacterials" "J04AK02,QJ04AK02" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "etha,ethamb" "aethambutolum,dadibutol,diambutol,etambutol,etambutolo,ethambutolum,myambutol,purderal,servambutol,tibutol" 1.2 "g" 1.2 "g" "100051-2,16841-9,18921-7,20381-0,23625-7,240-2,241-0,242-8,243-6,25187-6,25194-2,25195-9,25230-4,25404-5,3607-9,42645-2,42646-0,55154-9,55674-6,56025-0,7010-2,89491-5" "ETH" 14052 "Ethambutol" "Antimycobacterials" "J04AK02,QJ04AK02" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "emb,etha,ethamb" "aethambutolum,dadibutol,diambutol,etambutol,etambutolo,ethambutolum,myambutol,purderal,servambutol,tibutol" 1.2 "g" 1.2 "g" "100051-2,16841-9,18921-7,20381-0,23625-7,240-2,241-0,242-8,243-6,25187-6,25194-2,25195-9,25230-4,25404-5,3607-9,42645-2,42646-0,55154-9,55674-6,56025-0,7010-2,89491-5"
"ETI" 456476 "Ethambutol/isoniazid" "Antimycobacterials" "J04AM03,QJ04AM03" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "ETI" 456476 "Ethambutol/isoniazid" "Antimycobacterials" "J04AM03,QJ04AM03" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"ETI1" 2761171 "Ethionamide" "Antimycobacterials" "J04AD03,QJ04AD03" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "ethi,ethion" "aethionamidum,aetina,aetiva,amidazin,amidazine,atina,ethimide,ethina,ethinamide,ethionamidum,ethioniamide,ethylisothiamide,ethyonomide,etimid,etiocidan,etionamid,etionamida,etionamide,etioniamid,etionid,etionizin,etionizina,etionizine,fatoliamid,iridocin,iridozin,isothin,isotiamida,itiocide,nicotion,nisotin,nizotin,rigenicid,sertinon,teberus,thianid,thianide,thioamide,thiodine,thiomid,thioniden,tianid,tiomid,trecator,trekator,trescatyl,trescazide,tubenamide,tubermin,tuberoid,tuberoson" 0.75 "g" "16099-4,16845-0,18922-5,20382-8,23617-4,25183-5,25196-7,25198-3,25231-2,41693-3,42647-8,42648-6,7011-0,96110-2" "ETI1" 2761171 "Ethionamide" "Antimycobacterials" "J04AD03,QJ04AD03" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "ethi,ethion" "aethionamidum,aetina,aetiva,amidazin,amidazine,atina,ethimide,ethina,ethinamide,ethionamidum,ethioniamide,ethylisothiamide,ethyonomide,etimid,etiocidan,etionamid,etionamida,etionamide,etioniamid,etionid,etionizin,etionizina,etionizine,fatoliamid,iridocin,iridozin,isothin,isotiamida,itiocide,nicotion,nisotin,nizotin,rigenicid,sertinon,teberus,thianid,thianide,thioamide,thiodine,thiomid,thioniden,tianid,tiomid,trecator,trekator,trescatyl,trescazide,tubenamide,tubermin,tuberoid,tuberoson" 0.75 "g" "16099-4,16845-0,18922-5,20382-8,23617-4,25183-5,25196-7,25198-3,25231-2,41693-3,42647-8,42648-6,7011-0,96110-2"
"ETO" 6034 "Ethopabate" "Other antibacterials" "QP51AX17" "NA" "ethopabat" "NA" "ETO" 6034 "Ethopabate" "Other" "QP51AX17" "NA" "ethopabat" "NA"
"EXE" "Exebacase" "NA" "NA" "NA" "NA" "EXE" "Exebacase" "Other" "NA" "NA" "NA" "NA"
"FAR" 65894 "Faropenem" "Other antibacterials" "J01DI03,QJ01DI03" "Other beta-lactam antibacterials" "Other cephalosporins and penems" "farope" "farom,faropenemhydrate,faropenemsalt,fropenem,fropenum,furopenem" 0.75 "g" "73600-9,73622-3,73645-4" "FAR" 65894 "Faropenem" "Other" "J01DI03,QJ01DI03" "Other beta-lactam antibacterials" "Other cephalosporins and penems" "farope" "farom,faropenemhydrate,faropenemsalt,fropenem,fropenum,furopenem" 0.75 "g" "73600-9,73622-3,73645-4"
"FDX" 10034073 "Fidaxomicin" "Other antibacterials" "A07AA12,QA07AA12" "NA" "dificid,dificlir,difimicin,fidaxomicina,lipiarmicin,lipiarmycin,lipiarrmycin" 0.4 "g" "73599-3,73621-5,73644-7" "FDX" 10034073 "Fidaxomicin" "Other" "A07AA12,QA07AA12" "NA" "dificid,dificlir,difimicin,fidaxomicina,lipiarmicin,lipiarmycin,lipiarrmycin" 0.4 "g" "73599-3,73621-5,73644-7"
"FIN" 11567473 "Finafloxacin" "Fluoroquinolones" "NA" "NA" "xtoro" "73598-5,73620-7,73643-9" "FIN" 11567473 "Finafloxacin" "Fluoroquinolones,Quinolones" "NA" "NA" "xtoro" "73598-5,73620-7,73643-9"
"FLA" 46783781 "Flavomycin" "Other antibacterials" "NA" "flavom" "bambermicina,bambermycine,bambermycinum,flavofosfolipol,flavophospholipol,gainpro,menomycin" "NA" "FLA" 46783781 "Flavomycin" "Other" "NA" "flavom" "bambermicina,bambermycine,bambermycinum,flavofosfolipol,flavophospholipol,gainpro,menomycin" "NA"
"FLE" 3357 "Fleroxacin" "Fluoroquinolones" "J01MA08,QJ01MA08" "Quinolone antibacterials" "Fluoroquinolones" "fler,flerox" "fleroxacine,fleroxacino,fleroxacinum,fleroxicin,megalocin,megalone,megalosin,quinodis" 0.4 "g" 0.4 "g" "25411-0,32372-5,35806-9,7012-8" "FLE" 3357 "Fleroxacin" "Fluoroquinolones,Quinolones" "J01MA08,QJ01MA08" "Quinolone antibacterials" "Fluoroquinolones" "fler,flerox" "fleroxacine,fleroxacino,fleroxacinum,fleroxicin,megalocin,megalone,megalosin,quinodis" 0.4 "g" 0.4 "g" "25411-0,32372-5,35806-9,7012-8"
"FLO" 65864 "Flomoxef" "Other antibacterials" "J01DC14,QJ01DC14" "flomox" "flomoxefo,flomoxefsalt,flomoxefum,flumarin" 2 "g" "100052-0,53822-3" "FLO" 65864 "Flomoxef" "Other" "J01DC14,QJ01DC14" "flomox" "flomoxefo,flomoxefsalt,flomoxefum,flumarin" 2 "g" "100052-0,53822-3"
"FLR" 114811 "Florfenicol" "Phenicols" "QJ01BA90,QJ51BA90" "florfe" "aquafen,descocin,dexawin,efnicol,fricol,hyrazin,loncor,macphenicol,masatirin,neomyson,norfenicol,nuflor,racephenicol,rincrol,thiamcol,urfamicina,urophenyl" "23740-4,35807-7,35808-5,87599-7" "FLR" 114811 "Florfenicol" "Phenicols" "QJ01BA90,QJ51BA90" "florfe" "aquafen,descocin,dexawin,efnicol,fricol,hyrazin,loncor,macphenicol,masatirin,neomyson,norfenicol,nuflor,racephenicol,rincrol,thiamcol,urfamicina,urophenyl" "23740-4,35807-7,35808-5,87599-7"
"FLC" 21319 "Flucloxacillin" "Beta-lactams/penicillins" "J01CF05,QJ01CF05,QJ51CF05" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "clox,fluclo,flux" "bactopen,cloxacap,cloxacillinhydrate,cloxypen,floxacillin,floxacillinanhydrous,floxapen,floxapensalt,fluclomix,flucloxacilina,flucloxacilline,flucloxacillinum,flucloxin,fluorochloroxacillin,galfloxin,latocillin,orbeninhydrate,rimaflox,staphobristol,zoxin" 2 "g" 2 "g" "NA" "FLC" 21319 "Flucloxacillin" "Isoxazolylpenicillins,Penicillins,Beta-lactams" "J01CF05,QJ01CF05,QJ51CF05" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "clox,fluclo,flux" "bactopen,cloxacap,cloxacillinhydrate,cloxypen,floxacillin,floxacillinanhydrous,floxapen,floxapensalt,fluclomix,flucloxacilina,flucloxacilline,flucloxacillinum,flucloxin,fluorochloroxacillin,galfloxin,latocillin,orbeninhydrate,rimaflox,staphobristol,zoxin" 2 "g" 2 "g" "NA"
"FLU" 3365 "Fluconazole" "Antifungals/antimycotics" "D01AC15,J02AC01,QD01AC15,QJ02AC01" "Antimycotics for systemic use" "Triazole derivatives" "fluc,flucon,fluz,flz" "alflucoz,alkanazole,baten,biocanol,biozole,biozolene,canzol,cryptal,diflazon,diflucan,dimycon,elazor,flucazol,fluconazoli,fluconazolum,flucoral,flucostat,flukezol,flunazol,flunizol,fluzon,forcan,fuconal,fungata,loitin,mutum,oxifugol,pritenzol,syscan,trican,triconal,triflucan,zemyc,zoltec,zonal" 0.2 "g" 0.2 "g" "10987-6,16870-8,18924-1,248-5,249-3,250-1,251-9,25255-1,7013-6,80530-9" "FLU" 3365 "Fluconazole" "Antifungals" "D01AC15,J02AC01,QD01AC15,QJ02AC01" "Antimycotics for systemic use" "Triazole derivatives" "fluc,flucon,fluz,flz" "alflucoz,alkanazole,baten,biocanol,biozole,biozolene,canzol,cryptal,diflazon,diflucan,dimycon,elazor,flucazol,fluconazoli,fluconazolum,flucoral,flucostat,flukezol,flunazol,flunizol,fluzon,forcan,fuconal,fungata,loitin,mutum,oxifugol,pritenzol,syscan,trican,triconal,triflucan,zemyc,zoltec,zonal" 0.2 "g" 0.2 "g" "10987-6,16870-8,18924-1,248-5,249-3,250-1,251-9,25255-1,7013-6,80530-9"
"FCT" 3366 "Flucytosine" "Antifungals/antimycotics" "D01AE21,J02AX01,QD01AE21,QJ02AX01" "Antifungals for topical use" "Other antifungals for topical use" "5flc,fcu,flucyt,fluo,fluy" "alcobon,ancoban,ancobon,ancotil,ancotyl,flourocytosine,flucitosina,flucytosin,flucytosinum,flucytosone,fluocytosine,fluorcytosine,fluorocytosine" 10 "g" 10 "g" "NA" "FCT" 3366 "Flucytosine" "Antifungals" "D01AE21,J02AX01,QD01AE21,QJ02AX01" "Antifungals for topical use" "Other antifungals for topical use" "5flc,fcu,flucyt,fluo,fluy" "alcobon,ancoban,ancobon,ancotil,ancotyl,flourocytosine,flucitosina,flucytosin,flucytosinum,flucytosone,fluocytosine,fluorcytosine,fluorocytosine" 10 "g" 10 "g" "NA"
"FLM" 3374 "Flumequine" "Quinolones" "J01MB07,QJ01MB07" "Quinolone antibacterials" "Other quinolones" "flumeq" "apurone,fantacin,flumequina,flumequino,flumequinum,flumigal,flumiquil,flumisol,flumix,imequyl" 1.2 "g" "55675-3,55676-1,55677-9,55678-7" "FLM" 3374 "Flumequine" "Quinolones" "J01MB07,QJ01MB07" "Quinolone antibacterials" "Other quinolones" "flumeq" "apurone,fantacin,flumequina,flumequino,flumequinum,flumigal,flumiquil,flumisol,flumix,imequyl" 1.2 "g" "55675-3,55676-1,55677-9,55678-7"
"FLR1" 71260 "Flurithromycin" "Macrolides/lincosamides" "J01FA14,QJ01FA14" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "abbot,beritromicina,berythromycin,berythromycine,berythromycinum,flurithromycine,flurithromycinum,fluritromicina,fluritromycinum,flurizic,mizar" 0.75 "g" "NA" "FLR1" 71260 "Flurithromycin" "Macrolides" "J01FA14,QJ01FA14" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "abbot,beritromicina,berythromycin,berythromycine,berythromycinum,flurithromycine,flurithromycinum,fluritromicina,fluritromycinum,flurizic,mizar" 0.75 "g" "NA"
"FFL" 214356 "Fosfluconazole" "Antifungals/antimycotics" "NA" "NA" "fosfluconazol,procif,prodif" "NA" "FFL" 214356 "Fosfluconazole" "Antifungals" "NA" "NA" "fosfluconazol,procif,prodif" "NA"
"FOS" 446987 "Fosfomycin" "Other antibacterials" "J01XX01,QJ01XX01,QS02AA17,S02AA17" "Other antibacterials" "Other antibacterials" "ff,fm,fo,fof,fos,fosf,fosfom,fosmyc" "fosfocina,fosfomicin,fosfomicina,fosfomycine,fosfomycinum,fosfonomycin,infectophos,phosphonemycin,phosphonomycin,veramina" 3 "g" 8 "g" "25596-8,25653-7,35809-3,35810-1" "FOS" 446987 "Fosfomycin" "Phosphonics" "J01XX01,QJ01XX01,QS02AA17,S02AA17" "Other antibacterials" "Other antibacterials" "ff,fm,fo,fof,fos,fosf,fosfom,fosmyc" "fosfocina,fosfomicin,fosfomicina,fosfomycine,fosfomycinum,fosfonomycin,infectophos,phosphonemycin,phosphonomycin,veramina" 3 "g" 8 "g" "25596-8,25653-7,35809-3,35810-1"
"FMD" 572 "Fosmidomycin" "Other antibacterials" "NA" "NA" "fosmidomicina,fosmidomycina,fosmidomycine,fosmidomycinsalt,fosmidomycinum" "NA" "FMD" 572 "Fosmidomycin" "Other" "NA" "NA" "fosmidomicina,fosmidomycina,fosmidomycine,fosmidomycinsalt,fosmidomycinum" "NA"
"FRM" 8378 "Framycetin" "Aminoglycosides" "D09AA01,QD09AA01,QJ01GB91,QR01AX08,QS01AA07,R01AX08,S01AA07" "fram,framyc" "actilin,actiline,antibiotique,bycomycin,enterfram,fradiomycin,fradiomycinum,framicetina,framidal,framycetine,framycetinum,framycin,framygen,francetin,jernadex,myacyne,mycerin,mycifradin,neobrettin,neolate,neomas,neomcin,neomicina,neomin,neomycine,neomycinum,nivemycin,soframycin,soframycine" "18926-6,257-6,258-4,259-2,260-0,55679-5" "FRM" 8378 "Framycetin" "Aminoglycosides" "D09AA01,QD09AA01,QJ01GB91,QR01AX08,QS01AA07,R01AX08,S01AA07" "fram,framyc" "actilin,actiline,antibiotique,bycomycin,enterfram,fradiomycin,fradiomycinum,framicetina,framidal,framycetine,framycetinum,framycin,framygen,francetin,jernadex,myacyne,mycerin,mycifradin,neobrettin,neolate,neomas,neomcin,neomicina,neomin,neomycine,neomycinum,nivemycin,soframycin,soframycine" "18926-6,257-6,258-4,259-2,260-0,55679-5"
"FUR" 6870646 "Furazidin" "Other antibacterials" "J01XE03,QJ01XE03" "Other antibacterials" "Nitrofuran derivatives" "NA" "akritoin,furagin,furaginum,furamag,furazidine,hydantoin" 0.3 "g" "NA" "FUR" 6870646 "Furazidin" "Nitrofurans" "J01XE03,QJ01XE03" "Other antibacterials" "Nitrofuran derivatives" "NA" "akritoin,furagin,furaginum,furamag,furazidine,hydantoin" 0.3 "g" "NA"
"FRZ" 5323714 "Furazolidone" "Other antibacterials" "G01AX06,QG01AX06,QJ01XE90" "furazo" "bifuron,corizium,coryzium,diafuron,enterotoxon,furall,furanzolidone,furaxon,furaxone,furazolidine,furazolidon,furazolidona,furazolidonum,furazolum,furidon,furmethoxadone,furovag,furoxal,furoxane,furoxon,furoxone,furozolidine,giardil,giarlam,medaron,neftin,nicolen,nifulidone,nifuran,nifurazolidone,nifurazolidonum,nitrofuradoxon,nitrofurazolidone,nitrofurazolidonum,nitrofuroxon,optazol,ortazol,puradin,roptazol,sclaventerol,tikofuran,topazone,trichofuron,tricofuron,tricoron,trifurox,viofuragyn" "69574-2,87794-4" "FRZ" 5323714 "Furazolidone" "Nitrofurans" "G01AX06,QG01AX06,QJ01XE90" "furazo" "bifuron,corizium,coryzium,diafuron,enterotoxon,furall,furanzolidone,furaxon,furaxone,furazolidine,furazolidon,furazolidona,furazolidonum,furazolum,furidon,furmethoxadone,furovag,furoxal,furoxane,furoxon,furoxone,furozolidine,giardil,giarlam,medaron,neftin,nicolen,nifulidone,nifuran,nifurazolidone,nifurazolidonum,nitrofuradoxon,nitrofurazolidone,nitrofurazolidonum,nitrofuroxon,optazol,ortazol,puradin,roptazol,sclaventerol,tikofuran,topazone,trichofuron,tricofuron,tricoron,trifurox,viofuragyn" "69574-2,87794-4"
"FUS" 3000226 "Fusidic acid" "Other antibacterials" "D06AX01,D09AA02,J01XC01,QD06AX01,QD09AA02,QJ01XC01,QS01AA13,S01AA13" "Other antibacterials" "Steroid antibacterials" "fa,fusaci,fusi" "flucidin,fucidate,fucidina,fucidine,fucithalmic,fusidate,fusidicacid,fusidin,fusidine,taksta" 1.5 "g" 1.5 "g" "NA" "FUS" 3000226 "Fusidic acid" "Fusidanes" "D06AX01,D09AA02,J01XC01,QD06AX01,QD09AA02,QJ01XC01,QS01AA13,S01AA13" "Other antibacterials" "Steroid antibacterials" "fa,fusaci,fusi" "flucidin,fucidate,fucidina,fucidine,fucithalmic,fusidate,fusidicacid,fusidin,fusidine,taksta" 1.5 "g" 1.5 "g" "NA"
"GAM" 59364992 "Gamithromycin" "Macrolides/lincosamides" "QJ01FA95" "NA" "zactran" "100054-6,88376-9,88378-5" "GAM" 59364992 "Gamithromycin" "Macrolides" "QJ01FA95" "NA" "zactran" "100054-6,88376-9,88378-5"
"GRN" 124093 "Garenoxacin" "Fluoroquinolones" "J01MA19,QJ01MA19" "gareno" "ganefloxacin,garenfloxacin" 0.4 "g" "35811-9,35812-7,35813-5" "GRN" 124093 "Garenoxacin" "Fluoroquinolones,Quinolones" "J01MA19,QJ01MA19" "gareno" "ganefloxacin,garenfloxacin" 0.4 "g" "35811-9,35812-7,35813-5"
"GAT" 5379 "Gatifloxacin" "Fluoroquinolones" "J01MA16,QJ01MA16,QS01AE06,S01AE06" "Quinolone antibacterials" "Fluoroquinolones" "gati,gatifl" "acorafloxacin,avarofloxacin,balofloxacin,balofox,bazucin,bilimin,bonoq,gaity,gatiflo,gatifloxacine,gatifloxcin,gatilox,gatiquin,gatispan,kinome,tequin,tymer,zymar,zymaxid,zymer" 0.4 "g" 0.4 "g" "31036-7,31038-3,31040-9,31042-5,41494-6" "GAT" 5379 "Gatifloxacin" "Fluoroquinolones,Quinolones" "J01MA16,QJ01MA16,QS01AE06,S01AE06" "Quinolone antibacterials" "Fluoroquinolones" "gati,gatifl" "acorafloxacin,avarofloxacin,balofloxacin,balofox,bazucin,bilimin,bonoq,gaity,gatiflo,gatifloxacine,gatifloxcin,gatilox,gatiquin,gatispan,kinome,tequin,tymer,zymar,zymaxid,zymer" 0.4 "g" 0.4 "g" "31036-7,31038-3,31040-9,31042-5,41494-6"
"GEM" 9571107 "Gemifloxacin" "Fluoroquinolones" "J01MA15,QJ01MA15" "Quinolone antibacterials" "Fluoroquinolones" "gemifl" "factiv,gemifioxacin,gemifloxacine,gemifloxacino,gemifloxacinum" 0.32 "g" 0.2 "g" "35814-3,35815-0,35816-8,41697-4" "GEM" 9571107 "Gemifloxacin" "Fluoroquinolones,Quinolones" "J01MA15,QJ01MA15" "Quinolone antibacterials" "Fluoroquinolones" "gemifl" "factiv,gemifioxacin,gemifloxacine,gemifloxacino,gemifloxacinum" 0.32 "g" 0.2 "g" "35814-3,35815-0,35816-8,41697-4"
"GEN" 3467 "Gentamicin" "Aminoglycosides" "D06AX07,J01GB03,QA07AA91,QD06AX07,QG01AA91,QG51AA04,QJ01GB03,QJ51GB03,QS01AA11,QS02AA14,QS03AA06,S01AA11,S02AA14,S03AA06" "Aminoglycoside antibacterials" "Other aminoglycosides" "cn,ge1000,ge2000,gen,gen128,gen500,gent,genta1,gentam,gm" "centicin,cidomycin,garamicin,garamycin,gentacycol,gentamicina,gentamicine,gentamicins,gentamicinum,gentamycins,gentamycinum,gentocin,lyramycin,oksitselanim,septigen,septocin" 0.24 "g" "101494-3,13561-6,13562-4,15106-8,18928-2,18929-0,22746-2,22747-0,266-7,267-5,268-3,269-1,31091-2,31092-0,31093-8,35668-3,35817-6,3663-2,3664-0,3665-7,39082-3,47109-4,50630-3,59379-8,7016-9,7017-7,7018-5,80971-5,88111-0,89481-6" "GEN" 3467 "Gentamicin" "Aminoglycosides" "D06AX07,J01GB03,QA07AA91,QD06AX07,QG01AA91,QG51AA04,QJ01GB03,QJ51GB03,QS01AA11,QS02AA14,QS03AA06,S01AA11,S02AA14,S03AA06" "Aminoglycoside antibacterials" "Other aminoglycosides" "cn,ge1000,ge2000,gen,gen128,gen500,gent,genta1,gentam,gm" "centicin,cidomycin,garamicin,garamycin,gentacycol,gentamicina,gentamicine,gentamicins,gentamicinum,gentamycins,gentamycinum,gentocin,lyramycin,oksitselanim,septigen,septocin" 0.24 "g" "101494-3,13561-6,13562-4,15106-8,18928-2,18929-0,22746-2,22747-0,266-7,267-5,268-3,269-1,31091-2,31092-0,31093-8,35668-3,35817-6,3663-2,3664-0,3665-7,39082-3,47109-4,50630-3,59379-8,7016-9,7017-7,7018-5,80971-5,88111-0,89481-6"
"GEH" "Gentamicin-high" "Aminoglycosides" "NA" "gehi,gehl,genta high,gentamicin high" "NA" "18929-0,35817-6,7017-7,7018-5" "GEH" "Gentamicin-high" "Aminoglycosides" "NA" "gehi,gehl,genta high,gentamicin high" "NA" "18929-0,35817-6,7017-7,7018-5"
"GEP" 25101874 "Gepotidacin" "Other antibacterials" "J01XX13,QJ01XX13" "NA" "gepotidacina,gepotidacine" "NA" "GEP" 25101874 "Gepotidacin" "Other" "J01XX13,QJ01XX13" "NA" "gepotidacina,gepotidacine" "NA"
"GRX" 72474 "Grepafloxacin" "Fluoroquinolones" "J01MA11,QJ01MA11" "Quinolone antibacterials" "Fluoroquinolones" "grep,grepaf" "grepafloxacine,grepafloxacino,lungaskin,raxar,vaxar" 0.4 "g" "21316-5,23638-0,23639-8,35818-4" "GRX" 72474 "Grepafloxacin" "Fluoroquinolones,Quinolones" "J01MA11,QJ01MA11" "Quinolone antibacterials" "Fluoroquinolones" "grep,grepaf" "grepafloxacine,grepafloxacino,lungaskin,raxar,vaxar" 0.4 "g" "21316-5,23638-0,23639-8,35818-4"
"GRI" 441140 "Griseofulvin" "Antifungals/antimycotics" "D01AA08,D01BA01,QD01AA08,QD01BA01" "NA" "amudane,delmofulvina,epigriseofulvin,fulcin,fulcine,fulvicin,fulvidex,fulvina,fulvinil,fulvistatin,fungivin,greosin,gresfeed,gricin,grifulin,grifulvin,grisactin,griscofulvin,grisefuline,griseo,griseofulviin,griseofulvina,griseofulvine,griseofulvinum,griseomix,griseostatin,grisetin,grisofulvin,grisovin,grisowen,grizeofulvin,grysio,guservin,lamoryl,likuden,likunden,murfulvin,poncyl,spiro,spirofulvin,xuanjing" 0.5 "g" "12402-4,54200-1,54201-9,54202-7" "GRI" 441140 "Griseofulvin" "Antifungals" "D01AA08,D01BA01,QD01AA08,QD01BA01" "NA" "amudane,delmofulvina,epigriseofulvin,fulcin,fulcine,fulvicin,fulvidex,fulvina,fulvinil,fulvistatin,fungivin,greosin,gresfeed,gricin,grifulin,grifulvin,grisactin,griscofulvin,grisefuline,griseo,griseofulviin,griseofulvina,griseofulvine,griseofulvinum,griseomix,griseostatin,grisetin,grisofulvin,grisovin,grisowen,grizeofulvin,grysio,guservin,lamoryl,likuden,likunden,murfulvin,poncyl,spiro,spirofulvin,xuanjing" 0.5 "g" "12402-4,54200-1,54201-9,54202-7"
"HAB" 175989 "Habekacin" "Aminoglycosides" "NA" "NA" "amikafur,amikan,amitrex,arikayce,biklin,biodacyn,chemacin,fabianol,habekacinxsulfate,likacin,pierami" "NA" "HAB" 175989 "Habekacin" "Aminoglycosides" "NA" "NA" "amikafur,amikan,amitrex,arikayce,biklin,biodacyn,chemacin,fabianol,habekacinxsulfate,likacin,pierami" "NA"
"HCH" 11979956 "Hachimycin" "Antifungals/antimycotics" "D01AA03,G01AA06,J02AA02,QD01AA03,QG01AA06,QJ02AA02" "Antimycotics for systemic use" "Antibiotics" "NA" "cabimicina,hachimicina,hachimycine,hachimycinum,trichomycinum,trichonat" "NA" "HCH" 11979956 "Hachimycin" "Antifungals" "D01AA03,G01AA06,J02AA02,QD01AA03,QG01AA06,QJ02AA02" "Antimycotics for systemic use" "Antibiotics" "NA" "cabimicina,hachimicina,hachimycine,hachimycinum,trichomycinum,trichonat" "NA"
"HET" 443387 "Hetacillin" "Beta-lactams/penicillins" "J01CA18,QJ01CA18" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "hetaci" "etacillina,hetacilina,hetacilline,hetacillinum,natacillin,phenazacillin,versapen,versatrex" 2 "g" "18931-6,274-1,275-8,276-6,277-4" "HET" 443387 "Hetacillin" "Penicillins,Beta-lactams" "J01CA18,QJ01CA18" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "hetaci" "etacillina,hetacilina,hetacilline,hetacillinum,natacillin,phenazacillin,versapen,versatrex" 2 "g" "18931-6,274-1,275-8,276-6,277-4"
"HYG" 56928061 "Hygromycin" "Aminoglycosides" "NA" "NA" "antihelmycin,destomysin,hyanthelmix,hygromix,hygrovectine,hygrovetine" "NA" "HYG" 56928061 "Hygromycin" "Aminoglycosides" "NA" "NA" "antihelmycin,destomysin,hyanthelmix,hygromix,hygrovectine,hygrovetine" "NA"
"IBX" "Ibrexafungerp" "Antifungals" "J02AX07,QJ02AX07" "NA" "NA" "NA" "IBX" "Ibrexafungerp" "Antifungals" "J02AX07,QJ02AX07" "NA" "NA" "NA"
"ICL" 213043 "Iclaprim" "Other antibacterials" "J01EA03,QJ01EA03" "iclapr" "iclaprime,mersarex" "73597-7,73619-9,73642-1" "ICL" 213043 "Iclaprim" "Trimethoprims" "J01EA03,QJ01EA03" "iclapr" "iclaprime,mersarex" "73597-7,73619-9,73642-1"
"IPM" 104838 "Imipenem" "Carbapenems" "J01DH51,QJ01DH51" "Other beta-lactam antibacterials" "Carbapenems" "imci,imi,imip,imip32,imipen,imp" "imipemide,imipenemum,imipenen,primaxin,recarbrio,tienam,tienamycin" 2 "g" "101487-7,17010-0,18932-4,18933-2,23613-3,25221-3,25257-7,27331-8,278-2,279-0,280-8,281-6,282-4,283-2,284-0,285-7,35819-2,3688-9,54170-6,54171-4,54172-2,7019-3,85424-0,93232-7,96372-8" "IPM" 104838 "Imipenem" "Carbapenems,Beta-lactams" "J01DH51,QJ01DH51" "Other beta-lactam antibacterials" "Carbapenems" "imci,imi,imip,imip32,imipen,imp" "imipemide,imipenemum,imipenen,primaxin,recarbrio,tienam,tienamycin" 2 "g" "101487-7,17010-0,18932-4,18933-2,23613-3,25221-3,25257-7,27331-8,278-2,279-0,280-8,281-6,282-4,283-2,284-0,285-7,35819-2,3688-9,54170-6,54171-4,54172-2,7019-3,85424-0,93232-7,96372-8"
"IPE" "Imipenem/EDTA" "Carbapenems" "NA" "NA" "NA" "35819-2,54170-6,54171-4,54172-2" "IPE" "Imipenem/EDTA" "Carbapenems,Beta-lactams" "NA" "NA" "NA" "35819-2,54170-6,54171-4,54172-2"
"IMR" "Imipenem/relebactam" "Carbapenems" "J01DH56,QJ01DH56" "NA" "NA" 2 "g" "85424-0,93232-7,96372-8" "IMR" "Imipenem/relebactam" "Carbapenems,Beta-lactams,Beta-lactamase inhibitors" "J01DH56,QJ01DH56" "NA" "NA" 2 "g" "85424-0,93232-7,96372-8"
"ISV" 6918485 "Isavuconazole" "Antifungals/antimycotics" "J02AC05,QJ02AC05" "isav" "benzonitrile,ravuconazole" 0.2 "g" 0.2 "g" "85381-2,88887-5" "ISV" 6918485 "Isavuconazole" "Antifungals" "J02AC05,QJ02AC05" "isav" "benzonitrile,ravuconazole" 0.2 "g" 0.2 "g" "85381-2,88887-5"
"ISE" 3037209 "Isepamicin" "Aminoglycosides" "J01GB11,QJ01GB11" "Aminoglycoside antibacterials" "Other aminoglycosides" "isepam" "isepacin,isepalline,isepamicina,isepamicine,isepamicinsulphate,isepamicinum" 0.4 "g" "32381-6,35820-0,35821-8,55680-3" "ISE" 3037209 "Isepamicin" "Aminoglycosides" "J01GB11,QJ01GB11" "Aminoglycoside antibacterials" "Other aminoglycosides" "isepam" "isepacin,isepalline,isepamicina,isepamicine,isepamicinsulphate,isepamicinum" 0.4 "g" "32381-6,35820-0,35821-8,55680-3"
"ISO" 3760 "Isoconazole" "Antifungals/antimycotics" "D01AC05,G01AF07,QD01AC05,QG01AF07" "Antimycotics for topic use" "Triazole derivatives" "NA" "isoconazol,isoconazolum,travogen" "55681-1,55682-9,55683-7,55684-5" "ISO" 3760 "Isoconazole" "Antifungals" "D01AC05,G01AF07,QD01AC05,QG01AF07" "Antimycotics for topic use" "Triazole derivatives" "NA" "isoconazol,isoconazolum,travogen" "55681-1,55682-9,55683-7,55684-5"
"INH" 3767 "Isoniazid" "Antimycobacterials" "J04AC01,QJ04AC01" "Drugs for treatment of tuberculosis" "Hydrazides" "inh,isonia" "abdizide,acetylisoniazide,andrazide,anidrasona,antimicina,antituberkulosum,armacide,armazid,armazide,atcotibine,azuren,cedin,cemidon,chemiazid,chemidon,continazine,cortinazine,cotinazin,cotinizin,defonin,dianicotyl,dibutin,diforin,dinacrin,dinocrin,ditubin,ebidene,eralon,ertuban,eutizon,evalon,fetefu,fimalene,hidranizil,hidrasonil,hidrulta,hidrun,hycozid,hydra,hydrazid,hyozid,hyzyd,idrazil,inizid,ipcazide,iscotin,isidrina,ismazide,isobicina,isocid,isocidene,isocotin,isohydrazide,isokin,isolyn,isonerit,isonex,isoniacid,isoniazida,isoniazide,isoniazidum,isonicazide,isonicid,isonico,isonicotan,isonicotil,isonicotinhydrazid,isonicotinohydrazide,isonide,isonidrin,isonikazid,isonilex,isonin,isonindon,isonirit,isoniton,isonizida,isonizide,isotamine,isotebe,isotebezid,isotinyl,isozid,isozide,isozyd,laniazid,laniozid,mayambutol,mybasan,neoteben,neoxin,neumandin,nevin,niadrin,nicazide,nicetal,nicizina,niconyl,nicotibina,nicotibine,nicotisan,nicozide,nidaton,nidrazid,nikozid,niplen,nitadon,niteban,nitebannsc,nydrazid,nyscozid,pelazid,percin,phthisen,preparation,pycazide,pyreazid,pyricidin,pyridicin,pyrizidin,raumanon,razide,retozide,rifater,rimicid,rimifon,rimiphone,rimitsid,robiselin,robisellin,roxifen,sanohidrazina,sauterazid,sauterzid,stanozide,tebecid,tebenic,tebexin,tebilon,tebos,teebaconin,tekazin,tibazide,tibemid,tibiazide,tibinide,tibison,tibivis,tibizide,tibusan,tisin,tisiodrazida,tizide,tubazid,tubazide,tubeco,tubecotubercid,tuberian,tubicon,tubilysin,tubizid,tubomel,tyvid,unicocyde,unicozyde,vazadrine,vederon,zidafimia,zinadon,zonazide" 0.3 "g" 0.3 "g" "18934-0,20383-6,23947-5,25217-1,25218-9,25219-7,25451-6,26756-7,286-5,287-3,288-1,289-9,29315-9,3697-0,40371-7,42649-4,42650-2,42651-0,45215-1,48171-3,48172-1,55685-2,7020-1,89488-1" "INH" 3767 "Isoniazid" "Antimycobacterials" "J04AC01,QJ04AC01" "Drugs for treatment of tuberculosis" "Hydrazides" "inh,isonia" "abdizide,acetylisoniazide,andrazide,anidrasona,antimicina,antituberkulosum,armacide,armazid,armazide,atcotibine,azuren,cedin,cemidon,chemiazid,chemidon,continazine,cortinazine,cotinazin,cotinizin,defonin,dianicotyl,dibutin,diforin,dinacrin,dinocrin,ditubin,ebidene,eralon,ertuban,eutizon,evalon,fetefu,fimalene,hidranizil,hidrasonil,hidrulta,hidrun,hycozid,hydra,hydrazid,hyozid,hyzyd,idrazil,inizid,ipcazide,iscotin,isidrina,ismazide,isobicina,isocid,isocidene,isocotin,isohydrazide,isokin,isolyn,isonerit,isonex,isoniacid,isoniazida,isoniazide,isoniazidum,isonicazide,isonicid,isonico,isonicotan,isonicotil,isonicotinhydrazid,isonicotinohydrazide,isonide,isonidrin,isonikazid,isonilex,isonin,isonindon,isonirit,isoniton,isonizida,isonizide,isotamine,isotebe,isotebezid,isotinyl,isozid,isozide,isozyd,laniazid,laniozid,mayambutol,mybasan,neoteben,neoxin,neumandin,nevin,niadrin,nicazide,nicetal,nicizina,niconyl,nicotibina,nicotibine,nicotisan,nicozide,nidaton,nidrazid,nikozid,niplen,nitadon,niteban,nitebannsc,nydrazid,nyscozid,pelazid,percin,phthisen,preparation,pycazide,pyreazid,pyricidin,pyridicin,pyrizidin,raumanon,razide,retozide,rifater,rimicid,rimifon,rimiphone,rimitsid,robiselin,robisellin,roxifen,sanohidrazina,sauterazid,sauterzid,stanozide,tebecid,tebenic,tebexin,tebilon,tebos,teebaconin,tekazin,tibazide,tibemid,tibiazide,tibinide,tibison,tibivis,tibizide,tibusan,tisin,tisiodrazida,tizide,tubazid,tubazide,tubeco,tubecotubercid,tuberian,tubicon,tubilysin,tubizid,tubomel,tyvid,unicocyde,unicozyde,vazadrine,vederon,zidafimia,zinadon,zonazide" 0.3 "g" 0.3 "g" "18934-0,20383-6,23947-5,25217-1,25218-9,25219-7,25451-6,26756-7,286-5,287-3,288-1,289-9,29315-9,3697-0,40371-7,42649-4,42650-2,42651-0,45215-1,48171-3,48172-1,55685-2,7020-1,89488-1"
"IST" "Isoniazid/sulfamethoxazole/trimethoprim/pyridoxine" "Antimycobacterials" "NA" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "IST" "Isoniazid/sulfamethoxazole/trimethoprim/pyridoxine" "Trimethoprims,Sulfonamides,Antimycobacterials" "NA" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"ITR" 3793 "Itraconazole" "Antifungals/antimycotics" "J02AC02,QJ02AC02" "Antimycotics for systemic use" "Triazole derivatives" "itra,itraco" "candistat,canditral,cladosal,fungitraxx,intraconazole,itraconazol,itraconazolo,itraconazolum,itraconzaole,itrafungol,itralek,itrizole,lozanoc,onmel,sempera,sporamelt,sporanox,sporonox,traconal,triasporin" 0.2 "g" 0.2 "g" "10989-2,12392-7,25258-5,25452-4,27081-9,32184-4,32185-1,32603-3,54179-7,7021-9,80531-7" "ITR" 3793 "Itraconazole" "Antifungals" "J02AC02,QJ02AC02" "Antimycotics for systemic use" "Triazole derivatives" "itra,itraco" "candistat,canditral,cladosal,fungitraxx,intraconazole,itraconazol,itraconazolo,itraconazolum,itraconzaole,itrafungol,itralek,itrizole,lozanoc,onmel,sempera,sporamelt,sporanox,sporonox,traconal,triasporin" 0.2 "g" 0.2 "g" "10989-2,12392-7,25258-5,25452-4,27081-9,32184-4,32185-1,32603-3,54179-7,7021-9,80531-7"
"JOS" 5282165 "Josamycin" "Macrolides/lincosamides" "J01FA07,QJ01FA07" "Macrolides, lincosamides and streptogramins" "Macrolides" "josamy" "jomybel,josamicina,josamycine,josamycinum" 2 "g" "25597-6,25702-2,41698-2,41699-0" "JOS" 5282165 "Josamycin" "Macrolides" "J01FA07,QJ01FA07" "Macrolides, lincosamides and streptogramins" "Macrolides" "josamy" "jomybel,josamicina,josamycine,josamycinum" 2 "g" "25597-6,25702-2,41698-2,41699-0"
"KAN" 6032 "Kanamycin" "Aminoglycosides" "A07AA08,J01GB04,QA07AA08,QJ01GB04,QS01AA24,S01AA24" "Aminoglycoside antibacterials" "Other aminoglycosides" "hlk,k,kan,kana,kanamy,km" "kanamicina,kanamycine,kanamycins,kanamycinum,kantrex,klebcil" 3 "g" 1 "g" "18935-7,18936-5,23609-1,23889-9,25182-7,25213-0,25214-8,290-7,291-5,292-3,293-1,3698-8,3699-6,3700-2,42652-8,47395-9,49080-5,7022-7,7023-5,7024-3,88002-1,88705-9,89482-4" "KAN" 6032 "Kanamycin" "Aminoglycosides" "A07AA08,J01GB04,QA07AA08,QJ01GB04,QS01AA24,S01AA24" "Aminoglycoside antibacterials" "Other aminoglycosides" "hlk,k,kan,kana,kanamy,km" "kanamicina,kanamycine,kanamycins,kanamycinum,kantrex,klebcil" 3 "g" 1 "g" "18935-7,18936-5,23609-1,23889-9,25182-7,25213-0,25214-8,290-7,291-5,292-3,293-1,3698-8,3699-6,3700-2,42652-8,47395-9,49080-5,7022-7,7023-5,7024-3,88002-1,88705-9,89482-4"
"KAH" "Kanamycin-high" "Aminoglycosides" "NA" "k_h,kahl" "NA" "18936-5,7023-5,7024-3" "KAH" "Kanamycin-high" "Aminoglycosides" "NA" "k_h,kahl" "NA" "18936-5,7023-5,7024-3"
"KAC" "Kanamycin/cephalexin" "Aminoglycosides" "NA" "NA" "NA" "NA" "KAC" "Kanamycin/cephalexin" "Aminoglycosides" "NA" "NA" "NA" "NA"
"KET" 456201 "Ketoconazole" "Antifungals/antimycotics" "D01AC08,G01AF11,H02CA03,J02AB02,QD01AC08,QG01AF11,QH02CA03,QJ02AB02" "Antimycotics for systemic use" "Imidazole derivatives" "keto,ketoco,ktc" "brizoral,ethanone,extina,fungarest,fungoral,ketaconazole,ketocanazole,ketoconazol,ketoconazolum,ketodan,ketoderm,ketoisdin,ketozole,kuric,levoketoconazole,nizoral,normocort,panfungol,piperazine,recorlev,sebazole,teryzolin,terzolin,tocris,xolegel" 0.6 "g" "10990-0,12393-5,18937-3,25259-3,294-9,295-6,296-4,297-2,60091-6,60092-4,7025-0" "KAS" 65174 "Kasugamycin" "Aminoglycosides" "NA" "NA" "kasumin,kasuminl" "NA"
"KIT" "Kitasamycin" "Macrolides/lincosamides" "QJ01FA93" "leucomycin" "NA" "NA" "KET" 456201 "Ketoconazole" "Antifungals" "D01AC08,G01AF11,H02CA03,J02AB02,QD01AC08,QG01AF11,QH02CA03,QJ02AB02" "Antimycotics for systemic use" "Imidazole derivatives" "keto,ketoco,ktc" "brizoral,ethanone,extina,fungarest,fungoral,ketaconazole,ketocanazole,ketoconazol,ketoconazolum,ketodan,ketoderm,ketoisdin,ketozole,kuric,levoketoconazole,nizoral,normocort,panfungol,piperazine,recorlev,sebazole,teryzolin,terzolin,tocris,xolegel" 0.6 "g" "10990-0,12393-5,18937-3,25259-3,294-9,295-6,296-4,297-2,60091-6,60092-4,7025-0"
"LAS" 5360807 "Lasalocid" "Other antibacterials" "QP51BB02" "NA" "avatec,bovate,bovatec,lasalocide,lasalocido,lasalocidsalt,lasalocidum" "87598-9" "KIT" "Kitasamycin" "Macrolides" "QJ01FA93" "leucomycin" "NA" "NA"
"LSC" 71528768 "Lascufloxacin" "Fluoroquinolones" "J01MA25,QJ01MA25" "Quinolone antibacterials" "Fluoroquinolones" "NA" "lasvic" 75 "mg" "NA" "LAS" 5360807 "Lasalocid" "Ionophores" "QP51BB02" "NA" "avatec,bovate,bovatec,lasalocide,lasalocido,lasalocidsalt,lasalocidum" "87598-9"
"LTM" 47499 "Latamoxef" "Cephalosporins (3rd gen.)" "J01DD06,QJ01DD06" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "mox,moxa,moxalactam" "dilatamoxef,festamoxin,lamoxactam,latamoxefum,morrhuate,moxalactamsalt,moxam,shiomarin" 4 "g" "NA" "LSC" 71528768 "Lascufloxacin" "Fluoroquinolones,Quinolones" "J01MA25,QJ01MA25" "Quinolone antibacterials" "Fluoroquinolones" "NA" "lasvic" 75 "mg" "NA"
"LMU" 25185057 "Lefamulin" "Other antibacterials" "J01XX12,QJ01XX12" "NA" "lefamulinacetate,xenleta" "85425-7,99281-8" "LTM" 47499 "Latamoxef" "Cephalosporins (3rd gen.),Cephalosporins,Beta-lactams" "J01DD06,QJ01DD06" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "mox,moxa,moxalactam" "dilatamoxef,festamoxin,lamoxactam,latamoxefum,morrhuate,moxalactamsalt,moxam,shiomarin" 4 "g" "NA"
"LEN" 65646 "Lenampicillin" "Beta-lactams/penicillins" "NA" "NA" "lenampicilina,lenampicilline,lenampicillinum,takacillin,valacillin,varacillin" "NA" "LMU" 25185057 "Lefamulin" "Other" "J01XX12,QJ01XX12" "NA" "lefamulinacetate,xenleta" "85425-7,99281-8"
"LVX" 149096 "Levofloxacin" "Fluoroquinolones" "J01MA12,QJ01MA12,QS01AE05,S01AE05" "Quinolone antibacterials" "Fluoroquinolones" "le,lev,levo,levofl,lvx" "aeroquin,cravit,dextrofloxacin,dynaquin,elequine,iquix,levaquin,levofiexacin,levofloxacine,levofloxacino,levofloxacinum,loxof,ofloxcacin,oftaquix,quinsair,quixin,tavanic,unibiotic,venaxan" 0.5 "g" 0.5 "g" "101501-5,20396-8,20629-2,21367-8,21368-6,30532-6,30533-4,48173-9,53716-7,7026-8,76040-5,76041-3,76042-1" "LEN" 65646 "Lenampicillin" "Penicillins,Beta-lactams" "NA" "NA" "lenampicilina,lenampicilline,lenampicillinum,takacillin,valacillin,varacillin" "NA"
"LEO" "Levofloxacin/ornidazole" "Fluoroquinolones" "J01RA05,QJ01RA05" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "LVX" 149096 "Levofloxacin" "Fluoroquinolones,Quinolones" "J01MA12,QJ01MA12,QS01AE05,S01AE05" "Quinolone antibacterials" "Fluoroquinolones" "le,lev,levo,levofl,lvx" "aeroquin,cravit,dextrofloxacin,dynaquin,elequine,iquix,levaquin,levofiexacin,levofloxacine,levofloxacino,levofloxacinum,loxof,ofloxcacin,oftaquix,quinsair,quixin,tavanic,unibiotic,venaxan" 0.5 "g" 0.5 "g" "101501-5,20396-8,20629-2,21367-8,21368-6,30532-6,30533-4,48173-9,53716-7,7026-8,76040-5,76041-3,76042-1"
"LND" 9850038 "Levonadifloxacin" "Fluoroquinolones" "J01MA24,QJ01MA24" "NA" "NA" "NA" "LEO" "Levofloxacin/ornidazole" "Fluoroquinolones,Quinolones" "J01RA05,QJ01RA05" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"LSP" "Linco-spectin" "Other antibacterials" "NA" "lincomycin/spectinomycin" "NA" "NA" "LND" 9850038 "Levonadifloxacin" "Fluoroquinolones,Quinolones" "J01MA24,QJ01MA24" "NA" "NA" "NA"
"LIN" 3000540 "Lincomycin" "Macrolides/lincosamides" "J01FF02,QJ01FF02,QJ51FF02" "Macrolides, lincosamides and streptogramins" "Lincosamides" "linc,lincom" "albiotic,bactramycin,cillimycin,frademicina,jiemycin,lincocin,lincogap,lincolcina,lincolnensin,lincomicina,lincomix,lincomycine,lincomycinum,lincomyocin,lincorex,linocin,mycivin" 1.8 "g" 1.8 "g" "18938-1,298-0,299-8,300-4,301-2,41700-6,87597-1" "LSP" "Linco-spectin" "Other" "NA" "lincomycin/spectinomycin" "NA" "NA"
"LIN" 3000540 "Lincomycin" "Lincosamides" "J01FF02,QJ01FF02,QJ51FF02" "Macrolides, lincosamides and streptogramins" "Lincosamides" "linc,lincom" "albiotic,bactramycin,cillimycin,frademicina,jiemycin,lincocin,lincogap,lincolcina,lincolnensin,lincomicina,lincomix,lincomycine,lincomycinum,lincomyocin,lincorex,linocin,mycivin" 1.8 "g" 1.8 "g" "18938-1,298-0,299-8,300-4,301-2,41700-6,87597-1"
"LNZ" 441401 "Linezolid" "Oxazolidinones" "J01XX08,QJ01XX08" "Other antibacterials" "Other antibacterials" "line,linezo,lnz,lz,lzd" "desfluorolinezolid,linezoid,linezolidum,zivoxid,zyvox,zyvoxa,zyvoxam,zyvoxid" 1.2 "g" 1.2 "g" "29254-0,29255-7,29258-1,33332-8,34202-2,41500-0,80609-1,88706-7,96111-0" "LNZ" 441401 "Linezolid" "Oxazolidinones" "J01XX08,QJ01XX08" "Other antibacterials" "Other antibacterials" "line,linezo,lnz,lz,lzd" "desfluorolinezolid,linezoid,linezolidum,zivoxid,zyvox,zyvoxa,zyvoxam,zyvoxid" 1.2 "g" 1.2 "g" "29254-0,29255-7,29258-1,33332-8,34202-2,41500-0,80609-1,88706-7,96111-0"
"LFE" "Linoprist-flopristin" "Other antibacterials" "NA" "linflo" "NA" "NA" "LFE" "Linoprist-flopristin" "Other" "NA" "linflo" "NA" "NA"
"LOM" 3948 "Lomefloxacin" "Fluoroquinolones" "J01MA07,QJ01MA07,QS01AE04,S01AE04" "Quinolone antibacterials" "Fluoroquinolones" "lmf,lom,lome,lomefl" "bareon,logiflox,lomebact,lomefloxacine,lomefloxacino,lomefloxacinum,maxaquin,maxaquine,mazaquin,okacin,okacyn,uniquin" 0.4 "g" "18939-9,302-0,303-8,304-6,305-3,41701-4" "LOM" 3948 "Lomefloxacin" "Fluoroquinolones,Quinolones" "J01MA07,QJ01MA07,QS01AE04,S01AE04" "Quinolone antibacterials" "Fluoroquinolones" "lmf,lom,lome,lomefl" "bareon,logiflox,lomebact,lomefloxacine,lomefloxacino,lomefloxacinum,maxaquin,maxaquine,mazaquin,okacin,okacyn,uniquin" 0.4 "g" "18939-9,302-0,303-8,304-6,305-3,41701-4"
"LOR" 5284585 "Loracarbef" "Cephalosporins (2nd gen.)" "J01DC08,QJ01DC08" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "lora,loraca" "carbac,lorabid,loracarbefum,lorafem,lorbef,loribid" 0.6 "g" "18940-7,306-1,307-9,308-7,309-5,7027-6" "LOR" 5284585 "Loracarbef" "Cephalosporins (2nd gen.),Cephalosporins,Beta-lactams" "J01DC08,QJ01DC08" "Other beta-lactam antibacterials" "Second-generation cephalosporins" "lora,loraca" "carbac,lorabid,loracarbefum,lorafem,lorbef,loribid" 0.6 "g" "18940-7,306-1,307-9,308-7,309-5,7027-6"
"LYM" 54707177 "Lymecycline" "Tetracyclines" "J01AA04,QJ01AA04" "Tetracyclines" "Tetracyclines" "NA" "armyl,chlortetracyclin,ciclisin,ciclolysal,ciclolysine,eficiclina,infaciclina,limeciclina,lisinbiotic,lymecyclinum,mucomycin,ntetracycline,tetralisal,tetralysal,vebicyclysal" 0.6 "g" 0.6 "g" "18941-5,310-3,311-1,312-9,313-7" "LYM" 54707177 "Lymecycline" "Tetracyclines" "J01AA04,QJ01AA04" "Tetracyclines" "Tetracyclines" "NA" "armyl,chlortetracyclin,ciclisin,ciclolysal,ciclolysine,eficiclina,infaciclina,limeciclina,lisinbiotic,lymecyclinum,mucomycin,ntetracycline,tetralisal,tetralysal,vebicyclysal" 0.6 "g" 0.6 "g" "18941-5,310-3,311-1,312-9,313-7"
"MNA" 1292 "Mandelic acid" "Other antibacterials" "B05CA06,J01XX06,QB05CA06,QJ01XX06" "Other antibacterials" "Other antibacterials" "NA" "amygdalate,mandelsaeure,paramandelate,phenylglycolate,phenylhydroxyacetate,uromaline" 12 "g" "NA" "MNA" 1292 "Mandelic acid" "Other" "B05CA06,J01XX06,QB05CA06,QJ01XX06" "Other antibacterials" "Other antibacterials" "NA" "amygdalate,mandelsaeure,paramandelate,phenylglycolate,phenylhydroxyacetate,uromaline" 12 "g" "NA"
"MGX" "Manogepix" "Antifungals" "NA" "NA" "NA" "NA" "MGX" "Manogepix" "Antifungals" "NA" "NA" "NA" "NA"
"MAR" 60651 "Marbofloxacin" "Fluoroquinolones" "QJ01MA93" "marbof" "marbocyl,marbofloxacine,marbofloxacino,marbofloxacinum,marboquin,zeniquin" "73596-9,73618-1,73641-3" "MAR" 60651 "Marbofloxacin" "Fluoroquinolones,Quinolones" "QJ01MA93" "marbof" "marbocyl,marbofloxacine,marbofloxacino,marbofloxacinum,marboquin,zeniquin" "73596-9,73618-1,73641-3"
"MEC" 36273 "Mecillinam" "Beta-lactams/penicillins" "J01CA11,QJ01CA11" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "amdinocillin,mecill" "amdinocillin,coactin,hexacillin,mecilinamo,mecillinamum,selexidin" 1.2 "g" "NA" "MEC" 36273 "Mecillinam" "Penicillins,Beta-lactams" "J01CA11,QJ01CA11" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "amdinocillin,mecill" "amdinocillin,coactin,hexacillin,mecilinamo,mecillinamum,selexidin" 1.2 "g" "NA"
"MEL" 71306732 "Meleumycin" "Macrolides/lincosamides" "NA" "NA" "NA" "NA" "MEL" 71306732 "Meleumycin" "Macrolides" "NA" "NA" "NA" "NA"
"MEM" 441130 "Meropenem" "Carbapenems" "J01DH02,QJ01DH02" "Other beta-lactam antibacterials" "Carbapenems" "mem,mer,mero,merope,mp,mrp" "meronem,meropen,meropenemum,merrem" 3 "g" "101222-8,101488-5,101489-3,18943-1,41406-0,6651-4,6652-2,6653-0,6654-8,7029-2,85426-5,85427-3,88892-5,90980-4" "MEM" 441130 "Meropenem" "Carbapenems,Beta-lactams" "J01DH02,QJ01DH02" "Other beta-lactam antibacterials" "Carbapenems" "mem,mer,mero,merope,mp,mrp" "meronem,meropen,meropenemum,merrem" 3 "g" "101222-8,101488-5,101489-3,18943-1,41406-0,6651-4,6652-2,6653-0,6654-8,7029-2,85426-5,85427-3,88892-5,90980-4"
"MNC" "Meropenem/nacubactam" "Carbapenems" "NA" "NA" "NA" "NA" "MNC" "Meropenem/nacubactam" "Carbapenems,Beta-lactams,Beta-lactamase inhibitors" "NA" "NA" "NA" "NA"
"MEV" "Meropenem/vaborbactam" "Carbapenems" "J01DH52,QJ01DH52" "Other beta-lactam antibacterials" "Carbapenems" "NA" "NA" 3 "g" "101222-8,101489-3,85427-3,88892-5,90980-4" "MEV" "Meropenem/vaborbactam" "Carbapenems,Beta-lactams,Beta-lactamase inhibitors" "J01DH52,QJ01DH52" "Other beta-lactam antibacterials" "Carbapenems" "NA" "NA" 3 "g" "101222-8,101489-3,85427-3,88892-5,90980-4"
"MES" 176886 "Mesulfamide" "Other antibacterials" "NA" "NA" "mesulfamida,mesulfamido,mesulfamidum" "NA" "MES" 176886 "Mesulfamide" "Other" "NA" "NA" "mesulfamida,mesulfamido,mesulfamidum" "NA"
"MTC" 54675785 "Metacycline" "Tetracyclines" "J01AA05,QJ01AA05" "Tetracyclines" "Tetracyclines" "methcy" "bialatan,metaciclina,metacyclinum,methacyclin,methacycline,methacyclinum,methylenecycline,physiomycine,rondomycin" 0.6 "g" "NA" "MTC" 54675785 "Metacycline" "Tetracyclines" "J01AA05,QJ01AA05" "Tetracyclines" "Tetracyclines" "methcy" "bialatan,metaciclina,metacyclinum,methacyclin,methacycline,methacyclinum,methylenecycline,physiomycine,rondomycin" 0.6 "g" "NA"
"MTM" 6713928 "Metampicillin" "Beta-lactams/penicillins" "J01CA14,QJ01CA14" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "blomopen,bonopen,celinmicina,elatocilline,filorex,magnipen,metambac,metampen,metampicilina,metampicillina,metampicilline,metampicillinsalt,metampicillinum,micinovo,ocelina,pangocilin,probiotic,relyothenate,ruticina,rutizina,sedomycin,serfabiotic,suvipen,viderpen,viderpin,vioplex" 1.5 "g" 1.5 "g" "NA" "MTM" 6713928 "Metampicillin" "Penicillins,Beta-lactams" "J01CA14,QJ01CA14" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "blomopen,bonopen,celinmicina,elatocilline,filorex,magnipen,metambac,metampen,metampicilina,metampicillina,metampicilline,metampicillinsalt,metampicillinum,micinovo,ocelina,pangocilin,probiotic,relyothenate,ruticina,rutizina,sedomycin,serfabiotic,suvipen,viderpen,viderpin,vioplex" 1.5 "g" 1.5 "g" "NA"
"MTH" 4101 "Methenamine" "Other antibacterials" "J01XX05,QJ01XX05" "Other antibacterials" "Other antibacterials" "NA" "aminoform,aminoformaldehyde,ammoform,ammonioformaldehyde,antihydral,carin,cystamin,cystex,cystogen,duirexol,esametilentetramina,formamine,formin,grasselerator,heterin,hexaform,hexaloids,hexamethylamine,hexamethylenamine,hexamethyleneamine,hexamethylentetramin,hexamine,hexaminum,hexasan,hexilmethylenamine,metenamina,metenamine,methamin,methamine,methenamin,methenaminum,metramine,naphthamine,pellurin,resotropin,uramin,urasal,uratrine,urisol,uritone,urodeine,urotropin,urotropine,vesaloin,xametrin" 3 "g" "NA" "MTH" 4101 "Methenamine" "Other" "J01XX05,QJ01XX05" "Other antibacterials" "Other antibacterials" "NA" "aminoform,aminoformaldehyde,ammoform,ammonioformaldehyde,antihydral,carin,cystamin,cystex,cystogen,duirexol,esametilentetramina,formamine,formin,grasselerator,heterin,hexaform,hexaloids,hexamethylamine,hexamethylenamine,hexamethyleneamine,hexamethylentetramin,hexamine,hexaminum,hexasan,hexilmethylenamine,metenamina,metenamine,methamin,methamine,methenamin,methenaminum,metramine,naphthamine,pellurin,resotropin,uramin,urasal,uratrine,urisol,uritone,urodeine,urotropin,urotropine,vesaloin,xametrin" 3 "g" "NA"
"MET" 6087 "Meticillin" "Beta-lactams/penicillins" "J01CF03,QJ01CF03,QJ51CF03" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "methic,meti" "belfacillin,celbenin,celpilline,cinopenil,dimocillin,estafcilina,flabelline,lucopenin,metacillin,methcillin,methicillin,methicillinanhydrous,methicillinhydrate,methicillinsalt,methicillinum,methycillin,meticilina,meticillina,meticilline,meticillinsalt,meticillinum,penaureus,penysol,staficyn,staphcillin,synticillin" 4 "g" "NA" "MET" 6087 "Meticillin" "Isoxazolylpenicillins,Penicillins,Beta-lactams" "J01CF03,QJ01CF03,QJ51CF03" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "methic,meti" "belfacillin,celbenin,celpilline,cinopenil,dimocillin,estafcilina,flabelline,lucopenin,metacillin,methcillin,methicillin,methicillinanhydrous,methicillinhydrate,methicillinsalt,methicillinum,methycillin,meticilina,meticillina,meticilline,meticillinsalt,meticillinum,penaureus,penysol,staficyn,staphcillin,synticillin" 4 "g" "NA"
"MTP" 68590 "Metioprim" "Other antibacterials" "NA" "NA" "methioprim,metioprima,metioprime,metioprimum" "NA" "MTP" 68590 "Metioprim" "Other" "NA" "NA" "methioprim,metioprima,metioprime,metioprimum" "NA"
"MXT" 3047729 "Metioxate" "Fluoroquinolones" "NA" "NA" "metioxato,metioxatum" "NA" "MXT" 3047729 "Metioxate" "Fluoroquinolones,Quinolones" "NA" "NA" "metioxato,metioxatum" "NA"
"MTR" 4173 "Metronidazole" "Other antibacterials" "A01AB17,D06BX01,G01AF01,J01XD01,P01AB01,QA01AB17,QD06BX01,QG01AF01,QJ01XD01,QP51CA01" "Other antibacterials" "Imidazole derivatives" "metr,metron,mnz" "acromona,anagiardil,arilin,atrivyl,bexon,clont,danizol,deflamon,donnan,efloran,elyzol,entizol,eumin,flagemona,flagesol,flagil,flagyl,flazol,flegyl,florazole,fossyol,giatricol,gineflavir,givagil,hydroxydimetridazole,hydroxymetronidazole,izoklion,klion,klont,mepagyl,meronidal,metric,metrolag,metrolyl,metromidol,metronidazolo,metronidazolum,metroplex,metrotop,mexibol,monagyl,monasin,nalox,nidagyl,noritate,novonidazol,nuvessa,orvagil,polibiotic,protostat,rathimed,rosaced,rosased,sanatrichom,satric,takimetol,trichazol,trichex,trichobrol,trichocide,trichomol,trichopal,trichopol,tricocet,tricom,trikacide,trikamon,trikhopol,trikojol,trikozol,trimeks,trivazol,vagilen,vagimid,vandazole,vertisal,wagitran,zadstat,zidoval" 2 "g" 1.5 "g" "10991-8,18946-4,326-9,327-7,328-5,329-3,7031-8" "MTR" 4173 "Metronidazole" "Other" "A01AB17,D06BX01,G01AF01,J01XD01,P01AB01,QA01AB17,QD06BX01,QG01AF01,QJ01XD01,QP51CA01" "Other antibacterials" "Imidazole derivatives" "metr,metron,mnz,mtz" "acromona,anagiardil,arilin,atrivyl,bexon,clont,danizol,deflamon,donnan,efloran,elyzol,entizol,eumin,flagemona,flagesol,flagil,flagyl,flazol,flegyl,florazole,fossyol,giatricol,gineflavir,givagil,hydroxydimetridazole,hydroxymetronidazole,izoklion,klion,klont,mepagyl,meronidal,metric,metrolag,metrolyl,metromidol,metronidazolo,metronidazolum,metroplex,metrotop,mexibol,monagyl,monasin,nalox,nidagyl,noritate,novonidazol,nuvessa,orvagil,polibiotic,protostat,rathimed,rosaced,rosased,sanatrichom,satric,takimetol,trichazol,trichex,trichobrol,trichocide,trichomol,trichopal,trichopol,tricocet,tricom,trikacide,trikamon,trikhopol,trikojol,trikozol,trimeks,trivazol,vagilen,vagimid,vandazole,vertisal,wagitran,zadstat,zidoval" 2 "g" 1.5 "g" "10991-8,18946-4,326-9,327-7,328-5,329-3,7031-8"
"MEZ" 656511 "Mezlocillin" "Beta-lactams/penicillins" "J01CA10,QJ01CA10" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "mez,mezl,mezlo,mz" "baycipen,baypen,mezlin,mezlocilina,mezlocilline,mezlocillinsalt,mezlocillinum,multocillin" 6 "g" "18947-2,330-1,331-9,332-7,333-5,3820-8,41702-2,54194-6,54195-3,54196-1" "MEZ" 656511 "Mezlocillin" "Ureidopenicillins,Penicillins,Beta-lactams" "J01CA10,QJ01CA10" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "mez,mezl,mezlo,mz" "baycipen,baypen,mezlin,mezlocilina,mezlocilline,mezlocillinsalt,mezlocillinum,multocillin" 6 "g" "18947-2,330-1,331-9,332-7,333-5,3820-8,41702-2,54194-6,54195-3,54196-1"
"MSU" "Mezlocillin/sulbactam" "Beta-lactams/penicillins" "NA" "mezsul" "NA" "54194-6,54195-3,54196-1" "MSU" "Mezlocillin/sulbactam" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "NA" "mezsul" "NA" "54194-6,54195-3,54196-1"
"MIF" 477468 "Micafungin" "Antifungals/antimycotics" "J02AX05,QJ02AX05" "Antimycotics for systemic use" "Other antimycotics for systemic use" "mica,micafu" "fungard,funguard,micafungina,micafunginsalt,mycamine" 0.1 "g" "53812-4,58418-5,65340-2,85048-7" "MIF" 477468 "Micafungin" "Antifungals" "J02AX05,QJ02AX05" "Antimycotics for systemic use" "Other antimycotics for systemic use" "mica,micafu" "fungard,funguard,micafungina,micafunginsalt,mycamine" 0.1 "g" "53812-4,58418-5,65340-2,85048-7"
"MCZ" 4189 "Miconazole" "Antifungals/antimycotics" "A01AB09,A07AC01,D01AC02,G01AF04,J02AB01,QA01AB09,QA07AC01,QD01AC02,QG01AF04,QJ02AB01,QS02AA13,S02AA13" "Antimycotics for systemic use" "Imidazole derivatives" "mico" "aflorix,albistat,andergin,brentan,conofite,dactarin,florid,micantin,miconazol,miconazolo,miconazolum,micozole,minostate,monazole,monista,monistat,oravig,vusion,zimybase,zimycan" 0.2 "g" 1 "g" "17278-3,25607-3,25722-0,54180-5,55686-0" "MCZ" 4189 "Miconazole" "Antifungals" "A01AB09,A07AC01,D01AC02,G01AF04,J02AB01,QA01AB09,QA07AC01,QD01AC02,QG01AF04,QJ02AB01,QS02AA13,S02AA13" "Antimycotics for systemic use" "Imidazole derivatives" "mico" "aflorix,albistat,andergin,brentan,conofite,dactarin,florid,micantin,miconazol,miconazolo,miconazolum,micozole,minostate,monazole,monista,monistat,oravig,vusion,zimybase,zimycan" 0.2 "g" 1 "g" "17278-3,25607-3,25722-0,54180-5,55686-0"
"MCR" 3037206 "Micronomicin" "Aminoglycosides" "QS01AA22,S01AA22" "micron" "micromicin,micromycin,micronomicina,micronomicine,micronomicinum,sagamicin,santemycin" "NA" "MCR" 3037206 "Micronomicin" "Aminoglycosides" "QS01AA22,S01AA22" "micron" "micromicin,micromycin,micronomicina,micronomicine,micronomicinum,sagamicin,santemycin" "NA"
"MID" 5282169 "Midecamycin" "Macrolides/lincosamides" "J01FA03,QJ01FA03" "Macrolides, lincosamides and streptogramins" "Macrolides" "mideka" "macropen,madecacine,medemycin,midecamicina,midecamycine,midecamycinum,midecin,momicine,myoxam,normicina,rubimycin" 1.2 "g" 1 "g" "NA" "MID" 5282169 "Midecamycin" "Macrolides" "J01FA03,QJ01FA03" "Macrolides, lincosamides and streptogramins" "Macrolides" "mideka" "macropen,madecacine,medemycin,midecamicina,midecamycine,midecamycinum,midecin,momicine,myoxam,normicina,rubimycin" 1.2 "g" 1 "g" "NA"
"MIL" 37614 "Miloxacin" "Fluoroquinolones" "NA" "amiflo" "miloxacine,miloxacino,miloxacinum" "NA" "MIL" 37614 "Miloxacin" "Fluoroquinolones,Quinolones" "NA" "amiflo" "miloxacine,miloxacino,miloxacinum" "NA"
"MNO" 54675783 "Minocycline" "Tetracyclines" "A01AB23,D10AF07,J01AA08,QA01AB23,QD10AF07,QJ01AA08" "Tetracyclines" "Tetracyclines" "mc,mh,mi,min,mino,minocy,mn,mno" "acnez,arestin,borymycin,dynacin,lederderm,minociclina,minocin,minocline,minocyclin,minocyclinum,minocyn,minomax,minomycin,mynocine,periocline,solodyn,vectrin,ximino" 1 "mg" 0.2 "g" "18948-0,25225-4,334-3,335-0,336-8,337-6,34606-4,3822-4,49757-8,55156-4,7032-6" "MNO" 54675783 "Minocycline" "Tetracyclines" "A01AB23,D10AF07,J01AA08,QA01AB23,QD10AF07,QJ01AA08" "Tetracyclines" "Tetracyclines" "mc,mh,mi,min,mino,minocy,mn,mno" "acnez,arestin,borymycin,dynacin,lederderm,minociclina,minocin,minocline,minocyclin,minocyclinum,minocyn,minomax,minomycin,mynocine,periocline,solodyn,vectrin,ximino" 1 "mg" 0.2 "g" "18948-0,25225-4,334-3,335-0,336-8,337-6,34606-4,3822-4,49757-8,55156-4,7032-6"
"MCM" 5282188 "Miocamycin" "Macrolides/lincosamides" "J01FA11,QJ01FA11" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "acecamycin,macroral,miocamen,miocamycine,miokamycin,mosil,myocamicin,ponsinomycin" 1.2 "g" "18949-8,338-4,339-2,340-0,341-8,55687-8" "MCM" 5282188 "Miocamycin" "Macrolides" "J01FA11,QJ01FA11" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "acecamycin,macroral,miocamen,miocamycine,miokamycin,mosil,myocamicin,ponsinomycin" 1.2 "g" "18949-8,338-4,339-2,340-0,341-8,55687-8"
"MON" 23667299 "Monensin sodium" "Other antibacterials" "NA" "NA" "coban,elancoban,monelan,monensin,monensina,monensine,monensinum,monovet,romensin,rumensin" "NA" "MON" 23667299 "Monensin sodium" "Ionophores" "NA" "NA" "coban,elancoban,monelan,monensin,monensina,monensine,monensinum,monovet,romensin,rumensin" "NA"
"MRN" 70374 "Morinamide" "Antimycobacterials" "J04AK04,QJ04AK04" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "morfazinamide,morfazinammide,morfgazinamide,morinamida,morinamidum,morphazinamid,morphazinamide,piazofolina,piazolin,piazolina" "NA" "MRN" 70374 "Morinamide" "Antimycobacterials" "J04AK04,QJ04AK04" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "morfazinamide,morfazinammide,morfgazinamide,morinamida,morinamidum,morphazinamid,morphazinamide,piazofolina,piazolin,piazolina" "NA"
"MFX" 152946 "Moxifloxacin" "Fluoroquinolones" "J01MA14,QJ01MA14,QS01AE07,S01AE07" "Quinolone antibacterials" "Fluoroquinolones" "mox,moxi,moxifl,mxf" "actira,actura,avalox,avelox,avolex,izilox,moxeza,moxifloxacine,moxifloxacino,octegra,vegamox,vigamox,zimoxin" 0.4 "g" 0.4 "g" "31037-5,31039-1,31041-7,31043-3,41502-6,43751-7,45223-5,76043-9,76044-7,76045-4,80540-8,88707-5,93497-6,96112-8" "MFX" 152946 "Moxifloxacin" "Fluoroquinolones,Quinolones" "J01MA14,QJ01MA14,QS01AE07,S01AE07" "Quinolone antibacterials" "Fluoroquinolones" "mox,moxi,moxifl,mxf" "actira,actura,avalox,avelox,avolex,izilox,moxeza,moxifloxacine,moxifloxacino,octegra,vegamox,vigamox,zimoxin" 0.4 "g" 0.4 "g" "31037-5,31039-1,31041-7,31043-3,41502-6,43751-7,45223-5,76043-9,76044-7,76045-4,80540-8,88707-5,93497-6,96112-8"
"MUP" 446596 "Mupirocin" "Other antibacterials" "D06AX09,QD06AX09,QR01AX06,R01AX06" "mup,mupi,mupiro" "bactoderm,bactroban,centany,mupirocina,mupirocine,mupirocinum,plasimine,turixin" "20389-3,35822-6,35823-4,60542-8,60543-6,7033-4" "MUP" 446596 "Mupirocin" "Other" "D06AX09,QD06AX09,QR01AX06,R01AX06" "mup,mupi,mupiro" "bactoderm,bactroban,centany,mupirocina,mupirocine,mupirocinum,plasimine,turixin" "20389-3,35822-6,35823-4,60542-8,60543-6,7033-4"
"NAC" 73386748 "Nacubactam" "Beta-lactams/penicillins" "NA" "NA" "NA" "NA" "NAC" 73386748 "Nacubactam" "Beta-lactamase inhibitors" "NA" "NA" "NA" "NA"
"NAD" 4410 "Nadifloxacin" "Fluoroquinolones" "D10AF05,QD10AF05" "NA" "acuatim,nadifloxacine,nadifloxacino,nadifloxacinum,nadixa,nadoxin" "NA" "NAD" 4410 "Nadifloxacin" "Fluoroquinolones,Quinolones" "D10AF05,QD10AF05" "NA" "acuatim,nadifloxacine,nadifloxacino,nadifloxacinum,nadixa,nadoxin" "NA"
"NAF" 8982 "Nafcillin" "Beta-lactams/penicillins" "J01CF06,QJ01CF06" "nafcil" "nafcil,nafcilin,nafcilina,nafcillinanhydrous,nafcilline,nafcillinhydrate,nafcillinmonohydrate,nafcillinsalt,nafcillinum,naftopen,nallpen,naphcillin,naphthicillin,unipen" 3 "g" "10993-4,18951-4,25232-0,346-7,347-5,348-3,349-1,41704-8" "NAF" 8982 "Nafcillin" "Penicillins,Beta-lactams" "J01CF06,QJ01CF06" "nafcil" "nafcil,nafcilin,nafcilina,nafcillinanhydrous,nafcilline,nafcillinhydrate,nafcillinmonohydrate,nafcillinsalt,nafcillinum,naftopen,nallpen,naphcillin,naphthicillin,unipen" 3 "g" "10993-4,18951-4,25232-0,346-7,347-5,348-3,349-1,41704-8"
"ZWK" 117587595 "Nafithromycin" "Macrolides/lincosamides" "NA" "NA" "NA" "NA" "ZWK" 117587595 "Nafithromycin" "Macrolides" "NA" "NA" "NA" "NA"
"NAL" 4421 "Nalidixic acid" "Quinolones" "J01MB02,QJ01MB02" "Quinolone antibacterials" "Other quinolones" "na,nal,nalac,nali" "amfonelinsaeure,baktogram,betaxina,chemiurin,cybis,dixiben,dixilina,dixinal,eucisten,eucistin,innoxalomn,innoxalon,jicsron,kusnarin,nalidicron,nalidixan,nalidixane,nalidixate,nalidixateanhydrous,nalidixic,nalidixin,nalidixinsaure,nalitucsan,nalix,nalurin,narigix,naxuril,negram,nevigramon,nicelate,nogram,poleon,sicmylon,specifen,specifin,unaserus,uralgin,uriben,uriclar,urisal,urodixin,uroman,uroneg,uronidix,uropan,wintomylon,wintron" 4 "g" "NA" "NAL" 4421 "Nalidixic acid" "Quinolones" "J01MB02,QJ01MB02" "Quinolone antibacterials" "Other quinolones" "na,nal,nalac,nali" "amfonelinsaeure,baktogram,betaxina,chemiurin,cybis,dixiben,dixilina,dixinal,eucisten,eucistin,innoxalomn,innoxalon,jicsron,kusnarin,nalidicron,nalidixan,nalidixane,nalidixate,nalidixateanhydrous,nalidixic,nalidixin,nalidixinsaure,nalitucsan,nalix,nalurin,narigix,naxuril,negram,nevigramon,nicelate,nogram,poleon,sicmylon,specifen,specifin,unaserus,uralgin,uriben,uriclar,urisal,urodixin,uroman,uroneg,uronidix,uropan,wintomylon,wintron" 4 "g" "NA"
"NAL-S" "Nalidixic acid screening test" "Quinolones" "NA" "nal screen" "NA" "NA" "NAL-S" "Nalidixic acid screening test" "Quinolones" "NA" "nal screen" "NA" "NA"
"NAR" 65452 "Narasin" "Other antibacterials" "QP51BB04" "narasi" "monteban,narasine,narasino,narasinum,skycis" "87570-8" "NAR" 65452 "Narasin" "Ionophores" "QP51BB04" "narasi" "monteban,narasine,narasino,narasinum,skycis" "87570-8"
"NEM" 11993740 "Nemonoxacin" "Fluoroquinolones" "J01MB08,QJ01MB08" "Quinolone antibacterials" "Other quinolones" "NA" "NA" "NA" "NEM" 11993740 "Nemonoxacin" "Fluoroquinolones,Quinolones" "J01MB08,QJ01MB08" "Quinolone antibacterials" "Other quinolones" "NA" "NA" "NA"
"NEO" 8378 "Neomycin" "Aminoglycosides" "A01AB08,A07AA01,B05CA09,D06AX04,J01GB05,QA01AB08,QA07AA01,QB05CA09,QD06AX04,QJ01GB05,QR02AB01,QS01AA03,QS02AA07,QS03AA01,R02AB01,S01AA03,S02AA07,S03AA01" "Aminoglycoside antibacterials" "Other aminoglycosides" "neom,neomyc" "NA" 5 "g" 1 "g" "10995-9,18953-0,25262-7,354-1,355-8,356-6,357-4,41705-5" "NEO" "Neomycin" "Aminoglycosides" "A01AB08,A07AA01,B05CA09,D06AX04,J01GB05,QA01AB08,QA07AA01,QB05CA09,QD06AX04,QJ01GB05,QR02AB01,QS01AA03,QS02AA07,QS03AA01,R02AB01,S01AA03,S02AA07,S03AA01" "Aminoglycoside antibacterials" "Other aminoglycosides" "neom,neomyc" "NA" 5 "g" 1 "g" "10995-9,18953-0,25262-7,354-1,355-8,356-6,357-4,41705-5"
"NET" 441306 "Netilmicin" "Aminoglycosides" "J01GB07,QJ01GB07,QS01AA23,S01AA23" "Aminoglycoside antibacterials" "Other aminoglycosides" "neti,netilm" "netillin,netilmicina,netilmicine,netilmicinum,netilyn,netira,netromicine,netromycin,nettacin,ntromicine,ntromycin,vectacin,zetamicin" 0.35 "g" 0.35 "g" "18954-8,25263-5,358-2,359-0,360-8,361-6,3848-9,3849-7,3850-5,47385-0,59565-2,59566-0,59567-8,7035-9" "NET" 441306 "Netilmicin" "Aminoglycosides" "J01GB07,QJ01GB07,QS01AA23,S01AA23" "Aminoglycoside antibacterials" "Other aminoglycosides" "neti,netilm" "netillin,netilmicina,netilmicine,netilmicinum,netilyn,netira,netromicine,netromycin,nettacin,ntromicine,ntromycin,vectacin,zetamicin" 0.35 "g" 0.35 "g" "18954-8,25263-5,358-2,359-0,360-8,361-6,3848-9,3849-7,3850-5,47385-0,59565-2,59566-0,59567-8,7035-9"
"NIC" 9507 "Nicarbazin" "Other antibacterials" "NA" "NA" "nicarb,nicarbasin,nicarbazine,nicarmix,nicoxin,nicrazin,nicrazine,nirazin" "NA" "NIC" 9507 "Nicarbazin" "Other" "NA" "NA" "nicarb,nicarbasin,nicarbazine,nicarmix,nicoxin,nicrazin,nicrazine,nirazin" "NA"
"NIF" 71946 "Nifuroquine" "Fluoroquinolones" "NA" "NA" "abimasten,nifuroquina,nifuroquinum,quinaldofur" "NA" "NIF" 71946 "Nifuroquine" "Fluoroquinolones,Quinolones" "NA" "NA" "abimasten,nifuroquina,nifuroquinum,quinaldofur" "NA"
"NFR" 9571062 "Nifurtoinol" "Other antibacterials" "J01XE02,QJ01XE02" "Other antibacterials" "Nitrofuran derivatives" "NA" "levantin,nifurmazol,nifurmazole,nifurmazolo,nifurmazolum,nifurtoinolo,nifurtoinolum,urfadin,urfadine,urfadyn" 0.16 "g" "NA" "NFR" 9571062 "Nifurtoinol" "Nitrofurans" "J01XE02,QJ01XE02" "Other antibacterials" "Nitrofuran derivatives" "NA" "levantin,nifurmazol,nifurmazole,nifurmazolo,nifurmazolum,nifurtoinolo,nifurtoinolum,urfadin,urfadine,urfadyn" 0.16 "g" "NA"
"NTZ" 41684 "Nitazoxanide" "Other antibacterials" "P01AX11" "NA" "alinia,benzamide,colufase,cryptaz,daxon,dexidex,heliton,kidonax,nitax,nitaxozanid,nitaxozanide,nitazox,nitazoxamide,nitazoxanid,nitazoxanida,nitazoxanidum,nitrazoxanide,pacovanton,paramix,phavic" 1 "g" "73595-1,73617-3,73640-5" "NTZ" 41684 "Nitazoxanide" "Other" "P01AX11" "NA" "alinia,benzamide,colufase,cryptaz,daxon,dexidex,heliton,kidonax,nitax,nitaxozanid,nitaxozanide,nitazox,nitazoxamide,nitazoxanid,nitazoxanida,nitazoxanidum,nitrazoxanide,pacovanton,paramix,phavic" 1 "g" "73595-1,73617-3,73640-5"
"NIT" 6604200 "Nitrofurantoin" "Other antibacterials" "J01XE01,QJ01XE01" "Other antibacterials" "Nitrofuran derivatives" "f,f/m,fd,ft,ni,nit,nit16,nitr,nitro" "alfuran,benkfuran,berkfuran,berkfurin,ceduran,chemiofuran,cistofuran,cyantin,cystit,dantafur,fuamed,furabid,furachel,furadantin,furadantine,furadantoin,furadoin,furadoine,furadonin,furadonine,furadoninum,furadontin,furalan,furaloid,furantoina,furatoin,furedan,furina,furobactina,furodantin,gerofuran,ituran,macpac,macrobid,macrodantin,macrodantina,macrofuran,macrofurin,nierofu,nifuraden,nifuradene,nifuradeno,nifuradenum,nifuradine,nifurantin,nifuretten,nitoin,nitrex,nitrofuradantin,nitrofurantoina,nitrofurantoine,nitrofurantoinum,novofuran,orafuran,oxafuradene,oxafurandene,oxifuradene,oxyfuradene,parfuran,phenurin,renafur,siraliden,trantoin,uerineks,urizept,urodin,urofuran,urofurin,urolisa,urolong,uvamin,welfurin,zoofurin" 0.2 "g" "18955-5,362-4,363-2,364-0,365-7,3860-4,7036-7" "NIT" 6604200 "Nitrofurantoin" "Nitrofurans" "J01XE01,QJ01XE01" "Other antibacterials" "Nitrofuran derivatives" "f,f/m,fd,ft,ni,nit,nit16,nitr,nitro" "alfuran,benkfuran,berkfuran,berkfurin,ceduran,chemiofuran,cistofuran,cyantin,cystit,dantafur,fuamed,furabid,furachel,furadantin,furadantine,furadantoin,furadoin,furadoine,furadonin,furadonine,furadoninum,furadontin,furalan,furaloid,furantoina,furatoin,furedan,furina,furobactina,furodantin,gerofuran,ituran,macpac,macrobid,macrodantin,macrodantina,macrofuran,macrofurin,nierofu,nifuraden,nifuradene,nifuradeno,nifuradenum,nifuradine,nifurantin,nifuretten,nitoin,nitrex,nitrofuradantin,nitrofurantoina,nitrofurantoine,nitrofurantoinum,novofuran,orafuran,oxafuradene,oxafurandene,oxifuradene,oxyfuradene,parfuran,phenurin,renafur,siraliden,trantoin,uerineks,urizept,urodin,urofuran,urofurin,urolisa,urolong,uvamin,welfurin,zoofurin" 0.2 "g" "18955-5,362-4,363-2,364-0,365-7,3860-4,7036-7"
"NIZ" 5447130 "Nitrofurazone" "Other antibacterials" "NA" "nitfur" "acutol,aldomycin,alfucin,amifur,babrocid,becafurazone,biofuracina,biofurea,chemofuran,chixin,cocafurin,coxistat,dermofural,dymazone,dynazone,eldezol,fedacin,flavazone,fracine,furacilin,furacilinum,furacillin,furacin,furacine,furacinetten,furacoccid,furacort,furacycline,furaderm,furagent,furalcyn,furaldon,furalone,furametral,furaplast,furaseptyl,furaskin,furatsilin,furaziline,furazin,furazina,furazyme,furesol,furosem,fuvacillin,hemofuran,hydrazinecarboxamide,ibiofural,mammex,mastofuran,monafuracin,monafuracis,monofuracin,nefco,nifucin,nifurid,nifuzon,nitrofural,nitrofuralum,nitrofuran,nitrofurane,nitrofurazan,nitrofurazonum,nitrofurol,nitrozone,otofural,otofuran,rivafurazon,rivopon,sanfuran,semioxamazide,vabrocid,vadrocid,yatrocin" "20388-5,87793-6" "NIZ" 5447130 "Nitrofurazone" "Nitrofurans" "NA" "nitfur" "acutol,aldomycin,alfucin,amifur,babrocid,becafurazone,biofuracina,biofurea,chemofuran,chixin,cocafurin,coxistat,dermofural,dymazone,dynazone,eldezol,fedacin,flavazone,fracine,furacilin,furacilinum,furacillin,furacin,furacine,furacinetten,furacoccid,furacort,furacycline,furaderm,furagent,furalcyn,furaldon,furalone,furametral,furaplast,furaseptyl,furaskin,furatsilin,furaziline,furazin,furazina,furazyme,furesol,furosem,fuvacillin,hemofuran,hydrazinecarboxamide,ibiofural,mammex,mastofuran,monafuracin,monafuracis,monofuracin,nefco,nifucin,nifurid,nifuzon,nitrofural,nitrofuralum,nitrofuran,nitrofurane,nitrofurazan,nitrofurazonum,nitrofurol,nitrozone,otofural,otofuran,rivafurazon,rivopon,sanfuran,semioxamazide,vabrocid,vadrocid,yatrocin" "20388-5,87793-6"
"NTR" 19910 "Nitroxoline" "Fluoroquinolones" "J01XX07,QJ01XX07" "Other antibacterials" "Other antibacterials" "NA" "galinok,isinok,nibiol,nicene,nitroxlina,nitroxolin,nitroxolina,nitroxolinum,noxibiol,noxin" 1 "g" "25608-1,25723-8,32382-4,54181-3,55688-6" "NTR" 19910 "Nitroxoline" "Fluoroquinolones,Quinolones" "J01XX07,QJ01XX07" "Other antibacterials" "Other antibacterials" "NA" "galinok,isinok,nibiol,nicene,nitroxlina,nitroxolin,nitroxolina,nitroxolinum,noxibiol,noxin" 1 "g" "25608-1,25723-8,32382-4,54181-3,55688-6"
"NOR" 4539 "Norfloxacin" "Fluoroquinolones" "J01MA06,QJ01MA06,QS01AE02,S01AE02" "Quinolone antibacterials" "Fluoroquinolones" "nor,norf,norflo,nx,nxn" "baccidal,barazan,chibroxin,chibroxine,chibroxol,fulgram,gonorcin,lexinor,nolicin,noracin,noraxin,norflo,norfloxacine,norfloxacino,norfloxacinum,norocin,noroxin,noroxine,norxacin,sebercim,uroxacin,utinor,zoroxin" 0.8 "g" "18956-3,366-5,367-3,368-1,369-9,3867-9,41504-2,7037-5" "NOR" 4539 "Norfloxacin" "Fluoroquinolones,Quinolones" "J01MA06,QJ01MA06,QS01AE02,S01AE02" "Quinolone antibacterials" "Fluoroquinolones" "nor,norf,norflo,nx,nxn" "baccidal,barazan,chibroxin,chibroxine,chibroxol,fulgram,gonorcin,lexinor,nolicin,noracin,noraxin,norflo,norfloxacine,norfloxacino,norfloxacinum,norocin,noroxin,noroxine,norxacin,sebercim,uroxacin,utinor,zoroxin" 0.8 "g" "18956-3,366-5,367-3,368-1,369-9,3867-9,41504-2,7037-5"
"NOR-S" "Norfloxacin screening test" "Fluoroquinolones" "NA" "nor screen" "NA" "NA" "NOR-S" "Norfloxacin screening test" "Fluoroquinolones,Quinolones" "NA" "nor screen" "NA" "NA"
"NME" "Norfloxacin/metronidazole" "Fluoroquinolones" "J01RA14,QJ01RA14" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "NME" "Norfloxacin/metronidazole" "Fluoroquinolones,Quinolones" "J01RA14,QJ01RA14" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"NTI" "Norfloxacin/tinidazole" "Fluoroquinolones" "J01RA13,QJ01RA13" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "NTI" "Norfloxacin/tinidazole" "Fluoroquinolones,Quinolones" "J01RA13,QJ01RA13" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"NVA" 10419027 "Norvancomycin" "Glycopeptides" "NA" "NA" "NA" "NA" "NVA" 10419027 "Norvancomycin" "Glycopeptides,Peptides" "NA" "NA" "NA" "NA"
"NOV" 54675769 "Novobiocin" "Other antibacterials" "QJ01XX95" "novo,novobi" "albadry,albamix,albamycin,biotexin,cardelmycin,cardelmycinsalt,cathocin,cathomycin,inabiocin,novobiocina,novobiocine,novobiocinsalt,novobiocinum,robiocina,sirbiocina,spheromycin,stilbiocina,streptonivicin,streptonivicinsalt,vulcamicina,vulcamycin,vulkamycin" "17378-1,18957-1,370-7,371-5,372-3,373-1,41706-3" "NOV" 54675769 "Novobiocin" "Aminocoumarins" "QJ01XX95" "novo,novobi" "albadry,albamix,albamycin,biotexin,cardelmycin,cardelmycinsalt,cathocin,cathomycin,inabiocin,novobiocina,novobiocine,novobiocinsalt,novobiocinum,robiocina,sirbiocina,spheromycin,stilbiocina,streptonivicin,streptonivicinsalt,vulcamicina,vulcamycin,vulkamycin" "17378-1,18957-1,370-7,371-5,372-3,373-1,41706-3"
"NYS" 6433272 "Nystatin" "Antifungals/antimycotics" "A07AA02,D01AA01,G01AA01,QA07AA02,QD01AA01,QG01AA01" "nyst,nystan" "biofanal,diastatin,herniocid,moronal,myconystatin,mycostatin,mykostatyna,nilstat,nistatin,nistatina,nyotran,nystan,nystatyna,nystavescent,nystex" 1.5 "MU" "10697-1,10698-9,18958-9,35824-2,55689-4" "NYS" 6433272 "Nystatin" "Ionophores,Antifungals" "A07AA02,D01AA01,G01AA01,QA07AA02,QD01AA01,QG01AA01" "nyst,nystan" "biofanal,diastatin,herniocid,moronal,myconystatin,mycostatin,mykostatyna,nilstat,nistatin,nistatina,nyotran,nystan,nystatyna,nystavescent,nystex" 1.5 "MU" "10697-1,10698-9,18958-9,35824-2,55689-4"
"OFX" 4583 "Ofloxacin" "Fluoroquinolones" "J01MA01,QJ01MA01,QS01AE01,QS02AA16,S01AE01,S02AA16" "Quinolone antibacterials" "Fluoroquinolones" "of,ofl,oflo,ofloxa,ofx" "exocin,exocine,flobacin,floxil,floxin,monoflocet,oflocet,ofloxacina,ofloxacine,ofloxacino,ofloxacinum,ofloxaxin,oxaldin,tarivid,visiren,zanocin" 0.4 "g" 0.4 "g" "18959-7,20384-4,23948-3,25264-3,374-9,375-6,376-4,377-2,3877-8,41408-6,41409-4,41410-2,42653-6,7038-3,72168-8" "OFX" 4583 "Ofloxacin" "Fluoroquinolones,Quinolones" "J01MA01,QJ01MA01,QS01AE01,QS02AA16,S01AE01,S02AA16" "Quinolone antibacterials" "Fluoroquinolones" "of,ofl,oflo,ofloxa,ofx" "exocin,exocine,flobacin,floxil,floxin,monoflocet,oflocet,ofloxacina,ofloxacine,ofloxacino,ofloxacinum,ofloxaxin,oxaldin,tarivid,visiren,zanocin" 0.4 "g" 0.4 "g" "18959-7,20384-4,23948-3,25264-3,374-9,375-6,376-4,377-2,3877-8,41408-6,41409-4,41410-2,42653-6,7038-3,72168-8"
"OOR" "Ofloxacin/ornidazole" "Fluoroquinolones" "J01RA09,QJ01RA09" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "OOR" "Ofloxacin/ornidazole" "Fluoroquinolones,Quinolones" "J01RA09,QJ01RA09" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"OLE" 72493 "Oleandomycin" "Macrolides/lincosamides" "J01FA05,QJ01FA05" "Macrolides, lincosamides and streptogramins" "Macrolides" "oleand" "amimycin,landomycin,matromycin,oleandomicina,oleandomycine,oleandomycinum,romicil" 1 "g" "18960-5,378-0,379-8,380-6,381-4,55690-2" "OLE" 72493 "Oleandomycin" "Macrolides" "J01FA05,QJ01FA05" "Macrolides, lincosamides and streptogramins" "Macrolides" "oleand" "amimycin,landomycin,matromycin,oleandomicina,oleandomycine,oleandomycinum,romicil" 1 "g" "18960-5,378-0,379-8,380-6,381-4,55690-2"
"OMC" 54697325 "Omadacycline" "Tetracyclines" "J01AA15,QJ01AA15" "NA" "amadacycline" 0.3 "g" 0.1 "g" "73594-4,73616-5,73639-7" "OMC" 54697325 "Omadacycline" "Tetracyclines" "J01AA15,QJ01AA15" "NA" "amadacycline" 0.3 "g" 0.1 "g" "73594-4,73616-5,73639-7"
"OPT" 87880 "Optochin" "Other antibacterials" "NA" "NA" "aflukin,auriquin,biquinate,chinidin,chinidine,chinimetten,chinin,chinine,conchinin,conchinine,conquinine,dentojel,dihydrochinidin,dihydroquinidine,dihydroquinine,hydroconchinine,hydroconquinine,hydroquinidine,kinidin,numoquin,optochine,optoquine,pitayine,qualaquin,quinaglute,quinicardine,quinidex,quinidine,quiniduran,quinindine,quinine,quinineanhydrous,quinora,quinsan,rezquin" "100055-3,73665-2" "OPT" 87880 "Optochin" "Other" "NA" "NA" "aflukin,auriquin,biquinate,chinidin,chinidine,chinimetten,chinin,chinine,conchinin,conchinine,conquinine,dentojel,dihydrochinidin,dihydroquinidine,dihydroquinine,hydroconchinine,hydroconquinine,hydroquinidine,kinidin,numoquin,optochine,optoquine,pitayine,qualaquin,quinaglute,quinicardine,quinidex,quinidine,quiniduran,quinindine,quinine,quinineanhydrous,quinora,quinsan,rezquin" "100055-3,73665-2"
"ORB" 60605 "Orbifloxacin" "Fluoroquinolones" "QJ01MA95" "orbifl" "orbax" "35825-9,35826-7,35827-5" "ORB" 60605 "Orbifloxacin" "Fluoroquinolones,Quinolones" "QJ01MA95" "orbifl" "orbax" "35825-9,35826-7,35827-5"
"ORI" 16136912 "Oritavancin" "Glycopeptides" "J01XA05,QJ01XA05" "Other antibacterials" "Glycopeptide antibacterials" "orit,oritav" "NA" "41707-1,41708-9,41709-7,41736-0" "ORI" 16136912 "Oritavancin" "Lipoglycopeptides,Glycopeptides,Peptides" "J01XA05,QJ01XA05" "Other antibacterials" "Glycopeptide antibacterials" "orit,oritav" "NA" "41707-1,41708-9,41709-7,41736-0"
"ORS" "Ormetroprim/sulfamethoxazole" "Other antibacterials" "NA" "NA" "NA" "73593-6,73615-7,73638-9" "ORS" "Ormetroprim/sulfamethoxazole" "Trimethoprims,Sulfonamides" "NA" "NA" "NA" "73593-6,73615-7,73638-9"
"ORN" 28061 "Ornidazole" "Other antibacterials" "G01AF06,J01XD03,P01AB03,QG01AF06,QJ01XD03,QP51AA03" "Other antibacterials" "Imidazole derivatives" "NA" "levornidazole,madelen,ornidal,ornidazolum,tiberal" 1.5 "g" 1 "g" "55691-0,55692-8,55693-6,55694-4" "ORN" 28061 "Ornidazole" "Other" "G01AF06,J01XD03,P01AB03,QG01AF06,QJ01XD03,QP51AA03" "Other antibacterials" "Imidazole derivatives" "NA" "levornidazole,madelen,ornidal,ornidazolum,tiberal" 1.5 "g" 1 "g" "55691-0,55692-8,55693-6,55694-4"
"OTE" 77050711 "Oteseconazole" "Antifungals/antimycotics" "J02AC06,QJ02AC06" "Antimycotics for systemic use" "Triazole derivatives" "NA" "quilseconazole,vivijoa" 21 "mg" "NA" "OST" 11136668 "Ostreogrycin" "Streptogramins" "NA" "NA" "eskamicin,linopristin,stephylomycin" "NA"
"OXA" 6196 "Oxacillin" "Beta-lactams/penicillins" "J01CF04,QJ01CF04,QJ51CF04" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "ox,oxa,oxac,oxacil,oxal,oxs" "bactocill,bristopen,cryptocillin,micropenin,ossacillina,oxabel,oxabelsalt,oxacilina,oxacillinanhydrous,oxacilline,oxacillinhydrate,oxacillinsalt,oxacillinum,oxazocillin,oxazocilline,penstapho,prostaphlin,prostaphlyn,resistopen,stapenor" 2 "g" 2 "g" "18961-3,25265-0,382-2,383-0,384-8,385-5,3882-8,7039-1" "OTE" 77050711 "Oteseconazole" "Antifungals" "J02AC06,QJ02AC06" "Antimycotics for systemic use" "Triazole derivatives" "NA" "quilseconazole,vivijoa" 21 "mg" "NA"
"OXA-S" "Oxacillin screening test" "Beta-lactams/penicillins" "NA" "oxa screen" "NA" "NA" "OXA" 6196 "Oxacillin" "Isoxazolylpenicillins,Penicillins,Beta-lactams" "J01CF04,QJ01CF04,QJ51CF04" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "ox,oxa,oxac,oxacil,oxal,oxs" "bactocill,bristopen,cryptocillin,micropenin,ossacillina,oxabel,oxabelsalt,oxacilina,oxacillinanhydrous,oxacilline,oxacillinhydrate,oxacillinsalt,oxacillinum,oxazocillin,oxazocilline,penstapho,prostaphlin,prostaphlyn,resistopen,stapenor" 2 "g" 2 "g" "18961-3,25265-0,382-2,383-0,384-8,385-5,3882-8,7039-1"
"OXA-S" "Oxacillin screening test" "Isoxazolylpenicillins,Penicillins,Beta-lactams" "NA" "oxa screen" "NA" "NA"
"OXO" 4628 "Oxolinic acid" "Quinolones" "J01MB05,QJ01MB05" "Quinolone antibacterials" "Other quinolones" "oxoaci" "aqualinic,cistopax,dioxacin,emyrenil,gramurin,inoxyl,nidantin,oksaren,orthurine,ossian,oxoboi,oxolinic,pietil,prodoxal,prodoxol,starner,tiurasin,ultibid,urinox,uritrate,urotrate,uroxol,utibid" 1 "g" "NA" "OXO" 4628 "Oxolinic acid" "Quinolones" "J01MB05,QJ01MB05" "Quinolone antibacterials" "Other quinolones" "oxoaci" "aqualinic,cistopax,dioxacin,emyrenil,gramurin,inoxyl,nidantin,oksaren,orthurine,ossian,oxoboi,oxolinic,pietil,prodoxal,prodoxol,starner,tiurasin,ultibid,urinox,uritrate,urotrate,uroxol,utibid" 1 "g" "NA"
"OXY" 54675779 "Oxytetracycline" "Tetracyclines" "A01AB25,D06AA03,G01AA07,J01AA06,QA01AB25,QD06AA03,QG01AA07,QG51AA01,QJ01AA06,QJ51AA06,QS01AA04,S01AA04" "Tetracyclines" "Tetracyclines" "oxytet" "achromycin,actisite,adamycin,artomycin,berkmycen,biostat,bristacycline,cancycline,cyclopar,dabicycline,diacycine,dumocyclin,embryostat,fanterrin,galsenomycin,geomycin,geotilin,hostacycline,hydroxytetracyclinum,lenocycline,macocyn,medamycin,mephacyclin,nitox,oksisyklin,ossitetraciclina,oxitetraciclina,oxitetracyclin,oxitetracycline,oxitetracyclinum,oxymycin,oxypam,oxyterracin,oxyterracine,oxyterracyne,oxytetracid,oxytetracyclin,oxytetracyclinum,paltet,partrex,pennox,piracaps,proteroxyna,qidtet,quadracycline,quatrex,remicyclin,retet,ricycline,riomitsin,ryomycin,solkaciclina,stevacin,stilciclina,subamycin,sumycin,supramycin,sustamycin,tarocyn,tarosin,tefilin,teline,telotrex,teravit,terrafungine,terramitsin,terramycine,tetrabakat,tetrabid,tetrablet,tetracaps,tetracompren,tetrakap,tetralution,tetramavan,tetramed,tetran,tetrosol,topicycline,triphacyclin,unicin,ursocyclin,ursocycline,vetquamycin" 1 "g" 1 "g" "17396-3,18962-1,25266-8,386-3,387-1,388-9,389-7,55699-3,87595-5" "OXY" 54675779 "Oxytetracycline" "Tetracyclines" "A01AB25,D06AA03,G01AA07,J01AA06,QA01AB25,QD06AA03,QG01AA07,QG51AA01,QJ01AA06,QJ51AA06,QS01AA04,S01AA04" "Tetracyclines" "Tetracyclines" "oxytet" "achromycin,actisite,adamycin,artomycin,berkmycen,biostat,bristacycline,cancycline,cyclopar,dabicycline,diacycine,dumocyclin,embryostat,fanterrin,galsenomycin,geomycin,geotilin,hostacycline,hydroxytetracyclinum,lenocycline,macocyn,medamycin,mephacyclin,nitox,oksisyklin,ossitetraciclina,oxitetraciclina,oxitetracyclin,oxitetracycline,oxitetracyclinum,oxymycin,oxypam,oxyterracin,oxyterracine,oxyterracyne,oxytetracid,oxytetracyclin,oxytetracyclinum,paltet,partrex,pennox,piracaps,proteroxyna,qidtet,quadracycline,quatrex,remicyclin,retet,ricycline,riomitsin,ryomycin,solkaciclina,stevacin,stilciclina,subamycin,sumycin,supramycin,sustamycin,tarocyn,tarosin,tefilin,teline,telotrex,teravit,terrafungine,terramitsin,terramycine,tetrabakat,tetrabid,tetrablet,tetracaps,tetracompren,tetrakap,tetralution,tetramavan,tetramed,tetran,tetrosol,topicycline,triphacyclin,unicin,ursocyclin,ursocycline,vetquamycin" 1 "g" 1 "g" "17396-3,18962-1,25266-8,386-3,387-1,388-9,389-7,55699-3,87595-5"
"OZN" "Ozenoxacin" "D06AX14,QD06AX14" "NA" "NA" "NA" "OZN" "Ozenoxacin" "Quinolones" "D06AX14,QD06AX14" "NA" "NA" "NA"
"PAS" 4649 "P-aminosalicylic acid" "Antimycobacterials" "NA" "pasraa" "NA" "NA" "PAS" "P-aminosalicylic acid" "Antimycobacterials" "NA" "pasraa" "NA" "NA"
"PAN" 72015 "Panipenem" "Carbapenems" "NA" "NA" "carbenin,panipenemum,penipanem" "100056-1,53823-1" "PAN" 72015 "Panipenem" "Carbapenems,Beta-lactams" "NA" "NA" "carbenin,panipenemum,penipanem" "100056-1,53823-1"
"PAR" 165580 "Paromomycin" "Other antibacterials" "A07AA06,QA07AA06,QJ01GB92" "NA" "aminosidin,amminosidin,crestomycin,estomycin,gabbromycin,gabromycin,humatin,humycin,hydroxymycin,monomycin,paramomycin,paromomicina,paromomycine,paromomycinum,paucimycin,paucimycinum" 3 "g" "51719-3,53824-9,55700-9,55701-7,55702-5" "PAR" 165580 "Paromomycin" "Other" "A07AA06,QA07AA06,QJ01GB92" "NA" "aminosidin,amminosidin,crestomycin,estomycin,gabbromycin,gabromycin,humatin,humycin,hydroxymycin,monomycin,paramomycin,paromomicina,paromomycine,paromomycinum,paucimycin,paucimycinum" 3 "g" "51719-3,53824-9,55700-9,55701-7,55702-5"
"PAZ" 65957 "Pazufloxacin" "Fluoroquinolones" "J01MA18,QJ01MA18" "Quinolone antibacterials" "Fluoroquinolones" "NA" "pazufloxacine,pazufloxacino,pazufloxacinum" 1 "g" "NA" "PAZ" 65957 "Pazufloxacin" "Fluoroquinolones,Quinolones" "J01MA18,QJ01MA18" "Quinolone antibacterials" "Fluoroquinolones" "NA" "pazufloxacine,pazufloxacino,pazufloxacinum" 1 "g" "NA"
"PEF" 51081 "Pefloxacin" "Fluoroquinolones" "J01MA03,QJ01MA03" "Quinolone antibacterials" "Fluoroquinolones" "pefl,perflo" "labocton,pefbid,pefloxacine,pefloxacinium,pefloxacino,pefloxacinum,pefocin,pefran,pelox" 0.8 "g" 0.8 "g" "18963-9,35828-3,390-5,3906-5,7040-9" "PEF" 51081 "Pefloxacin" "Fluoroquinolones,Quinolones" "J01MA03,QJ01MA03" "Quinolone antibacterials" "Fluoroquinolones" "pefl,perflo" "labocton,pefbid,pefloxacine,pefloxacinium,pefloxacino,pefloxacinum,pefocin,pefran,pelox" 0.8 "g" 0.8 "g" "18963-9,35828-3,390-5,3906-5,7040-9"
"PEF-S" "Pefloxacin screening test" "Fluoroquinolones" "NA" "pef screen" "NA" "NA" "PEF-S" "Pefloxacin screening test" "Fluoroquinolones,Quinolones" "NA" "pef screen" "NA" "NA"
"PNM" 10250769 "Penamecillin" "Beta-lactams/penicillins" "J01CE06,QJ01CE06" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "havapen,hydroxymethyl,penamecilina,penamecillina,penamecilline,penamecillinum" 1.05 "g" "NA" "PNM" 10250769 "Penamecillin" "Penicillins,Beta-lactams" "J01CE06,QJ01CE06" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "havapen,hydroxymethyl,penamecilina,penamecillina,penamecilline,penamecillinum" 1.05 "g" "NA"
"PNO" "Penicillin/novobiocin" "Beta-lactams/penicillins" "NA" "pennov" "NA" "35872-1,35873-9,35874-7" "PNO" "Penicillin/novobiocin" "Penicillins,Beta-lactams,Aminocoumarins" "NA" "pennov" "NA" "35872-1,35873-9,35874-7"
"PSU" "Penicillin/sulbactam" "Beta-lactams/penicillins" "NA" "NA" "NA" "NA" "PSU" "Penicillin/sulbactam" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "NA" "NA" "NA" "NA"
"PNM1" 54686187 "Penimepicycline" "Tetracyclines" "J01AA10,QJ01AA10" "Tetracyclines" "Tetracyclines" "NA" "criseocil,duamine,geotricyn,hydrocycline,penetracyne,penimepiciclina,penimepicyclinum" "NA" "PNM1" 54686187 "Penimepicycline" "Tetracyclines" "J01AA10,QJ01AA10" "Tetracyclines" "Tetracyclines" "NA" "criseocil,duamine,geotricyn,hydrocycline,penetracyne,penimepiciclina,penimepicyclinum" "NA"
"PIM" 65453 "Pentisomicin" "Aminoglycosides" "NA" "NA" "mutamicin,mutamycin,pentisomicina,pentisomicine,pentisomicinum" "NA" "PIM" 65453 "Pentisomicin" "Aminoglycosides" "NA" "NA" "mutamicin,mutamycin,pentisomicina,pentisomicine,pentisomicinum" "NA"
"PTZ" 55250256 "Pentizidone" "Other antibacterials" "NA" "NA" "pentizidona,pentizidonum" "NA" "PTZ" 55250256 "Pentizidone" "Other" "NA" "NA" "pentizidona,pentizidonum" "NA"
"PEX" 16132253 "Pexiganan" "Other antibacterials" "NA" "NA" "cytolex,mangainin" "NA" "PEX" 16132253 "Pexiganan" "Other" "NA" "NA" "cytolex,mangainin" "NA"
"PHE" 272833 "Pheneticillin" "Beta-lactams/penicillins" "J01CE05,QJ01CE05" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "fene" "alfacillin,alticina,antibiocin,arcacil,arcasin,astracillin,bendralan,beromycin,brocsil,broxil,chemipen,cliacil,darcil,feneticilina,feneticillin,feneticillina,feneticilline,fenocin,icipen,isocillin,ispenoral,kavepenin,maxipen,optipen,oralopen,orapen,ospeneff,pedipen,penagen,pencompren,penemve,peniplus,penova,pensig,penvikal,phenethicilin,phenethicillin,phenethicillinum,pheneticilline,pheneticillinum,primcillin,priospen,roscopenin,semopen,suspen,synapen,syncillin,synerpenin,synthecillin,synthecilline,synthepen,triospen,vamosyn,veetids,vepen" 1 "g" "NA" "PHE" 272833 "Pheneticillin" "Penicillins,Beta-lactams" "J01CE05,QJ01CE05" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "fene" "alfacillin,alticina,antibiocin,arcacil,arcasin,astracillin,bendralan,beromycin,brocsil,broxil,chemipen,cliacil,darcil,feneticilina,feneticillin,feneticillina,feneticilline,fenocin,icipen,isocillin,ispenoral,kavepenin,maxipen,optipen,oralopen,orapen,ospeneff,pedipen,penagen,pencompren,penemve,peniplus,penova,pensig,penvikal,phenethicilin,phenethicillin,phenethicillinum,pheneticilline,pheneticillinum,primcillin,priospen,roscopenin,semopen,suspen,synapen,syncillin,synerpenin,synthecillin,synthecilline,synthepen,triospen,vamosyn,veetids,vepen" 1 "g" "NA"
"PHN" 6869 "Phenoxymethylpenicillin" "Beta-lactams/penicillins" "J01CE02,QJ01CE02" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "fepe,peni v,penicillin v,phepen,pnv,pv" "apopen,calcipen,fenacilin,fenospen,meropenin,oracillin,oracilline,oratren,orocillin,ospen,phenocillin,phenomycilline,phenopenicillin,rocilin,stabicillin,vebecillin" 2 "g" "NA" "PHN" 6869 "Phenoxymethylpenicillin" "Penicillins,Beta-lactams" "J01CE02,QJ01CE02" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "fepe,peni v,penicillin v,phepen,pnv,pv" "apopen,calcipen,fenacilin,fenospen,meropenin,oracillin,oracilline,oratren,orocillin,ospen,phenocillin,phenomycilline,phenopenicillin,rocilin,stabicillin,vebecillin" 2 "g" "NA"
"PMR" 5284447 "Pimaricin" "Antifungals/antimycotics" "NA" "natamycin" "delvocid,delvolan,delvopos,mycophyt,myprozine,natacyn,natafucin,natajen,natamatrix,natamax,natamicina,natamycin,natamycine,natamycinum,pimafucin,pimaracin,pimaricine,pimarizin,synogil,tennecetin" "NA" "PMR" 5284447 "Pimaricin" "Antifungals" "NA" "natamycin" "delvocid,delvolan,delvopos,mycophyt,myprozine,natacyn,natafucin,natajen,natamatrix,natamax,natamicina,natamycin,natamycine,natamycinum,pimafucin,pimaracin,pimaricine,pimarizin,synogil,tennecetin" "NA"
"PPA" 4831 "Pipemidic acid" "Quinolones" "J01MB04,QJ01MB04" "Quinolone antibacterials" "Other quinolones" "pipaci,pipz,pizu" "deblaston,dolcol,filtrax,karunomazin,memento,nuril,palin,pipedac,pipemid,pipemidate,pipemidic,pipemidicacid,pipram,pipurin,tractur,uromidin,urosten,uroval" 0.8 "g" "NA" "PPA" 4831 "Pipemidic acid" "Quinolones" "J01MB04,QJ01MB04" "Quinolone antibacterials" "Other quinolones" "pipaci,pipz,pizu" "deblaston,dolcol,filtrax,karunomazin,memento,nuril,palin,pipedac,pipemid,pipemidate,pipemidic,pipemidicacid,pipram,pipurin,tractur,uromidin,urosten,uroval" 0.8 "g" "NA"
"PIP" 43672 "Piperacillin" "Beta-lactams/penicillins" "J01CA12,QJ01CA12" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "pi,pip,pipc,pipe,pipera,pp" "penmalin,pentcillin,peperacillin,peracin,piperacilina,piperacillina,piperacilline,piperacillinhydrate,piperacillinum,pipercillin,pipracil,tazocin" 14 "g" "101490-1,101491-9,18969-6,18970-4,25268-4,3972-7,407-7,408-5,409-3,410-1,411-9,412-7,413-5,414-3,54197-9,54198-7,54199-5,55704-1,7043-3,7044-1" "PIP" 43672 "Piperacillin" "Ureidopenicillins,Penicillins,Beta-lactams" "J01CA12,QJ01CA12" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "pi,pip,pipc,pipe,pipera,pp" "penmalin,pentcillin,peperacillin,peracin,piperacilina,piperacillina,piperacilline,piperacillinhydrate,piperacillinum,pipercillin,pipracil,tazocin" 14 "g" "101490-1,101491-9,18969-6,18970-4,25268-4,3972-7,407-7,408-5,409-3,410-1,411-9,412-7,413-5,414-3,54197-9,54198-7,54199-5,55704-1,7043-3,7044-1"
"PIS" "Piperacillin/sulbactam" "Beta-lactams/penicillins" "J01CR05,QJ01CR05" "NA" "NA" 14 "g" "54197-9,54198-7,54199-5,55704-1" "PIS" "Piperacillin/sulbactam" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "NA" "NA" "NA" 14 "g" "54197-9,54198-7,54199-5,55704-1"
"TZP" 461573 "Piperacillin/tazobactam" "Beta-lactams/penicillins" "J01CR05,QJ01CR05" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "p/t,piptaz,piptazo,pit,pita,pt,ptc,ptz,tzp" "piptazobactam,tazonam,zobactin,zosyn" 14 "g" "101491-9,18970-4,411-9,412-7,413-5,414-3,7044-1" "TZP" 461573 "Piperacillin/tazobactam" "Ureidopenicillins,Penicillins,Beta-lactams,Beta-lactamase inhibitors" "J01CR05,QJ01CR05" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "p/t,piptaz,piptazo,pit,pita,pt,ptc,ptz,tzp" "piptazobactam,tazonam,zobactin,zosyn" 14 "g" "101491-9,18970-4,411-9,412-7,413-5,414-3,7044-1"
"PRC" 71978 "Piridicillin" "Beta-lactams/penicillins" "NA" "NA" "NA" "NA" "PRC" 71978 "Piridicillin" "Penicillins,Beta-lactams" "NA" "NA" "NA" "NA"
"PRL" 157385 "Pirlimycin" "Macrolides/lincosamides" "QJ51FF90" "pirlim" "pirlimycina,pirlimycine,pirlimycinum,pirsue" "35829-1,35830-9,35831-7" "PRL" 157385 "Pirlimycin" "Lincosamides,Macrolides" "QJ51FF90" "pirlim" "pirlimycina,pirlimycine,pirlimycinum,pirsue" "35829-1,35830-9,35831-7"
"PIR" 4855 "Piromidic acid" "Quinolones" "J01MB03,QJ01MB03" "Quinolone antibacterials" "Other quinolones" "NA" "bactramyl,enterol,gastrurol,panacid,pirodal,piromidate,reelon,septural,urisept,uropir,zaomeal" 2 "g" "NA" "PIR" 4855 "Piromidic acid" "Quinolones" "J01MB03,QJ01MB03" "Quinolone antibacterials" "Other quinolones" "NA" "bactramyl,enterol,gastrurol,panacid,pirodal,piromidate,reelon,septural,urisept,uropir,zaomeal" 2 "g" "NA"
"PVM" 33478 "Pivampicillin" "Beta-lactams/penicillins" "J01CA02,QJ01CA02" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "pivaloylampicillin,pivampicilina,pivampicilline,pivampicillinum" 1.05 "g" "18971-2,415-0,416-8,417-6,418-4" "PVM" 33478 "Pivampicillin" "Penicillins,Beta-lactams" "J01CA02,QJ01CA02" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "pivaloylampicillin,pivampicilina,pivampicilline,pivampicillinum" 1.05 "g" "18971-2,415-0,416-8,417-6,418-4"
"PME" 115163 "Pivmecillinam" "Beta-lactams/penicillins" "J01CA08,QJ01CA08" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "pivmec" "coactabs,melysin,pivamdinocillin,pivmecilinamo,pivmecillinamum,selexid" 0.6 "g" "NA" "PME" 115163 "Pivmecillinam" "Penicillins,Beta-lactams" "J01CA08,QJ01CA08" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "pivmec" "coactabs,melysin,pivamdinocillin,pivmecilinamo,pivmecillinamum,selexid" 0.6 "g" "NA"
"PLZ" 42613186 "Plazomicin" "Aminoglycosides" "J01GB14,QJ01GB14" "NA" "zemdri" "73592-8,73614-0,73637-1,92024-9,94719-2" "PLZ" 42613186 "Plazomicin" "Aminoglycosides" "J01GB14,QJ01GB14" "NA" "zemdri" "73592-8,73614-0,73637-1,92024-9,94719-2"
"PLB" 49800004 "Polymyxin B" "Polymyxins" "A07AA05,J01XB02,QA07AA05,QJ01XB02,QJ51XB02,QS01AA18,QS02AA11,QS03AA03,S01AA18,S02AA11,S03AA03" "Other antibacterials" "Polymyxins" "pb,pol,polb,poly,poly b,polyb,polymixin,polymixin b" "aerosporin" 3 "MU" 0.15 "g" "17473-0,18972-0,25269-2,35832-5,419-2,420-0,421-8,422-6" "PLB" 49800004 "Polymyxin B" "Polymyxins" "A07AA05,J01XB02,QA07AA05,QJ01XB02,QJ51XB02,QS01AA18,QS02AA11,QS03AA03,S01AA18,S02AA11,S03AA03" "Other antibacterials" "Polymyxins" "pb,pol,polb,poly,poly b,polyb,polymixin,polymixin b" "aerosporin" 3 "MU" 0.15 "g" "17473-0,18972-0,25269-2,35832-5,419-2,420-0,421-8,422-6"
"POP" "Polymyxin B/polysorbate 80" "Polymyxins" "NA" "NA" "NA" "NA" "POP" "Polymyxin B/polysorbate 80" "Polymyxins" "NA" "NA" "NA" "NA"
"POS" 468595 "Posaconazole" "Antifungals/antimycotics" "J02AC04,QJ02AC04" "Antimycotics for systemic use" "Triazole derivatives" "posa,posaco" "noxafil,schering,spriafil" 0.3 "g" 0.3 "g" "53731-6,54186-2,54187-0,54188-8,54189-6,80545-7" "POS" 468595 "Posaconazole" "Antifungals" "J02AC04,QJ02AC04" "Antimycotics for systemic use" "Triazole derivatives" "posa,posaco" "noxafil,schering,spriafil" 0.3 "g" 0.3 "g" "53731-6,54186-2,54187-0,54188-8,54189-6,80545-7"
"PRA" 9802884 "Pradofloxacin" "Fluoroquinolones" "QJ01MA97" "NA" "pudofloxacin,veraflox" "76148-6,87800-9" "PRA" 9802884 "Pradofloxacin" "Fluoroquinolones,Quinolones" "QJ01MA97" "NA" "pudofloxacin,veraflox" "76148-6,87800-9"
"PRX" 71455 "Premafloxacin" "Fluoroquinolones" "NA" "premaf" "premafloxacine,premafloxacino" "73591-0,73613-2,73636-3" "PRX" 71455 "Premafloxacin" "Fluoroquinolones,Quinolones" "NA" "premaf" "premafloxacine,premafloxacino" "73591-0,73613-2,73636-3"
"PMD" 456199 "Pretomanid" "Antimycobacterials" "J04AK08,QJ04AK08" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "NA" 0.2 "g" "93850-6" "PMD" 456199 "Pretomanid" "Antimycobacterials" "J04AK08,QJ04AK08" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "NA" 0.2 "g" "93850-6"
"PRM" 6446787 "Primycin" "Macrolides/lincosamides" "NA" "NA" "chinopricin,debrycin,primicina,primycine" "NA" "PRM" 6446787 "Primycin" "Macrolides" "NA" "NA" "chinopricin,debrycin,primicina,primycine" "NA"
"PRI" 11979535 "Pristinamycin" "Macrolides/lincosamides" "J01FG01,QJ01FG01" "Macrolides, lincosamides and streptogramins" "Streptogramins" "pris,pristi" "eskalin,micamicina,mikamycin,mikamycine,mikamycinum,ostreogricina,ostreogrycin,ostreogrycine,ostreogrycinum,pristinamicina,pristinamycine,pristinamycinum,pyostacine,stafac,stafytracine,stajac,staphylomycin,stapyocine,starfac,virgimycin,virgimycine,virginiamicina,virginiamycin,virginiamycina,virginiamycinum" 2 "g" "32383-2,35833-3,35834-1,55709-0" "PRI" 11979535 "Pristinamycin" "Streptogramins" "J01FG01,QJ01FG01" "Macrolides, lincosamides and streptogramins" "Streptogramins" "pris,pristi" "eskalin,micamicina,mikamycin,mikamycine,mikamycinum,ostreogricina,ostreogrycine,ostreogrycinum,pristinamicina,pristinamycine,pristinamycinum,pyostacine,stafac,stafytracine,stajac,staphylomycin,stapyocine,starfac,virgimycin,virgimycine,virginiamicina,virginiamycin,virginiamycina,virginiamycinum" 2 "g" "32383-2,35833-3,35834-1,55709-0"
"PRB" 5903 "Procaine benzylpenicillin" "Beta-lactams/penicillins" "J01CE09,QJ01CE09,QJ51CE09" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "afsillin,aquacilina,aquacillin,aquasuspen,avloprocil,cilicaine,crysticillin,depocillin,despacilina,distaquaine,duphapen,duracillin,hostacillin,hydracillin,kabipenin,ledercillin,millicillin,mylipen,neoproc,nopcaine,parencillin,premocillin,procanodia,prostabillin,retardillin,sharcillin,vetspen,vitablend,wycillin" 0.6 "g" "NA" "PRB" 5903 "Procaine benzylpenicillin" "Penicillins,Beta-lactams" "J01CE09,QJ01CE09,QJ51CE09" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "afsillin,aquacilina,aquacillin,aquasuspen,avloprocil,cilicaine,crysticillin,depocillin,despacilina,distaquaine,duphapen,duracillin,hostacillin,hydracillin,kabipenin,ledercillin,millicillin,mylipen,neoproc,nopcaine,parencillin,premocillin,procanodia,prostabillin,retardillin,sharcillin,vetspen,vitablend,wycillin" 0.6 "g" "NA"
"PRP" 92879 "Propicillin" "Beta-lactams/penicillins" "J01CE03,QJ01CE03" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "baycillin,propicilina,propicilline,propicillinum" 0.9 "g" "NA" "PRP" 92879 "Propicillin" "Penicillins,Beta-lactams" "J01CE03,QJ01CE03" "Beta-lactam antibacterials, penicillins" "Beta-lactamase sensitive penicillins" "NA" "baycillin,propicilina,propicilline,propicillinum" 0.9 "g" "NA"
"PKA" 9872451 "Propikacin" "Aminoglycosides" "NA" "NA" "propikacina,propikacine,propikacinum" "NA" "PKA" 9872451 "Propikacin" "Aminoglycosides" "NA" "NA" "propikacina,propikacine,propikacinum" "NA"
"PTH" 666418 "Protionamide" "Antimycobacterials" "J04AD01,QJ04AD01" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "prot" "ektebin,peteha,prothionamide,prothionamidum,protion,protionamid,protionamida,protionamidum,protionizina,tebeform,trevintix,tuberex" 0.75 "g" "NA" "PTH" 666418 "Protionamide" "Antimycobacterials" "J04AD01,QJ04AD01" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "prot" "ektebin,peteha,prothionamide,prothionamidum,protion,protionamid,protionamida,protionamidum,protionizina,tebeform,trevintix,tuberex" 0.75 "g" "NA"
"PRU" 65947 "Prulifloxacin" "Fluoroquinolones" "J01MA17,QJ01MA17" "Quinolone antibacterials" "Fluoroquinolones" "NA" "pruvel,quisnon,sword" 0.6 "g" "100058-7,76145-2" "PRU" 65947 "Prulifloxacin" "Fluoroquinolones,Quinolones" "J01MA17,QJ01MA17" "Quinolone antibacterials" "Fluoroquinolones" "NA" "pruvel,quisnon,sword" 0.6 "g" "100058-7,76145-2"
"PZA" 1046 "Pyrazinamide" "Antimycobacterials" "J04AK01,QJ04AK01" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "pyra" "aldinamid,aldinamide,eprazin,farmizina,isopas,novamid,pezetamid,piraldina,pirazimida,pirazinamid,pirazinamida,pirazinamide,pirazinecarboxamide,pyrafat,pyrazide,pyrazinamdie,pyrazinamidum,pyrazineamide,pyrizinamide,rifafour,rozide,tebrazid,tisamid,unipyranamide" 1.5 "g" "11001-5,18973-8,20461-0,23632-3,25186-8,25229-6,25270-0,423-4,424-2,425-9,426-7,42935-7,55710-8,55711-6,56026-8,92242-7" "PZA" 1046 "Pyrazinamide" "Antimycobacterials" "J04AK01,QJ04AK01" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "pyra" "aldinamid,aldinamide,eprazin,farmizina,isopas,novamid,pezetamid,piraldina,pirazimida,pirazinamid,pirazinamida,pirazinamide,pirazinecarboxamide,pyrafat,pyrazide,pyrazinamdie,pyrazinamidum,pyrazineamide,pyrizinamide,rifafour,rozide,tebrazid,tisamid,unipyranamide" 1.5 "g" "11001-5,18973-8,20461-0,23632-3,25186-8,25229-6,25270-0,423-4,424-2,425-9,426-7,42935-7,55710-8,55711-6,56026-8,92242-7"
"QDA" 11979418 "Quinupristin/dalfopristin" "Macrolides/lincosamides" "QJ01FG02" "Macrolides, lincosamides and streptogramins" "Streptogramins" "q/d,qda,qida,quda,rp,syn,synerc" "synercid" "23640-6,23641-4,33334-4,35835-8,58712-1" "QDA" 11979418 "Quinupristin/dalfopristin" "Streptogramins" "QJ01FG02" "Macrolides, lincosamides and streptogramins" "Streptogramins" "q/d,qda,qida,quda,rp,syn,synerc" "synercid" "23640-6,23641-4,33334-4,35835-8,58712-1"
"RAC" 56052 "Ractopamine" "Other antibacterials" "NA" "NA" "bufenina,bufenine,buphenin,buphenine,bupheninum,luteonin,nilidrine,nylidrinum,optaflexx,paylean,prepar,ractopamina,ractopaminum,ritodrina,ritodrine,ritodrinium,tomax,utopar,yutopar" "NA" "RAC" 56052 "Ractopamine" "Other" "NA" "NA" "bufenina,bufenine,buphenin,buphenine,bupheninum,luteonin,nilidrine,nylidrinum,optaflexx,paylean,prepar,ractopamina,ractopaminum,ritodrina,ritodrine,ritodrinium,tomax,utopar,yutopar" "NA"
"RAM" 16132338 "Ramoplanin" "Glycopeptides" "NA" "ramopl" "NA" "41710-5,41711-3,41712-1,41737-8" "RAM" 16132338 "Ramoplanin" "Glycopeptides,Peptides" "NA" "ramopl" "NA" "41710-5,41711-3,41712-1,41737-8"
"RZM" 10993211 "Razupenem" "Carbapenems" "NA" "razupe" "NA" "73590-2,73612-4,73635-5" "RZM" 10993211 "Razupenem" "Carbapenems,Beta-lactams" "NA" "razupe" "NA" "73590-2,73612-4,73635-5"
"RTP" 6918462 "Retapamulin" "Other antibacterials" "D06AX13,QD06AX13" "Antibiotics for topical use" "Other antibiotics for topical use" "ret" "altabax,altargo,rebapamulin,retapamulina" "NA" "RTP" 6918462 "Retapamulin" "Pleuromutilins" "D06AX13,QD06AX13" "Antibiotics for topical use" "Other antibiotics for topical use" "ret" "altabax,altargo,rebapamulin,retapamulina" "NA"
"RZF" "Rezafungin" "Antifungals" "NA" "NA" "NA" "NA" "RZF" "Rezafungin" "Antifungals" "NA" "NA" "NA" "NA"
"RBC" 44631912 "Ribociclib" "Antifungals/antimycotics" "L01EF02,QL01EF02" "Antimycotics for systemic use" "Triazole derivatives" "ribo" "kisqali" 0.45 "g" "NA" "RBC" 44631912 "Ribociclib" "Antifungals" "L01EF02,QL01EF02" "Antimycotics for systemic use" "Triazole derivatives" "ribo" "kisqali" 0.45 "g" "NA"
"RST" 33042 "Ribostamycin" "Aminoglycosides" "J01GB10,QJ01GB10" "Aminoglycoside antibacterials" "Other aminoglycosides" "NA" "exaluren,hetangmycin,ribastamin,ribostamicina,ribostamycine,ribostamycinum,vistamycin,xylostatin" 1 "g" "NA" "RST" 33042 "Ribostamycin" "Aminoglycosides" "J01GB10,QJ01GB10" "Aminoglycoside antibacterials" "Other aminoglycosides" "NA" "exaluren,hetangmycin,ribastamin,ribostamicina,ribostamycine,ribostamycinum,vistamycin,xylostatin" 1 "g" "NA"
"RID1" 16659285 "Ridinilazole" "Other antibacterials" "NA" "NA" "ridinilazol" "NA" "RID1" 16659285 "Ridinilazole" "Other" "NA" "NA" "ridinilazol" "NA"
"RIB" 135398743 "Rifabutin" "Antimycobacterials" "J04AB04,QJ04AB04" "Drugs for treatment of tuberculosis" "Antibiotics" "ansamy,rifb" "alfacid,ansamicin,ansamycins,ansatipin,ansatipine,assatipin,mycobutin,rifabutinum" 0.15 "g" "100699-8,16100-0,16386-5,16387-3,19149-4,20386-9,23630-7,24032-5,25199-1,25200-7,25201-5,42655-1,42656-9,54183-9,96113-6" "RIB" 135398743 "Rifabutin" "Rifamycins,Antimycobacterials" "J04AB04,QJ04AB04" "Drugs for treatment of tuberculosis" "Antibiotics" "ansamy,rfb,rifb" "alfacid,ansamicin,ansamycins,ansatipin,ansatipine,assatipin,mycobutin,rifabutinum" 0.15 "g" "100699-8,16100-0,16386-5,16387-3,19149-4,20386-9,23630-7,24032-5,25199-1,25200-7,25201-5,42655-1,42656-9,54183-9,96113-6"
"RIF" 135398735 "Rifampicin" "Antimycobacterials" "J04AB02,QJ04AB02,QJ54AB02" "Drugs for treatment of tuberculosis" "Antibiotics" "rifa,rifamp" "abrifam,archidyn,arficin,arzide,benemicin,doloresum,eremfat,famcin,fenampicin,rifadin,rifadine,rifagen,rifaldazin,rifaldazine,rifaldin,rifam,rifamor,rifampicina,rifampicine,rifampicinum,rifampin,rifamsolin,rifapiam,rifaprodin,rifcin,rifinah,rifobac,rifoldin,rifoldine,riforal,rimactan,rimactane,rimactazid,rimactizid,rimazid,sinerdol,tubocin" 0.6 "g" 0.6 "g" "NA" "RIF" 135398735 "Rifampicin" "Rifamycins,Antimycobacterials" "J04AB02,QJ04AB02,QJ54AB02" "Drugs for treatment of tuberculosis" "Antibiotics" "rifa,rifamp" "abrifam,archidyn,arficin,arzide,benemicin,doloresum,eremfat,famcin,fenampicin,rifadin,rifadine,rifagen,rifaldazin,rifaldazine,rifaldin,rifam,rifamor,rifampicina,rifampicine,rifampicinum,rifampin,rifamsolin,rifapiam,rifaprodin,rifcin,rifinah,rifobac,rifoldin,rifoldine,riforal,rimactan,rimactane,rimactazid,rimactizid,rimazid,sinerdol,tubocin" 0.6 "g" 0.6 "g" "NA"
"REI" 135483893 "Rifampicin/ethambutol/isoniazid" "Antimycobacterials" "J04AM07,QJ04AM07" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "isonarif,rifamate,rifamazid" "NA" "REI" 135483893 "Rifampicin/ethambutol/isoniazid" "Rifamycins,Antimycobacterials" "J04AM07,QJ04AM07" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "isonarif,rifamate,rifamazid" "NA"
"RFI" "Rifampicin/isoniazid" "Antimycobacterials" "J04AM02,QJ04AM02" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "RFI" "Rifampicin/isoniazid" "Rifamycins,Antimycobacterials" "J04AM02,QJ04AM02" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"RPEI" "Rifampicin/pyrazinamide/ethambutol/isoniazid" "Antimycobacterials" "J04AM06,QJ04AM06" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "RPEI" "Rifampicin/pyrazinamide/ethambutol/isoniazid" "Rifamycins,Antimycobacterials" "J04AM06,QJ04AM06" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"RPI" "Rifampicin/pyrazinamide/isoniazid" "Antimycobacterials" "J04AM05,QJ04AM05" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "RPI" "Rifampicin/pyrazinamide/isoniazid" "Rifamycins,Antimycobacterials" "J04AM05,QJ04AM05" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"RFM" 6324616 "Rifamycin" "Antimycobacterials" "A07AA13,D06AX15,J04AB03,QA07AA13,QD06AX15,QJ04AB03,QJ54AB03,QS01AA16,QS02AA12,S01AA16,S02AA12" "Drugs for treatment of tuberculosis" "Antibiotics" "rifmyc" "aemcolo,nacimycin,nancimycin,otofa,rifamastene,rifamicina,rifamycine,rifamycinum,rifocin,rifocyn,tuborin" 0.8 "g" 0.6 "g" "NA" "RFM" 6324616 "Rifamycin" "Rifamycins,Antimycobacterials" "A07AA13,D06AX15,J04AB03,QA07AA13,QD06AX15,QJ04AB03,QJ54AB03,QS01AA16,QS02AA12,S01AA16,S02AA12" "Drugs for treatment of tuberculosis" "Antibiotics" "rifmyc" "aemcolo,nacimycin,nancimycin,otofa,rifamastene,rifamicina,rifamycine,rifamycinum,rifocin,rifocyn,tuborin" 0.8 "g" 0.6 "g" "NA"
"RFP" 135403821 "Rifapentine" "Antimycobacterials" "J04AB05,QJ04AB05" "Drugs for treatment of tuberculosis" "Antibiotics" "rifp,rpt" "prifitin,priftin,rifapentin,rifapentina,rifapentinum" 0.11 "g" "100059-5,76627-9" "RFP" 135403821 "Rifapentine" "Rifamycins,Antimycobacterials" "J04AB05,QJ04AB05" "Drugs for treatment of tuberculosis" "Antibiotics" "rifp,rpt" "prifitin,priftin,rifapentin,rifapentina,rifapentinum" 0.11 "g" "100059-5,76627-9"
"RFX" 6436173 "Rifaximin" "Other antibacterials" "A07AA11,D06AX11,QA07AA11,QD06AX11,QG51AA06,QJ51XX01" "Intestinal antiinfectives" "Antibiotics" "NA" "fatroximin,flonorm,lormyx,lumenax,normix,rifacol,rifamixin,rifaxidin,rifaximina,rifaximine,rifaximinum,rifaxin,ritacol,spiraxin,xifaxan,xifaxsan" 0.6 "g" "73589-4,73611-6,73634-8" "RFX" 6436173 "Rifaximin" "Other" "A07AA11,D06AX11,QA07AA11,QD06AX11,QG51AA06,QJ51XX01" "Intestinal antiinfectives" "Antibiotics" "NA" "fatroximin,flonorm,lormyx,lumenax,normix,rifacol,rifamixin,rifaxidin,rifaximina,rifaximine,rifaximinum,rifaxin,ritacol,spiraxin,xifaxan,xifaxsan" 0.6 "g" "73589-4,73611-6,73634-8"
"RIT" 65633 "Ritipenem" "Carbapenems" "NA" "NA" "ritipenemsalt" "NA" "RIT" 65633 "Ritipenem" "Carbapenems,Beta-lactams" "NA" "NA" "ritipenemsalt" "NA"
"RIA" 163692 "Ritipenem acoxil" "Carbapenems" "NA" "NA" "penemac" "NA" "RIA" 163692 "Ritipenem acoxil" "Carbapenems,Beta-lactams" "NA" "NA" "penemac" "NA"
"ROK" 5282211 "Rokitamycin" "Macrolides/lincosamides" "J01FA12,QJ01FA12" "Macrolides, lincosamides and streptogramins" "Macrolides" "rokita" "propionylleucomycin,ricamycin,rokicid,rokital,rokitamicina,rokitamycine,rokitamycinum" 0.8 "g" "NA" "ROK" 5282211 "Rokitamycin" "Macrolides" "J01FA12,QJ01FA12" "Macrolides, lincosamides and streptogramins" "Macrolides" "rokita" "propionylleucomycin,ricamycin,rokicid,rokital,rokitamicina,rokitamycine,rokitamycinum" 0.8 "g" "NA"
"RLT" 54682938 "Rolitetracycline" "Tetracyclines" "J01AA09,QJ01AA09" "Tetracyclines" "Tetracyclines" "NA" "bristacin,colbiocin,kinteto,reverin,revrin,rolitetraciclina,rolitetracyclinum,solvocillin,superciclin,synotodecin,synterin,syntetrex,syntetrin,tetraverin,transcycline,velacicline,velacycline" 0.35 "g" "18976-1,435-8,436-6,437-4,438-2" "RLT" 54682938 "Rolitetracycline" "Tetracyclines" "J01AA09,QJ01AA09" "Tetracyclines" "Tetracyclines" "NA" "bristacin,colbiocin,kinteto,reverin,revrin,rolitetraciclina,rolitetracyclinum,solvocillin,superciclin,synotodecin,synterin,syntetrex,syntetrin,tetraverin,transcycline,velacicline,velacycline" 0.35 "g" "18976-1,435-8,436-6,437-4,438-2"
"ROS" 287180 "Rosoxacin" "Quinolones" "J01MB01,QJ01MB01" "Quinolone antibacterials" "Other quinolones" "NA" "acrosoxacin,eracine,eradacil,eradacin,eradicin,rosoxacine,rosoxacino,rosoxacinum,roxadyl,winoxacin,winuron" 0.3 "g" "18977-9,439-0,440-8,441-6,442-4,55713-2" "ROS" 287180 "Rosoxacin" "Quinolones" "J01MB01,QJ01MB01" "Quinolone antibacterials" "Other quinolones" "NA" "acrosoxacin,eracine,eradacil,eradacin,eradicin,rosoxacine,rosoxacino,rosoxacinum,roxadyl,winoxacin,winuron" 0.3 "g" "18977-9,439-0,440-8,441-6,442-4,55713-2"
"RXT" "Roxithromycin" "Macrolides/lincosamides" "J01FA06,QJ01FA06" "Macrolides, lincosamides and streptogramins" "Macrolides" "roxi,roxith" "NA" 0.3 "g" "18978-7,443-2,444-0,445-7,446-5,7046-6" "RXT" "Roxithromycin" "Macrolides" "J01FA06,QJ01FA06" "Macrolides, lincosamides and streptogramins" "Macrolides" "roxi,roxith" "NA" 0.3 "g" "18978-7,443-2,444-0,445-7,446-5,7046-6"
"RFL" 58258 "Rufloxacin" "Fluoroquinolones" "J01MA10,QJ01MA10" "Quinolone antibacterials" "Fluoroquinolones" "NA" "monos,rufloxacine,rufloxacino,rufloxacinum,tebraxin,uroflox" 0.2 "g" "NA" "RFL" 58258 "Rufloxacin" "Fluoroquinolones,Quinolones" "J01MA10,QJ01MA10" "Quinolone antibacterials" "Fluoroquinolones" "NA" "monos,rufloxacine,rufloxacino,rufloxacinum,tebraxin,uroflox" 0.2 "g" "NA"
"SAL" 3085092 "Salinomycin" "Other antibacterials" "QP51BB01" "salino" "coxistac,procoxacin,salinomicina,salinomycine,salinomycinum" "35836-6,35837-4,35838-2,87593-0" "SAL" 3085092 "Salinomycin" "Ionophores" "QP51BB01" "salino" "coxistac,procoxacin,salinomicina,salinomycine,salinomycinum" "35836-6,35837-4,35838-2,87593-0"
"SAR" 56208 "Sarafloxacin" "Fluoroquinolones" "QJ01MA98" "sarafl" "difloxacino,difloxacinum,difloxcine,sarafin,saraflox,sarafloxacine,sarafloxacino,sarafloxacinum" "73588-6,73610-8,73633-0" "SAR" 56208 "Sarafloxacin" "Fluoroquinolones,Quinolones" "QJ01MA98" "sarafl" "difloxacino,difloxacinum,difloxcine,sarafin,saraflox,sarafloxacine,sarafloxacino,sarafloxacinum" "73588-6,73610-8,73633-0"
"SRC" 54681908 "Sarecycline" "Tetracyclines" "J01AA14,QJ01AA14" "Tetracyclines" "Tetracyclines" "NA" "sareciclina,seysara" 0.1 "g" "NA" "SRC" 54681908 "Sarecycline" "Tetracyclines" "J01AA14,QJ01AA14" "Tetracyclines" "Tetracyclines" "NA" "sareciclina,seysara" 0.1 "g" "NA"
"SRX" 9933415 "Sarmoxicillin" "Beta-lactams/penicillins" "NA" "NA" "sarmoxillina,sarmoxilline,sarmoxillinum" "NA" "SRX" 9933415 "Sarmoxicillin" "Penicillins,Beta-lactams" "NA" "NA" "sarmoxillina,sarmoxilline,sarmoxillinum" "NA"
"SEC" 71815 "Secnidazole" "Other antibacterials" "P01AB07" "NA" "flagentyl,secnidal,secnidazolum,secnil,sindose,solosec" 2 "g" "NA" "SEC" 71815 "Secnidazole" "Other" "P01AB07" "NA" "flagentyl,secnidal,secnidazolum,secnil,sindose,solosec" 2 "g" "NA"
"SMF" "Simvastatin/fenofibrate" "Antimycobacterials" "C10BA04,QC10BA04" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "simv" "NA" "NA"
"SIS" 36119 "Sisomicin" "Aminoglycosides" "J01GB08,QJ01GB08" "Aminoglycoside antibacterials" "Other aminoglycosides" "siso,sisomy" "rickamicin,salvamina,sisomicina,sisomicine,sisomicinum,sisomin,sisomycin,sissomicin,sizomycin" 0.24 "g" "18979-5,447-3,448-1,449-9,450-7,55714-0" "SIS" 36119 "Sisomicin" "Aminoglycosides" "J01GB08,QJ01GB08" "Aminoglycoside antibacterials" "Other aminoglycosides" "siso,sisomy" "rickamicin,salvamina,sisomicina,sisomicine,sisomicinum,sisomin,sisomycin,sissomicin,sizomycin" 0.24 "g" "18979-5,447-3,448-1,449-9,450-7,55714-0"
"SIT" 461399 "Sitafloxacin" "Fluoroquinolones" "J01MA21,QJ01MA21" "sitafl" "gracevit" 0.1 "g" "NA" "SIT" 461399 "Sitafloxacin" "Fluoroquinolones,Quinolones" "J01MA21,QJ01MA21" "sitafl" "gracevit" 0.1 "g" "NA"
"SDA" 2724368 "Sodium aminosalicylate" "Antimycobacterials" "J04AA02,QJ04AA02" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "bactylan,lepasen,monopas,tubersan" 14 "g" 14 "g" "NA" "SDA" 2724368 "Sodium aminosalicylate" "Antimycobacterials" "J04AA02,QJ04AA02" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "bactylan,lepasen,monopas,tubersan" 14 "g" 14 "g" "NA"
"SOL" 25242512 "Solithromycin" "Macrolides/lincosamides" "J01FA16,QJ01FA16" "NA" "solithera" "73587-8,73609-0,73632-2" "SOL" 25242512 "Solithromycin" "Macrolides" "J01FA16,QJ01FA16" "NA" "solithera" "73587-8,73609-0,73632-2"
"SPX" 60464 "Sparfloxacin" "Fluoroquinolones" "J01MA09,QJ01MA09" "Quinolone antibacterials" "Fluoroquinolones" "spa,spar,sparfl" "esparfloxacino,parox,spara,sparfloxacine,sparfloxacinum,zagam" 0.2 "g" "20397-6,23610-9,23628-1,35839-0,7047-4" "SPX" 60464 "Sparfloxacin" "Fluoroquinolones,Quinolones" "J01MA09,QJ01MA09" "Quinolone antibacterials" "Fluoroquinolones" "spa,spar,sparfl" "esparfloxacino,parox,spara,sparfloxacine,sparfloxacinum,zagam" 0.2 "g" "20397-6,23610-9,23628-1,35839-0,7047-4"
"SPT" 15541 "Spectinomycin" "Other antibacterials" "J01XX04,QJ01XX04" "Other antibacterials" "Other antibacterials" "sc,spe,spec,spect,spt" "actinospectacina,adspec,espectinomicina,prospec,spectam,spectinomicina,spectinomycine,spectinomycinhydrate,spectinomycinum,spectogard,stanilo,togamycin,trobicin" 3 "g" "18980-3,35840-8,451-5,452-3,453-1,454-9" "SPT" 15541 "Spectinomycin" "Other" "J01XX04,QJ01XX04" "Other antibacterials" "Other antibacterials" "sc,spe,spec,spect,spt" "actinospectacina,adspec,espectinomicina,prospec,spectam,spectinomicina,spectinomycine,spectinomycinhydrate,spectinomycinum,spectogard,stanilo,togamycin,trobicin" 3 "g" "18980-3,35840-8,451-5,452-3,453-1,454-9"
"SPI" 6419898 "Spiramycin" "Macrolides/lincosamides" "J01FA02,QJ01FA02,QJ51FA02" "Macrolides, lincosamides and streptogramins" "Macrolides" "sipram,spir,spiram" "formacidine" 3 "g" "18981-1,455-6,456-4,457-2,458-0,55715-7" "SPI" 6419898 "Spiramycin" "Macrolides" "J01FA02,QJ01FA02,QJ51FA02" "Macrolides, lincosamides and streptogramins" "Macrolides" "sipram,spir,spiram" "formacidine" 3 "g" "18981-1,455-6,456-4,457-2,458-0,55715-7"
"SPM" "Spiramycin/metronidazole" "Other antibacterials" "J01RA04,QJ01RA04" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "SPM" "Spiramycin/metronidazole" "Other" "J01RA04,QJ01RA04" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"STR" "Streptoduocin" "Aminoglycosides" "J01GA02,QJ01GA02" "Aminoglycoside antibacterials" "Streptomycins" "NA" "NA" 1 "g" "NA" "STR" "Streptoduocin" "Aminoglycosides" "J01GA02,QJ01GA02" "Aminoglycoside antibacterials" "Streptomycins" "NA" "NA" 1 "g" "NA"
"STR1" 19649 "Streptomycin" "Aminoglycosides" "A07AA04,J01GA01,QA07AA04,QJ01GA01" "Aminoglycoside antibacterials" "Streptomycins" "s,st1000,st2000,stm,str,stre,strept" "agrept,agrimycin,chemform,estreptomicina,gerox,neodiestreptopab,strepcen,streptomicina,streptomycine,streptomycinum,streptomyzin" 1 "g" "18982-9,18983-7,20462-8,23626-5,25185-0,25205-6,25206-4,35841-6,4039-4,42658-5,42659-3,459-8,460-6,461-4,462-2,46719-1,48177-0,6933-6,7048-2,7049-0,96114-4" "STR1" 19649 "Streptomycin" "Aminoglycosides" "A07AA04,J01GA01,QA07AA04,QJ01GA01" "Aminoglycoside antibacterials" "Streptomycins" "s,st1000,st2000,stm,str,stre,strept" "agrept,agrimycin,chemform,estreptomicina,gerox,neodiestreptopab,strepcen,streptomicina,streptomycine,streptomycinum,streptomyzin" 1 "g" "18982-9,18983-7,20462-8,23626-5,25185-0,25205-6,25206-4,35841-6,4039-4,42658-5,42659-3,459-8,460-6,461-4,462-2,46719-1,48177-0,6933-6,7048-2,7049-0,96114-4"
"STH" "Streptomycin-high" "Aminoglycosides" "NA" "sthi,sthl,strepto high,streptomycin high" "NA" "18983-7,35841-6,6933-6,7049-0" "STH" "Streptomycin-high" "Aminoglycosides" "NA" "sthi,sthl,strepto high,streptomycin high" "NA" "18983-7,35841-6,6933-6,7049-0"
"STI" "Streptomycin/isoniazid" "Antimycobacterials" "J04AM01,QJ04AM01" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "STI" "Streptomycin/isoniazid" "Antimycobacterials" "J04AM01,QJ04AM01" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"SUL" 130313 "Sulbactam" "Beta-lactams/penicillins" "J01CG01,QJ01CG01" "Beta-lactam antibacterials, penicillins" "Beta-lactamase inhibitors" "sulbac" "betamaze,sulbactamum" 1 "g" "41716-2,41717-0,41718-8,41739-4" "SUL" 130313 "Sulbactam" "Beta-lactamase inhibitors" "J01CG01,QJ01CG01" "Beta-lactam antibacterials, penicillins" "Beta-lactamase inhibitors" "sulbac" "betamaze,sulbactamum" 1 "g" "41716-2,41717-0,41718-8,41739-4"
"SBC" 20055036 "Sulbenicillin" "Beta-lactams/penicillins" "J01CA16,QJ01CA16" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "sulben" "kedacillin,kedacillina,sulbenicilina,sulbenicilline,sulbenicillinum,sulpelin" 15 "g" "NA" "SBC" 20055036 "Sulbenicillin" "Penicillins,Beta-lactams" "J01CA16,QJ01CA16" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "sulben" "kedacillin,kedacillina,sulbenicilina,sulbenicilline,sulbenicillinum,sulpelin" 15 "g" "NA"
"SUC" 5318 "Sulconazole" "Antifungals/antimycotics" "D01AC09,QD01AC09" "NA" "sulconazol,sulconazolum" "NA" "SUC" 5318 "Sulconazole" "Antifungals" "D01AC09,QD01AC09" "NA" "sulconazol,sulconazolum" "NA"
"SUP" 6634 "Sulfachlorpyridazine" "Other antibacterials" "QJ01EQ12" "sulchl" "cluricol,cosulid,cosumix,durasulf,nefrosul,nsulfanilamide,prinzone,solfaclorpiridazina,sonilyn,sulfacloropiridazina,sulfaclorpiridazina,vetisulid" "NA" "SUP" 6634 "Sulfachlorpyridazine" "Sulfonamides" "QJ01EQ12" "sulchl" "cluricol,cosulid,cosumix,durasulf,nefrosul,nsulfanilamide,prinzone,solfaclorpiridazina,sonilyn,sulfacloropiridazina,sulfaclorpiridazina,vetisulid" "NA"
"SDI" 5215 "Sulfadiazine" "Trimethoprims" "J01EC02,QJ01EQ10" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "suldia" "codiazine,cremodiazine,cremotres,debenal,deltazina,dermazin,dermazine,diazolone,diazovit,eskadiazine,flamazine,geben,liquadiazine,microsulfon,neazine,neotrizine,palatrize,piridisir,pirimal,pyrimal,quadetts,quadramoid,sanodiazine,silbertone,sildaflo,silvadene,silvazine,silver,silveramide,sliverex,solfadiazina,spofadrizine,sterazine,sulfacombin,sulfadiazene,sulfadiazin,sulfadiazina,sulfadiazinum,sulfapirimidin,sulfapyrimidin,sulfapyrimidine,sulfatryl,sulfazine,sulfolex,sulfonsol,sulfose,sulphadiazine,terfonyl,theradiazine,thermazene,trifonamide,trisem,truozine" 0.6 "g" "18984-5,27216-1,463-0,464-8,465-5,466-3,59742-7,6907-0,7050-8" "SDI" 5215 "Sulfadiazine" "Trimethoprims,Sulfonamides" "J01EC02,QJ01EQ10" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "suldia" "codiazine,cremodiazine,cremotres,debenal,deltazina,dermazin,dermazine,diazolone,diazovit,eskadiazine,flamazine,geben,liquadiazine,microsulfon,neazine,neotrizine,palatrize,piridisir,pirimal,pyrimal,quadetts,quadramoid,sanodiazine,silbertone,sildaflo,silvadene,silvazine,silver,silveramide,sliverex,solfadiazina,spofadrizine,sterazine,sulfacombin,sulfadiazene,sulfadiazin,sulfadiazina,sulfadiazinum,sulfapirimidin,sulfapyrimidin,sulfapyrimidine,sulfatryl,sulfazine,sulfolex,sulfonsol,sulfose,sulphadiazine,terfonyl,theradiazine,thermazene,trifonamide,trisem,truozine" 0.6 "g" "18984-5,27216-1,463-0,464-8,465-5,466-3,59742-7,6907-0,7050-8"
"SLT" 122284 "Sulfadiazine/tetroxoprim" "Trimethoprims" "J01EE06" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "berlocombin,cotetroxazine,potesept,trimerazine" "NA" "SLT" 122284 "Sulfadiazine/tetroxoprim" "Trimethoprims,Sulfonamides" "J01EE06" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "berlocombin,cotetroxazine,potesept,trimerazine" "NA"
"SLT1" 64932 "Sulfadiazine/trimethoprim" "Trimethoprims" "J01EE02,QJ01EW10,QJ51RE01" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "antastmon,astra,ditrim,ditrivet,sultrisan,triglobe,trimin,tucoprim,uniprim" "NA" "SLT1" 64932 "Sulfadiazine/trimethoprim" "Trimethoprims,Sulfonamides" "J01EE02,QJ01EW10,QJ51RE01" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "antastmon,astra,ditrim,ditrivet,sultrisan,triglobe,trimin,tucoprim,uniprim" "NA"
"SUD" 5323 "Sulfadimethoxine" "Trimethoprims" "J01ED01,QJ01EQ09,QP51BA01" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "sdimet" "abcid,agribon,albon,arnosulfan,bactotril,bactrovet,deposul,diasulfa,diasulfyl,dimetazina,dinosol,dorisul,fuxal,lasibon,madribon,madrigid,madriqid,madroxin,madroxine,maxulvet,mecozine,memcozine,metoxidon,neostrepal,neostreptal,nsulfanilamidesalt,omnibon,persulfen,radonin,redifal,rofenaid,roscosulf,scandisil,solfadimetossina,sudine,suldixine,sulfabon,sulfadimethoxin,sulfadimethoxinesalt,sulfadimethoxinum,sulfadimetossina,sulfadimetoxin,sulfadimetoxina,sulfadimetoxine,sulfadimoxine,sulfastop,sulfoplan,sulforal,sulphadimethoxine,sulxin,sumbio,symbio,theracanzan,ultrasulfon" 0.5 "g" "87799-3,87803-3" "SUD" 5323 "Sulfadimethoxine" "Trimethoprims,Sulfonamides" "J01ED01,QJ01EQ09,QP51BA01" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "sdimet" "abcid,agribon,albon,arnosulfan,bactotril,bactrovet,deposul,diasulfa,diasulfyl,dimetazina,dinosol,dorisul,fuxal,lasibon,madribon,madrigid,madriqid,madroxin,madroxine,maxulvet,mecozine,memcozine,metoxidon,neostrepal,neostreptal,nsulfanilamidesalt,omnibon,persulfen,radonin,redifal,rofenaid,roscosulf,scandisil,solfadimetossina,sudine,suldixine,sulfabon,sulfadimethoxin,sulfadimethoxinesalt,sulfadimethoxinum,sulfadimetossina,sulfadimetoxin,sulfadimetoxina,sulfadimetoxine,sulfadimoxine,sulfastop,sulfoplan,sulforal,sulphadimethoxine,sulxin,sumbio,symbio,theracanzan,ultrasulfon" 0.5 "g" "87799-3,87803-3"
"SDM" 5327 "Sulfadimidine" "Trimethoprims" "J01EB03,QJ01EQ03,QP51AG01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "suldim" "azolmetazin,bovibol,calfspan,cremomethazine,diazil,diazilsulfadine,diazyl,dimezathine,intradine,kelametazine,mermeth,neasina,neazina,panazin,pirmazin,primazin,solfadimidina,spanbolet,sulfadimerazine,sulfadimesin,sulfadimesine,sulfadimethyldiazine,sulfadimezin,sulfadimezine,sulfadimezinum,sulfadimidin,sulfadimidina,sulfadimidinum,sulfadimidinun,sulfadine,sulfametazina,sulfametazyny,sulfamethiazine,sulfamezathine,sulfamidine,sulfodimesin,sulfodimezine,sulmet,sulphadimidine,sulphamethasine,sulphamethazine,sulphamezathine,sulphamidine,sulphodimezine,superseptil,superseptyl,vertolan,vesadin" 4 "g" "NA" "SDM" 5327 "Sulfadimidine" "Trimethoprims,Sulfonamides" "J01EB03,QJ01EQ03,QP51AG01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "suldim" "azolmetazin,bovibol,calfspan,cremomethazine,diazil,diazilsulfadine,diazyl,dimezathine,intradine,kelametazine,mermeth,neasina,neazina,panazin,pirmazin,primazin,solfadimidina,spanbolet,sulfadimerazine,sulfadimesin,sulfadimesine,sulfadimethyldiazine,sulfadimezin,sulfadimezine,sulfadimezinum,sulfadimidin,sulfadimidina,sulfadimidinum,sulfadimidinun,sulfadine,sulfametazina,sulfametazyny,sulfamethiazine,sulfamezathine,sulfamidine,sulfodimesin,sulfodimezine,sulmet,sulphadimidine,sulphamethasine,sulphamethazine,sulphamezathine,sulphamidine,sulphodimezine,superseptil,superseptyl,vertolan,vesadin" 4 "g" "NA"
"SLT2" "Sulfadimidine/trimethoprim" "Trimethoprims" "J01EE05,QJ01EW03" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "NA" "NA" "SLT2" "Sulfadimidine/trimethoprim" "Trimethoprims,Sulfonamides" "J01EE05,QJ01EW03" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "NA" "NA"
"SLF" 5344 "Sulfafurazole" "Trimethoprims" "J01EB05,QJ01EQ05,QS01AB02,S01AB02" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sfsz" "accuzole,alphazole,amidoxal,astrazolo,azosulfizin,bactesulf,barazae,chemouag,cosoxazole,dorsulfan,entusil,entusul,ganda,gantrisin,gantrisine,gantrisona,gantrizin,gantrosan,isoxamin,neazolin,neoxazol,novazolo,novosaxazole,nsulphanilamide,pancid,pediazole,renosulfan,resoxol,roxosul,roxoxol,saxosozine,sodizole,solfafurazolo,sosol,soxamide,soxisol,soxitabs,soxomide,stansin,sulbio,sulfafurazol,sulfafurazolum,sulfagan,sulfagen,sulfaisoxazole,sulfalar,sulfapolar,sulfasol,sulfasoxazole,sulfasoxizole,sulfazin,sulfisin,sulfisonazole,sulfisoxasole,sulfisoxazol,sulfisoxazolum,sulfizin,sulfizol,sulfizole,sulfofurazole,sulfoxol,suloxsol,sulphafuraz,sulphafurazol,sulphafurazole,sulphafurazolum,sulphaisoxazole,sulphisoxazol,sulphisoxazole,sulphofurazole,sulsoxin,thiasin,unisulf,urisoxin,uritrisin,urogan" 4 "g" 4 "g" "NA" "SLF" 5344 "Sulfafurazole" "Trimethoprims,Sulfonamides" "J01EB05,QJ01EQ05,QS01AB02,S01AB02" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sfsz" "accuzole,alphazole,amidoxal,astrazolo,azosulfizin,bactesulf,barazae,chemouag,cosoxazole,dorsulfan,entusil,entusul,ganda,gantrisin,gantrisine,gantrisona,gantrizin,gantrosan,isoxamin,neazolin,neoxazol,novazolo,novosaxazole,nsulphanilamide,pancid,pediazole,renosulfan,resoxol,roxosul,roxoxol,saxosozine,sodizole,solfafurazolo,sosol,soxamide,soxisol,soxitabs,soxomide,stansin,sulbio,sulfafurazol,sulfafurazolum,sulfagan,sulfagen,sulfaisoxazole,sulfalar,sulfapolar,sulfasol,sulfasoxazole,sulfasoxizole,sulfazin,sulfisin,sulfisonazole,sulfisoxasole,sulfisoxazol,sulfisoxazolum,sulfizin,sulfizol,sulfizole,sulfofurazole,sulfoxol,suloxsol,sulphafuraz,sulphafurazol,sulphafurazole,sulphafurazolum,sulphaisoxazole,sulphisoxazol,sulphisoxazole,sulphofurazole,sulsoxin,thiasin,unisulf,urisoxin,uritrisin,urogan" 4 "g" 4 "g" "NA"
"SLF1" 5343 "Sulfaisodimidine" "Trimethoprims" "J01EB01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "aristamid,aristamide,aristogyn,domain,domian,elcosin,elcosine,elkosil,elkosin,elkosine,erycon,isosulf,mefenal,solfisomidina,sulfadimetine,sulfaisodimerazine,sulfaisodimidinum,sulfaisomidine,sulfasomidine,sulfisomidin,sulfisomidina,sulfisomidine,sulfisomidinum,sulphasomidine" 4 "g" 4 "g" "NA" "SLF1" 5343 "Sulfaisodimidine" "Trimethoprims,Sulfonamides" "J01EB01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "aristamid,aristamide,aristogyn,domain,domian,elcosin,elcosine,elkosil,elkosin,elkosine,erycon,isosulf,mefenal,solfisomidina,sulfadimetine,sulfaisodimerazine,sulfaisodimidinum,sulfaisomidine,sulfasomidine,sulfisomidin,sulfisomidina,sulfisomidine,sulfisomidinum,sulphasomidine" 4 "g" 4 "g" "NA"
"SLF2" 9047 "Sulfalene" "Trimethoprims" "J01ED02,QJ01EQ19" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "dalysep,farmitalia,kelfizin,kelfizina,kelfizine,policydal,solfametopirazina,sulfalen,sulfaleno,sulfalenum,sulfamethopyrazine,sulfamethoxypyrazine,sulfametopyrazine,sulfametoxypyridazin,sulphalene,sulphametopyrazine,vetkelfizina" 0.1 "g" "NA" "SLF2" 9047 "Sulfalene" "Trimethoprims,Sulfonamides" "J01ED02,QJ01EQ19" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "dalysep,farmitalia,kelfizin,kelfizina,kelfizine,policydal,solfametopirazina,sulfalen,sulfaleno,sulfalenum,sulfamethopyrazine,sulfamethoxypyrazine,sulfametopyrazine,sulfametoxypyridazin,sulphalene,sulphametopyrazine,vetkelfizina" 0.1 "g" "NA"
"SZO" 187764 "Sulfamazone" "Trimethoprims" "J01ED09" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "sulfamazona,sulfamazonum,sulfenazone" 1.5 "g" "NA" "SZO" 187764 "Sulfamazone" "Trimethoprims,Sulfonamides" "J01ED09" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "sulfamazona,sulfamazonum,sulfenazone" 1.5 "g" "NA"
"SLF3" 5325 "Sulfamerazine" "Trimethoprims" "D06BA06,J01ED07,QD06BA06,QJ01EQ17" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "sulmet" "cremomerazine,kelamerazine,mebacid,mesulfa,methylpyrimal,methylsulfazin,methylsulfazine,metilsulfadiazin,metilsulfazin,percoccide,pyralcid,romezin,septacil,septosyl,solfamerazina,solumedin,solumedine,sulfameradine,sulfamerazin,sulfamerazina,sulfamerazinum,sulfamethyldiazine,sulphamerazine,sumedine" 3 "g" "NA" "SLF3" 5325 "Sulfamerazine" "Trimethoprims,Sulfonamides" "D06BA06,J01ED07,QD06BA06,QJ01EQ17" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "sulmet" "cremomerazine,kelamerazine,mebacid,mesulfa,methylpyrimal,methylsulfazin,methylsulfazine,metilsulfadiazin,metilsulfazin,percoccide,pyralcid,romezin,septacil,septosyl,solfamerazina,solumedin,solumedine,sulfameradine,sulfamerazin,sulfamerazina,sulfamerazinum,sulfamethyldiazine,sulphamerazine,sumedine" 3 "g" "NA"
"SLT3" "Sulfamerazine/trimethoprim" "Trimethoprims" "J01EE07,QJ01EW18" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "NA" "NA" "SLT3" "Sulfamerazine/trimethoprim" "Trimethoprims,Sulfonamides" "J01EE07,QJ01EW18" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "NA" "NA"
"SUM" 5327 "Sulfamethazine" "Other antibacterials" "NA" "NA" "NA" "87592-2" "SUM" "Sulfamethazine" "Sulfonamides" "NA" "NA" "NA" "87592-2"
"SLF4" 5328 "Sulfamethizole" "Trimethoprims" "B05CA04,D06BA04,J01EB02,QB05CA04,QD06BA04,QJ01EQ02,QS01AB01,S01AB01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sfmz" "aethazolum,ayerlucil,berlophen,gliprotiazol,globucid,globucin,globuzid,glyprothiazol,glyprothiazole,glyprothiazolum,glyprothizolum,lucosil,microsul,proklar,renasul,rufol,salimol,sethadil,solfametizolo,solfetidolo,sulfaethidiole,sulfaethidol,sulfaethidole,sulfaethidolum,sulfaetidol,sulfamethizol,sulfamethizolum,sulfametizol,sulfapyelon,sulfstat,sulfurine,sulphaethidole,sulphamethizole,tardipyrine,tetracid,thidicur,thiosulfil,ultrasul,urocydal,urodiaton,urolucosil,urosulfin" 4 "g" "60175-7,60176-5,60177-3" "SLF4" 5328 "Sulfamethizole" "Trimethoprims,Sulfonamides" "B05CA04,D06BA04,J01EB02,QB05CA04,QD06BA04,QJ01EQ02,QS01AB01,S01AB01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sfmz" "aethazolum,ayerlucil,berlophen,gliprotiazol,globucid,globucin,globuzid,glyprothiazol,glyprothiazole,glyprothiazolum,glyprothizolum,lucosil,microsul,proklar,renasul,rufol,salimol,sethadil,solfametizolo,solfetidolo,sulfaethidiole,sulfaethidol,sulfaethidole,sulfaethidolum,sulfaetidol,sulfamethizol,sulfamethizolum,sulfametizol,sulfapyelon,sulfstat,sulfurine,sulphaethidole,sulphamethizole,tardipyrine,tetracid,thidicur,thiosulfil,ultrasul,urocydal,urodiaton,urolucosil,urosulfin" 4 "g" "60175-7,60176-5,60177-3"
"SMX" 5329 "Sulfamethoxazole" "Trimethoprims" "J01EC01,QJ01EQ11" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "sfmx,sulf,sulfam" "septran,septrin,simsinomin,sinomin,solfametossazolo,sulfamethalazole,sulfamethoxazolum,sulfamethoxizole,sulfamethylisoxazole,sulfametoxazol,sulfiodizole,sulfisomezole,sulphisomezole,urobak" 2 "g" "10342-4,11577-4,18985-2,25271-8,39772-9,467-1,468-9,469-7,470-5,59971-2,59972-0,60333-2,72674-5,80549-9,80974-9" "SMX" 5329 "Sulfamethoxazole" "Trimethoprims,Sulfonamides" "J01EC01,QJ01EQ11" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "sfmx,sulf,sulfam" "septran,septrin,simsinomin,sinomin,solfametossazolo,sulfamethalazole,sulfamethoxazolum,sulfamethoxizole,sulfamethylisoxazole,sulfametoxazol,sulfiodizole,sulfisomezole,sulphisomezole,urobak" 2 "g" "10342-4,11577-4,18985-2,25271-8,39772-9,467-1,468-9,469-7,470-5,59971-2,59972-0,60333-2,72674-5,80549-9,80974-9"
"SLF5" 5330 "Sulfamethoxypyridazine" "Trimethoprims" "J01ED05,QJ01EQ15" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "altezol,cysul,davosin,depovernil,durox,kineks,kinex,kynex,lederkyn,lentac,lisulfen,longin,medicel,midicel,midikel,myasul,opinsul,paramid,petrisul,piridolo,quinoseptyl,retamid,retasulfin,retasulphine,slosul,spofadazine,succinylsulfathi,sulfalex,sulfapiridazin,sulfapyridazine,sulfdurazin,sulfozona,sultirene,vinces" 0.5 "g" "NA" "SLF5" 5330 "Sulfamethoxypyridazine" "Trimethoprims,Sulfonamides" "J01ED05,QJ01EQ15" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "altezol,cysul,davosin,depovernil,durox,kineks,kinex,kynex,lederkyn,lentac,lisulfen,longin,medicel,midicel,midikel,myasul,opinsul,paramid,petrisul,piridolo,quinoseptyl,retamid,retasulfin,retasulphine,slosul,spofadazine,succinylsulfathi,sulfalex,sulfapiridazin,sulfapyridazine,sulfdurazin,sulfozona,sultirene,vinces" 0.5 "g" "NA"
"SLF6" 19596 "Sulfametomidine" "Trimethoprims" "J01ED03" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "duroprocin,methofadin,methofazine,solfametomidina,sulfametomidin,sulfametomidina,sulfametomidinum,telemid" "NA" "SLF6" 19596 "Sulfametomidine" "Trimethoprims,Sulfonamides" "J01ED03" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "duroprocin,methofadin,methofazine,solfametomidina,sulfametomidin,sulfametomidina,sulfametomidinum,telemid" "NA"
"SLF7" 5326 "Sulfametoxydiazine" "Trimethoprims" "J01ED04" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "bayrena,berlicid,dairena,durenat,juvoxin,kinecid,kirocid,kiron,longasulf,methoxypyrimal,solfametossidiazina,sulfameter,sulfametersalt,sulfamethorine,sulfamethoxine,sulfamethoxydiazin,sulfamethoxydiazine,sulfamethoxydin,sulfamethoxydine,sulfametin,sulfametinum,sulfametorine,sulfametorinum,sulfametoxidiazina,sulfametoxidine,sulfametoxydiazinum,sulla,sulphameter,sulphamethoxydiazine,supramid,ultrax" 0.5 "g" "NA" "SLF7" 5326 "Sulfametoxydiazine" "Trimethoprims,Sulfonamides" "J01ED04" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "bayrena,berlicid,dairena,durenat,juvoxin,kinecid,kirocid,kiron,longasulf,methoxypyrimal,solfametossidiazina,sulfameter,sulfametersalt,sulfamethorine,sulfamethoxine,sulfamethoxydiazin,sulfamethoxydiazine,sulfamethoxydin,sulfamethoxydine,sulfametin,sulfametinum,sulfametorine,sulfametorinum,sulfametoxidiazina,sulfametoxidine,sulfametoxydiazinum,sulla,sulphameter,sulphamethoxydiazine,supramid,ultrax" 0.5 "g" "NA"
"SLT4" "Sulfametrole/trimethoprim" "Trimethoprims" "J01EE03" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "trsm" "NA" "NA" "SLT4" "Sulfametrole/trimethoprim" "Trimethoprims,Sulfonamides" "J01EE03" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "trsm" "NA" "NA"
"SLF8" 12894 "Sulfamoxole" "Trimethoprims" "J01EC03" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "NA" "enterocura,justamil,oxasulfa,solfaguanolo,solfamossolo,sulfadimethyloxazole,sulfaguanol,sulfaguanole,sulfaguanolum,sulfamoxol,sulfamoxolum,sulfano,sulfavigor,sulfmidil,sulfono,sulfune,sulfuno,sulphamoxole,tardamid,tardamide" 1 "g" 1 "g" "NA" "SLF8" 12894 "Sulfamoxole" "Trimethoprims,Sulfonamides" "J01EC03" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "NA" "enterocura,justamil,oxasulfa,solfaguanolo,solfamossolo,sulfadimethyloxazole,sulfaguanol,sulfaguanole,sulfaguanolum,sulfamoxol,sulfamoxolum,sulfano,sulfavigor,sulfmidil,sulfono,sulfune,sulfuno,sulphamoxole,tardamid,tardamide" 1 "g" 1 "g" "NA"
"SLT5" "Sulfamoxole/trimethoprim" "Trimethoprims" "J01EE04" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "NA" "NA" "SLT5" "Sulfamoxole/trimethoprim" "Trimethoprims,Sulfonamides" "J01EE04" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "NA" "NA" "NA"
"SLF9" 5333 "Sulfanilamide" "Trimethoprims" "D06BA05,J01EB06,QD06BA05,QJ01EQ06" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "albexan,albosal,ambeside,antistrept,astreptine,astrocid,bacteramid,bactesid,collomide,colsulanyde,copticide,deseptyl,dipron,ergaseptine,erysipan,estreptocida,exoseptoplix,fourneau,gerison,gombardol,hydroxysulfonamide,infepan,lusil,lysococcine,neococcyl,orgaseptine,prontalbin,prontylin,proseptal,proseptine,proseptol,pysococcine,sanamid,septanilam,septinal,septolix,septoplex,septoplix,solfanilamide,stramid,strepamide,strepsan,streptagol,streptamid,streptamin,streptasol,streptocid,streptocide,streptocidum,streptoclase,streptocom,strepton,streptopan,streptosil,streptozol,streptozone,streptrocide,sulfamidyl,sulfamine,sulfana,sulfanalone,sulfanidyl,sulfanil,sulfanilamida,sulfanilamidomethan,sulfanilamidum,sulfanimide,sulfocidin,sulfocidine,sulfonylamide,sulphanilamide,sulphanilamidum,sulphonamide,therapol,tolder" "NA" "SLF9" 5333 "Sulfanilamide" "Trimethoprims,Sulfonamides" "D06BA05,J01EB06,QD06BA05,QJ01EQ06" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "albexan,albosal,ambeside,antistrept,astreptine,astrocid,bacteramid,bactesid,collomide,colsulanyde,copticide,deseptyl,dipron,ergaseptine,erysipan,estreptocida,exoseptoplix,fourneau,gerison,gombardol,hydroxysulfonamide,infepan,lusil,lysococcine,neococcyl,orgaseptine,prontalbin,prontylin,proseptal,proseptine,proseptol,pysococcine,sanamid,septanilam,septinal,septolix,septoplex,septoplix,solfanilamide,stramid,strepamide,strepsan,streptagol,streptamid,streptamin,streptasol,streptocid,streptocide,streptocidum,streptoclase,streptocom,streptopan,streptosil,streptozol,streptozone,streptrocide,sulfamidyl,sulfamine,sulfana,sulfanalone,sulfanidyl,sulfanil,sulfanilamida,sulfanilamidomethan,sulfanilamidum,sulfanimide,sulfocidin,sulfocidine,sulfonylamide,sulphanilamide,sulphanilamidum,sulphonamide,therapol,tolder" "NA"
"SLF10" 68933 "Sulfaperin" "Trimethoprims" "J01ED06" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "anastaf,archisulfa,archisulpha,avissul,chemiopen,demosulfan,demosulphan,durisan,isosulfamerazine,isosulphamerazine,methylsulfadiazin,methylsulfadiazine,methylsulphadiazine,novosul,orosulfan,pallidin,retardon,risulfasens,sulfaperina,sulfaperine,sulfaperinum,sulfatreis,sulfopirimidine,sulpenta,sulphaperin,sulphaperina,sulphaperinum" 0.5 "g" "NA" "SLF10" 68933 "Sulfaperin" "Trimethoprims,Sulfonamides" "J01ED06" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "anastaf,archisulfa,archisulpha,avissul,chemiopen,demosulfan,demosulphan,durisan,isosulfamerazine,isosulphamerazine,methylsulfadiazin,methylsulfadiazine,methylsulphadiazine,novosul,orosulfan,pallidin,retardon,risulfasens,sulfaperina,sulfaperine,sulfaperinum,sulfatreis,sulfopirimidine,sulpenta,sulphaperin,sulphaperina,sulphaperinum" 0.5 "g" "NA"
"SLF11" 5335 "Sulfaphenazole" "Trimethoprims" "J01ED08,QJ01EQ08" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "depocid,depotsulfonamide,eftolon,firmazolo,inamil,isarol,merian,orisul,orisulf,paidazolo,phenylsulfapyrazole,plisulfan,raziosulfa,solfafenazolo,sulfabid,sulfafenazol,sulfafenazolo,sulfaphenazol,sulfaphenazolum,sulfaphenazon,sulfaphenylpipazol,sulfaphenylpyrazol,sulfaphenylpyrazole,sulfonylpyrazol,sulphaphenazole,sulphenazole" 1 "g" "NA" "SLF11" 5335 "Sulfaphenazole" "Trimethoprims,Sulfonamides" "J01ED08,QJ01EQ08" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "NA" "depocid,depotsulfonamide,eftolon,firmazolo,inamil,isarol,merian,orisul,orisulf,paidazolo,phenylsulfapyrazole,plisulfan,raziosulfa,solfafenazolo,sulfabid,sulfafenazol,sulfafenazolo,sulfaphenazol,sulfaphenazolum,sulfaphenazon,sulfaphenylpipazol,sulfaphenylpyrazol,sulfaphenylpyrazole,sulfonylpyrazol,sulphaphenazole,sulphenazole" 1 "g" "NA"
"SLF12" 5336 "Sulfapyridine" "Trimethoprims" "J01EB04,QJ01EQ04" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "adiplon,coccoclase,dagenan,eubasin,eubasinum,haptocil,piridazol,plurazol,pyriamid,pyridazol,relbapiridina,ronin,septipulmon,solfapiridina,soludagenan,streptosilpyridine,sulfapiridina,sulfapyridin,sulfapyridinum,sulfidin,sulfidine,sulphapyridin,sulphapyridine,thioseptal,trianon" 1 "g" "14075-6,55580-5" "SLF12" 5336 "Sulfapyridine" "Trimethoprims,Sulfonamides" "J01EB04,QJ01EQ04" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "adiplon,coccoclase,dagenan,eubasin,eubasinum,haptocil,piridazol,plurazol,pyriamid,pyridazol,relbapiridina,ronin,septipulmon,solfapiridina,soludagenan,streptosilpyridine,sulfapiridina,sulfapyridin,sulfapyridinum,sulfidin,sulfidine,sulphapyridin,sulphapyridine,thioseptal,trianon" 1 "g" "14075-6,55580-5"
"SNA" 60582 "Sulfasuccinamide" "Other antibacterials" "NA" "NA" "sulfasuccinamid,sulfasuccinamida,sulfasuccinamidum" "NA" "SNA" 60582 "Sulfasuccinamide" "Sulfonamides" "NA" "NA" "sulfasuccinamid,sulfasuccinamida,sulfasuccinamidum" "NA"
"SUT" 5340 "Sulfathiazole" "Trimethoprims" "D06BA02,J01EB07,QD06BA02,QJ01EQ07" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sulthi" "azoquimiol,azoseptale,cerazol,cerazole,chemosept,cibazol,duatok,dulana,eleudron,enterobiocine,estafilol,formosulfathiazole,neostrepsan,norsulfasol,norsulfazol,norsulfazole,norsulfazolum,planomide,poliseptil,sanotiazol,septozol,solfatiazolo,soluthiazomide,streptosilthiazole,sulfamul,sulfaplex,sulfathiazol,sulfathiazolesalt,sulfathiazolum,sulfatiazol,sulfavitina,sulfocerol,sulphathiazole,sulzol,thiacoccine,thiasulfol,thiazamide,thiozamide,wintrazole" "87591-4,87796-9,87797-7" "SUT" 5340 "Sulfathiazole" "Trimethoprims,Sulfonamides" "D06BA02,J01EB07,QD06BA02,QJ01EQ07" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sulthi" "azoquimiol,azoseptale,cerazol,cerazole,chemosept,cibazol,duatok,dulana,eleudron,enterobiocine,estafilol,formosulfathiazole,neostrepsan,norsulfasol,norsulfazol,norsulfazole,norsulfazolum,planomide,poliseptil,sanotiazol,septozol,solfatiazolo,soluthiazomide,streptosilthiazole,sulfamul,sulfaplex,sulfathiazol,sulfathiazolesalt,sulfathiazolum,sulfatiazol,sulfavitina,sulfocerol,sulphathiazole,sulzol,thiacoccine,thiasulfol,thiazamide,thiozamide,wintrazole" "87591-4,87796-9,87797-7"
"SLF13" 3000579 "Sulfathiourea" "Trimethoprims" "J01EB08" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "badional,baldinol,fontamide,salvoseptyl,solfatiourea,solufontamide,sulfanilthiourea,sulfathiocarbamid,sulfathiocarbamide,sulfathiocarbamidum,sulfathioureasalt,sulfathiouree,sulfatiourea,sulphathiourea" 6 "g" "NA" "SLF13" 3000579 "Sulfathiourea" "Trimethoprims,Sulfonamides" "J01EB08" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "NA" "badional,baldinol,fontamide,salvoseptyl,solfatiourea,solufontamide,sulfanilthiourea,sulfathiocarbamid,sulfathiocarbamide,sulfathiocarbamidum,sulfathioureasalt,sulfathiouree,sulfatiourea,sulphathiourea" 6 "g" "NA"
"SOX" 5344 "Sulfisoxazole" "Other antibacterials" "NA" "sulfiz" "NA" "11578-2,18986-0,25226-2,471-3,472-1,473-9,474-7,9701-4" "SOX" "Sulfisoxazole" "Sulfonamides" "NA" "sulfiz" "NA" "11578-2,18986-0,25226-2,471-3,472-1,473-9,474-7,9701-4"
"SSS" 86225 "Sulfonamide" "Other antibacterials" "NA" "sfna,sulami" "NA" "17674-3,17675-0,18987-8,35842-4,4040-2,4041-0,4042-8,475-4,476-2,477-0,478-8,75650-2" "SSS" 86225 "Sulfonamide" "Sulfonamides" "NA" "sfna,sulami" "NA" "17674-3,17675-0,18987-8,35842-4,4040-2,4041-0,4042-8,475-4,476-2,477-0,478-8,75650-2"
"SLP" 9950244 "Sulopenem" "Other antibacterials" "NA" "sulope" "orlynvah" "55289-3,55290-1,55291-9" "SLP" 9950244 "Sulopenem" "Other" "NA" "sulope" "orlynvah" "55289-3,55290-1,55291-9"
"SLT6" 444022 "Sultamicillin" "Beta-lactams/penicillins" "J01CR04,QJ01CR04" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "sultos" "combisid,sultamicilina,sultamicilline,sultamicillinum,unacid" 1.5 "g" "NA" "SLT6" 444022 "Sultamicillin" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "J01CR04,QJ01CR04" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "sultos" "combisid,sultamicilina,sultamicilline,sultamicillinum,unacid" 1.5 "g" "NA"
"SUR" 46700778 "Surotomycin" "Other antibacterials" "NA" "NA" "surotomicina,surotomycine" "NA" "SUR" 46700778 "Surotomycin" "Other" "NA" "NA" "surotomicina,surotomycine" "NA"
"TAL" 71447 "Talampicillin" "Beta-lactams/penicillins" "J01CA15,QJ01CA15" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "aseocillin,phthalidyl,talampicilina,talampicilline,talampicillinum,talpen,yamacillin" 2 "g" "18988-6,479-6,480-4,481-2,482-0" "TAL" 71447 "Talampicillin" "Penicillins,Beta-lactams" "J01CA15,QJ01CA15" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "NA" "aseocillin,phthalidyl,talampicilina,talampicilline,talampicillinum,talpen,yamacillin" 2 "g" "18988-6,479-6,480-4,481-2,482-0"
"TLP" 163307 "Talmetoprim" "Other antibacterials" "NA" "NA" "NA" "NA" "TLP" 163307 "Talmetoprim" "Other" "NA" "NA" "NA" "NA"
"TAZ" 123630 "Tazobactam" "Beta-lactams/penicillins" "J01CG02,QJ01CG02" "Beta-lactam antibacterials, penicillins" "Beta-lactamase inhibitors" "tazo,tazoba" "exblifep,tazobactamsalt,tazobactamum,tazobactum" "41719-6,41720-4,41721-2,41740-2" "TAN" 76902493 "Taniborbactam" "Carbapenems,Beta-lactams,Beta-lactamase inhibitors" "NA" "vnrx-5133" "NA" "NA"
"TBP" 9800194 "Tebipenem" "Carbapenems" "NA" "NA" "NA" "NA" "TAZ" 123630 "Tazobactam" "Beta-lactamase inhibitors" "J01CG02,QJ01CG02" "Beta-lactam antibacterials, penicillins" "Beta-lactamase inhibitors" "tazo,tazoba" "exblifep,tazobactamsalt,tazobactamum,tazobactum" "41719-6,41720-4,41721-2,41740-2"
"TBP" 9800194 "Tebipenem" "Carbapenems,Beta-lactams" "NA" "NA" "NA" "NA"
"TZD" 11234049 "Tedizolid" "Oxazolidinones" "J01XX11,QJ01XX11" "Other antibacterials" "Other antibacterials" "tedi" "torezolid" 0.2 "g" 0.2 "g" "73586-0,73608-2,73631-4" "TZD" 11234049 "Tedizolid" "Oxazolidinones" "J01XX11,QJ01XX11" "Other antibacterials" "Other antibacterials" "tedi" "torezolid" 0.2 "g" 0.2 "g" "73586-0,73608-2,73631-4"
"TEC" 16131923 "Teicoplanin" "Glycopeptides" "J01XA02,QJ01XA02" "Other antibacterials" "Glycopeptide antibacterials" "tec,tei,teic,teicop,tp,tpl,tpn" "NA" 0.4 "g" "18989-4,25534-9,25535-6,34378-0,34379-8,4043-6,483-8,484-6,485-3,486-1,7051-6,80968-1" "TEC" 16131923 "Teicoplanin" "Glycopeptides,Peptides" "J01XA02,QJ01XA02" "Other antibacterials" "Glycopeptide antibacterials" "tec,tei,teic,teicop,tp,tpl,tpn" "NA" 0.4 "g" "18989-4,25534-9,25535-6,34378-0,34379-8,4043-6,483-8,484-6,485-3,486-1,7051-6,80968-1"
"TCM" "Teicoplanin-macromethod" "Glycopeptides" "NA" "NA" "NA" "NA" "TCM" "Teicoplanin-macromethod" "Glycopeptides,Peptides" "NA" "NA" "NA" "NA"
"TLV" 3081362 "Telavancin" "Glycopeptides" "J01XA03,QJ01XA03" "Other antibacterials" "Glycopeptide antibacterials" "tela,telava" "arbelic,nvancomycin,televancin" "72894-9,73630-6,85051-1,88886-7" "TLV" 3081362 "Telavancin" "Lipoglycopeptides,Glycopeptides,Peptides" "J01XA03,QJ01XA03" "Other antibacterials" "Glycopeptide antibacterials" "tela,telava" "arbelic,nvancomycin,televancin" "72894-9,73630-6,85051-1,88886-7"
"TLT" 3002190 "Telithromycin" "Macrolides/lincosamides" "J01FA15,QJ01FA15" "Macrolides, lincosamides and streptogramins" "Macrolides" "teli,telith" "ketek,levviax" 0.8 "g" "35843-2,35844-0,35845-7,41722-0" "TLT" 3002190 "Telithromycin" "Macrolides" "J01FA15,QJ01FA15" "Macrolides, lincosamides and streptogramins" "Macrolides" "teli,telith" "ketek,levviax" 0.8 "g" "35843-2,35844-0,35845-7,41722-0"
"TMX" 60021 "Temafloxacin" "Fluoroquinolones" "J01MA05,QJ01MA05" "Quinolone antibacterials" "Fluoroquinolones" "tema,temafl" "omniflox,temafloxacina,temafloxacine,temafloxacino,temafloxacinum" 0.8 "g" "18990-2,487-9,488-7,489-5,490-3" "TMX" 60021 "Temafloxacin" "Fluoroquinolones,Quinolones" "J01MA05,QJ01MA05" "Quinolone antibacterials" "Fluoroquinolones" "tema,temafl" "omniflox,temafloxacina,temafloxacine,temafloxacino,temafloxacinum" 0.8 "g" "18990-2,487-9,488-7,489-5,490-3"
"TEM" 171758 "Temocillin" "Beta-lactams/penicillins" "J01CA17,QJ01CA17" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "temo,temoci" "negaban,temocilina,temocillina,temocilline,temocillinum" 4 "g" "18991-0,491-1,492-9,493-7,494-5,54190-4" "TEM" 171758 "Temocillin" "Penicillins,Beta-lactams" "J01CA17,QJ01CA17" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "temo,temoci" "negaban,temocilina,temocillina,temocilline,temocillinum" 4 "g" "18991-0,491-1,492-9,493-7,494-5,54190-4"
"TRB" 1549008 "Terbinafine" "Antifungals/antimycotics" "D01AE15,D01BA02,QD01AE15,QD01BA02" "Antifungals for systemic use" "Antifungals for systemic use" "terb" "afogan,bramazil,bramizil,corbinal,lamasil,lamisil,muzonal,shoprite,terbina,terbinafina,terbinafinum,terbine,terbinex,terbisil,zabel" 0.25 "g" "10720-1,10721-9,18992-8" "TRB" 1549008 "Terbinafine" "Antifungals" "D01AE15,D01BA02,QD01AE15,QD01BA02" "Antifungals for systemic use" "Antifungals for systemic use" "terb" "afogan,bramazil,bramizil,corbinal,lamasil,lamisil,muzonal,shoprite,terbina,terbinafina,terbinafinum,terbine,terbinex,terbisil,zabel" 0.25 "g" "10720-1,10721-9,18992-8"
"TRC" 441383 "Terconazole" "Antifungals/antimycotics" "G01AG02,QG01AG02" "NA" "fungistat,panlomyc,terazol,terconazol,terconazolum,tercospor,tetrazol,triaconazole,zazole" "55196-0" "TRC" 441383 "Terconazole" "Antifungals" "G01AG02,QG01AG02" "NA" "fungistat,panlomyc,terazol,terconazol,terconazolum,tercospor,tetrazol,triaconazole,zazole" "55196-0"
"TRZ" 65720 "Terizidone" "Antimycobacterials" "J04AK03,QJ04AK03" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "terivalidin,terizidona,terizidonum" "NA" "TRZ" 65720 "Terizidone" "Antimycobacterials" "J04AK03,QJ04AK03" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "terivalidin,terizidona,terizidonum" "NA"
"TCY" 54675776 "Tetracycline" "Tetracyclines" "A01AB13,D06AA04,J01AA07,QA01AB13,QD06AA04,QG01AA90,QG51AA02,QJ01AA07,QJ51AA07,QS01AA09,QS02AA08,QS03AA02,S01AA09,S02AA08,S03AA02" "Tetracyclines" "Tetracyclines" "tc,te,tet,tetcyc,tetr,tetra" "abramycin,abricycline,agromicina,ambramicina,ambramycin,biocycline,brodspec,cefracycline,centet,ciclibion,copharlan,criseociclina,democracin,deschlorobiomycin,economycin,hostacyclin,lexacycline,limecycline,liquamycin,mericycline,micycline,neocycline,omegamycin,orlycycline,panmycin,purocyclina,roviciclina,solvocin,tetrabon,tetraciclina,tetracyclinehydrate,tetracyclinum,tetracyn,tetradecin,tetrafil,tetraverine,tetrazyklin,tsiklomistsin,tsiklomitsin,veracin,vetacyclinum" 1 "g" 1 "g" "101504-9,18993-6,25272-6,4045-1,495-2,496-0,497-8,498-6,7052-4,87590-6" "TCY" 54675776 "Tetracycline" "Tetracyclines" "A01AB13,D06AA04,J01AA07,QA01AB13,QD06AA04,QG01AA90,QG51AA02,QJ01AA07,QJ51AA07,QS01AA09,QS02AA08,QS03AA02,S01AA09,S02AA08,S03AA02" "Tetracyclines" "Tetracyclines" "tc,te,tet,tetcyc,tetr,tetra" "abramycin,abricycline,agromicina,ambramicina,ambramycin,biocycline,brodspec,cefracycline,centet,ciclibion,copharlan,criseociclina,democracin,deschlorobiomycin,economycin,hostacyclin,lexacycline,limecycline,liquamycin,mericycline,micycline,neocycline,omegamycin,orlycycline,panmycin,purocyclina,roviciclina,solvocin,tetrabon,tetraciclina,tetracyclinehydrate,tetracyclinum,tetracyn,tetradecin,tetrafil,tetraverine,tetrazyklin,tsiklomistsin,tsiklomitsin,veracin,vetacyclinum" 1 "g" 1 "g" "101504-9,18993-6,25272-6,4045-1,495-2,496-0,497-8,498-6,7052-4,87590-6"
"TCY-S" "Tetracycline screening test" "Tetracyclines" "NA" "tcy screen" "NA" "NA" "TCY-S" "Tetracycline screening test" "Tetracyclines" "NA" "tcy screen" "NA" "NA"
"TOL" 54691494 "Tetracycline/oleandomycin" "Other antibacterials" "J01RA08,QJ01RA08" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA" "TOL" 54691494 "Tetracycline/oleandomycin" "Tetracyclines" "J01RA08,QJ01RA08" "Combinations of antibacterials" "Combinations of antibacterials" "NA" "NA" "NA"
"TET" 65450 "Tetroxoprim" "Other antibacterials" "NA" "NA" "primsol,tetroxoprima,tetroxoprime,tetroxoprimum,trimpex,trimplex" "NA" "TET" 65450 "Tetroxoprim" "Other" "NA" "NA" "primsol,tetroxoprima,tetroxoprime,tetroxoprimum,trimpex,trimplex" "NA"
"THA" 9568512 "Thiacetazone" "Oxazolidinones" "NA" "NA" "acetanilide,aktivan,ambathizon,amitiozon,antib,benthiozone,benzothiozane,benzothiozon,berkazon,citazone,conteben,diasan,domakol,ilbion,livazone,mivizon,myvizone,neotibil,neustab,novakol,panrone,parazone,seroden,siocarbazone,tebalon,tebecure,tebemar,tebethion,tebethione,tebezon,thiacetone,thiacetozone,thibon,thibone,thioacetazon,thioacetazonum,thioazetazone,thiocarbazil,thiomicid,thionicid,thioparamizon,thioparamizone,thiosemicarbarzone,thiosemicarbazone,thiotebesin,thiotebezin,thiotebicina,thizone,tiacetazon,tibicur,tibion,tibione,tibizan,tibon,tibone,tioacetazon,tioacetazona,tioatsetazon,tiobicina,tiocarone,tiosecolo,tubercazon,tubigal,tubin" "32384-0,54184-7,54204-3" "THA" 9568512 "Thiacetazone" "Oxazolidinones" "NA" "NA" "acetanilide,aktivan,ambathizon,amitiozon,antib,benthiozone,benzothiozane,benzothiozon,berkazon,citazone,conteben,diasan,domakol,ilbion,livazone,mivizon,myvizone,neotibil,neustab,novakol,panrone,parazone,seroden,siocarbazone,tebalon,tebecure,tebemar,tebethion,tebethione,tebezon,thiacetone,thiacetozone,thibon,thibone,thioacetazon,thioacetazonum,thioazetazone,thiocarbazil,thiomicid,thionicid,thioparamizon,thioparamizone,thiosemicarbarzone,thiosemicarbazone,thiotebesin,thiotebezin,thiotebicina,thizone,tiacetazon,tibicur,tibion,tibione,tibizan,tibon,tibone,tioacetazon,tioacetazona,tioatsetazon,tiobicina,tiocarone,tiosecolo,tubercazon,tubigal,tubin" "32384-0,54184-7,54204-3"
"THI" 27200 "Thiamphenicol" "Phenicols" "J01BA02,QJ01BA02,QJ51BA02" "Amphenicols" "Amphenicols" "thiaph" "armai,dextrosulfenidol,dextrosulphenidol,igralin,racefenicol,racefenicolo,racefenicolum,raceophenidol,thiamphenicolum,thiocymetin,thiophenicol,tiamfenicol,tiamfenicolo,urfamycine" 1.5 "g" 1.5 "g" "41723-8,41724-6,41725-3,54169-8" "THI" 27200 "Thiamphenicol" "Phenicols" "J01BA02,QJ01BA02,QJ51BA02" "Amphenicols" "Amphenicols" "thiaph" "armai,dextrosulfenidol,dextrosulphenidol,igralin,racefenicol,racefenicolo,racefenicolum,raceophenidol,thiamphenicolum,thiocymetin,thiophenicol,tiamfenicol,tiamfenicolo,urfamycine" 1.5 "g" 1.5 "g" "41723-8,41724-6,41725-3,54169-8"
"TAT" 9568512 "Thioacetazone" "Antimycobacterials" "J04AK07,QJ04AK07" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "NA" "NA" "TAT" "Thioacetazone" "Antimycobacterials" "J04AK07,QJ04AK07" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "NA" "NA" "NA"
"THI1" "Thioacetazone/isoniazid" "Antimycobacterials" "J04AM04,QJ04AM04" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA" "THI1" "Thioacetazone/isoniazid" "Antimycobacterials" "J04AM04,QJ04AM04" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
"TIA" 656958 "Tiamulin" "Other antibacterials" "QJ01XQ01" "tiamul" "denagard,thiamutilin,tiamulina,tiamuline,tiamulinum" "35846-5,35847-3,35848-1,87589-8" "THS" 16129666 "Thiostrepton" "Peptides" "NA" "NA" "alaninamide,bryamycin,gargon,pharmakon,prestwick,sporangiomycin,thiactin,tiostrepton" "NA"
"TIC" 36921 "Ticarcillin" "Beta-lactams/penicillins" "J01CA13,QJ01CA13" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "tc,ti,tic,tica,ticarc" "ticar,ticarcilina,ticarcilline,ticarcillinum,timentin" 15 "g" "18994-4,18995-1,25254-4,4054-3,4055-0,499-4,500-9,501-7,502-5,503-3,504-1,505-8,506-6,55716-5,55717-3,55718-1,55719-9,7053-2,7054-0" "TIA" 656958 "Tiamulin" "Pleuromutilins" "QJ01XQ01" "tiamul" "denagard,thiamutilin,tiamulina,tiamuline,tiamulinum" "35846-5,35847-3,35848-1,87589-8"
"TCC" 6437075 "Ticarcillin/clavulanic acid" "Beta-lactams/penicillins" "J01CR03,QJ01CR03" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "t/c,tcc,ticcla,ticl,tim,tlc" "augpenin" 15 "g" "NA" "TIC" 36921 "Ticarcillin" "Penicillins,Beta-lactams" "J01CA13,QJ01CA13" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "tc,ti,tic,tica,ticarc" "ticar,ticarcilina,ticarcilline,ticarcillinum,timentin" 15 "g" "18994-4,18995-1,25254-4,4054-3,4055-0,499-4,500-9,501-7,502-5,503-3,504-1,505-8,506-6,55716-5,55717-3,55718-1,55719-9,7053-2,7054-0"
"TCC" 6437075 "Ticarcillin/clavulanic acid" "Penicillins,Beta-lactams,Beta-lactamase inhibitors" "J01CR03,QJ01CR03" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "t/c,tcc,ticcla,ticl,tim,tlc" "augpenin" 15 "g" "NA"
"TGC" 54686904 "Tigecycline" "Tetracyclines" "J01AA12,QJ01AA12" "Tetracyclines" "Tetracyclines" "tgc,tig,tige,tigecy" "tigeciclina,tigecyclin,tigecyclinehydrate,tigilcycline,tygacil" 0.1 "g" "101499-2,42354-1,42355-8,42356-6,42357-4,55158-0" "TGC" 54686904 "Tigecycline" "Tetracyclines" "J01AA12,QJ01AA12" "Tetracyclines" "Tetracyclines" "tgc,tig,tige,tigecy" "tigeciclina,tigecyclin,tigecyclinehydrate,tigilcycline,tygacil" 0.1 "g" "101499-2,42354-1,42355-8,42356-6,42357-4,55158-0"
"TMN" "Tigemonam" "Monobactams" "NA" "NA" "NA" "NA" "TMN" "Tigemonam" "Monobactams,Beta-lactams" "NA" "NA" "NA" "NA"
"TBQ" 65592 "Tilbroquinol" "Fluoroquinolones" "P01AA05" "NA" "tilbroquinolum" "NA" "TBQ" 65592 "Tilbroquinol" "Fluoroquinolones,Quinolones" "P01AA05" "NA" "tilbroquinolum" "NA"
"TIP" 24860548 "Tildipirosin" "Macrolides/lincosamides" "QJ01FA96" "NA" "zuprevo" "100060-3,88375-1,88377-7" "TIP" 24860548 "Tildipirosin" "Macrolides" "QJ01FA96" "NA" "zuprevo" "100060-3,88375-1,88377-7"
"TIL" 5282521 "Tilmicosin" "Macrolides/lincosamides" "QJ01FA91" "tilmic" "micotil,pulmotil,tilmicosina,tilmicosine,tilmicosinum,tilmovet" "35849-9,35850-7,35851-5,87588-0" "TIL" 5282521 "Tilmicosin" "Macrolides" "QJ01FA91" "tilmic" "micotil,pulmotil,tilmicosina,tilmicosine,tilmicosinum,tilmovet" "35849-9,35850-7,35851-5,87588-0"
"TIN" 5479 "Tinidazole" "Other antibacterials" "G01AF21,J01XD02,P01AB02,QG01AF21,QJ01XD02,QP51AA02" "Other antibacterials" "Imidazole derivatives" "tini" "amtiba,bioshik,fasigin,fasigyn,glongyn,haisigyn,isotinidazole,pletil,protozol,simplotan,sorquetan,symplotan,tindamax,tindazole,tinidazolum,tricolam,trimonase" 2 "g" 1.5 "g" "54928-7,55720-7,55721-5,55722-3" "TIN" 5479 "Tinidazole" "Other" "G01AF21,J01XD02,P01AB02,QG01AF21,QJ01XD02,QP51AA02" "Other antibacterials" "Imidazole derivatives" "tini" "amtiba,bioshik,fasigin,fasigyn,glongyn,haisigyn,isotinidazole,pletil,protozol,simplotan,sorquetan,symplotan,tindamax,tindazole,tinidazolum,tricolam,trimonase" 2 "g" 1.5 "g" "54928-7,55720-7,55721-5,55722-3"
"TCR" 3001386 "Tiocarlide" "Antimycobacterials" "J04AD02,QJ04AD02" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "NA" "aethoksid,aethoxydum,amixyl,datanil,disocarban,disoxyl,ethoxide,etocarlid,etocarlida,etocarlide,etocarlidum,etoksid,thiocarlide,tiocarlid,tiocarlida,tiocarlidum" 7 "g" "NA" "TCR" 3001386 "Tiocarlide" "Antimycobacterials" "J04AD02,QJ04AD02" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "NA" "aethoksid,aethoxydum,amixyl,datanil,disocarban,disoxyl,ethoxide,etocarlid,etocarlida,etocarlide,etocarlidum,etoksid,thiocarlide,tiocarlid,tiocarlida,tiocarlidum" 7 "g" "NA"
"TDC" 10247721 "Tiodonium chloride" "Other antibacterials" "NA" "NA" "tiodonium" "NA" "TDC" 10247721 "Tiodonium chloride" "Other" "NA" "NA" "tiodonium" "NA"
"TXC" 65788 "Tioxacin" "Fluoroquinolones" "NA" "NA" "tioxacine,tioxacino,tioxacinum" "NA" "TXC" 65788 "Tioxacin" "Fluoroquinolones,Quinolones" "NA" "NA" "tioxacine,tioxacino,tioxacinum" "NA"
"TIZ" 394397 "Tizoxanide" "Other antibacterials" "NA" "NA" "NA" "73585-2,73607-4,73629-8" "TIZ" 394397 "Tizoxanide" "Other" "NA" "NA" "NA" "73585-2,73607-4,73629-8"
"TOB" 36294 "Tobramycin" "Aminoglycosides" "J01GB01,QJ01GB01,QS01AA12,S01AA12" "Aminoglycoside antibacterials" "Other aminoglycosides" "nn,tm,to,tob,tobr,tobram" "aktob,bethkis,distobram,gotabiotic,kitabis,nebcin,nebicin,nebramycin,tenebrimycin,tenemycin,tobacin,tobracin,tobradex,tobradistin,tobralex,tobramaxin,tobramicin,tobramicina,tobramitsetin,tobramycetin,tobramycine,tobramycinum,tobrased,tobrex" 0.24 "g" "101496-8,13584-8,17808-7,18996-9,22750-4,22751-2,22752-0,25227-0,25800-4,31094-6,31095-3,31096-1,35239-3,35670-9,4057-6,4058-4,4059-2,507-4,508-2,509-0,50927-3,510-8,52962-8,59380-6,7055-7,80966-5" "TOB" 36294 "Tobramycin" "Aminoglycosides" "J01GB01,QJ01GB01,QS01AA12,S01AA12" "Aminoglycoside antibacterials" "Other aminoglycosides" "nn,tm,to,tob,tobr,tobram" "aktob,bethkis,distobram,gotabiotic,kitabis,nebcin,nebicin,nebramycin,tenebrimycin,tenemycin,tobacin,tobracin,tobradex,tobradistin,tobralex,tobramaxin,tobramicin,tobramicina,tobramitsetin,tobramycetin,tobramycine,tobramycinum,tobrased,tobrex" 0.24 "g" "101496-8,13584-8,17808-7,18996-9,22750-4,22751-2,22752-0,25227-0,25800-4,31094-6,31095-3,31096-1,35239-3,35670-9,4057-6,4058-4,4059-2,507-4,508-2,509-0,50927-3,510-8,52962-8,59380-6,7055-7,80966-5"
"TOH" "Tobramycin-high" "Aminoglycosides" "NA" "tobra high,tobramycin high,tohl" "NA" "NA" "TOH" "Tobramycin-high" "Aminoglycosides" "NA" "tobra high,tobramycin high,tohl" "NA" "NA"
"TFX" 5517 "Tosufloxacin" "Fluoroquinolones" "J01MA22,QJ01MA22,QS01AE09,S01AE09" "tosufl" "NA" 0.45 "g" "100061-1,76146-0" "TFX" 5517 "Tosufloxacin" "Fluoroquinolones,Quinolones" "J01MA22,QJ01MA22,QS01AE09,S01AE09" "tosufl" "NA" 0.45 "g" "100061-1,76146-0"
"TMP" 5578 "Trimethoprim" "Trimethoprims" "J01EA01,QJ01EA01,QJ51EA01" "Sulfonamides and trimethoprim" "Trimethoprim and derivatives" "t,tmp,tr,tri,trim,w" "abaprim,anitrim,antrima,antrimox,bacdan,bacidal,bacide,bacin,bacterial,bacticel,bactifor,bactoprim,bactramin,bencole,bethaprim,biosulten,briscotrim,chemotrin,colizole,conprim,cotrimel,deprim,dosulfin,duocide,esbesul,espectrin,euctrim,exbesul,fermagex,fortrim,futin,ikaprim,infectotrimet,instalac,kombinax,lagatrim,lastrim,lescot,monoprim,monotrim,monotrimin,novotrimel,omstat,pancidim,proloprim,protrin,purbal,resprim,roubac,roubal,salvatrim,setprin,sinotrim,stopan,streptoplus,sugaprim,sulfamar,sulfoxaprim,sulthrim,sultrex,syraprim,tiempe,trimethioprim,trimethoprime,trimethoprimum,trimethopriom,trimetoprim,trimetoprima,trimexol,trimezol,trimogal,trimono,trimopan,triprim,trisul,trisulcom,trisulfam,trisural,uretrim,urobactrim,utetrin,velaten,wellcoprim,wellcoprin,xeroprim,zamboprim" 0.4 "g" 0.4 "g" "101495-0,11005-6,17747-7,18997-7,18998-5,20387-7,23614-1,23631-5,25273-4,32342-8,4079-0,4080-8,4081-6,511-6,512-4,513-2,514-0,515-7,516-5,517-3,518-1,55584-7,7056-5,7057-3,80552-3,80973-1" "TMP" 5578 "Trimethoprim" "Trimethoprims" "J01EA01,QJ01EA01,QJ51EA01" "Sulfonamides and trimethoprim" "Trimethoprim and derivatives" "t,tmp,tr,tri,trim,w" "abaprim,anitrim,antrima,antrimox,bacdan,bacidal,bacide,bacin,bacterial,bacticel,bactifor,bactoprim,bactramin,bencole,bethaprim,biosulten,briscotrim,chemotrin,colizole,conprim,cotrimel,deprim,dosulfin,duocide,esbesul,espectrin,euctrim,exbesul,fermagex,fortrim,futin,ikaprim,infectotrimet,instalac,kombinax,lagatrim,lastrim,lescot,monoprim,monotrim,monotrimin,novotrimel,omstat,pancidim,proloprim,protrin,purbal,resprim,roubac,roubal,salvatrim,setprin,sinotrim,stopan,streptoplus,sugaprim,sulfamar,sulfoxaprim,sulthrim,sultrex,syraprim,tiempe,trimethioprim,trimethoprime,trimethoprimum,trimethopriom,trimetoprim,trimetoprima,trimexol,trimezol,trimogal,trimono,trimopan,triprim,trisul,trisulcom,trisulfam,trisural,uretrim,urobactrim,utetrin,velaten,wellcoprim,wellcoprin,xeroprim,zamboprim" 0.4 "g" 0.4 "g" "101495-0,11005-6,17747-7,18997-7,18998-5,20387-7,23614-1,23631-5,25273-4,32342-8,4079-0,4080-8,4081-6,511-6,512-4,513-2,514-0,515-7,516-5,517-3,518-1,55584-7,7056-5,7057-3,80552-3,80973-1"
"SXT" 358641 "Trimethoprim/sulfamethoxazole" "Trimethoprims" "J01EE01" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "cot,cotrim,sxt,t/s,tms,trisul,trsu,trsx,ts" "abacin,abactrim,agoprim,alfatrim,aposulfatrim,bacteral,bactilen,bactiver,bacton,bactoreduct,bactrim,bactrizol,bactromin,bactropin,baktar,benzenesulfonamide,berlocid,bibacrim,biseptol,centran,centrin,chemitrim,chemotrim,ciplin,comox,cotribene,cotrim,cotrimhexal,cotrimoxazol,cotrimoxazole,cotrimstada,cotriver,dibaprim,drylin,duratrimet,eltrianyl,escoprim,eslectin,esteprim,eusaprim,fectrim,gamazole,gantanol,gantaprim,gantaprin,gantrim,groprim,helveprim,imexim,insozalin,jenamoxazol,kemoprim,kepinol,laratrim,linaris,maxtrim,metoxal,microtrim,mikrosid,momentol,nopil,oecotrim,omsat,oriprim,oxaprim,pantoprim,potrox,primazole,radonil,septra,septrim,servitrim,sigaprim,sigaprin,sulfatrim,sulfotrim,sulfotrimin,sulmeprim,sulprim,sumetrolim,supracombin,suprim,tacumil,teleprim,teleprin,thiocuran,tribakin,trifen,trigonyl,trimedin,trimesulf,trimethoprimsulfa,trimetoger,trimexazol,trimezole,trimforte,trimosulfa,uroplus" "101495-0,18998-5,20387-7,23631-5,25273-4,32342-8,4081-6,515-7,516-5,517-3,518-1,7057-3" "SXT" 358641 "Trimethoprim/sulfamethoxazole" "Trimethoprims,Sulfonamides" "J01EE01" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "cot,cotrim,sxt,t/s,tms,trisul,trsu,trsx,ts" "abacin,abactrim,agoprim,alfatrim,aposulfatrim,bacteral,bactilen,bactiver,bacton,bactoreduct,bactrim,bactrizol,bactromin,bactropin,baktar,benzenesulfonamide,berlocid,bibacrim,biseptol,centran,centrin,chemitrim,chemotrim,ciplin,comox,cotribene,cotrim,cotrimhexal,cotrimoxazol,cotrimoxazole,cotrimstada,cotriver,dibaprim,drylin,duratrimet,eltrianyl,escoprim,eslectin,esteprim,eusaprim,fectrim,gamazole,gantanol,gantaprim,gantaprin,gantrim,groprim,helveprim,imexim,insozalin,jenamoxazol,kemoprim,kepinol,laratrim,linaris,maxtrim,metoxal,microtrim,mikrosid,momentol,nopil,oecotrim,omsat,oriprim,oxaprim,pantoprim,potrox,primazole,radonil,septra,septrim,servitrim,sigaprim,sigaprin,sulfatrim,sulfotrim,sulfotrimin,sulmeprim,sulprim,sumetrolim,supracombin,suprim,tacumil,teleprim,teleprin,thiocuran,tribakin,trifen,trigonyl,trimedin,trimesulf,trimethoprimsulfa,trimetoger,trimexazol,trimezole,trimforte,trimosulfa,uroplus" "101495-0,18998-5,20387-7,23631-5,25273-4,32342-8,4081-6,515-7,516-5,517-3,518-1,7057-3"
"TRL" 202225 "Troleandomycin" "Macrolides/lincosamides" "J01FA08,QJ01FA08" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "aovine,cyclamycin,evramicina,matromicina,oleandocetin,oleandocetine,tekmisin,treolmicina,tribiocillina,triocetin,triolan,troleandomicina,troleandomycine,troleandomycinum,viamicina,wytrion" 1 "g" "18999-3,519-9,520-7,521-5,522-3" "TRL" 202225 "Troleandomycin" "Macrolides" "J01FA08,QJ01FA08" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "aovine,cyclamycin,evramicina,matromicina,oleandocetin,oleandocetine,tekmisin,treolmicina,tribiocillina,triocetin,triolan,troleandomicina,troleandomycine,troleandomycinum,viamicina,wytrion" 1 "g" "18999-3,519-9,520-7,521-5,522-3"
"TRO" 55886 "Trospectomycin" "Other antibacterials" "NA" "trospe" "trospectinomycin,trospectomicina,trospectomycine,trospectomycinum" "NA" "TRO" 55886 "Trospectomycin" "Other" "NA" "trospe" "trospectinomycin,trospectomicina,trospectomycine,trospectomycinum" "NA"
"TVA" 62959 "Trovafloxacin" "Fluoroquinolones" "J01MA13,QJ01MA13" "Quinolone antibacterials" "Fluoroquinolones" "trov,trovaf" "trovan,turvel" 0.2 "g" 0.2 "g" "23642-2,23643-0,35855-6,7058-1" "TVA" 62959 "Trovafloxacin" "Fluoroquinolones,Quinolones" "J01MA13,QJ01MA13" "Quinolone antibacterials" "Fluoroquinolones" "trov,trovaf" "trovan,turvel" 0.2 "g" 0.2 "g" "23642-2,23643-0,35855-6,7058-1"
"TUL" 9832301 "Tulathromycin" "Macrolides/lincosamides" "QJ01FA94" "tulath" "arovyn,draxxin,increxxa,macrosyn,tulieve,tulissin" "76149-4,87798-5" "TUL" 9832301 "Tulathromycin" "Macrolides" "QJ01FA94" "tulath" "arovyn,draxxin,increxxa,macrosyn,tulieve,tulissin" "76149-4,87798-5"
"TYL" 5280440 "Tylosin" "Macrolides/lincosamides" "QJ01FA90,QJ51FA90" "tylo" "fradizine,tilosina,tylan,tylocine,tylosine,tylosinum,vubityl" "35856-4,35857-2,35858-0,87587-2" "TYL" 5280440 "Tylosin" "Macrolides" "QJ01FA90,QJ51FA90" "tylo" "fradizine,tilosina,tylan,tylocine,tylosine,tylosinum,vubityl" "35856-4,35857-2,35858-0,87587-2"
"TYL1" 6441094 "Tylvalosin" "Macrolides/lincosamides" "QJ01FA92" "tvn" "aivlosin" "101526-2,87586-4" "TYL1" 6441094 "Tylvalosin" "Macrolides" "QJ01FA92" "tvn" "aivlosin" "101526-2,87586-4"
"PRU1" 124225 "Ulifloxacin (Prulifloxacin)" "Other antibacterials" "NA" "NA" "NA" "NA" "PRU1" 124225 "Ulifloxacin (Prulifloxacin)" "Other" "NA" "NA" "NA" "NA"
"VAN" 14969 "Vancomycin" "Glycopeptides" "A07AA09,J01XA01,QA07AA09,QJ01XA01,QS01AA28,S01AA28" "Other antibacterials" "Glycopeptide antibacterials" "va,van,vanc,vancom" "vancocin,vancoled,vancomicina,vancomycine,vancomycinum" 2 "g" 2 "g" "13586-3,13587-1,19000-9,20578-1,23615-8,25228-8,31012-8,39092-2,39796-8,39797-6,4089-9,4090-7,4091-5,4092-3,50938-0,523-1,524-9,525-6,526-4,59381-4,7059-9,92241-9,97657-1" "VAN" 14969 "Vancomycin" "Glycopeptides,Peptides" "A07AA09,J01XA01,QA07AA09,QJ01XA01,QS01AA28,S01AA28" "Other antibacterials" "Glycopeptide antibacterials" "va,van,vanc,vancom" "vancocin,vancoled,vancomicina,vancomycine,vancomycinum" 2 "g" 2 "g" "13586-3,13587-1,19000-9,20578-1,23615-8,25228-8,31012-8,39092-2,39796-8,39797-6,4089-9,4090-7,4091-5,4092-3,50938-0,523-1,524-9,525-6,526-4,59381-4,7059-9,92241-9,97657-1"
"VAM" "Vancomycin-macromethod" "Glycopeptides" "NA" "NA" "NA" "NA" "VAM" "Vancomycin-macromethod" "Glycopeptides,Peptides" "NA" "NA" "NA" "NA"
"VIO" 135398671 "Viomycin" "Antimycobacterials" "NA" "NA" "florimycin,floromycin,vioactane,viocin,viomicin,viomicina,viomycine,viomycinum" "19001-7,23616-6,527-2,528-0,529-8,530-6" "VIO" 135398671 "Viomycin" "Antimycobacterials" "NA" "NA" "florimycin,floromycin,vioactane,viocin,viomicin,viomicina,viomycine,viomycinum" "19001-7,23616-6,527-2,528-0,529-8,530-6"
"VIR" 11979535 "Virginiamycine" "Other antibacterials" "NA" "NA" "NA" "NA" "VIR" "Virginiamycine" "Streptogramins" "NA" "NA" "NA" "NA"
"VOR" 71616 "Voriconazole" "Antifungals/antimycotics" "J02AC03,QJ02AC03" "Antimycotics for systemic use" "Triazole derivatives" "vori,vorico,vrc" "vfend,voriconazol,voriconazolum,voriconzole,vorikonazole" 0.4 "g" 0.4 "g" "32379-0,35862-2,35863-0,38370-3,41199-1,41200-7,53902-3,73676-9,80553-1,80651-3" "VOR" 71616 "Voriconazole" "Antifungals" "J02AC03,QJ02AC03" "Antimycotics for systemic use" "Triazole derivatives" "vori,vorico,vrc" "vfend,voriconazol,voriconazolum,voriconzole,vorikonazole" 0.4 "g" 0.4 "g" "32379-0,35862-2,35863-0,38370-3,41199-1,41200-7,53902-3,73676-9,80553-1,80651-3"
"XBR" 72144 "Xibornol" "Other antibacterials" "J01XX02,QJ01XX02" "Other antibacterials" "Other antibacterials" "NA" "bactacine,bracen,nanbacine,xibornolo,xibornolum" "NA" "XER" 140830474 "Xeruborbactam" "Beta-lactamase inhibitors" "NA" "NA" "benzo,borate" "NA"
"ZID" 77846445 "Zidebactam" "Other antibacterials" "NA" "NA" "zidebactamsalt" "NA" "XBR" 72144 "Xibornol" "Other" "J01XX02,QJ01XX02" "Other antibacterials" "Other antibacterials" "NA" "bactacine,bracen,nanbacine,xibornolo,xibornolum" "NA"
"ZFD" "Zoliflodacin" "NA" "NA" "NA" "NA" "ZID" 77846445 "Zidebactam" "Beta-lactamase inhibitors" "NA" "NA" "zidebactamsalt" "NA"
"ZFD" 76685216 "Zoliflodacin" "Spiropyrimidinetriones" "NA" "zol" "nuzolvence,spiro,zoliflodacina,zoliflodacine" "NA"
"ZOR" 70697970 "Zorbamycin" "Glycopeptides,Peptides" "NA" "NA" "bleomycetin,boanmycin,nbleomycinamide,pingyangmycin" "NA"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
5908f9e6e7687dfb8301d27fb26d1790 6dc4dded108052760bfb626df03435e2
+1 -1
View File
@@ -283,7 +283,7 @@ for (i in 2:length(sheets_to_analyse)) {
guideline_name = guideline_name guideline_name = guideline_name
) )
), ),
error = function(e) message(e$message) error = function(e) message(conditionMessage(e))
) )
} }
+5 -3
View File
@@ -1,8 +1,8 @@
pattern regular_expr case_sensitive affect_ab_name affect_mo_name en ar bn zh cs da nl fi fr de el hi id it ja ko no pl pt ro ru es sw sv tr uk ur vi pattern regular_expr case_sensitive affect_ab_name affect_mo_name en ar bn zh cs da nl fi fr de el hi id it ja ko no pl pt ro ru es sw sv tr uk ur vi
language name English FALSE FALSE FALSE FALSE English Arabic Bengali Chinese Czech Danish Dutch Finnish French German Greek Hindi Indonesian Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swahili Swedish Turkish Ukrainian Urdu Vietnamese language name English FALSE FALSE FALSE FALSE English Arabic Bengali Chinese Czech Danish Dutch Finnish French German Greek Hindi Indonesian Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swahili Swedish Turkish Ukrainian Urdu Vietnamese
language name FALSE FALSE FALSE FALSE English العربية ইংরেজি 汉语 Čeština Dansk Nederlands Suomi Français Deutsch Ελληνικά हिन्दी Inggris Italiano 日本語 영어 Norsk Polski Português Română Русский Español Kiswahili Svenska Türkçe Українська انگریزی Tiếng Anh language name FALSE FALSE FALSE FALSE English العربية ইংরেজি 汉语 Čeština Dansk Nederlands Suomi Français Deutsch Ελληνικά हिन्दी Inggris Italiano 日本語 영어 Norsk Polski Português Română Русский Español Kiswahili Svenska Türkçe Українська انگریزی Tiếng Anh
Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE Coagulase-negative Staphylococcus المكورات العنقودية سالبة التخثر কোয়াগুলেজ-নেগেটিভ স্ট্যাফিলোকক্কাস 凝固酶阴性葡萄球菌 Koaguláza-negativní stafylokok Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Koagulaasinegatiivinen stafylokokki Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα कोएगुलेज़-ऩेगेटिव स्टैफिलोकोकस Stafilokokus koagulase-negatif Staphylococcus negativo coagulasi コアグラーゼ陰性ブドウ球菌 코아귤라제 음성 포도상구균 Koagulase-negative stafylokokker Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Stafilococ coagulazo-negativ Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Staphylococcus wasiokuwa na coagulase Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок کواگولیز منفی اسٹیفیلوکوکس Staphylococcus âm tính với coagulase Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE Coagulase-negative Staphylococcus المكورات العنقودية سالبة التخثر কোয়াগুলেজ-নেগেটিভ স্ট্যাফিলোকক্কাস 凝固酶阴性葡萄球菌 Koaguláza-negativní stafylokok Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Koagulaasinegatiivinen stafylokokki Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα कोएगुलेज़-ऩेगेटिव स्टैफिलोकोकस Stafilokokus koagulase-negatif Stafilococco coagulasi-negativo コアグラーゼ陰性ブドウ球菌 코아귤라제 음성 포도상구균 Koagulase-negative stafylokokker Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Stafilococ coagulazo-negativ Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Staphylococcus wasiokuwa na coagulase Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок کواگولیز منفی اسٹیفیلوکوکس Staphylococcus âm tính với coagulase
Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE Coagulase-positive Staphylococcus المكورات العنقودية موجبة التخثر কোয়াগুলেজ-পজিটিভ স্ট্যাফিলোকক্কাস 凝固酶阳性葡萄球菌 Koagulázopozitivní stafylokok Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Koagulaasipositiivinen stafylokokki Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη कोएगुलेज़-पॉज़िटिव स्टैफिलोकोकस Stafilokokus koagulase-positif Staphylococcus positivo coagulasi コアグラーゼ陽性ブドウ球菌 코아귤라제 양성 포도상구균 Koagulase-positive stafylokokker Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Stafilococul coagulazo-pozitiv Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Staphylococcus wenye coagulase Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок کواگولیز مثبت اسٹیفیلوکوکس Staphylococcus dương tính với coagulase Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE Coagulase-positive Staphylococcus المكورات العنقودية موجبة التخثر কোয়াগুলেজ-পজিটিভ স্ট্যাফিলোকক্কাস 凝固酶阳性葡萄球菌 Koagulázopozitivní stafylokok Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Koagulaasipositiivinen stafylokokki Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη कोएगुलेज़-पॉज़िटिव स्टैफिलोकोकस Stafilokokus koagulase-positif Stafilococco coagulasi-positivo コアグラーゼ陽性ブドウ球菌 코아귤라제 양성 포도상구균 Koagulase-positive stafylokokker Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Stafilococul coagulazo-pozitiv Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Staphylococcus wenye coagulase Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок کواگولیز مثبت اسٹیفیلوکوکس Staphylococcus dương tính với coagulase
Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE Beta-haemolytic Streptococcus العقديات الحالة للدم من النوع بيتا বিটা-হেমোলাইটিক স্ট্রেপটোকক্কাস β-溶血性链球菌 Beta-hemolytický streptokok Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Beeta-hemolyyttinen streptokokki Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος बीटा-हीमोलिटिक स्ट्रेप्टोकोकस Streptokokus beta-hemolitik Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 베타 용혈성 연쇄상구균 Beta-hemolytiske streptokokker Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Streptococ beta-hemolitic Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Streptococcus wa beta-hemolitiki Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок بیٹا ہیمولائٹک اسٹریپٹوکوکس Streptococcus tan máu beta Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE Beta-haemolytic Streptococcus العقديات الحالة للدم من النوع بيتا বিটা-হেমোলাইটিক স্ট্রেপটোকক্কাস β-溶血性链球菌 Beta-hemolytický streptokok Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Beeta-hemolyyttinen streptokokki Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος बीटा-हीमोलिटिक स्ट्रेप्टोकोकस Streptokokus beta-hemolitik Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 베타 용혈성 연쇄상구균 Beta-hemolytiske streptokokker Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Streptococ beta-hemolitic Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Streptococcus wa beta-hemolitiki Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок بیٹا ہیمولائٹک اسٹریپٹوکوکس Streptococcus tan máu beta
unknown Gram-negatives TRUE TRUE FALSE TRUE unknown Gram-negatives سالبة الجرام غير معروفة অজানা গ্রাম-নেগেটিভ 不明革兰氏阴性菌 neznámé gramnegativní ukendte Gram-negative onbekende Gram-negatieven tuntemattomat gramnegatiiviset Gram négatifs inconnus unbekannte Gramnegativen άγνωστοι αρνητικοί κατά Gram अज्ञात ग्राम-ऩेगेटिव्स Gram negatif tidak diketahui Gram negativi sconosciuti 不明なグラム陰性菌 알 수 없는 그람 음성균 ukjent Gram-negative Nieznane bakterie Gram-ujemne Gram negativos desconhecidos Gram-negative necunoscute неизвестные грамотрицательные Gram negativos desconocidos Gram hasi wasiojulikana okända gramnegativa bakterier bilinmeyen Gram-negatifler невідомі грамнегативні نامعلوم گرام منفی Gram âm chưa xác định unknown Gram-negatives TRUE TRUE FALSE TRUE unknown Gram-negatives سالبة الجرام غير معروفة অজানা গ্রাম-নেগেটিভ 不明革兰氏阴性菌 neznámé gramnegativní ukendte Gram-negative onbekende Gram-negatieven tuntemattomat gramnegatiiviset Gram négatifs inconnus unbekannte Gramnegativen άγνωστοι αρνητικοί κατά Gram अज्ञात ग्राम-ऩेगेटिव्स Gram negatif tidak diketahui Gram negativi sconosciuti 不明なグラム陰性菌 알 수 없는 그람 음성균 ukjent Gram-negative Nieznane bakterie Gram-ujemne Gram negativos desconhecidos Gram-negative necunoscute неизвестные грамотрицательные Gram negativos desconocidos Gram hasi wasiojulikana okända gramnegativa bakterier bilinmeyen Gram-negatifler невідомі грамнегативні نامعلوم گرام منفی Gram âm chưa xác định
unknown Gram-positives TRUE TRUE FALSE TRUE unknown Gram-positives موجبة الجرام غير معروفة অজানা গ্রাম-পজিটিভ 不明革兰氏阳性菌 neznámé grampozitivní ukendte Gram-positive onbekende Gram-positieven tuntemattomat grampositiiviset Gram positifs inconnus unbekannte Grampositiven άγνωστοι θετικοί κατά Gram अज्ञात ग्राम-पॉज़िटिव्स Gram positif tidak diketahui Gram positivi sconosciuti 未知のグラム陽性菌 알 수 없는 그람 양성균 ukjent Gram-positive Nieznane bakterie Gram-dodatnie Gram positivos desconhecidos Gram-pozitive necunoscute неизвестные грамположительные Gram positivos desconocidos Gram chanya wasiojulikana okända Gram-positiva bilinmeyen Gram-pozitifler невідомі грампозитивні نامعلوم گرام مثبت Gram dương chưa xác định unknown Gram-positives TRUE TRUE FALSE TRUE unknown Gram-positives موجبة الجرام غير معروفة অজানা গ্রাম-পজিটিভ 不明革兰氏阳性菌 neznámé grampozitivní ukendte Gram-positive onbekende Gram-positieven tuntemattomat grampositiiviset Gram positifs inconnus unbekannte Grampositiven άγνωστοι θετικοί κατά Gram अज्ञात ग्राम-पॉज़िटिव्स Gram positif tidak diketahui Gram positivi sconosciuti 未知のグラム陽性菌 알 수 없는 그람 양성균 ukjent Gram-positive Nieznane bakterie Gram-dodatnie Gram positivos desconhecidos Gram-pozitive necunoscute неизвестные грамположительные Gram positivos desconocidos Gram chanya wasiojulikana okända Gram-positiva bilinmeyen Gram-pozitifler невідомі грампозитивні نامعلوم گرام مثبت Gram dương chưa xác định
@@ -280,7 +280,8 @@ Antifungals FALSE TRUE TRUE FALSE Antifungals مضادات الفطريات অ
Antifungals/antimycotics FALSE TRUE TRUE FALSE Antifungals/antimycotics مضادات الفطريات/الفطريات المُمرِضة অ্যান্টিফাঙ্গালস/অ্যান্টিমাইকোটিকস 抗真菌药/抗真菌药 Antimykotika/antimykotika Antimykotika/antimykotika Antifungica/antimycotica Sienilääkkeet/antimykootit Antifongiques/antimycotiques Antimykotika/Antimykotika Αντιμυκητιασικά/αντιμυκητιασικά प्रतिफफूंद/प्रतिमाइकोटिक्स Antijamur/antimikotik Antifungini/antimicotici 抗真菌剤/抗真菌剤 항진균제/항진균성약물 Soppdrepende midler/antimykotika Środki przeciwgrzybicze/przeciwmikotyczne Antifúngicos/antimicóticos Antifungice/antimicrotice Противогрибковые препараты/антимикотики Antifúngicos/antimicóticos Dawa za kuua kuvu/antimaikoti Antimykotika/antimykotika Antifungaller/antimikotikler Протигрибкові засоби/антимікотики فنگس/اینٹی مائیکوٹک Thuốc chống nấm/kháng nấm Antifungals/antimycotics FALSE TRUE TRUE FALSE Antifungals/antimycotics مضادات الفطريات/الفطريات المُمرِضة অ্যান্টিফাঙ্গালস/অ্যান্টিমাইকোটিকস 抗真菌药/抗真菌药 Antimykotika/antimykotika Antimykotika/antimykotika Antifungica/antimycotica Sienilääkkeet/antimykootit Antifongiques/antimycotiques Antimykotika/Antimykotika Αντιμυκητιασικά/αντιμυκητιασικά प्रतिफफूंद/प्रतिमाइकोटिक्स Antijamur/antimikotik Antifungini/antimicotici 抗真菌剤/抗真菌剤 항진균제/항진균성약물 Soppdrepende midler/antimykotika Środki przeciwgrzybicze/przeciwmikotyczne Antifúngicos/antimicóticos Antifungice/antimicrotice Противогрибковые препараты/антимикотики Antifúngicos/antimicóticos Dawa za kuua kuvu/antimaikoti Antimykotika/antimykotika Antifungaller/antimikotikler Протигрибкові засоби/антимікотики فنگس/اینٹی مائیکوٹک Thuốc chống nấm/kháng nấm
Antimycobacterials FALSE TRUE TRUE FALSE Antimycobacterials مضادات الفطريات الحمضية المقاومة অ্যান্টিমাইকোব্যাকটেরিয়ালস 抗霉菌素类 Antimykobakteriální látky Antimycobakterier Antimycobacteriele middelen Antimykobakteerit Antimycobactériens Antimykobakterielle Mittel Αντιμυκοβακτηριακά प्रतिमाइकोबैक्टीरियल्स Antimikobakteri Antimicobatterici 抗マイコバクテリア薬 항항산균제 Antimykobakterielle midler Środki przeciwgrzybicze Antimycobacterials Antimicobacteriene Антимикобактериальные препараты Antimicrobianos Dawa dhidi ya mykobakteria Antimykobakterier Antimikobakteriyeller Засоби, що діють на мікобактерії اینٹی مائیکوبیکٹیریل Thuốc chống trực khuẩn kháng axit Antimycobacterials FALSE TRUE TRUE FALSE Antimycobacterials مضادات الفطريات الحمضية المقاومة অ্যান্টিমাইকোব্যাকটেরিয়ালস 抗霉菌素类 Antimykobakteriální látky Antimycobakterier Antimycobacteriele middelen Antimykobakteerit Antimycobactériens Antimykobakterielle Mittel Αντιμυκοβακτηριακά प्रतिमाइकोबैक्टीरियल्स Antimikobakteri Antimicobatterici 抗マイコバクテリア薬 항항산균제 Antimykobakterielle midler Środki przeciwgrzybicze Antimycobacterials Antimicobacteriene Антимикобактериальные препараты Antimicrobianos Dawa dhidi ya mykobakteria Antimykobakterier Antimikobakteriyeller Засоби, що діють на мікобактерії اینٹی مائیکوبیکٹیریل Thuốc chống trực khuẩn kháng axit
Beta-lactams/penicillins FALSE TRUE TRUE FALSE Beta-lactams/penicillins البيتا-لاكتامات/البنسلينات বেটা-ল্যাকটামস/পেনিসিলিনস β-内酰胺类/青霉素类 Beta-laktamy/peniciliny Beta-lactamer/penicilliner Beta-lactams/penicillines Beetalaktaamit/penisilliinit Bêta-lactamines/pénicillines Beta-Lactame/Penicilline Β-λακτάμες/πενικιλλίνες बीटा-लैक्टाम्स/पेनिसिलिन्स Beta-laktam/penisilin Beta-lattami/penicilline β-ラクタム系/ペニシリン系抗菌薬 베타-락탐/페니실린 Betalaktamer/penicilliner Beta-laktamy/penicyliny Beta-lactâmicas/penicilinas Beta-lactame/peniciline Бета-лактамы/пенициллины Beta-lactámicos/penicilinas Betalaktamu/penisilini Beta-laktamer/penicilliner Beta-laktamlar/penisilinler Бета-лактами/пеніциліни بیٹا لیکٹمز/پینسلنز Beta-lactam/penicillin Beta-lactams/penicillins FALSE TRUE TRUE FALSE Beta-lactams/penicillins البيتا-لاكتامات/البنسلينات বেটা-ল্যাকটামস/পেনিসিলিনস β-内酰胺类/青霉素类 Beta-laktamy/peniciliny Beta-lactamer/penicilliner Beta-lactams/penicillines Beetalaktaamit/penisilliinit Bêta-lactamines/pénicillines Beta-Lactame/Penicilline Β-λακτάμες/πενικιλλίνες बीटा-लैक्टाम्स/पेनिसिलिन्स Beta-laktam/penisilin Beta-lattami/penicilline β-ラクタム系/ペニシリン系抗菌薬 베타-락탐/페니실린 Betalaktamer/penicilliner Beta-laktamy/penicyliny Beta-lactâmicas/penicilinas Beta-lactame/peniciline Бета-лактамы/пенициллины Beta-lactámicos/penicilinas Betalaktamu/penisilini Beta-laktamer/penicilliner Beta-laktamlar/penisilinler Бета-лактами/пеніциліни بیٹا لیکٹمز/پینسلنز Beta-lactam/penicillin
Betalactams FALSE TRUE TRUE FALSE Betalactams البيتا-لاكتامات বেটা-ল্যাকটামস β-内酰胺类 Beta-laktamy Beta-lactamer Beta-lactams Beetalaktaamit Bêta-lactamines Beta-Lactame Β-λακτάμες बीटा-लैक्टाम्स Beta-laktam Beta-lattami β-ラクタム系抗菌薬 베타-락탐 Betalaktamer Beta-laktamy Beta-lactâmicas Beta-lactame Бета-лактамы Beta-lactámicos Betalaktamu Betalaktamer Beta-laktamlar Бета-лактами بیٹا لیکٹمز Beta-lactam Beta-lactams FALSE TRUE TRUE FALSE Betalactams البيتا-لاكتامات বেটা-ল্যাকটামস β-内酰胺类 Beta-laktamy Beta-lactamer Beta-lactams Beetalaktaamit Bêta-lactamines Beta-Lactame Β-λακτάμες बीटा-लैक्टाम्स Beta-laktam Beta-lattami β-ラクタム系抗菌薬 베타-락탐 Betalaktamer Beta-laktamy Beta-lactâmicas Beta-lactame Бета-лактамы Beta-lactámicos Betalaktamu Betalaktamer Beta-laktamlar Бета-лактами بیٹا لیکٹمز Beta-lactam
Beta-lactamase inhibitors FALSE TRUE TRUE FALSE Beta-lactamase inhibitors مثبطات بيتا-لاكتاماز বেটা-ল্যাকটামেজ ইনহিবিটরস β-内酰胺酶抑制剂 Inhibitory beta-laktamázy Beta-laktamasehæmmere Beta-lactamaseremmers Beetalaktamaasin estäjät Inhibiteurs de bêta-lactamase Beta-Laktamase-Inhibitoren Αναστολείς β-λακταμάσης बीटा-लैक्टामेज़ अवरोधक Inhibitor beta-laktamase Inibitori delle beta-lattamasi β-ラクタマーゼ阻害薬 베타-락타마제 억제제 Beta-laktamasehemmere Inhibitory beta-laktamaz Inibidores da beta-lactamase Inhibitori de beta-lactamază Ингибиторы бета-лактамаз Inhibidores de beta-lactamasa Vizuizi vya beta-laktamasi Beta-laktamashämmare Beta-laktamaz inhibitörleri Інгібітори бета-лактамаз بیٹا لیکٹامیز انہیبیٹرز Chất ức chế beta-lactamase
Carbapenems FALSE TRUE TRUE FALSE Carbapenems الكاربابينيمات কার্বাপেনেমস 碳青霉烯类 Karbapenemy Carbapenemer Carbapenems Karbapeneemit Carbapénèmes Carbapeneme Καρβαπενέμες कार्बापेनेम्स Karbapenem Carbapenemi カルバペネム系抗生物質 카르바페넴 Carbapenemer Karbapenemy Carbapenêmicos Carbapeneme Карбапенемы Carbapenémicos Karbapenemu Carbapenemer Karbapenemler Карбапенеми کارباپینیمز Carbapenem Carbapenems FALSE TRUE TRUE FALSE Carbapenems الكاربابينيمات কার্বাপেনেমস 碳青霉烯类 Karbapenemy Carbapenemer Carbapenems Karbapeneemit Carbapénèmes Carbapeneme Καρβαπενέμες कार्बापेनेम्स Karbapenem Carbapenemi カルバペネム系抗生物質 카르바페넴 Carbapenemer Karbapenemy Carbapenêmicos Carbapeneme Карбапенемы Carbapenémicos Karbapenemu Carbapenemer Karbapenemler Карбапенеми کارباپینیمز Carbapenem
Cephalosporins FALSE TRUE TRUE FALSE Cephalosporins السيفالوسبورينات সেফালোসপরিনস 头孢菌素类 Cefalosporiny Cefalosporiner Cefalosporines Kefalosporiinit Céphalosporines Cephalosporine Κεφαλοσπορίνες सेफालोस्पोरिन्स Sefalosporin Cefalosporine セファロスポリン 세팔로스포린 Cefalosporiner Cefalosporyny Cefalosporinas Cefalosporine Цефалоспорины Cefalosporinas Sefalosporini Kefalosporiner Sefalosporinler Цефалоспорини سیفالوسپورنز Cephalosporin Cephalosporins FALSE TRUE TRUE FALSE Cephalosporins السيفالوسبورينات সেফালোসপরিনস 头孢菌素类 Cefalosporiny Cefalosporiner Cefalosporines Kefalosporiinit Céphalosporines Cephalosporine Κεφαλοσπορίνες सेफालोस्पोरिन्स Sefalosporin Cefalosporine セファロスポリン 세팔로스포린 Cefalosporiner Cefalosporyny Cefalosporinas Cefalosporine Цефалоспорины Cefalosporinas Sefalosporini Kefalosporiner Sefalosporinler Цефалоспорини سیفالوسپورنز Cephalosporin
Cephalosporins (1st gen.) FALSE TRUE TRUE FALSE Cephalosporins (1st gen.) السيفالوسبورينات (الجيل الأول) সেফালোসপরিনস (১ম প্রজন্ম) 头孢菌素类(第一代) Cefalosporiny (1. gen.) Cefalosporiner (1. gen.) Cefalosporines (1e gen.) Kefalosporiinit (1. suk.) Céphalosporines (1ère génération) Cephalosporine (1. Gen.) Κεφαλοσπορίνες (1ου γένους) सेफालोस्पोरिन्स (प्रथम पीढ़ी) Sefalosporin (generasi 1) Cefalosporine (1° gen.) セファロスポリン系抗生物質(第1世代) 세팔로스포린 (1세대) Cefalosporiner (1. generasjon) Cefalosporyny (1. gen.) Cefalosporinas (1º género) Cefalosporine (prima generație) Цефалоспорины (1-го пок.) Cefalosporinas (1er gen.) Sefalosporini (kizazi cha 1) Kefalosporiner (första gen.) Sefalosporinler (1. kuşak) Цефалоспорини (1 пок.) سیفالوسپورنز (پہلی نسل) Cephalosporin (thế hệ 1) Cephalosporins (1st gen.) FALSE TRUE TRUE FALSE Cephalosporins (1st gen.) السيفالوسبورينات (الجيل الأول) সেফালোসপরিনস (১ম প্রজন্ম) 头孢菌素类(第一代) Cefalosporiny (1. gen.) Cefalosporiner (1. gen.) Cefalosporines (1e gen.) Kefalosporiinit (1. suk.) Céphalosporines (1ère génération) Cephalosporine (1. Gen.) Κεφαλοσπορίνες (1ου γένους) सेफालोस्पोरिन्स (प्रथम पीढ़ी) Sefalosporin (generasi 1) Cefalosporine (1° gen.) セファロスポリン系抗生物質(第1世代) 세팔로스포린 (1세대) Cefalosporiner (1. generasjon) Cefalosporyny (1. gen.) Cefalosporinas (1º género) Cefalosporine (prima generație) Цефалоспорины (1-го пок.) Cefalosporinas (1er gen.) Sefalosporini (kizazi cha 1) Kefalosporiner (första gen.) Sefalosporinler (1. kuşak) Цефалоспорини (1 пок.) سیفالوسپورنز (پہلی نسل) Cephalosporin (thế hệ 1)
@@ -302,6 +303,7 @@ Other antibacterials FALSE TRUE TRUE FALSE Other antibacterials مضادات ب
Oxazolidinones FALSE TRUE TRUE FALSE Oxazolidinones الأوكسازوليدينونات অক্সাজোলিডিনোনস 恶唑烷酮类 Oxazolidinone Oxazolidinones Oxazolidinonen Oxazolidinonit Oxazolidinones Oxazolidinone Οξαζολιδινόνες ऑक्साज़ोलिडिनोन्स Oksazolidinon Oxazolidinonas オキサゾリジノン 옥사졸리디논 Oxazolidinones Oksazolidynony Oxazolidinonas Oxazolidinone Оксазолидиноны Oxazolidinonas Oxazolidinoni Oxazolidinones Oxazolidinonlar Оксазолідинони اوکسا زولڈی نونز Oxazolidinone Oxazolidinones FALSE TRUE TRUE FALSE Oxazolidinones الأوكسازوليدينونات অক্সাজোলিডিনোনস 恶唑烷酮类 Oxazolidinone Oxazolidinones Oxazolidinonen Oxazolidinonit Oxazolidinones Oxazolidinone Οξαζολιδινόνες ऑक्साज़ोलिडिनोन्स Oksazolidinon Oxazolidinonas オキサゾリジノン 옥사졸리디논 Oxazolidinones Oksazolidynony Oxazolidinonas Oxazolidinone Оксазолидиноны Oxazolidinonas Oxazolidinoni Oxazolidinones Oxazolidinonlar Оксазолідинони اوکسا زولڈی نونز Oxazolidinone
Penicillins FALSE TRUE TRUE FALSE Penicillins البنسلينات পেনিসিলিনস 青霉素类 Пенициллины Penicillins Penicillines Penisilliinit Pénicillines Penicillins Πενικιλίνες पेनिसिलिन्स Penisilin Penicilinas ペニシリン 페니실린 Penicillins Penicyliny Penicilinas Peniciline Пенициллины Penicilinas Penisilini Penicillins Penisilinler Пеніциліни پینسلن Penicillin Penicillins FALSE TRUE TRUE FALSE Penicillins البنسلينات পেনিসিলিনস 青霉素类 Пенициллины Penicillins Penicillines Penisilliinit Pénicillines Penicillins Πενικιλίνες पेनिसिलिन्स Penisilin Penicilinas ペニシリン 페니실린 Penicillins Penicyliny Penicilinas Peniciline Пенициллины Penicilinas Penisilini Penicillins Penisilinler Пеніциліни پینسلن Penicillin
Phenicols FALSE TRUE TRUE FALSE Phenicols الفينيكولات ফেনিকলস 酚类抗生素 Phenikoly Fenicoler Fenicols Fenikolit Phénicols Phenicol Φαινικόλες फेनिकोल्स Fenikol Fenicoli フェニコール 페니콜 Fenicoler Fenikole Fenicóis Fenicoli Фениколы Fenicoles Fenikoli Fenicoler Fenikoller Фенікони فینیکولز Phenicols Phenicols FALSE TRUE TRUE FALSE Phenicols الفينيكولات ফেনিকলস 酚类抗生素 Phenikoly Fenicoler Fenicols Fenikolit Phénicols Phenicol Φαινικόλες फेनिकोल्स Fenikol Fenicoli フェニコール 페니콜 Fenicoler Fenikole Fenicóis Fenicoli Фениколы Fenicoles Fenikoli Fenicoler Fenikoller Фенікони فینیکولز Phenicols
Phosphonics FALSE TRUE TRUE FALSE Phosphonics الفوسفونيّات ফসফোনিকস 膦酸类 Phosphonáty Fosfonater Fosfonaten Fosfonaatit Phosphoniques Phosphonates Φωσφονικά फॉस्फ़ोनिक्स Fosfonik Fosfonici ホスホン酸系抗菌薬 포스포닉계 Fosfonater Fosfoniany Fosfônicos Fosfonați Фосфоники Fosfónicos Fosfoniki Fosfonater Fosfonikler Фосфоніки فاسفونکس Các hợp chất phosphonic
Polymyxins FALSE TRUE TRUE FALSE Polymyxins البوليميكسينات পলিমিক্সিনস 多粘菌素类 Polymyxiny Polymyxiner Polymyxines Polymysiinit Polymyxines Polymyxine Πολυμυξίνες पॉलीमिक्सिन्स Polimiksin Polimixine ポリミキシン 폴리믹신 Polymyxiner Polimyksyny Polimixinas Polimixine Полимиксины Polimixinas Polimiksini Polymyxiner Polimiksinler Поліміксини پولی مائکسینز Polymyxin Polymyxins FALSE TRUE TRUE FALSE Polymyxins البوليميكسينات পলিমিক্সিনস 多粘菌素类 Polymyxiny Polymyxiner Polymyxines Polymysiinit Polymyxines Polymyxine Πολυμυξίνες पॉलीमिक्सिन्स Polimiksin Polimixine ポリミキシン 폴리믹신 Polymyxiner Polimyksyny Polimixinas Polimixine Полимиксины Polimixinas Polimiksini Polymyxiner Polimiksinler Поліміксини پولی مائکسینز Polymyxin
Quinolones FALSE TRUE TRUE FALSE Quinolones الكوينولونات কুইনোলোনস 喹诺酮类 Chinolony Kinoloner Quinolonen Kinolonit Quinolones Quinolone Κινολόνες क्विनोलोन्स Kuinalon Chinoloni キノロン 퀴놀론 Kinoloner Quinolony Quinolones Quinolone Хинолоны Quinolonas Kinoloni Kinoloner Kinolonlar Хінолони کوئنولونز Quinolone Quinolones FALSE TRUE TRUE FALSE Quinolones الكوينولونات কুইনোলোনস 喹诺酮类 Chinolony Kinoloner Quinolonen Kinolonit Quinolones Quinolone Κινολόνες क्विनोलोन्स Kuinalon Chinoloni キノロン 퀴놀론 Kinoloner Quinolony Quinolones Quinolone Хинолоны Quinolonas Kinoloni Kinoloner Kinolonlar Хінолони کوئنولونز Quinolone
Rifamycins FALSE TRUE TRUE FALSE Rifamycins الريفاميسينات রিফামাইসিনস 利福霉素类 Rifamycine Rifamycins Rifamycinen Rifamysiinit Rifamycines Rifamycine Ριφαμυκίνες रिफामाइसिन्स Rifamisin Rifamicinas リファマイシン 리팜이신 Rifamycins Rifamycyny Rifamycinas Rifamicine Рифамицины Rifamicinas Rifamasini Rifamycins Rifamisinler Рифаміцини ریفامائسنز Rifamycin Rifamycins FALSE TRUE TRUE FALSE Rifamycins الريفاميسينات রিফামাইসিনস 利福霉素类 Rifamycine Rifamycins Rifamycinen Rifamysiinit Rifamycines Rifamycine Ριφαμυκίνες रिफामाइसिन्स Rifamisin Rifamicinas リファマイシン 리팜이신 Rifamycins Rifamycyny Rifamycinas Rifamicine Рифамицины Rifamicinas Rifamasini Rifamycins Rifamisinler Рифаміцини ریفامائسنز Rifamycin
1 pattern regular_expr case_sensitive affect_ab_name affect_mo_name en ar bn zh cs da nl fi fr de el hi id it ja ko no pl pt ro ru es sw sv tr uk ur vi
2 language name English FALSE FALSE FALSE FALSE English Arabic Bengali Chinese Czech Danish Dutch Finnish French German Greek Hindi Indonesian Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swahili Swedish Turkish Ukrainian Urdu Vietnamese
3 language name FALSE FALSE FALSE FALSE English العربية ইংরেজি 汉语 Čeština Dansk Nederlands Suomi Français Deutsch Ελληνικά हिन्दी Inggris Italiano 日本語 영어 Norsk Polski Português Română Русский Español Kiswahili Svenska Türkçe Українська انگریزی Tiếng Anh
4 Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE Coagulase-negative Staphylococcus المكورات العنقودية سالبة التخثر কোয়াগুলেজ-নেগেটিভ স্ট্যাফিলোকক্কাস 凝固酶阴性葡萄球菌 Koaguláza-negativní stafylokok Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Koagulaasinegatiivinen stafylokokki Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα कोएगुलेज़-ऩेगेटिव स्टैफिलोकोकस Stafilokokus koagulase-negatif Staphylococcus negativo coagulasi Stafilococco coagulasi-negativo コアグラーゼ陰性ブドウ球菌 코아귤라제 음성 포도상구균 Koagulase-negative stafylokokker Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Stafilococ coagulazo-negativ Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Staphylococcus wasiokuwa na coagulase Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок کواگولیز منفی اسٹیفیلوکوکس Staphylococcus âm tính với coagulase
5 Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE Coagulase-positive Staphylococcus المكورات العنقودية موجبة التخثر কোয়াগুলেজ-পজিটিভ স্ট্যাফিলোকক্কাস 凝固酶阳性葡萄球菌 Koagulázopozitivní stafylokok Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Koagulaasipositiivinen stafylokokki Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη कोएगुलेज़-पॉज़िटिव स्टैफिलोकोकस Stafilokokus koagulase-positif Staphylococcus positivo coagulasi Stafilococco coagulasi-positivo コアグラーゼ陽性ブドウ球菌 코아귤라제 양성 포도상구균 Koagulase-positive stafylokokker Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Stafilococul coagulazo-pozitiv Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Staphylococcus wenye coagulase Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок کواگولیز مثبت اسٹیفیلوکوکس Staphylococcus dương tính với coagulase
6 Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE Beta-haemolytic Streptococcus العقديات الحالة للدم من النوع بيتا বিটা-হেমোলাইটিক স্ট্রেপটোকক্কাস β-溶血性链球菌 Beta-hemolytický streptokok Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Beeta-hemolyyttinen streptokokki Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος बीटा-हीमोलिटिक स्ट्रेप्टोकोकस Streptokokus beta-hemolitik Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 베타 용혈성 연쇄상구균 Beta-hemolytiske streptokokker Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Streptococ beta-hemolitic Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Streptococcus wa beta-hemolitiki Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок بیٹا ہیمولائٹک اسٹریپٹوکوکس Streptococcus tan máu beta
7 unknown Gram-negatives TRUE TRUE FALSE TRUE unknown Gram-negatives سالبة الجرام غير معروفة অজানা গ্রাম-নেগেটিভ 不明革兰氏阴性菌 neznámé gramnegativní ukendte Gram-negative onbekende Gram-negatieven tuntemattomat gramnegatiiviset Gram négatifs inconnus unbekannte Gramnegativen άγνωστοι αρνητικοί κατά Gram अज्ञात ग्राम-ऩेगेटिव्स Gram negatif tidak diketahui Gram negativi sconosciuti 不明なグラム陰性菌 알 수 없는 그람 음성균 ukjent Gram-negative Nieznane bakterie Gram-ujemne Gram negativos desconhecidos Gram-negative necunoscute неизвестные грамотрицательные Gram negativos desconocidos Gram hasi wasiojulikana okända gramnegativa bakterier bilinmeyen Gram-negatifler невідомі грамнегативні نامعلوم گرام منفی Gram âm chưa xác định
8 unknown Gram-positives TRUE TRUE FALSE TRUE unknown Gram-positives موجبة الجرام غير معروفة অজানা গ্রাম-পজিটিভ 不明革兰氏阳性菌 neznámé grampozitivní ukendte Gram-positive onbekende Gram-positieven tuntemattomat grampositiiviset Gram positifs inconnus unbekannte Grampositiven άγνωστοι θετικοί κατά Gram अज्ञात ग्राम-पॉज़िटिव्स Gram positif tidak diketahui Gram positivi sconosciuti 未知のグラム陽性菌 알 수 없는 그람 양성균 ukjent Gram-positive Nieznane bakterie Gram-dodatnie Gram positivos desconhecidos Gram-pozitive necunoscute неизвестные грамположительные Gram positivos desconocidos Gram chanya wasiojulikana okända Gram-positiva bilinmeyen Gram-pozitifler невідомі грампозитивні نامعلوم گرام مثبت Gram dương chưa xác định
280 Antifungals/antimycotics FALSE TRUE TRUE FALSE Antifungals/antimycotics مضادات الفطريات/الفطريات المُمرِضة অ্যান্টিফাঙ্গালস/অ্যান্টিমাইকোটিকস 抗真菌药/抗真菌药 Antimykotika/antimykotika Antimykotika/antimykotika Antifungica/antimycotica Sienilääkkeet/antimykootit Antifongiques/antimycotiques Antimykotika/Antimykotika Αντιμυκητιασικά/αντιμυκητιασικά प्रतिफफूंद/प्रतिमाइकोटिक्स Antijamur/antimikotik Antifungini/antimicotici 抗真菌剤/抗真菌剤 항진균제/항진균성약물 Soppdrepende midler/antimykotika Środki przeciwgrzybicze/przeciwmikotyczne Antifúngicos/antimicóticos Antifungice/antimicrotice Противогрибковые препараты/антимикотики Antifúngicos/antimicóticos Dawa za kuua kuvu/antimaikoti Antimykotika/antimykotika Antifungaller/antimikotikler Протигрибкові засоби/антимікотики فنگس/اینٹی مائیکوٹک Thuốc chống nấm/kháng nấm
281 Antimycobacterials FALSE TRUE TRUE FALSE Antimycobacterials مضادات الفطريات الحمضية المقاومة অ্যান্টিমাইকোব্যাকটেরিয়ালস 抗霉菌素类 Antimykobakteriální látky Antimycobakterier Antimycobacteriele middelen Antimykobakteerit Antimycobactériens Antimykobakterielle Mittel Αντιμυκοβακτηριακά प्रतिमाइकोबैक्टीरियल्स Antimikobakteri Antimicobatterici 抗マイコバクテリア薬 항항산균제 Antimykobakterielle midler Środki przeciwgrzybicze Antimycobacterials Antimicobacteriene Антимикобактериальные препараты Antimicrobianos Dawa dhidi ya mykobakteria Antimykobakterier Antimikobakteriyeller Засоби, що діють на мікобактерії اینٹی مائیکوبیکٹیریل Thuốc chống trực khuẩn kháng axit
282 Beta-lactams/penicillins FALSE TRUE TRUE FALSE Beta-lactams/penicillins البيتا-لاكتامات/البنسلينات বেটা-ল্যাকটামস/পেনিসিলিনস β-内酰胺类/青霉素类 Beta-laktamy/peniciliny Beta-lactamer/penicilliner Beta-lactams/penicillines Beetalaktaamit/penisilliinit Bêta-lactamines/pénicillines Beta-Lactame/Penicilline Β-λακτάμες/πενικιλλίνες बीटा-लैक्टाम्स/पेनिसिलिन्स Beta-laktam/penisilin Beta-lattami/penicilline β-ラクタム系/ペニシリン系抗菌薬 베타-락탐/페니실린 Betalaktamer/penicilliner Beta-laktamy/penicyliny Beta-lactâmicas/penicilinas Beta-lactame/peniciline Бета-лактамы/пенициллины Beta-lactámicos/penicilinas Betalaktamu/penisilini Beta-laktamer/penicilliner Beta-laktamlar/penisilinler Бета-лактами/пеніциліни بیٹا لیکٹمز/پینسلنز Beta-lactam/penicillin
283 Betalactams Beta-lactams FALSE TRUE TRUE FALSE Betalactams البيتا-لاكتامات বেটা-ল্যাকটামস β-内酰胺类 Beta-laktamy Beta-lactamer Beta-lactams Beetalaktaamit Bêta-lactamines Beta-Lactame Β-λακτάμες बीटा-लैक्टाम्स Beta-laktam Beta-lattami β-ラクタム系抗菌薬 베타-락탐 Betalaktamer Beta-laktamy Beta-lactâmicas Beta-lactame Бета-лактамы Beta-lactámicos Betalaktamu Betalaktamer Beta-laktamlar Бета-лактами بیٹا لیکٹمز Beta-lactam
284 Beta-lactamase inhibitors FALSE TRUE TRUE FALSE Beta-lactamase inhibitors مثبطات بيتا-لاكتاماز বেটা-ল্যাকটামেজ ইনহিবিটরস β-内酰胺酶抑制剂 Inhibitory beta-laktamázy Beta-laktamasehæmmere Beta-lactamaseremmers Beetalaktamaasin estäjät Inhibiteurs de bêta-lactamase Beta-Laktamase-Inhibitoren Αναστολείς β-λακταμάσης बीटा-लैक्टामेज़ अवरोधक Inhibitor beta-laktamase Inibitori delle beta-lattamasi β-ラクタマーゼ阻害薬 베타-락타마제 억제제 Beta-laktamasehemmere Inhibitory beta-laktamaz Inibidores da beta-lactamase Inhibitori de beta-lactamază Ингибиторы бета-лактамаз Inhibidores de beta-lactamasa Vizuizi vya beta-laktamasi Beta-laktamashämmare Beta-laktamaz inhibitörleri Інгібітори бета-лактамаз بیٹا لیکٹامیز انہیبیٹرز Chất ức chế beta-lactamase
285 Carbapenems FALSE TRUE TRUE FALSE Carbapenems الكاربابينيمات কার্বাপেনেমস 碳青霉烯类 Karbapenemy Carbapenemer Carbapenems Karbapeneemit Carbapénèmes Carbapeneme Καρβαπενέμες कार्बापेनेम्स Karbapenem Carbapenemi カルバペネム系抗生物質 카르바페넴 Carbapenemer Karbapenemy Carbapenêmicos Carbapeneme Карбапенемы Carbapenémicos Karbapenemu Carbapenemer Karbapenemler Карбапенеми کارباپینیمز Carbapenem
286 Cephalosporins FALSE TRUE TRUE FALSE Cephalosporins السيفالوسبورينات সেফালোসপরিনস 头孢菌素类 Cefalosporiny Cefalosporiner Cefalosporines Kefalosporiinit Céphalosporines Cephalosporine Κεφαλοσπορίνες सेफालोस्पोरिन्स Sefalosporin Cefalosporine セファロスポリン 세팔로스포린 Cefalosporiner Cefalosporyny Cefalosporinas Cefalosporine Цефалоспорины Cefalosporinas Sefalosporini Kefalosporiner Sefalosporinler Цефалоспорини سیفالوسپورنز Cephalosporin
287 Cephalosporins (1st gen.) FALSE TRUE TRUE FALSE Cephalosporins (1st gen.) السيفالوسبورينات (الجيل الأول) সেফালোসপরিনস (১ম প্রজন্ম) 头孢菌素类(第一代) Cefalosporiny (1. gen.) Cefalosporiner (1. gen.) Cefalosporines (1e gen.) Kefalosporiinit (1. suk.) Céphalosporines (1ère génération) Cephalosporine (1. Gen.) Κεφαλοσπορίνες (1ου γένους) सेफालोस्पोरिन्स (प्रथम पीढ़ी) Sefalosporin (generasi 1) Cefalosporine (1° gen.) セファロスポリン系抗生物質(第1世代) 세팔로스포린 (1세대) Cefalosporiner (1. generasjon) Cefalosporyny (1. gen.) Cefalosporinas (1º género) Cefalosporine (prima generație) Цефалоспорины (1-го пок.) Cefalosporinas (1er gen.) Sefalosporini (kizazi cha 1) Kefalosporiner (första gen.) Sefalosporinler (1. kuşak) Цефалоспорини (1 пок.) سیفالوسپورنز (پہلی نسل) Cephalosporin (thế hệ 1)
303 Oxazolidinones FALSE TRUE TRUE FALSE Oxazolidinones الأوكسازوليدينونات অক্সাজোলিডিনোনস 恶唑烷酮类 Oxazolidinone Oxazolidinones Oxazolidinonen Oxazolidinonit Oxazolidinones Oxazolidinone Οξαζολιδινόνες ऑक्साज़ोलिडिनोन्स Oksazolidinon Oxazolidinonas オキサゾリジノン 옥사졸리디논 Oxazolidinones Oksazolidynony Oxazolidinonas Oxazolidinone Оксазолидиноны Oxazolidinonas Oxazolidinoni Oxazolidinones Oxazolidinonlar Оксазолідинони اوکسا زولڈی نونز Oxazolidinone
304 Penicillins FALSE TRUE TRUE FALSE Penicillins البنسلينات পেনিসিলিনস 青霉素类 Пенициллины Penicillins Penicillines Penisilliinit Pénicillines Penicillins Πενικιλίνες पेनिसिलिन्स Penisilin Penicilinas ペニシリン 페니실린 Penicillins Penicyliny Penicilinas Peniciline Пенициллины Penicilinas Penisilini Penicillins Penisilinler Пеніциліни پینسلن Penicillin
305 Phenicols FALSE TRUE TRUE FALSE Phenicols الفينيكولات ফেনিকলস 酚类抗生素 Phenikoly Fenicoler Fenicols Fenikolit Phénicols Phenicol Φαινικόλες फेनिकोल्स Fenikol Fenicoli フェニコール 페니콜 Fenicoler Fenikole Fenicóis Fenicoli Фениколы Fenicoles Fenikoli Fenicoler Fenikoller Фенікони فینیکولز Phenicols
306 Phosphonics FALSE TRUE TRUE FALSE Phosphonics الفوسفونيّات ফসফোনিকস 膦酸类 Phosphonáty Fosfonater Fosfonaten Fosfonaatit Phosphoniques Phosphonates Φωσφονικά फॉस्फ़ोनिक्स Fosfonik Fosfonici ホスホン酸系抗菌薬 포스포닉계 Fosfonater Fosfoniany Fosfônicos Fosfonați Фосфоники Fosfónicos Fosfoniki Fosfonater Fosfonikler Фосфоніки فاسفونکس Các hợp chất phosphonic
307 Polymyxins FALSE TRUE TRUE FALSE Polymyxins البوليميكسينات পলিমিক্সিনস 多粘菌素类 Polymyxiny Polymyxiner Polymyxines Polymysiinit Polymyxines Polymyxine Πολυμυξίνες पॉलीमिक्सिन्स Polimiksin Polimixine ポリミキシン 폴리믹신 Polymyxiner Polimyksyny Polimixinas Polimixine Полимиксины Polimixinas Polimiksini Polymyxiner Polimiksinler Поліміксини پولی مائکسینز Polymyxin
308 Quinolones FALSE TRUE TRUE FALSE Quinolones الكوينولونات কুইনোলোনস 喹诺酮类 Chinolony Kinoloner Quinolonen Kinolonit Quinolones Quinolone Κινολόνες क्विनोलोन्स Kuinalon Chinoloni キノロン 퀴놀론 Kinoloner Quinolony Quinolones Quinolone Хинолоны Quinolonas Kinoloni Kinoloner Kinolonlar Хінолони کوئنولونز Quinolone
309 Rifamycins FALSE TRUE TRUE FALSE Rifamycins الريفاميسينات রিফামাইসিনস 利福霉素类 Rifamycine Rifamycins Rifamycinen Rifamysiinit Rifamycines Rifamycine Ριφαμυκίνες रिफामाइसिन्स Rifamisin Rifamicinas リファマイシン 리팜이신 Rifamycins Rifamycyny Rifamycinas Rifamicine Рифамицины Rifamicinas Rifamasini Rifamycins Rifamisinler Рифаміцини ریفامائسنز Rifamycin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -28,8 +28,8 @@ AMR:::reset_all_thrown_messages()
> Now available for Python too! [Click here](./articles/AMR_for_Python.html) to read more. > Now available for Python too! [Click here](./articles/AMR_for_Python.html) to read more.
<div style="display: flex; font-size: 0.8em;"> <div style="display: flex; font-size: 0.8em;">
<p style="text-align:left; width: 50%;"><small><a href="https://amr-for-r.org/">https://amr-for-r.org</a></small></p> <p style="text-align:left; width: 50%;"><small><a href="https://amr-for-r.org/">amr-for-r.org</a></small></p>
<p style="text-align:right; width: 50%;"><small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">https://doi.org/10.18637/jss.v104.i03</a></small></p> <p style="text-align:right; width: 50%;"><small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">doi.org/10.18637/jss.v104.i03</a></small></p>
</div> </div>
<a href="./reference/clinical_breakpoints.html#response-from-clsi-and-eucast"><img src="./endorsement_clsi_eucast.jpg" class="endorse_img" align="right" height="120" /></a> <a href="./reference/clinical_breakpoints.html#response-from-clsi-and-eucast"><img src="./endorsement_clsi_eucast.jpg" class="endorse_img" align="right" height="120" /></a>
@@ -133,7 +133,7 @@ ggplot(data.frame(mic = some_mic_values,
sir = interpretation), sir = interpretation),
aes(x = group, y = mic, colour = sir)) + aes(x = group, y = mic, colour = sir)) +
theme_minimal() + theme_minimal() +
geom_boxplot(fill = NA, colour = "grey") + geom_boxplot(fill = NA, colour = "grey30") +
geom_jitter(width = 0.25) + geom_jitter(width = 0.25) +
# NEW scale function: plot MIC values to x, y, colour or fill # NEW scale function: plot MIC values to x, y, colour or fill

Some files were not shown because too many files have changed in this diff Show More