mirror of
https://github.com/msberends/AMR.git
synced 2026-09-16 22:39:42 +02:00
Compare commits
48
Commits
v3.0.1
..
cd23422a5f
@@ -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$
|
||||||
|
|||||||
@@ -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 (3.0.0)
|
- Latest CRAN version (3.0.1)
|
||||||
- One of the latest GitHub versions (3.0.0.9xxx)
|
- One of the latest GitHub versions (3.0.1.9xxx)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -28,11 +28,8 @@
|
|||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
# run in each PR in this repo
|
|
||||||
branches: '**'
|
|
||||||
push:
|
push:
|
||||||
branches: '**'
|
branches: [main]
|
||||||
schedule:
|
schedule:
|
||||||
# also run a schedule everyday at 1 AM.
|
# also run a schedule everyday at 1 AM.
|
||||||
# this is to check that all dependencies are still available (see R/zzz.R)
|
# this is to check that all dependencies are still available (see R/zzz.R)
|
||||||
|
|||||||
@@ -29,10 +29,11 @@
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
# run in each PR in this repo
|
# run in each PR in this repo (1 worker, see matrix logic below)
|
||||||
branches: '**'
|
branches: '**'
|
||||||
push:
|
push:
|
||||||
branches: '**'
|
# only on main; pushing to a PR branch is already covered by pull_request above
|
||||||
|
branches: [main]
|
||||||
schedule:
|
schedule:
|
||||||
# also run a schedule everyday at 1 AM.
|
# also run a schedule everyday at 1 AM.
|
||||||
# this is to check that all dependencies are still available (see R/zzz.R)
|
# this is to check that all dependencies are still available (see R/zzz.R)
|
||||||
@@ -41,7 +42,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 +66,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 }}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,12 @@
|
|||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: '**'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# run on every PR update (once per push)
|
||||||
branches: '**'
|
branches: '**'
|
||||||
|
push:
|
||||||
|
# only on main; PR pushes are already covered by pull_request above
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
name: code-coverage
|
name: code-coverage
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate TODO list from R/
|
- name: Generate TODO list from R/
|
||||||
run: |
|
run: |
|
||||||
|
export TZ=Europe/Amsterdam
|
||||||
|
last_updated=$(date +"%e %B %Y %H:%M:%S %Z" | sed 's/^ *//')
|
||||||
echo "## \`TODO\` Report" > todo.md
|
echo "## \`TODO\` Report" > todo.md
|
||||||
echo "" >> 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 "_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
|
echo "" >> todo.md
|
||||||
todos=$(grep -rn --include=\*.{R,Rmd,yaml,yml,md,css,js} --exclude={todo-tracker.yml,todo.md} "TODO" . || true)
|
todos=$(grep -rn --include=\*.{R,Rmd,yaml,yml,md,css,js} --exclude={todo-tracker.yml,todo.md} "TODO" . || true)
|
||||||
|
|||||||
@@ -0,0 +1,197 @@
|
|||||||
|
# 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 2011–2025 and CLSI 2011–2025 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 (2011–2025) |
|
||||||
|
| `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.0–3.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
|
||||||
|
|
||||||
|
**First, ensure `git` and `gh` are installed** — both are required for the version computation and for pushing changes. Install them if missing before doing anything else:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
which git || apt-get install -y git
|
||||||
|
which gh || apt-get install -y gh
|
||||||
|
# Also ensure all tags are fetched so git describe works
|
||||||
|
git fetch --tags
|
||||||
|
```
|
||||||
|
|
||||||
|
Then 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`** — **only replace line 1** (the `# AMR <version>` heading) with the new version number; do **not** create a new section. `NEWS.md` is a **continuous log** for the entire current `x.y.z.9nnn` development series: all changes since the last stable release accumulate under that single heading. After updating line 1, append the new change as a bullet under the appropriate sub-heading (`### New`, `### Fixes`, or `### Updates`).
|
||||||
|
|
||||||
|
Style rules for `NEWS.md` entries:
|
||||||
|
- Be **extremely concise** — one short line per item
|
||||||
|
- Do **not** end with a full stop (period)
|
||||||
|
- No verbose explanations; just the essential fact
|
||||||
|
|
||||||
|
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.
|
||||||
+6
-5
@@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 3.0.1
|
Version: 3.0.1.9045
|
||||||
Date: 2025-09-20
|
Date: 2026-04-05
|
||||||
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")),
|
||||||
@@ -63,7 +63,8 @@ Suggests:
|
|||||||
tidyselect,
|
tidyselect,
|
||||||
tinytest,
|
tinytest,
|
||||||
vctrs,
|
vctrs,
|
||||||
xml2
|
xml2,
|
||||||
|
usethis
|
||||||
VignetteBuilder: knitr,rmarkdown
|
VignetteBuilder: knitr,rmarkdown
|
||||||
URL: https://amr-for-r.org, https://github.com/msberends/AMR
|
URL: https://amr-for-r.org, https://github.com/msberends/AMR
|
||||||
BugReports: https://github.com/msberends/AMR/issues
|
BugReports: https://github.com/msberends/AMR/issues
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -390,6 +409,12 @@ 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, 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)
|
||||||
|
|||||||
@@ -1,3 +1,56 @@
|
|||||||
|
# AMR 3.0.1.9045
|
||||||
|
|
||||||
|
### New
|
||||||
|
* Support for clinical breakpoints of 2026 of both CLSI and EUCAST, by adding all of their over 5,700 new clinical breakpoints to the `clinical_breakpoints` data set for usage in `as.sir()`. EUCAST 2026 is now the new default guideline for all MIC and disk diffusion interpretations.
|
||||||
|
* 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
|
||||||
|
- Gained argument `add_if_missing` (default: `TRUE`). When set to `FALSE`, rules are only applied to cells that already contain an SIR value; `NA` cells are left untouched. This is useful with `overwrite = TRUE` to update reported results without imputing values for drugs that were not tested (#259)
|
||||||
|
* Function `amr_course()`, which allows for automated download and unpacking of a GitHub repository for e.g. webinar use
|
||||||
|
* 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
|
||||||
|
|
||||||
|
### 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 a bug in plotting MIC values when `keep_operators = "all"`
|
||||||
|
* 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
|
||||||
|
* Extensive `cli` integration for better message handling and clickable links in messages and warnings (#191, #265)
|
||||||
|
* `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
|
# AMR 3.0.1
|
||||||
|
|
||||||
This is a bugfix release following the release of v3.0.0 in June 2025.
|
This is a bugfix release following the release of v3.0.0 in June 2025.
|
||||||
@@ -34,7 +87,7 @@ This is a bugfix release following the release of v3.0.0 in June 2025.
|
|||||||
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).
|
||||||
|
|
||||||
@@ -46,7 +99,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**
|
||||||
|
|||||||
+16
-10
@@ -30,41 +30,47 @@
|
|||||||
# add new version numbers here, and add the rules themselves to "data-raw/eucast_rules.tsv" and clinical_breakpoints
|
# add new version numbers here, and add the rules themselves to "data-raw/eucast_rules.tsv" and clinical_breakpoints
|
||||||
# (sourcing "data-raw/_pre_commit_checks.R" will process the TSV file)
|
# (sourcing "data-raw/_pre_commit_checks.R" will process the TSV file)
|
||||||
EUCAST_VERSION_BREAKPOINTS <- list(
|
EUCAST_VERSION_BREAKPOINTS <- list(
|
||||||
|
"16.0" = list(
|
||||||
|
version_txt = "v16.0",
|
||||||
|
year = 2026,
|
||||||
|
title = "'EUCAST Clinical Breakpoint Tables'",
|
||||||
|
url = "https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/"
|
||||||
|
),
|
||||||
"15.0" = list(
|
"15.0" = 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 +78,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 +98,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/"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+297
-212
@@ -253,12 +253,9 @@ search_type_in_df <- function(x, type, info = TRUE, add_col_prefix = TRUE) {
|
|||||||
# WHONET support
|
# WHONET support
|
||||||
found <- sort(colnames(x)[colnames_formatted %like_case% "^(specimen date|specimen_date|spec_date)"])
|
found <- sort(colnames(x)[colnames_formatted %like_case% "^(specimen date|specimen_date|spec_date)"])
|
||||||
if (!inherits(pm_pull(x, found), c("Date", "POSIXct"))) {
|
if (!inherits(pm_pull(x, found), c("Date", "POSIXct"))) {
|
||||||
stop(
|
stop_("Found column {.field ", font_bold(found), "} to be used as input for {.arg ", ifelse(add_col_prefix, "col_", ""), type,
|
||||||
font_red(paste0(
|
"}, but this column contains no valid dates. Transform its values to valid dates first.",
|
||||||
"Found column '", font_bold(found), "' to be used as input for `", ifelse(add_col_prefix, "col_", ""), type,
|
call = FALSE
|
||||||
"`, but this column contains no valid dates. Transform its values to valid dates first."
|
|
||||||
)),
|
|
||||||
call. = FALSE
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (any(vapply(FUN.VALUE = logical(1), x, function(x) inherits(x, c("Date", "POSIXct"))))) {
|
} else if (any(vapply(FUN.VALUE = logical(1), x, function(x) inherits(x, c("Date", "POSIXct"))))) {
|
||||||
@@ -304,9 +301,9 @@ search_type_in_df <- function(x, type, info = TRUE, add_col_prefix = TRUE) {
|
|||||||
if (!is.null(found)) {
|
if (!is.null(found)) {
|
||||||
# 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_(
|
||||||
"`, but this column does not contain 'logical' values (TRUE/FALSE) and was ignored.",
|
"Column {.field ", font_bold(found), "} found as input for {.arg ", ifelse(add_col_prefix, "col_", ""), type,
|
||||||
add_fn = font_red
|
"}, but this column does not contain {.code TRUE}/{.code FALSE} values and was ignored."
|
||||||
)
|
)
|
||||||
found <- NULL
|
found <- NULL
|
||||||
}
|
}
|
||||||
@@ -317,9 +314,9 @@ search_type_in_df <- function(x, type, info = TRUE, add_col_prefix = TRUE) {
|
|||||||
|
|
||||||
if (!is.null(found) && isTRUE(info)) {
|
if (!is.null(found) && isTRUE(info)) {
|
||||||
if (message_not_thrown_before("search_in_type", type)) {
|
if (message_not_thrown_before("search_in_type", type)) {
|
||||||
msg <- paste0("Using column '", font_bold(found), "' as input for `", ifelse(add_col_prefix, "col_", ""), type, "`.")
|
msg <- paste0("Using column {.field ", font_bold(found), "} as input for {.arg ", ifelse(add_col_prefix, "col_", ""), type, "}.")
|
||||||
if (type %in% c("keyantibiotics", "keyantimicrobials", "specimen")) {
|
if (type %in% c("keyantibiotics", "keyantimicrobials", "specimen")) {
|
||||||
msg <- paste(msg, "Use", font_bold(paste0(ifelse(add_col_prefix, "col_", ""), type), "= FALSE"), "to prevent this.")
|
msg <- paste(msg, "Use {.arg ", paste0(ifelse(add_col_prefix, "col_", ""), type), "= FALSE} to prevent this.")
|
||||||
}
|
}
|
||||||
message_(msg)
|
message_(msg)
|
||||||
}
|
}
|
||||||
@@ -362,9 +359,9 @@ stop_ifnot_installed <- function(package) {
|
|||||||
if (any(!installed) && any(package == "rstudioapi")) {
|
if (any(!installed) && any(package == "rstudioapi")) {
|
||||||
stop("This function only works in RStudio when using R >= 3.2.", call. = FALSE)
|
stop("This function only works in RStudio when using R >= 3.2.", call. = FALSE)
|
||||||
} else if (any(!installed)) {
|
} else if (any(!installed)) {
|
||||||
stop("This requires the ", vector_and(package[!installed]), " package.",
|
stop_(
|
||||||
"\nTry to install with install.packages().",
|
"This requires the ", vector_and(paste0("{.pkg ", package[!installed], "}"), quotes = FALSE), " package.",
|
||||||
call. = FALSE
|
"\nTry to install with {.fun install.packages}."
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return(invisible())
|
return(invisible())
|
||||||
@@ -387,13 +384,18 @@ 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() || !interactive())) {
|
||||||
|
# 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 {
|
||||||
@@ -403,30 +405,136 @@ import_fn <- function(name, pkg, error_on_fail = TRUE) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_cli_rlang <- function() {
|
||||||
|
pkg_is_available("cli", min_version = "3.0.0") && pkg_is_available("rlang", min_version = "1.0.3")
|
||||||
|
}
|
||||||
|
|
||||||
|
highlight_code <- function(code) {
|
||||||
|
if (has_cli_rlang()) {
|
||||||
|
cli::code_highlight(code)
|
||||||
|
} else {
|
||||||
|
code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Format a cli-markup string for output, with a plain-text fallback when cli is
|
||||||
|
# unavailable. Unlike message_() / warning_() / stop_(), this function returns
|
||||||
|
# the formatted string rather than emitting it, so it can be passed to any
|
||||||
|
# output function (e.g. packageStartupMessage()).
|
||||||
|
format_inline_ <- function(...) {
|
||||||
|
msg <- paste0(c(...), collapse = "")
|
||||||
|
if (has_cli_rlang()) {
|
||||||
|
if (!cli::ansi_has_hyperlink_support()) {
|
||||||
|
msg <- simplify_help_markup(msg)
|
||||||
|
}
|
||||||
|
cli::format_inline(msg)
|
||||||
|
} else {
|
||||||
|
cli_to_plain(msg, envir = parent.frame())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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 (has_cli_rlang()) {
|
||||||
|
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
|
||||||
@@ -434,151 +542,112 @@ 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
|
simplify_help_markup <- function(msg) {
|
||||||
if (pkg_is_available("cli") && in_rstudio() &&
|
# {.help [{.fun fn}](pkg::fn)} -> {.code fn()}
|
||||||
tryCatch(getExportedValue("versionInfo", ns = asNamespace("rstudioapi"))()$version > "2023.6.0.0", error = function(e) {
|
# {.help [display](topic)} -> {.code display}
|
||||||
return(FALSE)
|
msg <- gsub(
|
||||||
})) {
|
"\\{\\.help \\[\\{\\.fun ([^}]+)\\}\\]\\([^)]+\\)\\}",
|
||||||
# we are in a recent version of RStudio, so do something nice: add links to our help pages in the console.
|
"{.code \\1()}",
|
||||||
parts <- strsplit(msg, "`", fixed = TRUE)[[1]]
|
msg,
|
||||||
cmds <- parts %in% paste0(ls(envir = asNamespace("AMR")), "()")
|
perl = TRUE
|
||||||
# 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
|
msg <- gsub(
|
||||||
parts[cmds & parts %like% "[.]"] <- font_url(
|
"\\{\\.help \\[([^]]+)\\]\\([^)]+\\)\\}",
|
||||||
url = paste0("ide:help:AMR::", gsub("()", "", parts[cmds & parts %like% "[.]"], fixed = TRUE)),
|
"{.code \\1}",
|
||||||
txt = parts[cmds & parts %like% "[.]"]
|
msg,
|
||||||
)
|
perl = TRUE
|
||||||
# otherwise, give a 'click to run' popup
|
)
|
||||||
parts[cmds & parts %unlike% "[.]"] <- font_url(
|
# {.topic [display](topic)} -> {.code ?display}
|
||||||
url = paste0("ide:run:AMR::", parts[cmds & parts %unlike% "[.]"]),
|
msg <- gsub(
|
||||||
txt = parts[cmds & parts %unlike% "[.]"]
|
"\\{\\.topic \\[([^]]+)\\]\\([^)]+\\)\\}",
|
||||||
)
|
"{.code ?\\1}",
|
||||||
# datasets should give help page as well
|
msg,
|
||||||
parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")] <- font_url(
|
perl = TRUE
|
||||||
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
|
msg
|
||||||
}
|
}
|
||||||
|
|
||||||
message_ <- function(...,
|
message_ <- function(...,
|
||||||
appendLF = TRUE,
|
appendLF = TRUE,
|
||||||
add_fn = list(font_blue),
|
|
||||||
as_note = TRUE) {
|
as_note = TRUE) {
|
||||||
message(
|
if (has_cli_rlang()) {
|
||||||
word_wrap(...,
|
msg <- paste0(c(...), collapse = "")
|
||||||
add_fn = add_fn,
|
if (!cli::ansi_has_hyperlink_support()) {
|
||||||
as_note = as_note
|
msg <- simplify_help_markup(msg)
|
||||||
),
|
}
|
||||||
appendLF = appendLF
|
if (isTRUE(as_note)) {
|
||||||
)
|
cli::cli_inform(c("i" = msg), .envir = parent.frame())
|
||||||
|
} else if (isTRUE(appendLF)) {
|
||||||
|
cli::cli_inform(msg, .envir = parent.frame())
|
||||||
|
} else {
|
||||||
|
# This mirrors what rlang::inform() does internally (cat() to stderr), so it behaves consistently with cli_inform() output
|
||||||
|
cat(format_inline_(msg), file = stderr())
|
||||||
|
}
|
||||||
|
} 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 (has_cli_rlang()) {
|
||||||
trimws2(word_wrap(...,
|
msg <- paste0(c(...), collapse = "")
|
||||||
add_fn = add_fn,
|
if (!cli::ansi_has_hyperlink_support()) {
|
||||||
as_note = FALSE
|
msg <- simplify_help_markup(msg)
|
||||||
)),
|
}
|
||||||
immediate. = immediate,
|
cli::cli_warn(msg, .envir = parent.frame())
|
||||||
call. = call
|
} else {
|
||||||
)
|
plain_msg <- cli_to_plain(paste0(c(...), collapse = ""), envir = parent.frame())
|
||||||
|
warning(trimws2(word_wrap(plain_msg, as_note = FALSE)), immediate. = immediate, 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 (!cli::ansi_has_hyperlink_support()) {
|
||||||
if (!isFALSE(call)) {
|
msg <- simplify_help_markup(msg)
|
||||||
if (isTRUE(call)) {
|
|
||||||
call <- as.character(sys.call(-1)[1])
|
|
||||||
} 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 <- as.character(sys.call(call)[1])
|
|
||||||
}
|
|
||||||
msg_call <- paste0("in ", call, "():")
|
|
||||||
}
|
}
|
||||||
msg <- trimws2(word_wrap(msg, add_fn = list(), as_note = FALSE))
|
if (has_cli_rlang()) {
|
||||||
if (!is.null(AMR_env$cli_abort) && length(unlist(strsplit(msg, "\n", fixed = TRUE))) <= 1) {
|
if (isTRUE(call)) {
|
||||||
if (is.character(call)) {
|
call_obj <- sys.call(-1)
|
||||||
call <- as.call(str2lang(paste0(call, "()")))
|
} else if (!isFALSE(call)) {
|
||||||
|
call_obj <- sys.call(call)
|
||||||
} else {
|
} else {
|
||||||
call <- NULL
|
call_obj <- NULL
|
||||||
}
|
}
|
||||||
AMR_env$cli_abort(msg, call = call)
|
cli::cli_abort(msg, call = call_obj, .envir = parent.frame())
|
||||||
} 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -621,7 +690,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
|
||||||
@@ -682,51 +751,71 @@ format_included_data_number <- function(data) {
|
|||||||
paste0(ifelse(rounder == 0, "", "~"), format(round(n, rounder), decimal.mark = ".", big.mark = " "))
|
paste0(ifelse(rounder == 0, "", "~"), format(round(n, rounder), decimal.mark = ".", big.mark = " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
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 ", documentation = FALSE) {
|
||||||
# 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)
|
||||||
}
|
}
|
||||||
if (isTRUE(quotes)) {
|
if (isTRUE(quotes)) {
|
||||||
quotes <- '"'
|
if (isTRUE(documentation)) {
|
||||||
|
quotes <- c("`\"", "\"`")
|
||||||
|
} else {
|
||||||
|
# use cli to format as values
|
||||||
|
quotes <- c("{.val ", "}")
|
||||||
|
}
|
||||||
} else if (isFALSE(quotes)) {
|
} else if (isFALSE(quotes)) {
|
||||||
quotes <- ""
|
quotes <- ""
|
||||||
} else {
|
} else {
|
||||||
quotes <- quotes[1L]
|
quotes <- quotes[1L]
|
||||||
}
|
}
|
||||||
|
if (length(quotes) == 1) {
|
||||||
|
quotes <- c(quotes, quotes)
|
||||||
|
}
|
||||||
if (isTRUE(initial_captital)) {
|
if (isTRUE(initial_captital)) {
|
||||||
v[1] <- gsub("^([a-z])", "\\U\\1", v[1], perl = TRUE)
|
v[1] <- gsub("^([a-z])", "\\U\\1", v[1], perl = TRUE)
|
||||||
}
|
}
|
||||||
if (length(v) <= 1) {
|
if (length(v) <= 1) {
|
||||||
return(paste0(quotes, v, quotes))
|
return(paste0(quotes[1], v, quotes[2]))
|
||||||
}
|
}
|
||||||
if (identical(v, c("I", "R", "S"))) {
|
if (identical(v, c("I", "R", "S"))) {
|
||||||
# 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[1], v, quotes[2])
|
||||||
|
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)]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
vector_and <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_captital = FALSE) {
|
vector_and <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_captital = FALSE, documentation = FALSE) {
|
||||||
vector_or(
|
vector_or(
|
||||||
v = v, quotes = quotes, reverse = reverse, sort = sort,
|
v = v, quotes = quotes, reverse = reverse, sort = sort,
|
||||||
initial_captital = initial_captital, last_sep = " and "
|
initial_captital = initial_captital, documentation = documentation,
|
||||||
|
last_sep = " and "
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -746,7 +835,7 @@ format_class <- function(class, plural = FALSE) {
|
|||||||
ifelse(plural, "s", "")
|
ifelse(plural, "s", "")
|
||||||
)
|
)
|
||||||
# exceptions
|
# exceptions
|
||||||
class[class == "logical"] <- ifelse(plural, "a vector of `TRUE`/`FALSE`", "`TRUE` or `FALSE`")
|
class[class == "logical"] <- ifelse(plural, "a vector of {.code TRUE}/{.code FALSE}", "{.code TRUE} or {.code FALSE}")
|
||||||
class[class == "data.frame"] <- "a data set"
|
class[class == "data.frame"] <- "a data set"
|
||||||
if ("list" %in% class) {
|
if ("list" %in% class) {
|
||||||
class <- "a list"
|
class <- "a list"
|
||||||
@@ -755,12 +844,12 @@ format_class <- function(class, plural = FALSE) {
|
|||||||
class <- "a matrix"
|
class <- "a matrix"
|
||||||
}
|
}
|
||||||
if ("custom_eucast_rules" %in% class) {
|
if ("custom_eucast_rules" %in% class) {
|
||||||
class <- "input created with `custom_eucast_rules()`"
|
class <- "input created with {.fun custom_eucast_rules}"
|
||||||
}
|
}
|
||||||
if (any(c("mo", "ab", "sir") %in% class)) {
|
if (any(c("mo", "ab", "sir") %in% class)) {
|
||||||
class <- paste0("of class '", class[1L], "'")
|
class <- paste0("of class {.cls ", class[1L], "}")
|
||||||
}
|
}
|
||||||
class[class == class.bak] <- paste0("of class '", class[class == class.bak], "'")
|
class[class == class.bak] <- paste0("of class {.cls ", class[class == class.bak], "}")
|
||||||
# output
|
# output
|
||||||
vector_or(class, quotes = FALSE, sort = FALSE)
|
vector_or(class, quotes = FALSE, sort = FALSE)
|
||||||
}
|
}
|
||||||
@@ -795,11 +884,11 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
|
|||||||
AMR_env$meet_criteria_error_txt <- NULL
|
AMR_env$meet_criteria_error_txt <- NULL
|
||||||
|
|
||||||
if (is.null(object)) {
|
if (is.null(object)) {
|
||||||
stop_if(allow_NULL == FALSE, "argument `", obj_name, "` must not be NULL", call = call_depth)
|
stop_if(allow_NULL == FALSE, "argument {.arg ", obj_name, "} must not be NULL", call = call_depth)
|
||||||
return(invisible())
|
return(invisible())
|
||||||
}
|
}
|
||||||
if (is.null(dim(object)) && length(object) == 1 && suppressWarnings(is.na(object))) { # suppressWarnings for functions
|
if (is.null(dim(object)) && length(object) == 1 && suppressWarnings(is.na(object))) { # suppressWarnings for functions
|
||||||
stop_if(allow_NA == FALSE, "argument `", obj_name, "` must not be NA", call = call_depth)
|
stop_if(allow_NA == FALSE, "argument {.arg ", obj_name, "} must not be NA", call = call_depth)
|
||||||
return(invisible())
|
return(invisible())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -809,32 +898,32 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!is.null(allow_class) && !(suppressWarnings(all(is.na(object))) && allow_NA == TRUE)) {
|
if (!is.null(allow_class) && !(suppressWarnings(all(is.na(object))) && allow_NA == TRUE)) {
|
||||||
stop_ifnot(inherits(object, allow_class), "argument `", obj_name,
|
stop_ifnot(inherits(object, allow_class), "argument {.arg ", obj_name,
|
||||||
"` must be ", format_class(allow_class, plural = isTRUE(has_length > 1)),
|
"} must be ", format_class(allow_class, plural = isTRUE(has_length > 1)),
|
||||||
", i.e. not be ", format_class(class(object), plural = isTRUE(has_length > 1)),
|
", i.e. not be ", format_class(class(object), plural = isTRUE(has_length > 1)),
|
||||||
call = call_depth
|
call = call_depth
|
||||||
)
|
)
|
||||||
# check data.frames for data
|
# check data.frames for data
|
||||||
if (inherits(object, "data.frame")) {
|
if (inherits(object, "data.frame")) {
|
||||||
stop_if(any(dim(object) == 0),
|
stop_if(any(dim(object) == 0),
|
||||||
"the data provided in argument `", obj_name,
|
"the data provided in argument {.arg ", obj_name,
|
||||||
"` must contain rows and columns (current dimensions: ",
|
"} must contain rows and columns (current dimensions: ",
|
||||||
paste(dim(object), collapse = "x"), ")",
|
paste(dim(object), collapse = "x"), ")",
|
||||||
call = call_depth
|
call = call_depth
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!is.null(has_length)) {
|
if (!is.null(has_length)) {
|
||||||
stop_ifnot(length(object) %in% has_length, "argument `", obj_name,
|
stop_ifnot(length(object) %in% has_length, "argument {.arg ", obj_name,
|
||||||
"` must ", # ifelse(allow_NULL, "be NULL or must ", ""),
|
"} must ", # ifelse(allow_NULL, "be NULL or must ", ""),
|
||||||
"be of length ", vector_or(has_length, quotes = FALSE),
|
"be of length ", vector_or(has_length, quotes = FALSE),
|
||||||
", not ", length(object),
|
", not ", length(object),
|
||||||
call = call_depth
|
call = call_depth
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (!is.null(looks_like)) {
|
if (!is.null(looks_like)) {
|
||||||
stop_ifnot(object %like% looks_like, "argument `", obj_name,
|
stop_ifnot(object %like% looks_like, "argument {.arg ", obj_name,
|
||||||
"` must ", # ifelse(allow_NULL, "be NULL or must ", ""),
|
"} must ", # ifelse(allow_NULL, "be NULL or must ", ""),
|
||||||
"resemble the regular expression \"", looks_like, "\"",
|
"resemble the regular expression \"", looks_like, "\"",
|
||||||
call = call_depth
|
call = call_depth
|
||||||
)
|
)
|
||||||
@@ -852,7 +941,7 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
|
|||||||
if ("logical" %in% allow_class) {
|
if ("logical" %in% allow_class) {
|
||||||
or_values <- paste0(or_values, ", or TRUE or FALSE")
|
or_values <- paste0(or_values, ", or TRUE or FALSE")
|
||||||
}
|
}
|
||||||
stop_ifnot(all(object %in% is_in.bak, na.rm = TRUE), "argument `", obj_name, "` ",
|
stop_ifnot(all(object %in% is_in.bak, na.rm = TRUE), "argument {.arg ", obj_name, "} ",
|
||||||
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
||||||
"must be either ",
|
"must be either ",
|
||||||
"must only contain values "
|
"must only contain values "
|
||||||
@@ -863,8 +952,8 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (isTRUE(is_positive)) {
|
if (isTRUE(is_positive)) {
|
||||||
stop_if(is.numeric(object) && !all(object > 0, na.rm = TRUE), "argument `", obj_name,
|
stop_if(is.numeric(object) && !all(object > 0, na.rm = TRUE), "argument {.arg ", obj_name,
|
||||||
"` must ",
|
"} must ",
|
||||||
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
||||||
"be a number higher than zero",
|
"be a number higher than zero",
|
||||||
"all be numbers higher than zero"
|
"all be numbers higher than zero"
|
||||||
@@ -873,8 +962,8 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (isTRUE(is_positive_or_zero)) {
|
if (isTRUE(is_positive_or_zero)) {
|
||||||
stop_if(is.numeric(object) && !all(object >= 0, na.rm = TRUE), "argument `", obj_name,
|
stop_if(is.numeric(object) && !all(object >= 0, na.rm = TRUE), "argument {.arg ", obj_name,
|
||||||
"` must ",
|
"} must ",
|
||||||
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
||||||
"be zero or a positive number",
|
"be zero or a positive number",
|
||||||
"all be zero or numbers higher than zero"
|
"all be zero or numbers higher than zero"
|
||||||
@@ -883,8 +972,8 @@ meet_criteria <- function(object, # can be literally `list(...)` for `allow_argu
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (isTRUE(is_finite)) {
|
if (isTRUE(is_finite)) {
|
||||||
stop_if(is.numeric(object) && !all(is.finite(object[!is.na(object)]), na.rm = TRUE), "argument `", obj_name,
|
stop_if(is.numeric(object) && !all(is.finite(object[!is.na(object)]), na.rm = TRUE), "argument {.arg ", obj_name,
|
||||||
"` must ",
|
"} must ",
|
||||||
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
ifelse(!is.null(has_length) && length(has_length) == 1 && has_length == 1,
|
||||||
"be a finite number",
|
"be a finite number",
|
||||||
"all be finite numbers"
|
"all be finite numbers"
|
||||||
@@ -918,9 +1007,9 @@ ascertain_sir_classes <- function(x, obj_name) {
|
|||||||
sirs <- vapply(FUN.VALUE = logical(1), x, is.sir)
|
sirs <- vapply(FUN.VALUE = logical(1), x, is.sir)
|
||||||
if (!any(sirs, na.rm = TRUE)) {
|
if (!any(sirs, na.rm = TRUE)) {
|
||||||
warning_(
|
warning_(
|
||||||
"the data provided in argument `", obj_name,
|
"the data provided in argument {.arg ", 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 {.cls sir}. Eligible SIR columns 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)
|
||||||
@@ -966,8 +1055,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)
|
||||||
@@ -1017,13 +1111,13 @@ get_current_data <- function(arg_name, call) {
|
|||||||
} else {
|
} else {
|
||||||
examples <- ""
|
examples <- ""
|
||||||
}
|
}
|
||||||
stop_("this function must be used inside a `dplyr` verb or `data.frame` call",
|
stop_("this function must be used inside a {.pkg dplyr} verb or {.cls data.frame} call",
|
||||||
examples,
|
examples,
|
||||||
call = call
|
call = call
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
# mimic a base R error that the argument is missing
|
# mimic a base R error that the argument is missing
|
||||||
stop_("argument `", arg_name, "` is missing with no default", call = call)
|
stop_("argument {.arg ", arg_name, "} is missing with no default", call = call)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,24 +1131,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
|
||||||
}
|
}
|
||||||
@@ -1108,11 +1186,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)
|
||||||
@@ -1222,10 +1303,14 @@ try_colour <- function(..., before, after, collapse = " ") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is_dark <- function() {
|
is_dark <- function() {
|
||||||
AMR_env$current_theme <- tryCatch(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$editor, error = function(e) NULL)
|
AMR_env$current_theme <- NULL
|
||||||
|
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)) {
|
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$former_theme <- AMR_env$current_theme
|
||||||
AMR_env$is_dark_theme <- !has_colour() || tryCatch(isTRUE(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$dark), error = function(e) TRUE)
|
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)
|
||||||
}
|
}
|
||||||
@@ -1620,13 +1705,13 @@ get_n_cores <- function(max_cores = Inf) {
|
|||||||
|
|
||||||
# Support `where()` if tidyselect not installed ----
|
# Support `where()` if tidyselect not installed ----
|
||||||
if (!is.null(import_fn("where", "tidyselect", error_on_fail = FALSE))) {
|
if (!is.null(import_fn("where", "tidyselect", error_on_fail = FALSE))) {
|
||||||
# tidyselect::where() exists, load the namespace to make `where()`s work across the package in default arguments
|
# tidyselect::where() exists, retrieve from their namespace to make `where()`s work across the package in default arguments
|
||||||
loadNamespace("tidyselect")
|
where <- tidyselect::where
|
||||||
} else {
|
} else {
|
||||||
where <- function(fn) {
|
where <- function(fn) {
|
||||||
# based on https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
|
# based on https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
|
||||||
if (!is.function(fn)) {
|
if (!is.function(fn)) {
|
||||||
stop_("`", deparse(substitute(fn)), "()` is not a valid predicate function.")
|
stop_("{.fun ", deparse(substitute(fn)), "} is not a valid predicate function.")
|
||||||
}
|
}
|
||||||
df <- pm_select_env$.data
|
df <- pm_select_env$.data
|
||||||
cols <- pm_select_env$get_colnames()
|
cols <- pm_select_env$get_colnames()
|
||||||
@@ -1641,7 +1726,7 @@ if (!is.null(import_fn("where", "tidyselect", error_on_fail = FALSE))) {
|
|||||||
},
|
},
|
||||||
fn
|
fn
|
||||||
))
|
))
|
||||||
if (!is.logical(preds)) stop_("`where()` must be used with functions that return `TRUE` or `FALSE`.")
|
if (!is.logical(preds)) stop_("{.fun where} must be used with functions that return {.code TRUE} or {.code FALSE}.")
|
||||||
data_cols <- cols
|
data_cols <- cols
|
||||||
cols <- data_cols[preds]
|
cols <- data_cols[preds]
|
||||||
which(data_cols %in% cols)
|
which(data_cols %in% cols)
|
||||||
|
|||||||
+17
-5
@@ -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.
|
||||||
#'
|
#'
|
||||||
|
|||||||
@@ -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,12 +191,13 @@ 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)]
|
||||||
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
|
previously_coerced_mention <- !is.na(x) & 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)) {
|
if (any(previously_coerced_mention) && isTRUE(info) && message_not_thrown_before("as.ab", entire_session = TRUE)) {
|
||||||
|
only_one <- length(unique(which(x[which(previously_coerced)] %in% x_bak_clean))) == 1
|
||||||
message_(
|
message_(
|
||||||
"Returning previously coerced ",
|
"Returning ", ifelse(only_one, "a ", ""), "previously coerced ",
|
||||||
ifelse(length(unique(which(x[which(previously_coerced)] %in% x_bak_clean))) > 1, "value for an antimicrobial", "values for various antimicrobials"),
|
ifelse(only_one, "value for an antimicrobial", "values for various antimicrobials"),
|
||||||
". Run `ab_reset_session()` to reset this. This note will be shown once per session."
|
". Run {.help [{.fun ab_reset_session}](AMR::ab_reset_session)} to reset this. This note will be shown once per session."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +211,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
|
|||||||
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)) {
|
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 `as.ab()`: some input seems to resemble antiviral drugs - use `as.av()` or e.g. `av_name()` for these, not `as.ab()` or e.g. `ab_name()`.")
|
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)}.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,7 +445,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
|
|||||||
# take failed ATC codes apart from rest
|
# take failed ATC codes apart from rest
|
||||||
if (length(x_unknown_ATCs) > 0 && fast_mode == FALSE) {
|
if (length(x_unknown_ATCs) > 0 && fast_mode == FALSE) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `as.ab()`: these ATC codes are not (yet) in the antimicrobials data set: ",
|
"in {.help [{.fun as.ab}](AMR::as.ab)}: these ATC codes are not (yet) in the antimicrobials data set: ",
|
||||||
vector_and(x_unknown_ATCs), "."
|
vector_and(x_unknown_ATCs), "."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -451,12 +459,14 @@ 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()`: ", ifelse(length(unique(x_unknown)) == 1, "this value", "these values"), " could not be coerced to a valid antimicrobial ID: ",
|
"in {.help [{.fun as.ab}](AMR::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), "."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Throw note about uncertainties
|
# Throw note about uncertainties
|
||||||
|
x_uncertain <- x_uncertain[!is.na(x_uncertain)]
|
||||||
|
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[!is.na(AMR_env$ab_previously_coerced$x), ]
|
||||||
if (isTRUE(info) && length(x_uncertain) > 0 && fast_mode == FALSE) {
|
if (isTRUE(info) && length(x_uncertain) > 0 && fast_mode == FALSE) {
|
||||||
x_uncertain <- unique(x_uncertain)
|
x_uncertain <- unique(x_uncertain)
|
||||||
if (message_not_thrown_before("as.ab", "uncertainties", x_bak)) {
|
if (message_not_thrown_before("as.ab", "uncertainties", x_bak)) {
|
||||||
@@ -474,7 +484,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
|
|||||||
}
|
}
|
||||||
message_(
|
message_(
|
||||||
"Antimicrobial translation was uncertain for ", examples,
|
"Antimicrobial translation was uncertain for ", examples,
|
||||||
". If required, use `add_custom_antimicrobials()` to add custom entries."
|
". If required, use {.help [{.fun add_custom_antimicrobials}](AMR::add_custom_antimicrobials)} to add custom entries."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -507,11 +517,19 @@ 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, ...) {
|
||||||
out <- trimws(format(x))
|
out <- trimws(format(x))
|
||||||
out[is.na(x)] <- font_na(NA)
|
out[is.na(x)] <- pillar::style_na(NA)
|
||||||
|
|
||||||
# add the names to the drugs as mouse-over!
|
# add the names to the drugs as mouse-over!
|
||||||
if (in_rstudio()) {
|
if (in_rstudio()) {
|
||||||
@@ -536,16 +554,27 @@ type_sum.ab <- function(x, ...) {
|
|||||||
print.ab <- function(x, ...) {
|
print.ab <- function(x, ...) {
|
||||||
if (!is.null(attributes(x)$amr_selector)) {
|
if (!is.null(attributes(x)$amr_selector)) {
|
||||||
function_name <- attributes(x)$amr_selector
|
function_name <- attributes(x)$amr_selector
|
||||||
message_(
|
if (has_cli_rlang()) {
|
||||||
"This 'ab' vector was retrieved using `", function_name, "()`, which should normally be used inside a `dplyr` verb or `data.frame` call, e.g.:\n",
|
cli::cli_inform(c(
|
||||||
" ", AMR_env$bullet_icon, " your_data %>% select(", function_name, "())\n",
|
"i" = paste0("This {.cls ab} vector was retrieved using {.fun ", function_name, "}, which should normally be used inside a {.pkg dplyr} verb or {.cls data.frame} call, e.g.:"),
|
||||||
" ", AMR_env$bullet_icon, " your_data %>% select(column_a, column_b, ", function_name, "())\n",
|
paste0("\u00a0\u00a0", AMR_env$bullet_icon, " ", highlight_code(paste0("your_data %>% select(", function_name, "())"))),
|
||||||
" ", AMR_env$bullet_icon, " your_data %>% filter(any(", function_name, "() == \"R\"))\n",
|
paste0("\u00a0\u00a0", AMR_env$bullet_icon, " ", highlight_code(paste0("your_data %>% select(column_a, column_b, ", function_name, "())"))),
|
||||||
" ", AMR_env$bullet_icon, " your_data[, ", function_name, "()]\n",
|
paste0("\u00a0\u00a0", AMR_env$bullet_icon, " ", highlight_code(paste0("your_data %>% filter(any(", function_name, "() == \"R\"))"))),
|
||||||
" ", AMR_env$bullet_icon, " your_data[, c(\"column_a\", \"column_b\", ", function_name, "())]"
|
paste0("\u00a0\u00a0", AMR_env$bullet_icon, " ", highlight_code(paste0("your_data[, ", function_name, "()]"))),
|
||||||
)
|
paste0("\u00a0\u00a0", AMR_env$bullet_icon, " ", highlight_code(paste0("your_data[, c(\"column_a\", \"column_b\", ", function_name, "())]")))
|
||||||
|
))
|
||||||
|
} else {
|
||||||
|
message(word_wrap(paste0(
|
||||||
|
"This 'ab' vector was retrieved using `", function_name, "()`, which should normally be used inside a dplyr verb or data.frame call, e.g.:\n",
|
||||||
|
"\u00a0\u00a0", AMR_env$bullet_icon, " your_data %>% select(", function_name, "())\n",
|
||||||
|
"\u00a0\u00a0", AMR_env$bullet_icon, " your_data %>% select(column_a, column_b, ", function_name, "())\n",
|
||||||
|
"\u00a0\u00a0", AMR_env$bullet_icon, " your_data %>% filter(any(", function_name, "() == \"R\"))\n",
|
||||||
|
"\u00a0\u00a0", AMR_env$bullet_icon, " your_data[, ", function_name, "()]\n",
|
||||||
|
"\u00a0\u00a0", AMR_env$bullet_icon, " your_data[, c(\"column_a\", \"column_b\", ", function_name, "())]"
|
||||||
|
), as_note = TRUE))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cat("Class 'ab'\n")
|
cat(format_inline_("Class {.cls ab}\n"))
|
||||||
print(as.character(x), quote = FALSE)
|
print(as.character(x), quote = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,8 +718,8 @@ get_translate_ab <- function(translate_ab) {
|
|||||||
} else {
|
} else {
|
||||||
translate_ab <- tolower(translate_ab)
|
translate_ab <- tolower(translate_ab)
|
||||||
stop_ifnot(translate_ab %in% colnames(AMR::antimicrobials),
|
stop_ifnot(translate_ab %in% colnames(AMR::antimicrobials),
|
||||||
"invalid value for 'translate_ab', this must be a column name of the `antimicrobials` data set\n",
|
"invalid value for {.arg translate_ab}, this must be a column name of the {.help [antimicrobials](AMR::antimicrobials)} data set\n",
|
||||||
"or `TRUE` (equals 'name') or `FALSE` to not translate at all.",
|
"or {.code TRUE} (equals {.val name}) or {.code FALSE} to not translate at all.",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
translate_ab
|
translate_ab
|
||||||
|
|||||||
+1
-1
@@ -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 {.val drug}, {.val dose} or {.val administration}")
|
||||||
}
|
}
|
||||||
|
|
||||||
# collapse text if needed
|
# collapse text if needed
|
||||||
|
|||||||
+31
-9
@@ -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
|
||||||
@@ -243,7 +265,7 @@ ab_ddd <- function(x, administration = "oral", ...) {
|
|||||||
|
|
||||||
if (any(ab_name(x, language = NULL) %like% "/" & is.na(out))) {
|
if (any(ab_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `ab_ddd()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
"in {.help [{.fun ab_ddd}](AMR::ab_ddd)}: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||||
"Please refer to the WHOCC website:\n",
|
"Please refer to the WHOCC website:\n",
|
||||||
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
||||||
)
|
)
|
||||||
@@ -263,7 +285,7 @@ ab_ddd_units <- function(x, administration = "oral", ...) {
|
|||||||
|
|
||||||
if (any(ab_name(x, language = NULL) %like% "/" & is.na(out))) {
|
if (any(ab_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `ab_ddd_units()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
"in {.help [{.fun ab_ddd_units}](AMR::ab_ddd_units)}: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||||
"Please refer to the WHOCC website:\n",
|
"Please refer to the WHOCC website:\n",
|
||||||
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
||||||
)
|
)
|
||||||
@@ -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),
|
||||||
@@ -319,12 +341,12 @@ ab_url <- function(x, open = FALSE, ...) {
|
|||||||
|
|
||||||
NAs <- ab_name(ab, tolower = TRUE, language = NULL)[!is.na(ab) & is.na(atcs)]
|
NAs <- ab_name(ab, tolower = TRUE, language = NULL)[!is.na(ab) & is.na(atcs)]
|
||||||
if (length(NAs) > 0) {
|
if (length(NAs) > 0) {
|
||||||
warning_("in `ab_url()`: no ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
warning_("in {.fun ab_url}: no ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (open == TRUE) {
|
if (open == TRUE) {
|
||||||
if (length(u) > 1 && !is.na(u[1L])) {
|
if (length(u) > 1 && !is.na(u[1L])) {
|
||||||
warning_("in `ab_url()`: only the first URL will be opened, as `browseURL()` only suports one string.")
|
warning_("in {.fun ab_url}: only the first URL will be opened, as {.fun browseURL} only suports one string.")
|
||||||
}
|
}
|
||||||
if (!is.na(u[1L])) {
|
if (!is.na(u[1L])) {
|
||||||
utils::browseURL(u[1L])
|
utils::browseURL(u[1L])
|
||||||
@@ -375,7 +397,7 @@ set_ab_names <- function(data, ..., property = "name", language = get_AMR_locale
|
|||||||
}
|
}
|
||||||
vars <- get_column_abx(df, info = FALSE, only_sir_columns = FALSE, sort = FALSE, fn = "set_ab_names")
|
vars <- get_column_abx(df, info = FALSE, only_sir_columns = FALSE, sort = FALSE, fn = "set_ab_names")
|
||||||
if (length(vars) == 0) {
|
if (length(vars) == 0) {
|
||||||
message_("No columns with antibiotic results found for `set_ab_names()`, leaving names unchanged.")
|
message_("No columns with antibiotic results found for {.fun set_ab_names}, leaving names unchanged.")
|
||||||
return(data)
|
return(data)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -402,7 +424,7 @@ set_ab_names <- function(data, ..., property = "name", language = get_AMR_locale
|
|||||||
)
|
)
|
||||||
if (any(x %in% c("", NA))) {
|
if (any(x %in% c("", NA))) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `set_ab_names()`: no ", property, " found for column(s): ",
|
"in {.help [{.fun set_ab_names}](AMR::set_ab_names)}: no ", property, " found for column(s): ",
|
||||||
vector_and(vars[x %in% c("", NA)], sort = FALSE)
|
vector_and(vars[x %in% c("", NA)], sort = FALSE)
|
||||||
)
|
)
|
||||||
x[x %in% c("", NA)] <- vars[x %in% c("", NA)]
|
x[x %in% c("", NA)] <- vars[x %in% c("", NA)]
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
|||||||
} else if (length(reference) == 1) {
|
} else if (length(reference) == 1) {
|
||||||
reference <- rep(reference, length(x))
|
reference <- rep(reference, length(x))
|
||||||
} else {
|
} else {
|
||||||
stop_("`x` and `reference` must be of same length, or `reference` must be of length 1.")
|
stop_("{.arg x} and {.arg reference} must be of same length, or {.arg reference} must be of length 1.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x <- as.POSIXlt(x, ...)
|
x <- as.POSIXlt(x, ...)
|
||||||
@@ -109,10 +109,10 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
|||||||
|
|
||||||
if (any(ages < 0, na.rm = TRUE)) {
|
if (any(ages < 0, na.rm = TRUE)) {
|
||||||
ages[!is.na(ages) & ages < 0] <- NA
|
ages[!is.na(ages) & ages < 0] <- NA
|
||||||
warning_("in `age()`: NAs introduced for ages below 0.")
|
warning_("in {.fun age}: NAs introduced for ages below 0.")
|
||||||
}
|
}
|
||||||
if (any(ages > 120, na.rm = TRUE)) {
|
if (any(ages > 120, na.rm = TRUE)) {
|
||||||
warning_("in `age()`: some ages are above 120.")
|
warning_("in {.fun age}: some ages are above 120.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isTRUE(na.rm)) {
|
if (isTRUE(na.rm)) {
|
||||||
@@ -191,7 +191,7 @@ age_groups <- function(x, split_at = c(0, 12, 25, 55, 75), names = NULL, na.rm =
|
|||||||
|
|
||||||
if (any(x < 0, na.rm = TRUE)) {
|
if (any(x < 0, na.rm = TRUE)) {
|
||||||
x[x < 0] <- NA
|
x[x < 0] <- NA
|
||||||
warning_("in `age_groups()`: NAs introduced for ages below 0.")
|
warning_("in {.fun age_groups}: NAs introduced for ages below 0.")
|
||||||
}
|
}
|
||||||
if (is.character(split_at)) {
|
if (is.character(split_at)) {
|
||||||
split_at <- split_at[1L]
|
split_at <- split_at[1L]
|
||||||
@@ -211,7 +211,7 @@ age_groups <- function(x, split_at = c(0, 12, 25, 55, 75), names = NULL, na.rm =
|
|||||||
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 {.arg split_at}.") # only 0 is available
|
||||||
|
|
||||||
# turn input values to 'split_at' indices
|
# turn input values to 'split_at' indices
|
||||||
y <- x
|
y <- x
|
||||||
@@ -228,7 +228,7 @@ age_groups <- function(x, split_at = c(0, 12, 25, 55, 75), names = NULL, na.rm =
|
|||||||
agegroups <- factor(lbls[y], levels = lbls, ordered = TRUE)
|
agegroups <- factor(lbls[y], levels = lbls, ordered = TRUE)
|
||||||
|
|
||||||
if (!is.null(names)) {
|
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)), ").")
|
stop_ifnot(length(names) == length(levels(agegroups)), "{.arg names} must have the same length as the number of age groups (", length(levels(agegroups)), ").")
|
||||||
levels(agegroups) <- names
|
levels(agegroups) <- names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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, ...)
|
||||||
|
}
|
||||||
+58
-22
@@ -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, ...) {
|
||||||
@@ -646,7 +678,7 @@ not_intrinsic_resistant <- function(only_sir_columns = FALSE, col_mo = NULL, ver
|
|||||||
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)])]
|
||||||
if (length(agents) > 0 &&
|
if (length(agents) > 0 &&
|
||||||
message_not_thrown_before("not_intrinsic_resistant", sort(agents))) {
|
message_not_thrown_before("not_intrinsic_resistant", sort(agents))) {
|
||||||
agents_formatted <- paste0("'", font_bold(agents, collapse = NULL), "'")
|
agents_formatted <- paste0("{.field ", font_bold(agents, collapse = NULL), "}")
|
||||||
agents_names <- ab_name(names(agents), tolower = TRUE, language = NULL)
|
agents_names <- ab_name(names(agents), tolower = TRUE, language = NULL)
|
||||||
need_name <- generalise_antibiotic_name(agents) != generalise_antibiotic_name(agents_names)
|
need_name <- generalise_antibiotic_name(agents) != generalise_antibiotic_name(agents_names)
|
||||||
agents_formatted[need_name] <- paste0(agents_formatted[need_name], " (", agents_names[need_name], ")")
|
agents_formatted[need_name] <- paste0(agents_formatted[need_name], " (", agents_names[need_name], ")")
|
||||||
@@ -685,12 +717,12 @@ 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")) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `", function_name, "()`: some drugs were ignored since they cannot be used for treatment: ",
|
"in {.help [{.fun ", function_name, "}](AMR::", function_name, ")}: some drugs were ignored since they cannot be used for treatment: ",
|
||||||
vector_and(
|
vector_and(
|
||||||
ab_name(names(ab_in_data)[names(ab_in_data) %in% untreatable],
|
ab_name(names(ab_in_data)[names(ab_in_data) %in% untreatable],
|
||||||
language = NULL,
|
language = NULL,
|
||||||
@@ -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_") {
|
||||||
@@ -761,14 +797,14 @@ amr_select_exec <- function(function_name,
|
|||||||
if (only_treatable == TRUE) {
|
if (only_treatable == TRUE) {
|
||||||
if (message_not_thrown_before(function_name, "amr_class", "untreatable")) {
|
if (message_not_thrown_before(function_name, "amr_class", "untreatable")) {
|
||||||
message_(
|
message_(
|
||||||
"in `", function_name, "()`: ",
|
"in {.help [{.fun ", function_name, "}](AMR::", function_name, ")}: ",
|
||||||
vector_and(
|
vector_and(
|
||||||
paste0(
|
paste0(
|
||||||
ab_name(abx[abx %in% untreatable],
|
ab_name(abx[abx %in% untreatable],
|
||||||
language = NULL,
|
language = NULL,
|
||||||
tolower = TRUE
|
tolower = TRUE
|
||||||
),
|
),
|
||||||
" (`", abx[abx %in% untreatable], "`)"
|
" ({.field ", font_bold(abx[abx %in% untreatable], collapse = NULL), "})"
|
||||||
),
|
),
|
||||||
quotes = FALSE,
|
quotes = FALSE,
|
||||||
sort = TRUE,
|
sort = TRUE,
|
||||||
@@ -801,10 +837,10 @@ 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 {.arg with = FALSE}, see our examples at {.help [{.fun amr_selector}](AMR::amr_selector)}.",
|
||||||
immediate = TRUE
|
immediate = TRUE
|
||||||
)
|
)
|
||||||
cat("Class 'amr_selector'\n")
|
cat(format_inline_("Class {.cls amr_selector}\n"))
|
||||||
print(as.character(x), quote = FALSE)
|
print(as.character(x), quote = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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(paste0("{.field ", font_bold(cols_ab, collapse = NULL), "}"), quotes = FALSE), " to only contain values ", vector_or(VALID_SIR_LEVELS))
|
||||||
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)
|
||||||
@@ -901,7 +937,7 @@ any.amr_selector_any_all <- function(..., na.rm = FALSE) {
|
|||||||
if (length(e1) > 1) {
|
if (length(e1) > 1) {
|
||||||
message_(
|
message_(
|
||||||
"Assuming a filter on ", type, " ", length(e1), " ", gsub("[\\(\\)]", "", fn_name),
|
"Assuming a filter on ", type, " ", length(e1), " ", gsub("[\\(\\)]", "", fn_name),
|
||||||
". Wrap around `all()` or `any()` to prevent this note."
|
". Wrap around {.fun all} or {.fun any} to prevent this note."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -926,12 +962,12 @@ any.amr_selector_any_all <- function(..., na.rm = FALSE) {
|
|||||||
if (length(e1) > 1) {
|
if (length(e1) > 1) {
|
||||||
message_(
|
message_(
|
||||||
"Assuming a filter on ", type, " ", length(e1), " ", gsub("[\\(\\)]", "", fn_name),
|
"Assuming a filter on ", type, " ", length(e1), " ", gsub("[\\(\\)]", "", fn_name),
|
||||||
". Wrap around `all()` or `any()` to prevent this note."
|
". Wrap around {.fun all} or {.fun any} to prevent this note."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# 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") {
|
||||||
@@ -1035,12 +1071,12 @@ message_agent_names <- function(function_name, agents, ab_group = NULL, examples
|
|||||||
message_("No antimicrobial drugs of class '", ab_group, "' found", examples, ".")
|
message_("No antimicrobial drugs of class '", ab_group, "' found", examples, ".")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
agents_formatted <- paste0("'", font_bold(agents, collapse = NULL), "'")
|
agents_formatted <- paste0("{.field ", font_bold(agents, collapse = NULL), "}")
|
||||||
agents_names <- ab_name(names(agents), tolower = TRUE, language = NULL)
|
agents_names <- ab_name(names(agents), tolower = TRUE, language = NULL)
|
||||||
need_name <- generalise_antibiotic_name(agents) != generalise_antibiotic_name(agents_names)
|
need_name <- generalise_antibiotic_name(agents) != generalise_antibiotic_name(agents_names)
|
||||||
agents_formatted[need_name] <- paste0(agents_formatted[need_name], " (", agents_names[need_name], ")")
|
agents_formatted[need_name] <- paste0(agents_formatted[need_name], " (", agents_names[need_name], ")")
|
||||||
message_(
|
message_(
|
||||||
"For `", function_name, "(",
|
"For {.help [", function_name, "(",
|
||||||
ifelse(function_name == "amr_class",
|
ifelse(function_name == "amr_class",
|
||||||
paste0("\"", amr_class_args, "\""),
|
paste0("\"", amr_class_args, "\""),
|
||||||
ifelse(!is.null(call),
|
ifelse(!is.null(call),
|
||||||
@@ -1048,7 +1084,7 @@ message_agent_names <- function(function_name, agents, ab_group = NULL, examples
|
|||||||
""
|
""
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
")` using ",
|
")](AMR::", function_name, ")} using ",
|
||||||
ifelse(length(agents) == 1, "column ", "columns "),
|
ifelse(length(agents) == 1, "column ", "columns "),
|
||||||
vector_and(agents_formatted, quotes = FALSE, sort = FALSE)
|
vector_and(agents_formatted, quotes = FALSE, sort = FALSE)
|
||||||
)
|
)
|
||||||
|
|||||||
+23
-21
@@ -163,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
|
||||||
#'
|
#'
|
||||||
@@ -445,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))))
|
||||||
}
|
}
|
||||||
@@ -453,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 = c("character", "numeric", "integer"), 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)
|
||||||
}
|
}
|
||||||
@@ -482,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]
|
||||||
@@ -519,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)
|
||||||
@@ -556,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))
|
||||||
@@ -580,9 +583,9 @@ antibiogram.default <- function(x,
|
|||||||
if (length(existing_ab_combined_cols) > 0 && !is.null(ab_transform)) {
|
if (length(existing_ab_combined_cols) > 0 && !is.null(ab_transform)) {
|
||||||
ab_transform <- NULL
|
ab_transform <- NULL
|
||||||
warning_(
|
warning_(
|
||||||
"Detected column name(s) containing the '+' character, which conflicts with the expected syntax in `antibiogram()`: the '+' is used to combine separate antimicrobial agent columns (e.g., \"AMP+GEN\").\n\n",
|
"Detected column name(s) containing the '+' character, which conflicts with the expected syntax in {.help [{.fun antibiogram}](AMR::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",
|
"To avoid incorrectly guessing which antimicrobials this represents, {.arg ab_transform} was automatically set to {.code 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."
|
"If this is unintended, please rename the column(s) to avoid using '+' in the name, or set {.code ab_transform = NULL} explicitly to suppress this message."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
antimicrobials <- ab_trycatch
|
antimicrobials <- ab_trycatch
|
||||||
@@ -611,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)
|
||||||
@@ -625,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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -810,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))
|
||||||
@@ -996,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(
|
||||||
@@ -1196,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -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_("{.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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -475,7 +475,7 @@ as.av <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
|||||||
# take failed ATC codes apart from rest
|
# take failed ATC codes apart from rest
|
||||||
if (length(x_unknown_ATCs) > 0 && fast_mode == FALSE) {
|
if (length(x_unknown_ATCs) > 0 && fast_mode == FALSE) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `as.av()`: these ATC codes are not (yet) in the antivirals data set: ",
|
"in {.help [{.fun as.av}](AMR::as.av)}: these ATC codes are not (yet) in the antivirals data set: ",
|
||||||
vector_and(x_unknown_ATCs), "."
|
vector_and(x_unknown_ATCs), "."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -486,7 +486,7 @@ as.av <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
|||||||
)
|
)
|
||||||
if (length(x_unknown) > 0 && fast_mode == FALSE) {
|
if (length(x_unknown) > 0 && fast_mode == FALSE) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `as.av()`: these values could not be coerced to a valid antiviral drug ID: ",
|
"in {.help [{.fun as.av}](AMR::as.av)}: these values could not be coerced to a valid antiviral drug ID: ",
|
||||||
vector_and(x_unknown), "."
|
vector_and(x_unknown), "."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -511,8 +511,8 @@ is.av <- function(x) {
|
|||||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, av)
|
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, av)
|
||||||
pillar_shaft.av <- function(x, ...) {
|
pillar_shaft.av <- function(x, ...) {
|
||||||
out <- trimws(format(x))
|
out <- trimws(format(x))
|
||||||
out[!is.na(x)] <- gsub("+", font_subtle("+"), out[!is.na(x)], fixed = TRUE)
|
out[!is.na(x)] <- gsub("+", pillar::style_subtle("+"), out[!is.na(x)], fixed = TRUE)
|
||||||
out[is.na(x)] <- font_na(NA)
|
out[is.na(x)] <- pillar::style_na(NA)
|
||||||
create_pillar_column(out, align = "left", min_width = 4)
|
create_pillar_column(out, align = "left", min_width = 4)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -526,7 +526,7 @@ type_sum.av <- function(x, ...) {
|
|||||||
#' @export
|
#' @export
|
||||||
#' @noRd
|
#' @noRd
|
||||||
print.av <- function(x, ...) {
|
print.av <- function(x, ...) {
|
||||||
cat("Class 'av'\n")
|
cat(format_inline_("Class {.cls av}\n"))
|
||||||
print(as.character(x), quote = FALSE)
|
print(as.character(x), quote = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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 {.val drug}, {.val dose} or {.val administration}")
|
||||||
}
|
}
|
||||||
|
|
||||||
# collapse text if needed
|
# collapse text if needed
|
||||||
|
|||||||
+4
-4
@@ -162,7 +162,7 @@ av_ddd <- function(x, administration = "oral", ...) {
|
|||||||
|
|
||||||
if (any(av_name(x, language = NULL) %like% "/" & is.na(out))) {
|
if (any(av_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `av_ddd()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
"in {.help [{.fun av_ddd}](AMR::av_ddd)}: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||||
"Please refer to the WHOCC website:\n",
|
"Please refer to the WHOCC website:\n",
|
||||||
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
||||||
)
|
)
|
||||||
@@ -182,7 +182,7 @@ av_ddd_units <- function(x, administration = "oral", ...) {
|
|||||||
|
|
||||||
if (any(av_name(x, language = NULL) %like% "/" & is.na(out))) {
|
if (any(av_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `av_ddd_units()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
"in {.help [{.fun av_ddd_units}](AMR::av_ddd_units)}: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||||
"Please refer to the WHOCC website:\n",
|
"Please refer to the WHOCC website:\n",
|
||||||
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
"atcddd.fhi.no/ddd/list_of_ddds_combined_products/"
|
||||||
)
|
)
|
||||||
@@ -233,12 +233,12 @@ av_url <- function(x, open = FALSE, ...) {
|
|||||||
|
|
||||||
NAs <- av_name(av, tolower = TRUE, language = NULL)[!is.na(av) & is.na(atcs)]
|
NAs <- av_name(av, tolower = TRUE, language = NULL)[!is.na(av) & is.na(atcs)]
|
||||||
if (length(NAs) > 0) {
|
if (length(NAs) > 0) {
|
||||||
warning_("in `av_url()`: no ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
warning_("in {.fun av_url}: no ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (open == TRUE) {
|
if (open == TRUE) {
|
||||||
if (length(u) > 1 && !is.na(u[1L])) {
|
if (length(u) > 1 && !is.na(u[1L])) {
|
||||||
warning_("in `av_url()`: only the first URL will be opened, as `browseURL()` only suports one string.")
|
warning_("in {.fun av_url}: only the first URL will be opened, as {.fun browseURL} only suports one string.")
|
||||||
}
|
}
|
||||||
if (!is.na(u[1L])) {
|
if (!is.na(u[1L])) {
|
||||||
utils::browseURL(u[1L])
|
utils::browseURL(u[1L])
|
||||||
|
|||||||
+23
-10
@@ -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.
|
||||||
@@ -82,9 +82,9 @@ bug_drug_combinations <- function(x,
|
|||||||
# -- mo
|
# -- mo
|
||||||
if (is.null(col_mo)) {
|
if (is.null(col_mo)) {
|
||||||
col_mo <- search_type_in_df(x = x, type = "mo")
|
col_mo <- search_type_in_df(x = x, type = "mo")
|
||||||
stop_if(is.null(col_mo), "`col_mo` must be set")
|
stop_if(is.null(col_mo), "{.arg col_mo} must be set")
|
||||||
} else {
|
} else {
|
||||||
stop_ifnot(col_mo %in% colnames(x), "column '", col_mo, "' (`col_mo`) not found")
|
stop_ifnot(col_mo %in% colnames(x), "column {.field ", font_bold(col_mo), "} ({.arg col_mo}) not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
x.bak <- x
|
x.bak <- x
|
||||||
@@ -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) {
|
||||||
@@ -218,7 +226,7 @@ format.bug_drug_combinations <- function(x,
|
|||||||
x.bak <- x
|
x.bak <- x
|
||||||
if (inherits(x, "grouped")) {
|
if (inherits(x, "grouped")) {
|
||||||
# bug_drug_combinations() has been run on groups, so de-group here
|
# bug_drug_combinations() has been run on groups, so de-group here
|
||||||
warning_("in `format()`: formatting the output of `bug_drug_combinations()` does not support grouped variables, they were ignored")
|
warning_("in {.fun format}: formatting the output of {.fun bug_drug_combinations} does not support grouped variables, they were ignored")
|
||||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||||
idx <- split(seq_len(nrow(x)), paste0(x$mo, "%%", x$ab))
|
idx <- split(seq_len(nrow(x)), paste0(x$mo, "%%", x$ab))
|
||||||
x <- data.frame(
|
x <- data.frame(
|
||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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,10 +122,21 @@
|
|||||||
#' 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
|
||||||
),
|
),
|
||||||
@@ -132,10 +146,21 @@ count_resistant <- function(..., only_all_tested = FALSE) {
|
|||||||
|
|
||||||
#' @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
|
||||||
),
|
),
|
||||||
@@ -161,7 +186,7 @@ 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
|
||||||
),
|
),
|
||||||
@@ -187,7 +212,7 @@ 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
|
||||||
),
|
),
|
||||||
@@ -200,7 +225,7 @@ 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
|
||||||
),
|
),
|
||||||
@@ -213,7 +238,7 @@ 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
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -166,5 +166,5 @@ clear_custom_antimicrobials <- function() {
|
|||||||
n2 <- nrow(AMR_env$AB_lookup)
|
n2 <- nrow(AMR_env$AB_lookup)
|
||||||
AMR_env$custom_ab_codes <- character(0)
|
AMR_env$custom_ab_codes <- character(0)
|
||||||
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(AMR_env$ab_previously_coerced$ab %in% AMR_env$AB_lookup$ab), , drop = FALSE]
|
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(AMR_env$ab_previously_coerced$ab %in% AMR_env$AB_lookup$ab), , drop = FALSE]
|
||||||
message_("Cleared ", nr2char(n - n2), " custom record", ifelse(n - n2 > 1, "s", ""), " from the internal `antimicrobials` data set.")
|
message_("Cleared ", nr2char(n - n2), " custom record", ifelse(n - n2 > 1, "s", ""), " from the internal {.help [antimicrobials](AMR::antimicrobials)} data set.")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
#'
|
#'
|
||||||
#' ### Using taxonomic properties in rules
|
#' ### Using taxonomic properties in rules
|
||||||
#'
|
#'
|
||||||
#' There is one exception in columns used for the rules: all column names of the [microorganisms] data set can also be used, but do not have to exist in the data set. These column names are: `r vector_and(colnames(microorganisms), sort = FALSE)`. Thus, this next example will work as well, despite the fact that the `df` data set does not contain a column `genus`:
|
#' There is one exception in columns used for the rules: all column names of the [microorganisms] data set can also be used, but do not have to exist in the data set. These column names are: `r vector_and(colnames(microorganisms), sort = FALSE, documentation = TRUE)`. Thus, this next example will work as well, despite the fact that the `df` data set does not contain a column `genus`:
|
||||||
#'
|
#'
|
||||||
#' ```r
|
#' ```r
|
||||||
#' y <- custom_eucast_rules(
|
#' y <- custom_eucast_rules(
|
||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
+11
-12
@@ -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
|
||||||
@@ -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
|
||||||
@@ -235,9 +235,9 @@ print.custom_mdro_guideline <- function(x, ...) {
|
|||||||
for (i in seq_len(length(x))) {
|
for (i in seq_len(length(x))) {
|
||||||
rule <- x[[i]]
|
rule <- x[[i]]
|
||||||
rule$query <- format_custom_query_rule(rule$query)
|
rule$query <- format_custom_query_rule(rule$query)
|
||||||
cat(" ", i, ". ", font_bold("If "), font_blue(rule$query), font_bold(" then: "), font_red(rule$value), "\n", sep = "")
|
cat("\u00a0\u00a0", i, ". ", font_bold("If "), font_blue(rule$query), font_bold(" then: "), font_red(rule$value), "\n", sep = "")
|
||||||
}
|
}
|
||||||
cat(" ", i + 1, ". ", font_bold("Otherwise: "), font_red(paste0("Negative")), "\n", sep = "")
|
cat("\u00a0\u00a0", i + 1, ". ", font_bold("Otherwise: "), font_red(paste0("Negative")), "\n", sep = "")
|
||||||
cat("\nUnmatched rows will return ", font_red("NA"), ".\n", sep = "")
|
cat("\nUnmatched rows will return ", font_red("NA"), ".\n", sep = "")
|
||||||
if (isTRUE(attributes(x)$as_factor)) {
|
if (isTRUE(attributes(x)$as_factor)) {
|
||||||
cat("Results will be of class 'factor', with ordered levels: ", paste0(attributes(x)$values, collapse = " < "), "\n", sep = "")
|
cat("Results will be of class 'factor', with ordered levels: ", paste0(attributes(x)$values, collapse = " < "), "\n", sep = "")
|
||||||
@@ -259,16 +259,15 @@ run_custom_mdro_guideline <- function(df, guideline, info) {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
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: ",
|
" ({.code ", 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, " ({.code ", 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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
#' }
|
#' }
|
||||||
add_custom_microorganisms <- function(x) {
|
add_custom_microorganisms <- function(x) {
|
||||||
meet_criteria(x, allow_class = "data.frame")
|
meet_criteria(x, allow_class = "data.frame")
|
||||||
stop_ifnot("genus" %in% tolower(colnames(x)), paste0("`x` must contain column 'genus'."))
|
stop_ifnot("genus" %in% tolower(colnames(x)), "{.arg x} must contain column {.code genus}.")
|
||||||
|
|
||||||
add_MO_lookup_to_AMR_env()
|
add_MO_lookup_to_AMR_env()
|
||||||
|
|
||||||
@@ -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, ...) {
|
||||||
|
|||||||
@@ -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"`
|
||||||
@@ -106,12 +106,12 @@
|
|||||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(microorganisms), big.mark = " ")` observations and `r ncol(microorganisms)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(microorganisms), big.mark = " ")` observations and `r ncol(microorganisms)` variables:
|
||||||
#' - `mo`\cr ID of microorganism as used by this package. ***This is a unique identifier.***
|
#' - `mo`\cr ID of microorganism as used by this package. ***This is a unique identifier.***
|
||||||
#' - `fullname`\cr Full name, like `"Escherichia coli"`. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon. ***This is a unique identifier.***
|
#' - `fullname`\cr Full name, like `"Escherichia coli"`. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon. ***This is a unique identifier.***
|
||||||
#' - `status` \cr Status of the taxon, either `r vector_or(microorganisms$status)`
|
#' - `status` \cr Status of the taxon, either `r vector_or(microorganisms$status, documentation = TRUE)`
|
||||||
#' - `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, `species`, `subspecies`\cr Taxonomic rank of the microorganism. Note that for fungi, *phylum* is equal to their taxonomic *division*. Also, for fungi, *subkingdom* and *subdivision* were left out since they do not occur in the bacterial taxonomy.
|
#' - `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, `species`, `subspecies`\cr Taxonomic rank of the microorganism. Note that for fungi, *phylum* is equal to their taxonomic *division*. Also, for fungi, *subkingdom* and *subdivision* were left out since they do not occur in the bacterial taxonomy.
|
||||||
#' - `rank`\cr Text of the taxonomic rank of the microorganism, such as `"species"` or `"genus"`
|
#' - `rank`\cr Text of the taxonomic rank of the microorganism, such as `"species"` or `"genus"`
|
||||||
#' - `ref`\cr Author(s) and year of related scientific publication. This contains only the *first surname* and year of the *latest* authors, e.g. "Wallis *et al.* 2006 *emend.* Smith and Jones 2018" becomes "Smith *et al.*, 2018". This field is directly retrieved from the source specified in the column `source`. Moreover, accents were removed to comply with CRAN that only allows ASCII characters.
|
#' - `ref`\cr Author(s) and year of related scientific publication. This contains only the *first surname* and year of the *latest* authors, e.g. "Wallis *et al.* 2006 *emend.* Smith and Jones 2018" becomes "Smith *et al.*, 2018". This field is directly retrieved from the source specified in the column `source`. Moreover, accents were removed to comply with CRAN that only allows ASCII characters.
|
||||||
#' - `oxygen_tolerance` \cr Oxygen tolerance, either `r vector_or(microorganisms$oxygen_tolerance)`. These data were retrieved from BacDive (see *Source*). Items that contain "likely" are missing from BacDive and were extrapolated from other species within the same genus to guess the oxygen tolerance. Currently `r round(length(microorganisms$oxygen_tolerance[which(!is.na(microorganisms$oxygen_tolerance))]) / nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]) * 100, 1)`% of all `r format_included_data_number(nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]))` bacteria in the data set contain an oxygen tolerance.
|
#' - `oxygen_tolerance` \cr Oxygen tolerance, either `r vector_or(microorganisms$oxygen_tolerance, documentation = TRUE)`. These data were retrieved from BacDive (see *Source*). Items that contain "likely" are missing from BacDive and were extrapolated from other species within the same genus to guess the oxygen tolerance. Currently `r round(length(microorganisms$oxygen_tolerance[which(!is.na(microorganisms$oxygen_tolerance))]) / nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]) * 100, 1)`% of all `r format_included_data_number(nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]))` bacteria in the data set contain an oxygen tolerance.
|
||||||
#' - `source`\cr Either `r vector_or(microorganisms$source)` (see *Source*)
|
#' - `source`\cr Either `r vector_or(microorganisms$source, documentation = TRUE)` (see *Source*)
|
||||||
#' - `lpsn`\cr Identifier ('Record number') of `r TAXONOMY_VERSION$LPSN$name`. This will be the first/highest LPSN identifier to keep one identifier per row. For example, *Acetobacter ascendens* has LPSN Record number 7864 and 11011. Only the first is available in the `microorganisms` data set. ***This is a unique identifier***, though available for only `r format_included_data_number(sum(!is.na(microorganisms$lpsn)))` records.
|
#' - `lpsn`\cr Identifier ('Record number') of `r TAXONOMY_VERSION$LPSN$name`. This will be the first/highest LPSN identifier to keep one identifier per row. For example, *Acetobacter ascendens* has LPSN Record number 7864 and 11011. Only the first is available in the `microorganisms` data set. ***This is a unique identifier***, though available for only `r format_included_data_number(sum(!is.na(microorganisms$lpsn)))` records.
|
||||||
#' - `lpsn_parent`\cr LPSN identifier of the parent taxon
|
#' - `lpsn_parent`\cr LPSN identifier of the parent taxon
|
||||||
#' - `lpsn_renamed_to`\cr LPSN identifier of the currently valid taxon
|
#' - `lpsn_renamed_to`\cr LPSN identifier of the currently valid taxon
|
||||||
@@ -222,8 +222,8 @@
|
|||||||
#' - `date`\cr Date of receipt at the laboratory
|
#' - `date`\cr Date of receipt at the laboratory
|
||||||
#' - `patient`\cr ID of the patient
|
#' - `patient`\cr ID of the patient
|
||||||
#' - `age`\cr Age of the patient
|
#' - `age`\cr Age of the patient
|
||||||
#' - `gender`\cr Gender of the patient, either `r vector_or(example_isolates$gender)`
|
#' - `gender`\cr Gender of the patient, either `r vector_or(example_isolates$gender, documentation = TRUE)`
|
||||||
#' - `ward`\cr Ward type where the patient was admitted, either `r vector_or(example_isolates$ward)`
|
#' - `ward`\cr Ward type where the patient was admitted, either `r vector_or(example_isolates$ward, documentation = TRUE)`
|
||||||
#' - `mo`\cr ID of microorganism created with [as.mo()], see also the [microorganisms] data set
|
#' - `mo`\cr ID of microorganism created with [as.mo()], see also the [microorganisms] data set
|
||||||
#' - `PEN:RIF`\cr `r sum(vapply(FUN.VALUE = logical(1), example_isolates, is.sir))` different antimicrobials with class [`sir`] (see [as.sir()]); these column names occur in the [antimicrobials] data set and can be translated with [set_ab_names()] or [ab_name()]
|
#' - `PEN:RIF`\cr `r sum(vapply(FUN.VALUE = logical(1), example_isolates, is.sir))` different antimicrobials with class [`sir`] (see [as.sir()]); these column names occur in the [antimicrobials] data set and can be translated with [set_ab_names()] or [ab_name()]
|
||||||
#' @inheritSection AMR Download Our Reference Data
|
#' @inheritSection AMR Download Our Reference Data
|
||||||
@@ -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)))`;
|
||||||
@@ -292,9 +292,9 @@
|
|||||||
#' Use [as.sir()] to transform MICs or disks measurements to SIR values.
|
#' Use [as.sir()] to transform MICs or disks measurements to SIR values.
|
||||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(clinical_breakpoints), big.mark = " ")` observations and `r ncol(clinical_breakpoints)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(clinical_breakpoints), big.mark = " ")` observations and `r ncol(clinical_breakpoints)` variables:
|
||||||
#' - `guideline`\cr Name of the guideline
|
#' - `guideline`\cr Name of the guideline
|
||||||
#' - `type`\cr Breakpoint type, either `r vector_or(clinical_breakpoints$type)`
|
#' - `type`\cr Breakpoint type, either `r vector_or(clinical_breakpoints$type, documentation = TRUE)`
|
||||||
#' - `host`\cr Host of infectious agent. This is mostly useful for veterinary breakpoints and is either `r vector_or(clinical_breakpoints$host)`
|
#' - `host`\cr Host of infectious agent. This is mostly useful for veterinary breakpoints and is either `r vector_or(clinical_breakpoints$host, documentation = TRUE)`
|
||||||
#' - `method`\cr Testing method, either `r vector_or(clinical_breakpoints$method)`
|
#' - `method`\cr Testing method, either `r vector_or(clinical_breakpoints$method, documentation = TRUE)`
|
||||||
#' - `site`\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
#' - `site`\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
||||||
#' - `mo`\cr Microbial ID, see [as.mo()]
|
#' - `mo`\cr Microbial ID, see [as.mo()]
|
||||||
#' - `rank_index`\cr Taxonomic rank index of `mo` from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
#' - `rank_index`\cr Taxonomic rank index of `mo` from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
||||||
@@ -350,10 +350,10 @@
|
|||||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(dosage), big.mark = " ")` observations and `r ncol(dosage)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(dosage), big.mark = " ")` observations and `r ncol(dosage)` variables:
|
||||||
#' - `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
|
#' - `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
|
||||||
#' - `name`\cr Official name of the antimicrobial drug as used by WHONET/EARS-Net or the WHO
|
#' - `name`\cr Official name of the antimicrobial drug as used by WHONET/EARS-Net or the WHO
|
||||||
#' - `type`\cr Type of the dosage, either `r vector_or(dosage$type)`
|
#' - `type`\cr Type of the dosage, either `r vector_or(dosage$type, documentation = TRUE)`
|
||||||
#' - `dose`\cr Dose, such as "2 g" or "25 mg/kg"
|
#' - `dose`\cr Dose, such as "2 g" or "25 mg/kg"
|
||||||
#' - `dose_times`\cr Number of times a dose must be administered
|
#' - `dose_times`\cr Number of times a dose must be administered
|
||||||
#' - `administration`\cr Route of administration, either `r vector_or(dosage$administration)`
|
#' - `administration`\cr Route of administration, either `r vector_or(dosage$administration, documentation = TRUE)`
|
||||||
#' - `notes`\cr Additional dosage notes
|
#' - `notes`\cr Additional dosage notes
|
||||||
#' - `original_txt`\cr Original text in the PDF file of EUCAST
|
#' - `original_txt`\cr Original text in the PDF file of EUCAST
|
||||||
#' - `eucast_version`\cr Version number of the EUCAST Clinical Breakpoints guideline to which these dosages apply, either `r vector_or(dosage$eucast_version, quotes = FALSE, sort = TRUE, reverse = TRUE)`
|
#' - `eucast_version`\cr Version number of the EUCAST Clinical Breakpoints guideline to which these dosages apply, either `r vector_or(dosage$eucast_version, quotes = FALSE, sort = TRUE, reverse = TRUE)`
|
||||||
@@ -362,14 +362,14 @@
|
|||||||
#' dosage
|
#' dosage
|
||||||
"dosage"
|
"dosage"
|
||||||
|
|
||||||
# TODO #' Data Set with `r format(nrow(esbl_isolates), big.mark = " ")` ESBL Isolates
|
#' Data Set with `r format(nrow(esbl_isolates), big.mark = " ")` ESBL Isolates
|
||||||
# TODO #'
|
#'
|
||||||
# TODO #' 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).
|
#' 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).
|
||||||
# TODO #' @format A [tibble][tibble::tibble] with `r format(nrow(esbl_isolates), big.mark = " ")` observations and `r ncol(esbl_isolates)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(esbl_isolates), big.mark = " ")` observations and `r ncol(esbl_isolates)` variables:
|
||||||
# TODO #' - `esbl`\cr Logical indicator if the isolate is ESBL-producing
|
#' - `esbl`\cr Logical indicator if the isolate is ESBL-producing
|
||||||
# TODO #' - `genus`\cr Genus of the microorganism
|
#' - `genus`\cr Genus of the microorganism
|
||||||
# TODO #' - `AMC:COL`\cr MIC values for 17 antimicrobial agents, transformed to class [`mic`] (see [as.mic()])
|
#' - `AMC:COL`\cr MIC values for 17 antimicrobial drugs, transformed to class [`mic`] (see [as.mic()])
|
||||||
# TODO #' @details See our [tidymodels integration][amr-tidymodels] for an example using this data set.
|
#' @details See our [tidymodels integration][amr-tidymodels] for an example using this data set.
|
||||||
# TODO #' @examples
|
#' @examples
|
||||||
# TODO #' esbl_isolates
|
#' esbl_isolates
|
||||||
# TODO "esbl_isolates"
|
"esbl_isolates"
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ as.disk <- function(x, na.rm = FALSE) {
|
|||||||
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.disk()`: ", na_after - na_before, " result",
|
warning_("in {.help [{.fun as.disk}](AMR::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 {.field ", font_bold(cur_col, collapse = NULL), "}")),
|
||||||
" 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: ",
|
||||||
@@ -162,7 +162,7 @@ is.disk <- function(x) {
|
|||||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, disk)
|
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, disk)
|
||||||
pillar_shaft.disk <- function(x, ...) {
|
pillar_shaft.disk <- function(x, ...) {
|
||||||
out <- trimws(format(x))
|
out <- trimws(format(x))
|
||||||
out[is.na(x)] <- font_na(NA)
|
out[is.na(x)] <- pillar::style_na(NA)
|
||||||
create_pillar_column(out, align = "right", width = 2)
|
create_pillar_column(out, align = "right", width = 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ pillar_shaft.disk <- function(x, ...) {
|
|||||||
#' @export
|
#' @export
|
||||||
#' @noRd
|
#' @noRd
|
||||||
print.disk <- function(x, ...) {
|
print.disk <- function(x, ...) {
|
||||||
cat("Class 'disk'\n")
|
cat(format_inline_("Class {.cls disk}\n"))
|
||||||
print(as.integer(x), quote = FALSE)
|
print(as.integer(x), quote = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-36
@@ -246,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) {
|
||||||
@@ -263,8 +263,7 @@ first_isolate <- function(x = NULL,
|
|||||||
),
|
),
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
add_fn = font_red
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,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 ----
|
||||||
@@ -309,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
|
||||||
@@ -318,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
|
||||||
@@ -334,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 {.code ", column, "} not found.",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -363,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)) {
|
||||||
@@ -376,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)) {
|
||||||
@@ -420,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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -429,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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -437,9 +430,8 @@ 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")),
|
n_rows <- length(c(row.start:row.end))
|
||||||
", as all isolates were different microbial species",
|
message_("=> Found {.strong ", n_rows, " first isolates}, as all isolates were different microbial species",
|
||||||
add_fn = font_black,
|
|
||||||
as_note = FALSE
|
as_note = FALSE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -456,16 +448,16 @@ first_isolate <- function(x = NULL,
|
|||||||
if (!is.null(col_keyantimicrobials)) {
|
if (!is.null(col_keyantimicrobials)) {
|
||||||
if (isTRUE(info) && message_not_thrown_before("first_isolate", "type")) {
|
if (isTRUE(info) && message_not_thrown_before("first_isolate", "type")) {
|
||||||
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_(
|
||||||
points_threshold,
|
"Basing inclusion on all antimicrobial results, using a points threshold of ",
|
||||||
add_fn = font_red
|
points_threshold
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -524,9 +516,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)) {
|
||||||
@@ -550,9 +540,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
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -565,8 +554,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 {.field ", 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
|
||||||
@@ -577,8 +565,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 {.field ", 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
|
||||||
@@ -624,7 +611,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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -215,7 +215,7 @@ is_new_episode <- function(x, episode_days = NULL, case_free_days = NULL, ...) {
|
|||||||
|
|
||||||
exec_episode <- function(x, episode_days, case_free_days, ...) {
|
exec_episode <- function(x, episode_days, case_free_days, ...) {
|
||||||
stop_ifnot(is.null(episode_days) || is.null(case_free_days),
|
stop_ifnot(is.null(episode_days) || is.null(case_free_days),
|
||||||
"either argument `episode_days` or argument `case_free_days` must be set.",
|
"either argument {.arg episode_days} or argument {.arg case_free_days} must be set.",
|
||||||
call = -2
|
call = -2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -295,7 +295,7 @@ geom_sir <- function(position = NULL,
|
|||||||
...) {
|
...) {
|
||||||
x <- x[1]
|
x <- x[1]
|
||||||
stop_ifnot_installed("ggplot2")
|
stop_ifnot_installed("ggplot2")
|
||||||
stop_if(is.data.frame(position), "`position` is invalid. Did you accidentally use '%>%' instead of '+'?")
|
stop_if(is.data.frame(position), "{.arg position} is invalid. Did you accidentally use {.code %>%} instead of {.code +}?")
|
||||||
meet_criteria(position, allow_class = "character", has_length = 1, is_in = c("fill", "stack", "dodge"), allow_NULL = TRUE)
|
meet_criteria(position, allow_class = "character", has_length = 1, is_in = c("fill", "stack", "dodge"), allow_NULL = TRUE)
|
||||||
meet_criteria(x, allow_class = "character", has_length = 1)
|
meet_criteria(x, allow_class = "character", has_length = 1)
|
||||||
meet_criteria(fill, allow_class = "character", has_length = 1)
|
meet_criteria(fill, allow_class = "character", has_length = 1)
|
||||||
|
|||||||
+10
-12
@@ -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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -87,7 +86,7 @@ guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE, only_s
|
|||||||
} else {
|
} else {
|
||||||
if (isTRUE(verbose)) {
|
if (isTRUE(verbose)) {
|
||||||
message_(
|
message_(
|
||||||
"Using column '", font_bold(ab_result), "' as input for ", search_string,
|
"Using column {.field ", font_bold(ab_result), "} as input for ", search_string,
|
||||||
" (", ab_name(search_string, language = NULL, tolower = TRUE), ")."
|
" (", ab_name(search_string, language = NULL, tolower = TRUE), ")."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -147,7 +146,7 @@ get_column_abx <- function(x,
|
|||||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(sort, allow_class = "logical", has_length = 1)
|
meet_criteria(sort, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info) && message_not_thrown_before("get_column_abx", colnames(x))) {
|
||||||
message_("Auto-guessing columns suitable for analysis", appendLF = FALSE, as_note = FALSE)
|
message_("Auto-guessing columns suitable for analysis", appendLF = 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,17 +265,17 @@ 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 = FALSE), 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))) {
|
||||||
if (isTRUE(verbose) && !out[i] %in% duplicates) {
|
if (isTRUE(verbose) && !out[i] %in% duplicates) {
|
||||||
message_(
|
message_(
|
||||||
"Using column '", font_bold(out[i]), "' as input for ", names(out)[i],
|
"Using column {.field ", font_bold(out[i]), "} as input for ", names(out)[i],
|
||||||
" (", ab_name(names(out)[i], tolower = TRUE, language = NULL), ")."
|
" (", ab_name(names(out)[i], tolower = TRUE, language = NULL), ")."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -285,11 +284,10 @@ get_column_abx <- function(x,
|
|||||||
if (names(out)[i] != already_set_as) {
|
if (names(out)[i] != already_set_as) {
|
||||||
message_(
|
message_(
|
||||||
paste0(
|
paste0(
|
||||||
"Column '", font_bold(out[i]), "' will not be used for ",
|
"Column {.field ", 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
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,17 +53,18 @@ 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), documentation = TRUE, 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)`.
|
||||||
#' @param version_expertrules The version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be `r vector_or(names(EUCAST_VERSION_EXPERT_RULES), reverse = TRUE)`.
|
#' @param version_expertrules The version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be `r vector_or(names(EUCAST_VERSION_EXPERT_RULES), reverse = TRUE)`.
|
||||||
#' @param ampc_cephalosporin_resistance (only applies when `rules` contains `"expert"` or `"all"`) a [character] value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants - the default is `NA`. Currently only works when `version_expertrules` is `3.2` and higher; these versions of '*EUCAST Expert Rules on Enterobacterales*' state that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these three drugs. A value of `NA` (the default) for this argument will remove results for these three drugs, while e.g. a value of `"R"` will make the results for these drugs resistant. Use `NULL` or `FALSE` to not alter results for these three drugs of AmpC de-repressed cephalosporin-resistant mutants. Using `TRUE` is equal to using `"R"`. \cr For *EUCAST Expert Rules* v3.2, this rule applies to: `r vector_and(gsub("[^a-zA-Z ]+", "", unlist(strsplit(EUCAST_RULES_DF[which(EUCAST_RULES_DF$reference.version %in% c(3.2, 3.3) & EUCAST_RULES_DF$reference.rule %like% "ampc"), "this_value"][1], "|", fixed = TRUE))), quotes = "*")`.
|
#' @param ampc_cephalosporin_resistance (only applies when `rules` contains `"expert"` or `"all"`) a [character] value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants - the default is `NA`. Currently only works when `version_expertrules` is `3.2` and higher; these versions of '*EUCAST Expert Rules on Enterobacterales*' state that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these three drugs. A value of `NA` (the default) for this argument will remove results for these three drugs, while e.g. a value of `"R"` will make the results for these drugs resistant. Use `NULL` or `FALSE` to not alter results for these three drugs of AmpC de-repressed cephalosporin-resistant mutants. Using `TRUE` is equal to using `"R"`. \cr For *EUCAST Expert Rules* v3.2, this rule applies to: `r vector_and(gsub("[^a-zA-Z ]+", "", unlist(strsplit(EUCAST_RULES_DF[which(EUCAST_RULES_DF$reference.version %in% c(3.2, 3.3) & EUCAST_RULES_DF$reference.rule %like% "ampc"), "this_value"][1], "|", fixed = TRUE))), quotes = "*")`.
|
||||||
@@ -73,9 +74,10 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
|
|||||||
#' @param only_sir_columns A [logical] to indicate whether only antimicrobial columns must be included that were transformed to class [sir][as.sir()] on beforehand. Defaults to `FALSE` if no columns of `x` have a class [sir][as.sir()].
|
#' @param only_sir_columns A [logical] to indicate whether only antimicrobial columns must be included that were transformed to class [sir][as.sir()] on beforehand. Defaults to `FALSE` if no columns of `x` have a class [sir][as.sir()].
|
||||||
#' @param custom_rules Custom rules to apply, created with [custom_eucast_rules()].
|
#' @param custom_rules Custom rules to apply, created with [custom_eucast_rules()].
|
||||||
#' @param overwrite A [logical] indicating whether to overwrite existing SIR values (default: `FALSE`). When `FALSE`, only non-SIR values are modified (i.e., any value that is not already S, I or R). To ensure compliance with EUCAST guidelines, **this should remain** `FALSE`, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant".
|
#' @param overwrite A [logical] indicating whether to overwrite existing SIR values (default: `FALSE`). When `FALSE`, only non-SIR values are modified (i.e., any value that is not already S, I or R). To ensure compliance with EUCAST guidelines, **this should remain** `FALSE`, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant".
|
||||||
|
#' @param add_if_missing A [logical] indicating whether rules should also be applied to missing (`NA`) values (default: `TRUE`). When `FALSE`, rules are only applied to cells that already contain an SIR value; cells with `NA` are left untouched. This is particularly useful when using `overwrite = TRUE` with custom rules and you want to update reported results without imputing values for untested drugs.
|
||||||
#' @inheritParams first_isolate
|
#' @inheritParams first_isolate
|
||||||
#' @details
|
#' @details
|
||||||
#' **Note:** This function does not translate MIC values to SIR values. Use [as.sir()] for that. \cr
|
#' **Note:** This function does not translate MIC or disk values to SIR values. Use [as.sir()] for that. \cr
|
||||||
#' **Note:** When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. \cr
|
#' **Note:** When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. \cr
|
||||||
#'
|
#'
|
||||||
#' The file containing all EUCAST rules is located here: <https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv>. **Note:** Old taxonomic names are replaced with the current taxonomy where applicable. For example, *Ochrobactrum anthropi* was renamed to *Brucella anthropi* in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The `AMR` package contains the full microbial taxonomy updated until `r documentation_date(max(TAXONOMY_VERSION$GBIF$accessed_date, TAXONOMY_VERSION$LPSN$accessed_date))`, see [microorganisms].
|
#' The file containing all EUCAST rules is located here: <https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv>. **Note:** Old taxonomic names are replaced with the current taxonomy where applicable. For example, *Ochrobactrum anthropi* was renamed to *Brucella anthropi* in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The `AMR` package contains the full microbial taxonomy updated until `r documentation_date(max(TAXONOMY_VERSION$GBIF$accessed_date, TAXONOMY_VERSION$LPSN$accessed_date))`, see [microorganisms].
|
||||||
@@ -100,9 +102,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 +158,24 @@ 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 = 16.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,
|
||||||
|
add_if_missing = TRUE,
|
||||||
|
...) {
|
||||||
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)
|
||||||
@@ -181,22 +186,33 @@ eucast_rules <- function(x,
|
|||||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||||
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)
|
||||||
|
meet_criteria(add_if_missing, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
|
stop_if(
|
||||||
|
!overwrite && !add_if_missing,
|
||||||
|
"Either set {.arg overwrite} or {.arg add_if_missing} to {.code TRUE}, or both."
|
||||||
|
)
|
||||||
|
|
||||||
|
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 +240,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 +249,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")
|
||||||
@@ -321,7 +337,7 @@ eucast_rules <- function(x,
|
|||||||
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 EUCAST rules depend on it.")
|
message_("Using column {.field ", font_bold(cols_ab[names(cols_ab) == "AMX"]), "} as input for ampicillin since many EUCAST 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"])))
|
||||||
}
|
}
|
||||||
@@ -451,7 +467,7 @@ eucast_rules <- function(x,
|
|||||||
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.bak) > 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
|
||||||
@@ -473,7 +489,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")
|
||||||
@@ -502,8 +518,8 @@ eucast_rules <- function(x,
|
|||||||
|
|
||||||
## Set base to R where base + enzyme inhibitor is R ----
|
## Set base to R where base + enzyme inhibitor is R ----
|
||||||
rule_current <- paste0(
|
rule_current <- paste0(
|
||||||
ab_enzyme$base_name[i], " (`", col_base, "`) = R if ",
|
ab_enzyme$base_name[i], " ({.field ", font_bold(col_base), "}) = R if ",
|
||||||
tolower(ab_enzyme$enzyme_name[i]), " (`", col_enzyme, "`) = R"
|
tolower(ab_enzyme$enzyme_name[i]), " ({.field ", font_bold(col_enzyme), "}) = R"
|
||||||
)
|
)
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
cat(word_wrap(rule_current,
|
cat(word_wrap(rule_current,
|
||||||
@@ -525,7 +541,8 @@ eucast_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -543,8 +560,8 @@ eucast_rules <- function(x,
|
|||||||
|
|
||||||
## Set base + enzyme inhibitor to S where base is S ----
|
## Set base + enzyme inhibitor to S where base is S ----
|
||||||
rule_current <- paste0(
|
rule_current <- paste0(
|
||||||
ab_enzyme$enzyme_name[i], " (`", col_enzyme, "`) = S if ",
|
ab_enzyme$enzyme_name[i], " ({.field ", font_bold(col_enzyme), "}) = S if ",
|
||||||
tolower(ab_enzyme$base_name[i]), " (`", col_base, "`) = S"
|
tolower(ab_enzyme$base_name[i]), " ({.field ", font_bold(col_base), "}) = S"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
@@ -567,7 +584,8 @@ eucast_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -587,23 +605,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 {.val other} or {.val 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
|
||||||
}
|
}
|
||||||
@@ -663,10 +671,10 @@ eucast_rules <- function(x,
|
|||||||
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_(
|
||||||
"' as ", ab_name(ab_s, language = NULL, tolower = TRUE),
|
"Using column {.field ", font_bold(cols_ab[names(cols_ab) == ab]),
|
||||||
" since a column '", ab_s, "' is missing but required for the chosen rules",
|
"} as ", ab_name(ab_s, language = NULL, tolower = TRUE),
|
||||||
add_fn = font_red
|
" since a column {.code ", ab_s, "} is missing but required for the chosen rules"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
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))
|
||||||
@@ -808,7 +816,7 @@ eucast_rules <- function(x,
|
|||||||
")$"
|
")$"
|
||||||
)
|
)
|
||||||
} else if (like_is_one_of != "like") {
|
} else if (like_is_one_of != "like") {
|
||||||
stop("invalid value for column 'like.is.one_of'", call. = FALSE)
|
stop("invalid value for column {.field like.is.one_of}", call. = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is.na(source_antibiotics)) {
|
if (is.na(source_antibiotics)) {
|
||||||
@@ -864,7 +872,8 @@ eucast_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -890,7 +899,7 @@ 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 <- tryCatch(which(eval(parse(text = rule$query), envir = x)),
|
rows <- tryCatch(which(eval(parse(text = rule$query), envir = x)),
|
||||||
error = function(e) stop_(paste0(conditionMessage(e), font_red(" (check available data and compare with the custom rules set)")), call = FALSE)
|
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(
|
||||||
@@ -934,7 +943,8 @@ eucast_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -1053,9 +1063,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 = "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1065,13 +1075,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 {.cls sir}. Transform them on beforehand, 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))"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1092,6 +1102,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,
|
||||||
@@ -1103,7 +1136,8 @@ edit_sir <- function(x,
|
|||||||
warned,
|
warned,
|
||||||
info,
|
info,
|
||||||
verbose,
|
verbose,
|
||||||
overwrite) {
|
overwrite,
|
||||||
|
add_if_missing) {
|
||||||
cols <- unique(cols[!is.na(cols) & !is.null(cols)])
|
cols <- unique(cols[!is.na(cols) & !is.null(cols)])
|
||||||
|
|
||||||
# for Verbose Mode, keep track of all changes and return them
|
# for Verbose Mode, keep track of all changes and return them
|
||||||
@@ -1131,18 +1165,21 @@ 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}.")
|
||||||
}
|
}
|
||||||
|
# determine which cells to modify based on overwrite and add_if_missing
|
||||||
|
apply_mask <- if (isTRUE(overwrite)) {
|
||||||
|
if (isFALSE(add_if_missing)) !isNA else rep(TRUE, length(isNA))
|
||||||
|
} else {
|
||||||
|
if (isFALSE(add_if_missing)) isSIR else non_SIR
|
||||||
|
}
|
||||||
|
warning_("test", call = T) # aaaaaaa
|
||||||
tryCatch(
|
tryCatch(
|
||||||
# insert into original table
|
# insert into original table
|
||||||
if (isTRUE(overwrite)) {
|
new_edits[rows, cols][apply_mask] <- to,
|
||||||
new_edits[rows, cols] <- to
|
|
||||||
} else {
|
|
||||||
new_edits[rows, cols][non_SIR] <- to
|
|
||||||
},
|
|
||||||
warning = function(w) {
|
warning = function(w) {
|
||||||
if (w$message %like% "invalid factor level") {
|
if (w$message %like% "invalid factor level") {
|
||||||
xyz <- vapply(FUN.VALUE = logical(1), cols, function(col) {
|
xyz <- vapply(FUN.VALUE = logical(1), cols, function(col) {
|
||||||
@@ -1152,13 +1189,9 @@ edit_sir <- function(x,
|
|||||||
)
|
)
|
||||||
TRUE
|
TRUE
|
||||||
})
|
})
|
||||||
if (isTRUE(overwrite)) {
|
suppressWarnings(new_edits[rows, cols][apply_mask] <<- to)
|
||||||
suppressWarnings(new_edits[rows, cols] <<- to)
|
|
||||||
} else {
|
|
||||||
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."
|
||||||
@@ -1166,7 +1199,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()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1230,7 +1263,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"))
|
||||||
@@ -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 {.fun ", 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
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ key_antimicrobials <- function(x = NULL,
|
|||||||
col_mo <- search_type_in_df(x = x, type = "mo", info = FALSE)
|
col_mo <- search_type_in_df(x = x, type = "mo", info = FALSE)
|
||||||
}
|
}
|
||||||
if (is.null(col_mo)) {
|
if (is.null(col_mo)) {
|
||||||
warning_("in `key_antimicrobials()`: no column found for `col_mo`, ignoring antibiotics set in `gram_negative` and `gram_positive`, and antimycotics set in `antifungal`")
|
warning_("in {.fun key_antimicrobials}: no column found for {.arg col_mo}, ignoring antibiotics set in {.arg gram_negative} and {.arg gram_positive}, and antimycotics set in {.arg antifungal}")
|
||||||
gramstain <- NA_character_
|
gramstain <- NA_character_
|
||||||
kingdom <- NA_character_
|
kingdom <- NA_character_
|
||||||
} else {
|
} else {
|
||||||
@@ -182,12 +182,12 @@ key_antimicrobials <- function(x = NULL,
|
|||||||
any(filter, na.rm = TRUE) &&
|
any(filter, na.rm = TRUE) &&
|
||||||
message_not_thrown_before("key_antimicrobials", name)) {
|
message_not_thrown_before("key_antimicrobials", name)) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `key_antimicrobials()`: ",
|
"in {.help [{.fun key_antimicrobials}](AMR::key_antimicrobials)}: ",
|
||||||
ifelse(values_new_length == 0,
|
ifelse(values_new_length == 0,
|
||||||
"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)}."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ key_antimicrobials <- function(x = NULL,
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (length(unique(key_ab)) == 1) {
|
if (length(unique(key_ab)) == 1) {
|
||||||
warning_("in `key_antimicrobials()`: no distinct key antibiotics determined.")
|
warning_("in {.fun key_antimicrobials}: no distinct key antibiotics determined.")
|
||||||
}
|
}
|
||||||
|
|
||||||
key_ab
|
key_ab
|
||||||
@@ -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)
|
||||||
@@ -307,14 +310,12 @@ antimicrobials_equal <- function(y,
|
|||||||
meet_criteria(type, allow_class = "character", has_length = 1, is_in = c("points", "keyantimicrobials"))
|
meet_criteria(type, allow_class = "character", has_length = 1, is_in = c("points", "keyantimicrobials"))
|
||||||
meet_criteria(ignore_I, allow_class = "logical", has_length = 1)
|
meet_criteria(ignore_I, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(points_threshold, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
meet_criteria(points_threshold, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
||||||
stop_ifnot(length(y) == length(z), "length of `y` and `z` must be equal")
|
stop_ifnot(length(y) == length(z), "length of {.arg y} and {.arg z} must be equal")
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -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).
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
#' @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 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 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,12 +167,12 @@ 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
|
||||||
@@ -211,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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,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",
|
||||||
@@ -326,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."
|
||||||
@@ -474,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 {.field ", font_bold(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"]
|
||||||
@@ -674,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)
|
||||||
@@ -777,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"])
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -817,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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1830,8 +1888,8 @@ mdro <- function(x = NULL,
|
|||||||
if (any(x$MDRO == -1, na.rm = TRUE)) {
|
if (any(x$MDRO == -1, na.rm = TRUE)) {
|
||||||
if (message_not_thrown_before("mdro", "availability")) {
|
if (message_not_thrown_before("mdro", "availability")) {
|
||||||
warning_(
|
warning_(
|
||||||
"in `mdro()`: NA introduced for isolates where the available percentage of antimicrobial classes was below ",
|
"in {.help [{.fun mdro}](AMR::mdro)}: NA introduced for isolates where the available percentage of antimicrobial classes was below ",
|
||||||
percentage(pct_required_classes), " (set with `pct_required_classes`)"
|
percentage(pct_required_classes), " (set with {.arg pct_required_classes})"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
# set these -1s to NA
|
# set these -1s to NA
|
||||||
@@ -1883,7 +1941,8 @@ mdro <- function(x = NULL,
|
|||||||
# 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",
|
||||||
@@ -1906,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", ...)
|
||||||
}
|
}
|
||||||
@@ -1919,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", ...)
|
||||||
}
|
}
|
||||||
@@ -1931,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", ...)
|
||||||
}
|
}
|
||||||
@@ -1943,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", ...)
|
||||||
}
|
}
|
||||||
@@ -1955,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", ...)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)))`).
|
||||||
#'
|
#'
|
||||||
@@ -71,7 +72,7 @@ COMMON_MIC_VALUES <- c(
|
|||||||
#' ```
|
#' ```
|
||||||
#' x <- random_mic(10)
|
#' x <- random_mic(10)
|
||||||
#' x
|
#' x
|
||||||
#' #> Class 'mic'
|
#' #> Class <mic>
|
||||||
#' #> [1] 16 1 8 8 64 >=128 0.0625 32 32 16
|
#' #> [1] 16 1 8 8 64 >=128 0.0625 32 32 16
|
||||||
#'
|
#'
|
||||||
#' is.factor(x)
|
#' is.factor(x)
|
||||||
@@ -88,7 +89,7 @@ COMMON_MIC_VALUES <- c(
|
|||||||
#'
|
#'
|
||||||
#' ```
|
#' ```
|
||||||
#' x[x > 4]
|
#' x[x > 4]
|
||||||
#' #> Class 'mic'
|
#' #> Class <mic>
|
||||||
#' #> [1] 16 8 8 64 >=128 32 32 16
|
#' #> [1] 16 8 8 64 >=128 32 32 16
|
||||||
#'
|
#'
|
||||||
#' df <- data.frame(x, hospital = "A")
|
#' df <- data.frame(x, hospital = "A")
|
||||||
@@ -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,17 +162,22 @@ 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)) {
|
||||||
keep_operators <- "none"
|
keep_operators <- "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is.mic(x) && (keep_operators == "all" || !any(x %like% "[>=<]", na.rm = TRUE))) {
|
if (any(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)
|
||||||
@@ -258,9 +269,9 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
|
|||||||
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.mic()`: ", na_after - na_before, " result",
|
warning_("in {.help [{.fun as.mic}](AMR::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 {.field ", font_bold(cur_col, collapse = NULL), "}")),
|
||||||
" 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,18 +320,19 @@ 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))
|
||||||
mic_range <- gsub("[.]0+$", "", mic_range)
|
mic_range <- gsub("[.]0+$", "", mic_range)
|
||||||
mic_range[mic_range == "NA"] <- NA_character_
|
mic_range[mic_range == "NA"] <- NA_character_
|
||||||
} else if (is.mic(mic_range)) {
|
} else if (any(is.mic(mic_range))) {
|
||||||
mic_range <- as.character(mic_range)
|
mic_range <- as.character(mic_range)
|
||||||
}
|
}
|
||||||
stop_ifnot(
|
stop_ifnot(
|
||||||
all(mic_range %in% c(VALID_MIC_LEVELS, NA)),
|
all(mic_range %in% c(VALID_MIC_LEVELS, NA)),
|
||||||
"Values in `mic_range` must be valid MIC values. ",
|
"Values in {.arg mic_range} must be valid MIC values. ",
|
||||||
"The allowed range is ", format(as.double(as.mic(VALID_MIC_LEVELS)[1]), scientific = FALSE), " to ", format(as.double(as.mic(VALID_MIC_LEVELS)[length(VALID_MIC_LEVELS)]), scientific = FALSE), ". ",
|
"The allowed range is ", format(as.double(as.mic(VALID_MIC_LEVELS)[1]), scientific = FALSE), " to ", format(as.double(as.mic(VALID_MIC_LEVELS)[length(VALID_MIC_LEVELS)]), scientific = FALSE), ". ",
|
||||||
"Unvalid: ", vector_and(mic_range[!mic_range %in% c(VALID_MIC_LEVELS, NA)], quotes = FALSE), "."
|
"Unvalid: ", vector_and(mic_range[!mic_range %in% c(VALID_MIC_LEVELS, NA)], quotes = FALSE), "."
|
||||||
)
|
)
|
||||||
@@ -336,7 +352,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) {
|
||||||
@@ -426,23 +442,19 @@ all_valid_mics <- function(x) {
|
|||||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, mic)
|
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, mic)
|
||||||
pillar_shaft.mic <- function(x, ...) {
|
pillar_shaft.mic <- function(x, ...) {
|
||||||
if (!identical(levels(x), VALID_MIC_LEVELS) && message_not_thrown_before("pillar_shaft.mic")) {
|
if (!identical(levels(x), VALID_MIC_LEVELS) && message_not_thrown_before("pillar_shaft.mic")) {
|
||||||
warning_(AMR_env$sup_1_icon, " These columns contain an outdated or altered structure - convert with `as.mic()` to update",
|
warning_(AMR_env$sup_1_icon, " These columns contain an outdated or altered structure - convert with {.fun as.mic} to update",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
crude_numbers <- as.double(x)
|
crude_numbers <- as.double(x)
|
||||||
operators <- gsub("[^<=>]+", "", as.character(x))
|
operators <- gsub("[^<=>]+", "", as.character(x))
|
||||||
# colourise operators
|
# colourise operators
|
||||||
operators[!is.na(operators) & operators != ""] <- font_silver(operators[!is.na(operators) & operators != ""], collapse = NULL)
|
operators[!is.na(operators) & operators != ""] <- pillar::style_subtle(operators[!is.na(operators) & operators != ""])
|
||||||
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)] <- pillar::style_na(NA)
|
||||||
# make trailing zeroes less visible
|
# make trailing zeroes less visible
|
||||||
if (is_dark()) {
|
out[out %like% "[.]"] <- gsub("([.]?0+)$", pillar::style_subtle("\\1"), out[out %like% "[.]"], perl = TRUE)
|
||||||
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))))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,7 +472,7 @@ type_sum.mic <- function(x, ...) {
|
|||||||
#' @export
|
#' @export
|
||||||
#' @noRd
|
#' @noRd
|
||||||
print.mic <- function(x, ...) {
|
print.mic <- function(x, ...) {
|
||||||
cat("Class 'mic'")
|
cat(format_inline_("Class {.cls mic}"))
|
||||||
if (!identical(levels(x), VALID_MIC_LEVELS)) {
|
if (!identical(levels(x), VALID_MIC_LEVELS)) {
|
||||||
cat(font_red(" with an outdated or altered structure - convert with `as.mic()` to update"))
|
cat(font_red(" with an outdated or altered structure - convert with `as.mic()` to update"))
|
||||||
}
|
}
|
||||||
@@ -493,7 +505,7 @@ as.vector.mic <- function(x, mode = "numneric", ...) {
|
|||||||
y <- as.mic(y)
|
y <- as.mic(y)
|
||||||
calls <- unlist(lapply(sys.calls(), as.character))
|
calls <- unlist(lapply(sys.calls(), as.character))
|
||||||
if (any(calls %in% c("rbind", "cbind")) && message_not_thrown_before("as.vector.mic")) {
|
if (any(calls %in% c("rbind", "cbind")) && message_not_thrown_before("as.vector.mic")) {
|
||||||
warning_("Functions `rbind()` and `cbind()` cannot preserve the structure of MIC values. Use dplyr's `bind_rows()` or `bind_cols()` instead.", call = FALSE)
|
warning_("Functions {.fun rbind} and {.fun cbind} cannot preserve the structure of MIC values. Use {.pkg dplyr}'s {.fun bind_rows} or {.fun bind_cols} instead.", call = FALSE)
|
||||||
}
|
}
|
||||||
y
|
y
|
||||||
}
|
}
|
||||||
@@ -586,7 +598,7 @@ sort.mic <- function(x, decreasing = FALSE, ...) {
|
|||||||
#' @export
|
#' @export
|
||||||
#' @noRd
|
#' @noRd
|
||||||
hist.mic <- function(x, ...) {
|
hist.mic <- function(x, ...) {
|
||||||
warning_("in `hist()`: use `plot()` or ggplot2's `autoplot()` for optimal plotting of MIC values")
|
warning_("in {.fun hist}: use {.fun plot} or {.pkg ggplot2}'s {.fun autoplot} for optimal plotting of MIC values")
|
||||||
hist(log2(x))
|
hist(log2(x))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,6 +617,24 @@ get_skimmers.mic <- function(column) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -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
|
||||||
#'
|
#'
|
||||||
@@ -247,7 +249,7 @@ as.mo <- function(x,
|
|||||||
if (length(which(ind)) > 0 && isTRUE(info) && message_not_thrown_before("as.mo_microorganisms.codes", is.na(out), toupper(x))) {
|
if (length(which(ind)) > 0 && isTRUE(info) && message_not_thrown_before("as.mo_microorganisms.codes", is.na(out), toupper(x))) {
|
||||||
message_(
|
message_(
|
||||||
"Retrieved value", ifelse(sum(ind) > 1, "s", ""),
|
"Retrieved value", ifelse(sum(ind) > 1, "s", ""),
|
||||||
" from the `microorganisms.codes` data set for ", vector_and(toupper(x)[ind]), "."
|
" from the {.help [microorganisms.codes](AMR::microorganisms.codes)} data set for ", vector_and(toupper(x)[ind]), "."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
# From SNOMED ----
|
# From SNOMED ----
|
||||||
@@ -265,7 +267,7 @@ as.mo <- function(x,
|
|||||||
if (isTRUE(info) && message_not_thrown_before("as.mo", old, new, entire_session = TRUE) && any(is.na(old) & !is.na(new), na.rm = TRUE)) {
|
if (isTRUE(info) && message_not_thrown_before("as.mo", old, new, entire_session = TRUE) && any(is.na(old) & !is.na(new), na.rm = TRUE)) {
|
||||||
message_(
|
message_(
|
||||||
"Returning previously coerced value", ifelse(sum(is.na(old) & !is.na(new)) > 1, "s", ""),
|
"Returning previously coerced value", ifelse(sum(is.na(old) & !is.na(new)) > 1, "s", ""),
|
||||||
" for ", vector_and(x[is.na(old) & !is.na(new)]), ". Run `mo_reset_session()` to reset this. This note will be shown once per session for this input."
|
" for ", vector_and(x[is.na(old) & !is.na(new)]), ". Run {.help [{.fun mo_reset_session}](AMR::mo_reset_session)} to reset this. This note will be shown once per session for this input."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,7 +402,14 @@ 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)]
|
||||||
@@ -446,8 +455,8 @@ as.mo <- function(x,
|
|||||||
if (length(AMR_env$mo_uncertainties$original_input) <= 3) {
|
if (length(AMR_env$mo_uncertainties$original_input) <= 3) {
|
||||||
examples <- vector_and(
|
examples <- vector_and(
|
||||||
paste0(
|
paste0(
|
||||||
'"', AMR_env$mo_uncertainties$original_input,
|
"{.val ", AMR_env$mo_uncertainties$original_input,
|
||||||
'" (assumed ', italicise(AMR_env$mo_uncertainties$fullname), ")"
|
"} (assumed ", italicise(AMR_env$mo_uncertainties$fullname), ")"
|
||||||
),
|
),
|
||||||
quotes = FALSE
|
quotes = FALSE
|
||||||
)
|
)
|
||||||
@@ -456,7 +465,7 @@ as.mo <- function(x,
|
|||||||
}
|
}
|
||||||
msg <- c(msg, paste0(
|
msg <- c(msg, paste0(
|
||||||
"Microorganism translation was uncertain for ", examples,
|
"Microorganism translation was uncertain for ", examples,
|
||||||
". Run `mo_uncertainties()` to review ", plural[2], ", or use `add_custom_microorganisms()` to add custom entries."
|
". Run {.help [{.fun mo_uncertainties}](AMR::mo_uncertainties)} to review ", plural[2], ", or use {.help [{.fun add_custom_microorganisms}](AMR::add_custom_microorganisms)} to add custom entries."
|
||||||
))
|
))
|
||||||
|
|
||||||
for (m in msg) {
|
for (m in msg) {
|
||||||
@@ -472,11 +481,11 @@ as.mo <- function(x,
|
|||||||
if (isFALSE(keep_synonyms)) {
|
if (isFALSE(keep_synonyms)) {
|
||||||
out[!is.na(out_current)] <- out_current[!is.na(out_current)]
|
out[!is.na(out_current)] <- out_current[!is.na(out_current)]
|
||||||
if (isTRUE(info) && length(AMR_env$mo_renamed$old) > 0) {
|
if (isTRUE(info) && length(AMR_env$mo_renamed$old) > 0) {
|
||||||
print(mo_renamed(), extra_txt = " (use `keep_synonyms = TRUE` to leave uncorrected)")
|
print(mo_renamed(), extra_txt = " (use {.arg keep_synonyms = TRUE} to leave uncorrected)")
|
||||||
}
|
}
|
||||||
} 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 {.arg 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 ----
|
||||||
@@ -493,7 +502,7 @@ as.mo <- function(x,
|
|||||||
)
|
)
|
||||||
if (any(out %in% AMR_env$MO_lookup$mo[match(post_Becker, AMR_env$MO_lookup$fullname)])) {
|
if (any(out %in% AMR_env$MO_lookup$mo[match(post_Becker, AMR_env$MO_lookup$fullname)])) {
|
||||||
if (message_not_thrown_before("as.mo", "becker")) {
|
if (message_not_thrown_before("as.mo", "becker")) {
|
||||||
warning_("in `as.mo()`: Becker ", font_italic("et al."), " (2014, 2019, 2020) does not contain these species named after their publication: ",
|
warning_("in {.help [{.fun as.mo}](AMR::as.mo)}: Becker ", font_italic("et al."), " (2014, 2019, 2020) does not contain these species named after their publication: ",
|
||||||
vector_and(font_italic(gsub("Staphylococcus", "S.", post_Becker, fixed = TRUE), collapse = NULL), quotes = FALSE),
|
vector_and(font_italic(gsub("Staphylococcus", "S.", post_Becker, fixed = TRUE), collapse = NULL), quotes = FALSE),
|
||||||
". Categorisation to CoNS/CoPS was taken from the original scientific publication(s).",
|
". Categorisation to CoNS/CoPS was taken from the original scientific publication(s).",
|
||||||
immediate = TRUE, call = FALSE
|
immediate = TRUE, call = FALSE
|
||||||
@@ -538,7 +547,7 @@ as.mo <- function(x,
|
|||||||
out[is.na(out) & !is.na(x)] <- "UNKNOWN"
|
out[is.na(out) & !is.na(x)] <- "UNKNOWN"
|
||||||
AMR_env$mo_failures <- unique(x[out == "UNKNOWN" & !toupper(x) %in% c("UNKNOWN", "CON", "UNK") & !x %like_case% "^[(]unknown [a-z]+[)]$" & !is.na(x)])
|
AMR_env$mo_failures <- unique(x[out == "UNKNOWN" & !toupper(x) %in% c("UNKNOWN", "CON", "UNK") & !x %like_case% "^[(]unknown [a-z]+[)]$" & !is.na(x)])
|
||||||
if (length(AMR_env$mo_failures) > 0) {
|
if (length(AMR_env$mo_failures) > 0) {
|
||||||
warning_("The following input could not be coerced and was returned as \"UNKNOWN\": ", vector_and(AMR_env$mo_failures, quotes = TRUE), ".\nYou can retrieve this list with `mo_failures()`.", call = FALSE)
|
warning_("The following input could not be coerced and was returned as \"UNKNOWN\": ", vector_and(AMR_env$mo_failures, quotes = TRUE), ".\nYou can retrieve this list with {.fun mo_failures}.", call = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return class ----
|
# Return class ----
|
||||||
@@ -623,6 +632,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:
|
||||||
@@ -631,13 +648,13 @@ pillar_shaft.mo <- function(x, ...) {
|
|||||||
add_MO_lookup_to_AMR_env()
|
add_MO_lookup_to_AMR_env()
|
||||||
out <- trimws(format(x))
|
out <- trimws(format(x))
|
||||||
# grey out the kingdom (part until first "_")
|
# grey out the kingdom (part until first "_")
|
||||||
out[!is.na(x)] <- gsub("^([A-Z]+_)(.*)", paste0(font_subtle("\\1"), "\\2"), out[!is.na(x)], perl = TRUE)
|
out[!is.na(x)] <- gsub("^([A-Z]+_)(.*)", paste0(pillar::style_subtle("\\1"), "\\2"), out[!is.na(x)], perl = TRUE)
|
||||||
# and grey out every _
|
# and grey out every _
|
||||||
out[!is.na(x)] <- gsub("_", font_subtle("_"), out[!is.na(x)])
|
out[!is.na(x)] <- gsub("_", pillar::style_subtle("_"), out[!is.na(x)])
|
||||||
|
|
||||||
# markup NA and UNKNOWN
|
# markup NA and UNKNOWN
|
||||||
out[is.na(x)] <- font_na(" NA")
|
out[is.na(x)] <- pillar::style_na(" NA")
|
||||||
out[x == "UNKNOWN"] <- font_na(" UNKNOWN")
|
out[x == "UNKNOWN"] <- pillar::style_na(" UNKNOWN")
|
||||||
|
|
||||||
# markup manual codes
|
# markup manual codes
|
||||||
out[x %in% AMR_env$MO_lookup$mo & !x %in% AMR::microorganisms$mo] <- font_blue(out[x %in% AMR_env$MO_lookup$mo & !x %in% AMR::microorganisms$mo], collapse = NULL)
|
out[x %in% AMR_env$MO_lookup$mo & !x %in% AMR::microorganisms$mo] <- font_blue(out[x %in% AMR_env$MO_lookup$mo & !x %in% AMR::microorganisms$mo], collapse = NULL)
|
||||||
@@ -656,20 +673,20 @@ pillar_shaft.mo <- function(x, ...) {
|
|||||||
(!is.null(df) && !all(unlist(df[, which(mo_cols), drop = FALSE]) %in% all_mos))) {
|
(!is.null(df) && !all(unlist(df[, which(mo_cols), drop = FALSE]) %in% all_mos))) {
|
||||||
# markup old mo codes
|
# markup old mo codes
|
||||||
out[!x %in% all_mos] <- font_italic(
|
out[!x %in% all_mos] <- font_italic(
|
||||||
font_na(x[!x %in% all_mos],
|
pillar::style_na(x[!x %in% all_mos],
|
||||||
collapse = NULL
|
collapse = NULL
|
||||||
),
|
),
|
||||||
collapse = NULL
|
collapse = NULL
|
||||||
)
|
)
|
||||||
# throw a warning with the affected column name(s)
|
# throw a warning with the affected column name(s)
|
||||||
if (!is.null(mo_cols)) {
|
if (!is.null(mo_cols)) {
|
||||||
col <- paste0("Column ", vector_or(colnames(df)[mo_cols], quotes = TRUE, sort = FALSE))
|
col <- paste0("Column ", vector_or(paste0("{.field ", font_bold(colnames(df)[mo_cols], collapse = NULL), "}"), quotes = TRUE, sort = FALSE))
|
||||||
} else {
|
} else {
|
||||||
col <- "The data"
|
col <- "The data"
|
||||||
}
|
}
|
||||||
warning_(
|
warning_(
|
||||||
col, " contains old MO codes (from a previous AMR package version). ",
|
col, " contains old MO codes (from a previous AMR package version). ",
|
||||||
"Please update your MO codes with `as.mo()`.",
|
"Please update your MO codes with {.help [{.fun as.mo}](AMR::as.mo)}.",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -766,7 +783,7 @@ get_skimmers.mo <- function(column) {
|
|||||||
#' @noRd
|
#' @noRd
|
||||||
print.mo <- function(x, print.shortnames = FALSE, ...) {
|
print.mo <- function(x, print.shortnames = FALSE, ...) {
|
||||||
add_MO_lookup_to_AMR_env()
|
add_MO_lookup_to_AMR_env()
|
||||||
cat("Class 'mo'\n")
|
cat(format_inline_("Class {.cls mo}\n"))
|
||||||
x_names <- names(x)
|
x_names <- names(x)
|
||||||
if (is.null(x_names) & print.shortnames == TRUE) {
|
if (is.null(x_names) & print.shortnames == TRUE) {
|
||||||
x_names <- tryCatch(mo_shortname(x, ...), error = function(e) NULL)
|
x_names <- tryCatch(mo_shortname(x, ...), error = function(e) NULL)
|
||||||
@@ -776,7 +793,7 @@ print.mo <- function(x, print.shortnames = FALSE, ...) {
|
|||||||
if (!all(x %in% c(AMR_env$MO_lookup$mo, NA))) {
|
if (!all(x %in% c(AMR_env$MO_lookup$mo, NA))) {
|
||||||
warning_(
|
warning_(
|
||||||
"Some MO codes are from a previous AMR package version. ",
|
"Some MO codes are from a previous AMR package version. ",
|
||||||
"Please update the MO codes with `as.mo()`.",
|
"Please update the MO codes with {.help [{.fun as.mo}](AMR::as.mo)}.",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -810,7 +827,7 @@ as.data.frame.mo <- function(x, ...) {
|
|||||||
if (!all(x %in% c(AMR_env$MO_lookup$mo, NA))) {
|
if (!all(x %in% c(AMR_env$MO_lookup$mo, NA))) {
|
||||||
warning_(
|
warning_(
|
||||||
"The data contains old MO codes (from a previous AMR package version). ",
|
"The data contains old MO codes (from a previous AMR package version). ",
|
||||||
"Please update your MO codes with `as.mo()`."
|
"Please update your MO codes with {.help [{.fun as.mo}](AMR::as.mo)}."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
nm <- deparse1(substitute(x))
|
nm <- deparse1(substitute(x))
|
||||||
@@ -892,14 +909,16 @@ 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))
|
message_("No uncertainties to show. Only uncertainties of the last call to {.help [{.fun as.mo}](AMR::as.mo)} or any {.help [{.fun mo_*}](AMR::mo_property)} function are stored.")
|
||||||
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))
|
message_("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)}.",
|
||||||
|
as_note = FALSE
|
||||||
|
)
|
||||||
|
|
||||||
add_MO_lookup_to_AMR_env()
|
add_MO_lookup_to_AMR_env()
|
||||||
|
|
||||||
@@ -909,12 +928,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(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 = "")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -946,21 +965,6 @@ print.mo_uncertainties <- function(x, n = 10, ...) {
|
|||||||
# sort on descending scores
|
# sort on descending scores
|
||||||
candidates_formatted <- candidates_formatted[order(1 - scores)]
|
candidates_formatted <- candidates_formatted[order(1 - scores)]
|
||||||
scores_formatted <- scores_formatted[order(1 - scores)]
|
scores_formatted <- scores_formatted[order(1 - scores)]
|
||||||
|
|
||||||
candidates <- word_wrap(
|
|
||||||
paste0(
|
|
||||||
"Also matched: ",
|
|
||||||
vector_and(
|
|
||||||
paste0(
|
|
||||||
candidates_formatted,
|
|
||||||
font_blue(paste0(" (", scores_formatted, ")"), collapse = NULL)
|
|
||||||
),
|
|
||||||
quotes = FALSE, sort = FALSE
|
|
||||||
)
|
|
||||||
),
|
|
||||||
extra_indent = nchar("Also matched: "),
|
|
||||||
width = 0.9 * getOption("width", 100)
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
candidates <- ""
|
candidates <- ""
|
||||||
}
|
}
|
||||||
@@ -970,46 +974,54 @@ print.mo_uncertainties <- function(x, n = 10, ...) {
|
|||||||
n = x[i, ]$fullname
|
n = x[i, ]$fullname
|
||||||
)
|
)
|
||||||
score_formatted <- trimws(formatC(round(score, 3), format = "f", digits = 3))
|
score_formatted <- trimws(formatC(round(score, 3), format = "f", digits = 3))
|
||||||
txt <- paste(txt,
|
|
||||||
|
out <- paste0(
|
||||||
paste0(
|
paste0(
|
||||||
|
"", strrep(font_grey("-"), times = getOption("width", 100) - 1), "\n",
|
||||||
|
"{.val ", x[i, ]$original_input, "}",
|
||||||
|
" -> ",
|
||||||
paste0(
|
paste0(
|
||||||
"", strrep(font_grey("-"), times = getOption("width", 100)), "\n",
|
font_bold(italicise(x[i, ]$fullname)),
|
||||||
'"', x[i, ]$original_input, '"',
|
" (", x[i, ]$mo, ", ", score_set_colour(score_formatted, score), ")"
|
||||||
" -> ",
|
)
|
||||||
paste0(
|
|
||||||
font_bold(italicise(x[i, ]$fullname)),
|
|
||||||
" (", x[i, ]$mo, ", ", score_set_colour(score_formatted, score), ")"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
collapse = "\n"
|
|
||||||
),
|
),
|
||||||
ifelse(x[i, ]$mo %in% AMR_env$MO_lookup$mo[which(AMR_env$MO_lookup$status == "synonym")],
|
collapse = "\n"
|
||||||
paste0(
|
|
||||||
strrep(" ", nchar(x[i, ]$original_input) + 6),
|
|
||||||
ifelse(x[i, ]$keep_synonyms == FALSE,
|
|
||||||
# Add note if result was coerced to accepted taxonomic name
|
|
||||||
font_red(paste0("This outdated taxonomic name was converted to ", font_italic(AMR_env$MO_lookup$fullname[match(synonym_mo_to_accepted_mo(x[i, ]$mo), AMR_env$MO_lookup$mo)], collapse = NULL), " (", synonym_mo_to_accepted_mo(x[i, ]$mo), ")."), collapse = NULL),
|
|
||||||
# Or add note if result is currently another taxonomic name
|
|
||||||
font_red(paste0(font_bold("Note: "), "The current name is ", font_italic(AMR_env$MO_lookup$fullname[match(synonym_mo_to_accepted_mo(x[i, ]$mo), AMR_env$MO_lookup$mo)], collapse = NULL), " (", AMR_env$MO_lookup$ref[match(synonym_mo_to_accepted_mo(x[i, ]$mo), AMR_env$MO_lookup$mo)], ")."), collapse = NULL)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
""
|
|
||||||
),
|
|
||||||
candidates,
|
|
||||||
sep = "\n"
|
|
||||||
)
|
)
|
||||||
txt <- gsub("[\n]+", "\n", txt)
|
message_(out, as_note = FALSE)
|
||||||
# remove first and last break
|
|
||||||
txt <- gsub("(^[\n]|[\n]$)", "", txt)
|
if (x[i, ]$mo %in% AMR_env$MO_lookup$mo[which(AMR_env$MO_lookup$status == "synonym")]) {
|
||||||
txt <- paste0("\n", txt, "\n")
|
out2 <- paste0(
|
||||||
|
strrep(" ", nchar(x[i, ]$original_input) + 6),
|
||||||
|
ifelse(x[i, ]$keep_synonyms == FALSE,
|
||||||
|
# Add note if result was coerced to accepted taxonomic name
|
||||||
|
font_red(paste0("This outdated taxonomic name was converted to ", font_italic(AMR_env$MO_lookup$fullname[match(synonym_mo_to_accepted_mo(x[i, ]$mo), AMR_env$MO_lookup$mo)], collapse = NULL), " (", synonym_mo_to_accepted_mo(x[i, ]$mo), ")."), collapse = NULL),
|
||||||
|
# Or add note if result is currently another taxonomic name
|
||||||
|
font_red(paste0(font_bold("Note: "), "The current name is ", font_italic(AMR_env$MO_lookup$fullname[match(synonym_mo_to_accepted_mo(x[i, ]$mo), AMR_env$MO_lookup$mo)], collapse = NULL), " (", AMR_env$MO_lookup$ref[match(synonym_mo_to_accepted_mo(x[i, ]$mo), AMR_env$MO_lookup$mo)], ")."), collapse = NULL)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
message_(out2, as_note = FALSE)
|
||||||
|
}
|
||||||
|
|
||||||
|
other_matches <- paste0(
|
||||||
|
"Also matched: ",
|
||||||
|
vector_and(
|
||||||
|
paste0(
|
||||||
|
candidates_formatted,
|
||||||
|
font_blue(paste0(" (", scores_formatted, ")"), collapse = NULL)
|
||||||
|
),
|
||||||
|
quotes = FALSE, sort = FALSE
|
||||||
|
)
|
||||||
|
)
|
||||||
|
message_(other_matches, as_note = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
cat(txt)
|
|
||||||
if (isTRUE(any_maxed_out)) {
|
if (isTRUE(any_maxed_out)) {
|
||||||
cat(font_blue(word_wrap("\nOnly the first ", n, " other matches of each record are shown. Run `print(mo_uncertainties(), n = ...)` to view more entries, or save `mo_uncertainties()` to an object.")))
|
cat("\n")
|
||||||
|
message_("Only the first ", n, " other matches of each record are shown. Run {.help [`print(mo_uncertainties(), n = ...)`](AMR::mo_uncertainties)} to view more entries, or save {.help [{.fun mo_uncertainties}](AMR::mo_uncertainties)} to an object.")
|
||||||
}
|
}
|
||||||
if (isTRUE(more_than_50)) {
|
if (isTRUE(more_than_50)) {
|
||||||
cat(font_blue(word_wrap("\nOnly the first 50 uncertainties are shown. Run `View(mo_uncertainties())` to view all entries, or save `mo_uncertainties()` to an object.")))
|
cat("\n")
|
||||||
|
message_("Only the first 50 uncertainties are shown. Run {.help [`View(mo_uncertainties())`](AMR::mo_uncertainties)} to view all entries, or save {.help [{.fun mo_uncertainties}](AMR::mo_uncertainties)} to an object.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1018,7 +1030,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))
|
message_("No renamed taxonomy to show. Only renamed taxonomy of the last call of {.help [{.fun as.mo}](AMR::as.mo)} or any {.help [{.fun mo_*}](AMR::mo_property)} function are stored.")
|
||||||
return(invisible(NULL))
|
return(invisible(NULL))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1029,14 +1041,17 @@ print.mo_renamed <- function(x, extra_txt = "", n = 25, ...) {
|
|||||||
|
|
||||||
rows <- seq_len(min(NROW(x), n))
|
rows <- seq_len(min(NROW(x), n))
|
||||||
|
|
||||||
message_(
|
message_("The following microorganism", ifelse(NROW(x) > 1, "s were", " was"), " taxonomically renamed", extra_txt, ":")
|
||||||
"The following microorganism", ifelse(NROW(x) > 1, "s were", " was"), " taxonomically renamed", extra_txt, ":\n",
|
old_format <- format(paste0(font_italic(x$old[rows], collapse = NULL), x$ref_old[rows])) # format() will set trailing spaces for textual alignment
|
||||||
paste0(" ", AMR_env$bullet_icon, " ", font_italic(x$old[rows], collapse = NULL), x$ref_old[rows],
|
old_format <- gsub(" ", "\u00a0", old_format, fixed = TRUE)
|
||||||
" -> ", font_italic(x$new[rows], collapse = NULL), x$ref_new[rows],
|
for (old_tax in rows) {
|
||||||
collapse = "\n"
|
message_("\u00a0\u00a0", AMR_env$bullet_icon, " ", old_format[old_tax], " -> ", font_italic(x$new[old_tax]), x$ref_new[old_tax], as_note = FALSE)
|
||||||
),
|
}
|
||||||
ifelse(NROW(x) > n, paste0("\n\nOnly the first ", n, " (out of ", NROW(x), ") are shown. Run `print(mo_renamed(), n = ...)` to view more entries (might be slow), or save `mo_renamed()` to an object."), "")
|
if (NROW(x) > n) {
|
||||||
)
|
message_("\u00a0\u00a0Only the first ", n, " (out of ", NROW(x), ") are shown. Run {.code print(mo_renamed(), n = ...)} to view more entries (might be slow), or save {.fun mo_renamed} to an object.",
|
||||||
|
as_note = FALSE
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# UNDOCUMENTED HELPER FUNCTIONS -------------------------------------------
|
# UNDOCUMENTED HELPER FUNCTIONS -------------------------------------------
|
||||||
@@ -1241,14 +1256,14 @@ replace_old_mo_codes <- function(x, property) {
|
|||||||
}
|
}
|
||||||
if (property != "mo") {
|
if (property != "mo") {
|
||||||
warning_(
|
warning_(
|
||||||
"in `mo_", property, "()`: the input contained ", n_matched,
|
"in {.help [{.fun mo_", property, "}](AMR::mo_", property, ")}: the input contained ", n_matched,
|
||||||
" old MO code", ifelse(n_matched == 1, "", "s"),
|
" old MO code", ifelse(n_matched == 1, "", "s"),
|
||||||
" (", n_unique, "from a previous AMR package version). ",
|
" (", n_unique, "from a previous AMR package version). ",
|
||||||
"Please update your MO codes with `as.mo()` to increase speed."
|
"Please update your MO codes with {.help [{.fun as.mo}](AMR::as.mo)} to increase speed."
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
warning_(
|
warning_(
|
||||||
"in `as.mo()`: the input contained ", n_matched,
|
"in {.help [{.fun as.mo}](AMR::as.mo)}: the input contained ", n_matched,
|
||||||
" old MO code", ifelse(n_matched == 1, "", "s"),
|
" old MO code", ifelse(n_matched == 1, "", "s"),
|
||||||
" (", n_unique, "from a previous AMR package version). ",
|
" (", n_unique, "from a previous AMR package version). ",
|
||||||
n_solved, " old MO code", ifelse(n_solved == 1, "", "s"),
|
n_solved, " old MO code", ifelse(n_solved == 1, "", "s"),
|
||||||
|
|||||||
+4
-5
@@ -270,7 +270,6 @@ mo_shortname <- function(x, language = get_AMR_locale(), keep_synonyms = getOpti
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_subspecies <- function(x, language = get_AMR_locale(), keep_synonyms = getOption("AMR_keep_synonyms", FALSE), ...) {
|
mo_subspecies <- function(x, language = get_AMR_locale(), keep_synonyms = getOption("AMR_keep_synonyms", FALSE), ...) {
|
||||||
@@ -584,7 +583,7 @@ mo_is_intrinsic_resistant <- function(x, ab, language = get_AMR_locale(), keep_s
|
|||||||
ab <- rep(ab, length(x))
|
ab <- rep(ab, length(x))
|
||||||
}
|
}
|
||||||
if (length(x) != length(ab)) {
|
if (length(x) != length(ab)) {
|
||||||
stop_("length of `x` and `ab` must be equal, or one of them must be of length 1.")
|
stop_("length of {.arg x} and {.arg ab} must be equal, or one of them must be of length 1.")
|
||||||
}
|
}
|
||||||
|
|
||||||
# show used version number once per session (AMR_env will reload every session)
|
# show used version number once per session (AMR_env will reload every session)
|
||||||
@@ -943,7 +942,7 @@ mo_url <- function(x, open = FALSE, language = get_AMR_locale(), keep_synonyms =
|
|||||||
|
|
||||||
if (isTRUE(open)) {
|
if (isTRUE(open)) {
|
||||||
if (length(u) > 1) {
|
if (length(u) > 1) {
|
||||||
warning_("in `mo_url()`: only the first URL will be opened, as R's built-in function `browseURL()` only suports one string.")
|
warning_("in {.fun mo_url}: only the first URL will be opened, as R's built-in function {.fun browseURL} only suports one string.")
|
||||||
}
|
}
|
||||||
utils::browseURL(u[1L])
|
utils::browseURL(u[1L])
|
||||||
}
|
}
|
||||||
@@ -1043,10 +1042,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 {.field ", 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-9
@@ -75,7 +75,7 @@
|
|||||||
#'
|
#'
|
||||||
#' ```
|
#' ```
|
||||||
#' as.mo("lab_mo_ecoli")
|
#' as.mo("lab_mo_ecoli")
|
||||||
#' #> Class 'mo'
|
#' #> Class <mo>
|
||||||
#' #> [1] B_ESCHR_COLI
|
#' #> [1] B_ESCHR_COLI
|
||||||
#'
|
#'
|
||||||
#' mo_genus("lab_mo_kpneumoniae")
|
#' mo_genus("lab_mo_kpneumoniae")
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
#' as.mo(c("Escherichia coli", "E. coli", "lab_mo_ecoli"))
|
#' as.mo(c("Escherichia coli", "E. coli", "lab_mo_ecoli"))
|
||||||
#' #> NOTE: Translation to one microorganism was guessed with uncertainty.
|
#' #> NOTE: Translation to one microorganism was guessed with uncertainty.
|
||||||
#' #> Use mo_uncertainties() to review it.
|
#' #> Use mo_uncertainties() to review it.
|
||||||
#' #> Class 'mo'
|
#' #> Class <mo>
|
||||||
#' #> [1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI
|
#' #> [1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI
|
||||||
#' ```
|
#' ```
|
||||||
#'
|
#'
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
#' #> NOTE: Updated mo_source file '/Users/me/mo_source.rds' (0.3 kB) from
|
#' #> NOTE: Updated mo_source file '/Users/me/mo_source.rds' (0.3 kB) from
|
||||||
#' #> '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns
|
#' #> '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns
|
||||||
#' #> "Organisation XYZ" and "mo"
|
#' #> "Organisation XYZ" and "mo"
|
||||||
#' #> Class 'mo'
|
#' #> Class <mo>
|
||||||
#' #> [1] B_ESCHR_COLI
|
#' #> [1] B_ESCHR_COLI
|
||||||
#'
|
#'
|
||||||
#' mo_genus("lab_Staph_aureus")
|
#' mo_genus("lab_Staph_aureus")
|
||||||
@@ -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))
|
||||||
@@ -290,7 +289,7 @@ check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_o
|
|||||||
}
|
}
|
||||||
if (!"mo" %in% colnames(x)) {
|
if (!"mo" %in% colnames(x)) {
|
||||||
if (stop_on_error == TRUE) {
|
if (stop_on_error == TRUE) {
|
||||||
stop_(refer_to_name, " must contain a column 'mo'", call = FALSE)
|
stop_(refer_to_name, " must contain a column {.code mo}", call = FALSE)
|
||||||
} else {
|
} else {
|
||||||
return(FALSE)
|
return(FALSE)
|
||||||
}
|
}
|
||||||
@@ -314,14 +313,14 @@ check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_o
|
|||||||
}
|
}
|
||||||
if (colnames(x)[1] != "mo" && nrow(x) > length(unique(x[, 1, drop = TRUE]))) {
|
if (colnames(x)[1] != "mo" && nrow(x) > length(unique(x[, 1, drop = TRUE]))) {
|
||||||
if (stop_on_error == TRUE) {
|
if (stop_on_error == TRUE) {
|
||||||
stop_(refer_to_name, " contains duplicate values in column '", colnames(x)[1], "'", call = FALSE)
|
stop_(refer_to_name, " contains duplicate values in column {.field ", font_bold(colnames(x)[1]), "}", call = FALSE)
|
||||||
} else {
|
} else {
|
||||||
return(FALSE)
|
return(FALSE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (colnames(x)[2] != "mo" && nrow(x) > length(unique(x[, 2, drop = TRUE]))) {
|
if (colnames(x)[2] != "mo" && nrow(x) > length(unique(x[, 2, drop = TRUE]))) {
|
||||||
if (stop_on_error == TRUE) {
|
if (stop_on_error == TRUE) {
|
||||||
stop_(refer_to_name, " contains duplicate values in column '", colnames(x)[2], "'", call = FALSE)
|
stop_(refer_to_name, " contains duplicate values in column {.field ", font_bold(colnames(x)[2]), "}", call = FALSE)
|
||||||
} else {
|
} else {
|
||||||
return(FALSE)
|
return(FALSE)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ pca <- function(x,
|
|||||||
|
|
||||||
x <- as.data.frame(new_list, stringsAsFactors = FALSE)
|
x <- as.data.frame(new_list, stringsAsFactors = FALSE)
|
||||||
if (any(vapply(FUN.VALUE = logical(1), x, function(y) !is.numeric(y)))) {
|
if (any(vapply(FUN.VALUE = logical(1), x, function(y) !is.numeric(y)))) {
|
||||||
warning_("in `pca()`: be sure to first calculate the resistance (or susceptibility) of variables with antimicrobial test results, since PCA works with numeric variables only. See Examples in `?pca`.", call = FALSE)
|
warning_("in {.fun pca}: be sure to first calculate the resistance (or susceptibility) of variables with antimicrobial test results, since PCA works with numeric variables only. See {.help [{.fun pca}](AMR::pca)}.", call = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
# set column names
|
# set column names
|
||||||
|
|||||||
+156
-51
@@ -53,17 +53,17 @@
|
|||||||
#' ### 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.
|
#' 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()].
|
#' 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.
|
#' 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 = " < ")`).
|
#' 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()].
|
#' 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.
|
#' 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
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
#' geom_boxplot(fill = NA, colour = "grey30") +
|
#' 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")
|
#' labs(title = "scale_y_mic()/scale_colour_sir() automatically applied")
|
||||||
#'
|
#'
|
||||||
#' mic_sir_plot
|
#' mic_sir_plot
|
||||||
#' }
|
#' }
|
||||||
#' if (require("ggplot2")) {
|
#' if (require("ggplot2")) {
|
||||||
@@ -258,15 +258,15 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
|
|||||||
} else if (any(other_x %in% colnames(df))) {
|
} else if (any(other_x %in% colnames(df))) {
|
||||||
aest_val <- intersect(other_x, colnames(df))[1]
|
aest_val <- intersect(other_x, colnames(df))[1]
|
||||||
} 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 {.fun scale_", aest, "_mic} with columns ", vector_and(colnames(df), sort = FALSE))
|
||||||
}
|
}
|
||||||
mics <- 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(mics < min(self$mic_values_rescaled, na.rm = TRUE) | mics > 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 {.field ", font_bold(aest_val), "} is outside the plotted MIC range, consider using/updating the {.arg mic_range} argument in {.fun scale_", aest, "_mic}.")
|
||||||
}
|
}
|
||||||
out[[aest_val]] <- log2(as.double(mics))
|
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.character(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
|
||||||
lims <- range(self$mic_values_rescaled, na.rm = TRUE)
|
lims <- range(self$mic_values_rescaled, na.rm = TRUE)
|
||||||
# support inner and outer 'mic_range' settings (e.g., the data ranges 0.5-8 and 'mic_range' is set to 0.025-32)
|
# support inner and outer 'mic_range' settings (e.g., the data ranges 0.5-8 and 'mic_range' is set to 0.025-32)
|
||||||
@@ -280,11 +280,21 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
|
|||||||
ind_max <- which(COMMON_MIC_VALUES >= lims[2])[which.min(abs(COMMON_MIC_VALUES[COMMON_MIC_VALUES >= lims[2]] - lims[2]))] # Closest index where COMMON_MIC_VALUES >= lims[2]
|
ind_max <- which(COMMON_MIC_VALUES >= lims[2])[which.min(abs(COMMON_MIC_VALUES[COMMON_MIC_VALUES >= lims[2]] - lims[2]))] # Closest index where COMMON_MIC_VALUES >= lims[2]
|
||||||
|
|
||||||
self$mic_values_levels <- as.mic(COMMON_MIC_VALUES[ind_min:ind_max])
|
self$mic_values_levels <- as.mic(COMMON_MIC_VALUES[ind_min:ind_max])
|
||||||
|
if (length(unique(self$mic_values_levels)) > 1) {
|
||||||
|
if (keep_operators == "all" && !all(self$mic_values_rescaled %in% self$mic_values_levels, na.rm = TRUE)) {
|
||||||
|
self$mic_values_levels <- unique(sort(c(self$mic_values_levels, self$mic_values_rescaled)))
|
||||||
|
|
||||||
if (keep_operators %in% c("edges", "all") && length(unique(self$mic_values_levels)) > 1) {
|
# collision = same log2 position, but different string labels
|
||||||
self$mic_values_levels[1] <- paste0("<=", self$mic_values_levels[1])
|
log_positions <- log2(as.double(self$mic_values_levels))
|
||||||
self$mic_values_levels[length(self$mic_values_levels)] <- paste0(">=", self$mic_values_levels[length(self$mic_values_levels)])
|
dup_positions <- log_positions[duplicated(log_positions) | duplicated(log_positions, fromLast = TRUE)]
|
||||||
|
colliding_labels <- as.character(self$mic_values_levels)[log_positions %in% dup_positions]
|
||||||
|
self$warn_keep_all_operators <- length(unique(colliding_labels)) > 1
|
||||||
|
} else if (keep_operators == "edges") {
|
||||||
|
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_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)) {
|
if (aest == "y" && "group" %in% colnames(df)) {
|
||||||
@@ -312,7 +322,26 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) {
|
|||||||
}
|
}
|
||||||
scale$labels <- function(..., self) {
|
scale$labels <- function(..., self) {
|
||||||
if (is.null(self$mic_breaks_set)) {
|
if (is.null(self$mic_breaks_set)) {
|
||||||
self$mic_values_levels
|
if (isTRUE(self$warn_keep_all_operators)) {
|
||||||
|
lookup <- tapply(
|
||||||
|
as.character(self$mic_values_rescaled),
|
||||||
|
self$mic_values_log,
|
||||||
|
function(x) paste(unique(x), collapse = ", ")
|
||||||
|
)
|
||||||
|
level_log <- as.character(log2(as.double(self$mic_values_levels)))
|
||||||
|
|
||||||
|
if (any(grepl(", ", lookup))) {
|
||||||
|
warning_("Using {.arg keep_operators = \"all\"} caused MIC values with different operators to share the same log2 position on the axis. These have been combined into a single label (e.g., {.val ", lookup[grepl(", ", lookup)][1], "}).", call = FALSE)
|
||||||
|
}
|
||||||
|
|
||||||
|
ifelse(
|
||||||
|
level_log %in% names(lookup),
|
||||||
|
lookup[level_log],
|
||||||
|
as.character(self$mic_values_levels)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
self$mic_values_levels
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
breaks <- tryCatch(scale$breaks(), error = function(e) NULL)
|
breaks <- tryCatch(scale$breaks(), error = function(e) NULL)
|
||||||
if (!is.null(breaks)) {
|
if (!is.null(breaks)) {
|
||||||
@@ -399,7 +428,12 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
args,
|
args,
|
||||||
list(
|
list(
|
||||||
aesthetics = aesthetics,
|
aesthetics = aesthetics,
|
||||||
values = c(colours_SIR, NI = "grey30")
|
values = c(colours_SIR,
|
||||||
|
NI = "grey30",
|
||||||
|
WT = unname(colours_SIR[1]),
|
||||||
|
NWT = unname(colours_SIR[4]),
|
||||||
|
NS = unname(colours_SIR[4])
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -407,7 +441,7 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
|
|
||||||
scale$labels <- function(x) {
|
scale$labels <- function(x) {
|
||||||
stop_ifnot(all(x %in% c(levels(NA_sir_), "SI", "IR", 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 {.cls sir}, see {.help [{.fun as.sir}](AMR::as.sir)}.",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
x <- as.character(x)
|
x <- as.character(x)
|
||||||
@@ -424,6 +458,9 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
x[x == "SI"] <- "(S/I) Susceptible"
|
x[x == "SI"] <- "(S/I) Susceptible"
|
||||||
x[x == "IR"] <- "(I/R) Non-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
|
||||||
@@ -537,11 +574,16 @@ plot.mic <- function(x,
|
|||||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
|
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
|
||||||
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
||||||
colours_SIR <- expand_SIR_colours(colours_SIR)
|
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(
|
||||||
x = x,
|
x = x,
|
||||||
@@ -572,10 +614,14 @@ 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, "(SDD) Susceptible dose-dependent")
|
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])
|
||||||
@@ -584,10 +630,14 @@ plot.mic <- function(x,
|
|||||||
legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline)))
|
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 (any(cols_sub$cols == colours_SIR[4] & cols_sub$count > 0)) {
|
if (!is_wt_nwt & any(cols_sub$cols == colours_SIR[4] & cols_sub$count > 0)) {
|
||||||
legend_txt <- c(legend_txt, "(R) Resistant")
|
legend_txt <- c(legend_txt, "(R) Resistant")
|
||||||
legend_col <- c(legend_col, colours_SIR[4])
|
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,
|
||||||
@@ -680,6 +730,8 @@ autoplot.mic <- function(object,
|
|||||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
|
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
|
||||||
@@ -690,6 +742,9 @@ autoplot.mic <- function(object,
|
|||||||
|
|
||||||
colours_SIR <- expand_SIR_colours(colours_SIR)
|
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(
|
||||||
@@ -708,17 +763,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[1] & is_wt_nwt] <- "(WT) Wildtype"
|
||||||
df$cols[df$cols == colours_SIR[2]] <- "(SDD) Susceptible dose-dependent"
|
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[3]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
||||||
df$cols[df$cols == colours_SIR[4]] <- "(R) Resistant"
|
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",
|
"(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
|
||||||
),
|
),
|
||||||
@@ -733,7 +792,9 @@ autoplot.mic <- function(object,
|
|||||||
"(I) Susceptible, incr. exp." = colours_SIR[3],
|
"(I) Susceptible, incr. exp." = colours_SIR[3],
|
||||||
"(I) Intermediate" = colours_SIR[3],
|
"(I) Intermediate" = colours_SIR[3],
|
||||||
"(R) Resistant" = colours_SIR[4],
|
"(R) Resistant" = colours_SIR[4],
|
||||||
"(NI) Non-interpretable" = "grey30"
|
"(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 +
|
||||||
@@ -797,10 +858,15 @@ plot.disk <- function(x,
|
|||||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
|
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 = " "))
|
||||||
colours_SIR <- expand_SIR_colours(colours_SIR)
|
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(
|
||||||
x = x,
|
x = x,
|
||||||
@@ -832,10 +898,14 @@ 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[4] & 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[4]
|
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)) {
|
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_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])
|
||||||
@@ -844,10 +914,14 @@ plot.disk <- function(x,
|
|||||||
legend_txt <- c(legend_txt, "(SDD) Susceptible dose-dependent")
|
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),
|
||||||
@@ -879,6 +953,8 @@ barplot.disk <- function(height,
|
|||||||
),
|
),
|
||||||
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)
|
||||||
@@ -889,6 +965,8 @@ barplot.disk <- function(height,
|
|||||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
|
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 = " "))
|
||||||
|
|
||||||
@@ -901,6 +979,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,
|
||||||
...
|
...
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -947,6 +1029,9 @@ autoplot.disk <- function(object,
|
|||||||
|
|
||||||
colours_SIR <- expand_SIR_colours(colours_SIR)
|
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,
|
||||||
@@ -964,23 +1049,26 @@ 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]] <- "(S) Susceptible"
|
df$cols[df$cols == colours_SIR[1] & !is_wt_nwt] <- "(S) Susceptible"
|
||||||
|
df$cols[df$cols == colours_SIR[1] & is_wt_nwt] <- "(WT) Wildtype"
|
||||||
df$cols[df$cols == colours_SIR[2]] <- "(SDD) Susceptible dose-dependent"
|
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[3]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
||||||
df$cols[df$cols == colours_SIR[4]] <- "(R) Resistant"
|
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],
|
||||||
@@ -988,7 +1076,9 @@ autoplot.disk <- function(object,
|
|||||||
"(I) Susceptible, incr. exp." = colours_SIR[3],
|
"(I) Susceptible, incr. exp." = colours_SIR[3],
|
||||||
"(I) Intermediate" = colours_SIR[3],
|
"(I) Intermediate" = colours_SIR[3],
|
||||||
"(R) Resistant" = colours_SIR[4],
|
"(R) Resistant" = colours_SIR[4],
|
||||||
"(NI) Non-interpretable" = "grey30"
|
"(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 +
|
||||||
@@ -1036,25 +1126,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)
|
||||||
|
|
||||||
@@ -1069,7 +1159,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))
|
||||||
|
|
||||||
@@ -1112,9 +1202,14 @@ barplot.sir <- function(height,
|
|||||||
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,
|
||||||
@@ -1160,6 +1255,11 @@ autoplot.sir <- function(object,
|
|||||||
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)
|
||||||
@@ -1169,7 +1269,9 @@ autoplot.sir <- function(object,
|
|||||||
"SDD" = colours_SIR[2],
|
"SDD" = colours_SIR[2],
|
||||||
"I" = colours_SIR[3],
|
"I" = colours_SIR[3],
|
||||||
"R" = colours_SIR[4],
|
"R" = colours_SIR[4],
|
||||||
"NI" = "grey30"
|
"NI" = "grey30",
|
||||||
|
"WT" = colours_SIR[1],
|
||||||
|
"NWT" = colours_SIR[4]
|
||||||
),
|
),
|
||||||
limits = force
|
limits = force
|
||||||
) +
|
) +
|
||||||
@@ -1298,6 +1400,9 @@ plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, f
|
|||||||
cols[sir == "I"] <- colours_SIR[3]
|
cols[sir == "I"] <- colours_SIR[3]
|
||||||
cols[sir == "R"] <- colours_SIR[4]
|
cols[sir == "R"] <- colours_SIR[4]
|
||||||
cols[sir == "NI"] <- "grey30"
|
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"
|
||||||
@@ -1367,10 +1472,10 @@ scale_sir_colours <- function(...,
|
|||||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
|
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 {.fun scale_sir_colours} for the {.code fill} aesthetic has been superseded by {.fun scale_fill_sir}, please use that instead. This warning will be shown once per session.")
|
||||||
}
|
}
|
||||||
if (any(c("colour", "color") %in% aesthetics) && message_not_thrown_before("scale_sir_colours", "colour", entire_session = TRUE)) {
|
if (any(c("colour", "color") %in% aesthetics) && message_not_thrown_before("scale_sir_colours", "colour", entire_session = TRUE)) {
|
||||||
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 {.fun scale_sir_colours} for the {.code colour} aesthetic has been superseded by {.fun scale_colour_sir}, please use that instead. This warning will be shown once per session.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("colours" %in% names(list(...))) {
|
if ("colours" %in% names(list(...))) {
|
||||||
@@ -1514,7 +1619,7 @@ expand_SIR_colours <- function(colours_SIR, unname = TRUE) {
|
|||||||
# named input: match and reorder
|
# named input: match and reorder
|
||||||
stop_ifnot(
|
stop_ifnot(
|
||||||
all(names(colours_SIR) %in% sir_order),
|
all(names(colours_SIR) %in% sir_order),
|
||||||
"Unknown names in `colours_SIR`. Expected any of: ", vector_or(levels(NA_sir_), quotes = FALSE, sort = FALSE), "."
|
"Unknown names in {.arg colours_SIR}. Expected any of: ", vector_or(levels(NA_sir_), quotes = FALSE, sort = FALSE), "."
|
||||||
)
|
)
|
||||||
if (length(colours_SIR) == 4) {
|
if (length(colours_SIR) == 4) {
|
||||||
# add colours for SI (same as S) and IR (same as R)
|
# add colours for SI (same as S) and IR (same as R)
|
||||||
|
|||||||
+36
-11
@@ -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,10 +233,20 @@
|
|||||||
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,
|
||||||
@@ -246,10 +261,20 @@ 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,
|
||||||
@@ -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)
|
||||||
@@ -287,7 +312,7 @@ sir_confidence_interval <- function(...,
|
|||||||
)
|
)
|
||||||
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
|
||||||
),
|
),
|
||||||
@@ -321,7 +346,7 @@ sir_confidence_interval <- function(...,
|
|||||||
if (n < minimum) {
|
if (n < minimum) {
|
||||||
warning_("Introducing NA: ",
|
warning_("Introducing NA: ",
|
||||||
ifelse(n == 0, "no", paste("only", n)),
|
ifelse(n == 0, "no", paste("only", n)),
|
||||||
" results available for `sir_confidence_interval()` (`minimum` = ", minimum, ").",
|
" results available for {.help [{.fun sir_confidence_interval}](AMR::sir_confidence_interval)} (whilst {.arg minimum = ", minimum, "}).",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
if (is.character(out)) {
|
if (is.character(out)) {
|
||||||
@@ -341,7 +366,7 @@ 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,
|
||||||
@@ -359,7 +384,7 @@ 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,
|
||||||
@@ -395,7 +420,7 @@ 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,
|
||||||
@@ -413,7 +438,7 @@ 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,
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ resistance_predict <- function(x,
|
|||||||
extra_msg = paste0("Use the tidymodels framework instead, for which we have written a basic and short introduction on our website: ", font_url("https://amr-for-r.org/articles/AMR_with_tidymodels.html", txt = font_bold("AMR with tidymodels")))
|
extra_msg = paste0("Use the tidymodels framework instead, for which we have written a basic and short introduction on our website: ", font_url("https://amr-for-r.org/articles/AMR_with_tidymodels.html", txt = font_bold("AMR with tidymodels")))
|
||||||
)
|
)
|
||||||
|
|
||||||
stop_if(is.null(model), 'choose a regression model with the `model` argument, e.g. resistance_predict(..., model = "binomial")')
|
stop_if(is.null(model), 'choose a regression model with the {.arg model} argument, e.g. {.code resistance_predict(..., model = "binomial")}')
|
||||||
|
|
||||||
x.bak <- x
|
x.bak <- x
|
||||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||||
@@ -146,11 +146,11 @@ resistance_predict <- function(x,
|
|||||||
# -- date
|
# -- date
|
||||||
if (is.null(col_date)) {
|
if (is.null(col_date)) {
|
||||||
col_date <- search_type_in_df(x = x, type = "date")
|
col_date <- search_type_in_df(x = x, type = "date")
|
||||||
stop_if(is.null(col_date), "`col_date` must be set")
|
stop_if(is.null(col_date), "{.arg col_date} must be set")
|
||||||
}
|
}
|
||||||
stop_ifnot(
|
stop_ifnot(
|
||||||
col_date %in% colnames(x),
|
col_date %in% colnames(x),
|
||||||
"column '", col_date, "' not found"
|
"column {.code ", col_date, "} not found"
|
||||||
)
|
)
|
||||||
|
|
||||||
year <- function(x) {
|
year <- function(x) {
|
||||||
@@ -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
|
||||||
@@ -357,7 +357,7 @@ ggplot_sir_predict <- function(x,
|
|||||||
meet_criteria(ribbon, allow_class = "logical", has_length = 1)
|
meet_criteria(ribbon, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
stop_ifnot_installed("ggplot2")
|
stop_ifnot_installed("ggplot2")
|
||||||
stop_ifnot(inherits(x, "resistance_predict"), "`x` must be a resistance prediction model created with resistance_predict()")
|
stop_ifnot(inherits(x, "resistance_predict"), "{.arg x} must be a resistance prediction model created with {.fun resistance_predict}")
|
||||||
|
|
||||||
if (attributes(x)$I_as_S == TRUE) {
|
if (attributes(x)$I_as_S == TRUE) {
|
||||||
ylab <- "%R"
|
ylab <- "%R"
|
||||||
|
|||||||
@@ -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,7 @@
|
|||||||
#' @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]: 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()] such as `as.sir(df, penicillins())`.
|
#' @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.
|
#' Otherwise: arguments passed on to methods.
|
||||||
#' @details
|
#' @details
|
||||||
@@ -95,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.
|
||||||
@@ -153,9 +156,9 @@
|
|||||||
#'
|
#'
|
||||||
#' ### 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
|
||||||
#'
|
#'
|
||||||
@@ -165,7 +168,7 @@
|
|||||||
#'
|
#'
|
||||||
#' 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`
|
||||||
@@ -179,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
|
||||||
@@ -353,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
|
||||||
@@ -394,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
|
||||||
@@ -434,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",
|
||||||
@@ -450,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")]
|
||||||
@@ -464,7 +471,7 @@ is_sir_eligible <- function(x, threshold = 0.05) {
|
|||||||
if (!is.na(ab)) {
|
if (!is.na(ab)) {
|
||||||
# this is a valid antibiotic drug code
|
# this is a valid antibiotic drug code
|
||||||
message_(
|
message_(
|
||||||
"Column '", font_bold(cur_col), "' is SIR eligible (despite only having empty values), since it seems to be ",
|
"Column {.field ", font_bold(cur_col), "} is SIR eligible (despite only having empty values), since it seems to be ",
|
||||||
ab_name(ab, language = NULL, tolower = TRUE), " (", ab, ")"
|
ab_name(ab, language = NULL, tolower = TRUE), " (", ab, ")"
|
||||||
)
|
)
|
||||||
return(TRUE)
|
return(TRUE)
|
||||||
@@ -482,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))
|
||||||
@@ -506,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), ...))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -569,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_("{.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 {.field ", font_bold(cur_col, collapse = NULL), "}")),
|
||||||
" 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: ",
|
||||||
@@ -610,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),
|
||||||
@@ -631,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,
|
||||||
@@ -653,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),
|
||||||
@@ -673,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,
|
||||||
@@ -697,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),
|
||||||
@@ -714,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)
|
||||||
@@ -729,6 +759,10 @@ as.sir.data.frame <- function(x,
|
|||||||
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 (isTRUE(info) && message_not_thrown_before("as.sir", "sir_interpretation_history")) {
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
|
||||||
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
|
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
|
||||||
sel <- colnames(pm_select(x, ...))
|
sel <- colnames(pm_select(x, ...))
|
||||||
} else {
|
} else {
|
||||||
@@ -753,10 +787,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") {
|
||||||
@@ -786,7 +820,7 @@ as.sir.data.frame <- function(x,
|
|||||||
# column found, transform to logical
|
# column found, transform to logical
|
||||||
stop_if(
|
stop_if(
|
||||||
length(col_uti) != 1 | !col_uti %in% colnames(x),
|
length(col_uti) != 1 | !col_uti %in% colnames(x),
|
||||||
"argument `uti` must be a [logical] vector, of must be a single column name of `x`"
|
"argument {.arg uti} must be a [logical] vector, or must be a single column name of {.arg x}"
|
||||||
)
|
)
|
||||||
uti <- as.logical(x[, col_uti, drop = TRUE])
|
uti <- as.logical(x[, col_uti, drop = TRUE])
|
||||||
}
|
}
|
||||||
@@ -795,8 +829,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 ")
|
||||||
@@ -804,9 +838,8 @@ 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 ", paste0("{.field ", 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."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -828,7 +861,7 @@ as.sir.data.frame <- function(x,
|
|||||||
return(FALSE)
|
return(FALSE)
|
||||||
}
|
}
|
||||||
if (length(sel) == 0 || (length(sel) > 0 && ab %in% sel)) {
|
if (length(sel) == 0 || (length(sel) > 0 && ab %in% sel)) {
|
||||||
ab_coerced <- suppressWarnings(as.ab(ab, info = info))
|
ab_coerced <- suppressWarnings(as.ab(ab, info = FALSE))
|
||||||
if (is.na(ab_coerced) || (length(sel) > 0 & !ab %in% sel)) {
|
if (is.na(ab_coerced) || (length(sel) > 0 & !ab %in% sel)) {
|
||||||
# not even a valid AB code
|
# not even a valid AB code
|
||||||
return(FALSE)
|
return(FALSE)
|
||||||
@@ -853,7 +886,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)
|
||||||
@@ -868,7 +901,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: ", conditionMessage(e), add_fn = font_red)
|
message_("Could not create parallel cluster, using single-core computation. Error message: ", conditionMessage(e))
|
||||||
}
|
}
|
||||||
return(NULL)
|
return(NULL)
|
||||||
}
|
}
|
||||||
@@ -878,6 +911,11 @@ as.sir.data.frame <- function(x,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isTRUE(info)) {
|
||||||
|
message_(as_note = FALSE) # empty line
|
||||||
|
message_("Processing columns:", as_note = FALSE)
|
||||||
|
}
|
||||||
|
|
||||||
run_as_sir_column <- function(i) {
|
run_as_sir_column <- function(i) {
|
||||||
ab_col <- ab_cols[i]
|
ab_col <- ab_cols[i]
|
||||||
out <- list(result = NULL, log = NULL)
|
out <- list(result = NULL, log = NULL)
|
||||||
@@ -894,6 +932,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,
|
||||||
@@ -921,6 +960,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,
|
||||||
@@ -938,12 +978,12 @@ as.sir.data.frame <- function(x,
|
|||||||
return(out)
|
return(out)
|
||||||
} else if (types[i] == "sir") {
|
} else if (types[i] == "sir") {
|
||||||
ab <- ab_col
|
ab <- ab_col
|
||||||
ab_coerced <- suppressWarnings(as.ab(ab, info = info))
|
ab_coerced <- suppressWarnings(as.ab(ab, info = FALSE))
|
||||||
show_message <- FALSE
|
show_message <- FALSE
|
||||||
if (!all(x[, ab, drop = TRUE] %in% c("S", "SDD", "I", "R", "NI", NA), na.rm = TRUE)) {
|
if (!all(x[, ab, drop = TRUE] %in% c("S", "SDD", "I", "R", "NI", NA), na.rm = TRUE)) {
|
||||||
show_message <- TRUE
|
show_message <- TRUE
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
message_("Cleaning values in column '", font_bold(ab), "' (",
|
message_("\u00a0\u00a0", AMR_env$bullet_icon, " Cleaning values in column ", paste0("{.field ", font_bold(ab), "}"), " (",
|
||||||
ifelse(ab_coerced != toupper(ab), paste0(ab_coerced, ", "), ""),
|
ifelse(ab_coerced != toupper(ab), paste0(ab_coerced, ", "), ""),
|
||||||
ab_name(ab_coerced, tolower = TRUE, info = info), ")... ",
|
ab_name(ab_coerced, tolower = TRUE, info = info), ")... ",
|
||||||
appendLF = FALSE,
|
appendLF = FALSE,
|
||||||
@@ -953,7 +993,7 @@ as.sir.data.frame <- function(x,
|
|||||||
} else if (!is.sir(x.bak[, ab, drop = TRUE])) {
|
} else if (!is.sir(x.bak[, ab, drop = TRUE])) {
|
||||||
show_message <- TRUE
|
show_message <- TRUE
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
message_("Assigning class 'sir' to already clean column '", font_bold(ab), "' (",
|
message_("\u00a0\u00a0", AMR_env$bullet_icon, " Assigning class {.cls sir} to already clean column ", paste0("{.field ", font_bold(ab), "}"), " (",
|
||||||
ifelse(ab_coerced != toupper(ab), paste0(ab_coerced, ", "), ""),
|
ifelse(ab_coerced != toupper(ab), paste0(ab_coerced, ", "), ""),
|
||||||
ab_name(ab_coerced, tolower = TRUE, language = NULL, info = info), ")... ",
|
ab_name(ab_coerced, tolower = TRUE, language = NULL, info = info), ")... ",
|
||||||
appendLF = FALSE,
|
appendLF = FALSE,
|
||||||
@@ -963,7 +1003,7 @@ as.sir.data.frame <- function(x,
|
|||||||
}
|
}
|
||||||
result <- as.sir.default(x = as.character(x[, ab, drop = TRUE]))
|
result <- as.sir.default(x = as.character(x[, ab, drop = TRUE]))
|
||||||
if (show_message == TRUE && isTRUE(info)) {
|
if (show_message == TRUE && isTRUE(info)) {
|
||||||
message(font_green_bg(" OK "))
|
message_(font_green_bg("\u00a0OK\u00a0"), as_note = FALSE)
|
||||||
}
|
}
|
||||||
out$result <- result
|
out$result <- result
|
||||||
out$log <- NULL
|
out$log <- NULL
|
||||||
@@ -975,7 +1015,7 @@ as.sir.data.frame <- function(x,
|
|||||||
|
|
||||||
if (isTRUE(parallel) && n_cores > 1 && length(ab_cols) > 1) {
|
if (isTRUE(parallel) && n_cores > 1 && length(ab_cols) > 1) {
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
message()
|
message_(as_note = FALSE)
|
||||||
message_("Running in parallel mode using ", n_cores, " out of ", get_n_cores(Inf), " cores, on columns ", vector_and(font_bold(ab_cols, collapse = NULL), quotes = "'", sort = FALSE), "...", as_note = FALSE, appendLF = FALSE)
|
message_("Running in parallel mode using ", n_cores, " out of ", get_n_cores(Inf), " cores, on columns ", vector_and(font_bold(ab_cols, collapse = NULL), quotes = "'", sort = FALSE), "...", as_note = FALSE, appendLF = FALSE)
|
||||||
}
|
}
|
||||||
if (.Platform$OS.type == "windows" || getRversion() < "4.0.0") {
|
if (.Platform$OS.type == "windows" || getRversion() < "4.0.0") {
|
||||||
@@ -983,7 +1023,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",
|
||||||
@@ -995,16 +1035,16 @@ as.sir.data.frame <- function(x,
|
|||||||
result_list <- parallel::mclapply(seq_along(ab_cols), run_as_sir_column, mc.cores = n_cores)
|
result_list <- parallel::mclapply(seq_along(ab_cols), run_as_sir_column, mc.cores = n_cores)
|
||||||
}
|
}
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
message_(font_green_bg(" DONE "), as_note = FALSE)
|
message_(font_green_bg("\u00aDONE\u00a"), as_note = FALSE)
|
||||||
message()
|
message_(as_note = FALSE)
|
||||||
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_(as_note = FALSE)
|
||||||
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)
|
||||||
@@ -1039,8 +1079,8 @@ get_guideline <- function(guideline, reference_data) {
|
|||||||
guideline_param[guideline_param %unlike% " "] <- gsub("([a-z]+)([0-9]+)", "\\1 \\2", guideline_param[guideline_param %unlike% " "], ignore.case = TRUE)
|
guideline_param[guideline_param %unlike% " "] <- gsub("([a-z]+)([0-9]+)", "\\1 \\2", guideline_param[guideline_param %unlike% " "], ignore.case = TRUE)
|
||||||
|
|
||||||
stop_ifnot(guideline_param %in% reference_data$guideline,
|
stop_ifnot(guideline_param %in% reference_data$guideline,
|
||||||
"invalid guideline: '", guideline,
|
"invalid guideline: {.val ", guideline,
|
||||||
"'.\nValid guidelines are: ", vector_and(reference_data$guideline, quotes = TRUE, reverse = TRUE),
|
"}.\nValid guidelines are: ", vector_and(reference_data$guideline, reverse = TRUE),
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1096,6 +1136,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,
|
||||||
@@ -1117,7 +1158,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)
|
||||||
@@ -1134,13 +1176,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_("Run `sir_interpretation_history()` afterwards to retrieve a logbook with all details of the breakpoint interpretations.\n\n", add_fn = font_green)
|
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")
|
||||||
}
|
}
|
||||||
|
|
||||||
current_df <- tryCatch(get_current_data(NA, 0), error = function(e) NULL)
|
current_df <- tryCatch(get_current_data(NA, 0), error = function(e) NULL)
|
||||||
@@ -1156,13 +1198,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 {
|
||||||
@@ -1188,7 +1230,7 @@ as_sir_method <- function(method_short,
|
|||||||
host <- convert_host(host, lang = language)
|
host <- convert_host(host, lang = language)
|
||||||
if (any(is.na(host) & !is.na(host.bak)) && isTRUE(info) && message_not_thrown_before("as.sir", "missing_hosts")) {
|
if (any(is.na(host) & !is.na(host.bak)) && isTRUE(info) && message_not_thrown_before("as.sir", "missing_hosts")) {
|
||||||
warning_("The following animal host(s) could not be coerced: ", vector_and(host.bak[is.na(host) & !is.na(host.bak)]), immediate = TRUE)
|
warning_("The following animal host(s) could not be coerced: ", vector_and(host.bak[is.na(host) & !is.na(host.bak)]), immediate = TRUE)
|
||||||
message() # new line
|
message_(as_note = FALSE) # new line
|
||||||
}
|
}
|
||||||
# TODO add a switch to turn this off? In interactive sessions perhaps ask the user. Default should be On.
|
# TODO add a switch to turn this off? In interactive sessions perhaps ask the user. Default should be On.
|
||||||
# if (breakpoint_type == "animal" && isTRUE(info) && message_not_thrown_before("as.sir", "host_missing_breakpoints")) {
|
# if (breakpoint_type == "animal" && isTRUE(info) && message_not_thrown_before("as.sir", "host_missing_breakpoints")) {
|
||||||
@@ -1213,7 +1255,7 @@ as_sir_method <- function(method_short,
|
|||||||
|
|
||||||
# get mo
|
# get mo
|
||||||
if (!is.null(current_df) && length(mo) == 1 && mo %in% colnames(current_df)) {
|
if (!is.null(current_df) && length(mo) == 1 && mo %in% colnames(current_df)) {
|
||||||
mo_var_found <- paste0(" based on column '", font_bold(mo), "'")
|
mo_var_found <- paste0(" based on column {.field ", font_bold(mo), "}")
|
||||||
mo <- current_df[[mo]]
|
mo <- current_df[[mo]]
|
||||||
} else if (length(mo) != length(x)) {
|
} else if (length(mo) != length(x)) {
|
||||||
mo_var_found <- ""
|
mo_var_found <- ""
|
||||||
@@ -1229,7 +1271,7 @@ as_sir_method <- function(method_short,
|
|||||||
silent = TRUE
|
silent = TRUE
|
||||||
)
|
)
|
||||||
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
|
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
|
||||||
mo_var_found <- paste0(" based on column '", font_bold(mo), "'")
|
mo_var_found <- paste0(" based on column {.field ", font_bold(mo), "}")
|
||||||
mo <- df[, mo, drop = TRUE]
|
mo <- df[, mo, drop = TRUE]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1242,9 +1284,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 {.cls 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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1278,11 +1320,11 @@ 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)
|
||||||
ab <- suppressWarnings(as.ab(ab, info = info))
|
ab <- suppressWarnings(as.ab(ab, info = FALSE))
|
||||||
if (!is.null(list(...)$mo.bak)) {
|
if (!is.null(list(...)$mo.bak)) {
|
||||||
mo.bak <- list(...)$mo.bak
|
mo.bak <- list(...)$mo.bak
|
||||||
} else {
|
} else {
|
||||||
@@ -1294,8 +1336,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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1319,14 +1360,12 @@ 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_("{.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
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# format agents ----
|
# format agents ----
|
||||||
agent_formatted <- paste0("'", font_bold(ab.bak, collapse = NULL), "'")
|
agent_formatted <- paste0("{.field ", font_bold(ab.bak, collapse = NULL), "}")
|
||||||
agent_name <- ab_name(ab, tolower = TRUE, language = NULL, info = info)
|
agent_name <- ab_name(ab, tolower = TRUE, language = NULL, info = info)
|
||||||
same_ab <- generalise_antibiotic_name(ab) == generalise_antibiotic_name(agent_name)
|
same_ab <- generalise_antibiotic_name(ab) == generalise_antibiotic_name(agent_name)
|
||||||
same_ab.bak <- generalise_antibiotic_name(ab.bak) == generalise_antibiotic_name(agent_name)
|
same_ab.bak <- generalise_antibiotic_name(ab.bak) == generalise_antibiotic_name(agent_name)
|
||||||
@@ -1342,7 +1381,7 @@ as_sir_method <- function(method_short,
|
|||||||
)
|
)
|
||||||
# this intro text will also be printed in the progress bar if the `progress` package is installed
|
# this intro text will also be printed in the progress bar if the `progress` package is installed
|
||||||
intro_txt <- paste0(
|
intro_txt <- paste0(
|
||||||
"Interpreting ", method_long, ": ", ifelse(isTRUE(list(...)$is_data.frame), "column ", ""),
|
"\u00a0\u00a0", AMR_env$bullet_icon, " Interpreting ", method_long, ": ", ifelse(isTRUE(list(...)$is_data.frame), "column ", ""),
|
||||||
ifelse(length(unique(agent_formatted)) == 1, unique(agent_formatted), paste0(vector_and(agent_formatted, quotes = FALSE, sort = FALSE))),
|
ifelse(length(unique(agent_formatted)) == 1, unique(agent_formatted), paste0(vector_and(agent_formatted, quotes = FALSE, sort = FALSE))),
|
||||||
mo_var_found,
|
mo_var_found,
|
||||||
ifelse(identical(reference_data, AMR::clinical_breakpoints),
|
ifelse(identical(reference_data, AMR::clinical_breakpoints),
|
||||||
@@ -1360,7 +1399,7 @@ as_sir_method <- function(method_short,
|
|||||||
rise_warning <- FALSE
|
rise_warning <- FALSE
|
||||||
rise_notes <- FALSE
|
rise_notes <- FALSE
|
||||||
method_coerced <- toupper(method)
|
method_coerced <- toupper(method)
|
||||||
ab_coerced <- as.ab(ab, info = info)
|
ab_coerced <- as.ab(ab, info = FALSE)
|
||||||
|
|
||||||
if (identical(reference_data, AMR::clinical_breakpoints)) {
|
if (identical(reference_data, AMR::clinical_breakpoints)) {
|
||||||
breakpoints <- reference_data %pm>%
|
breakpoints <- reference_data %pm>%
|
||||||
@@ -1378,8 +1417,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,
|
||||||
@@ -1393,7 +1432,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
|
||||||
@@ -1404,8 +1443,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.")
|
||||||
@@ -1417,12 +1455,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])
|
||||||
@@ -1458,14 +1496,14 @@ as_sir_method <- function(method_short,
|
|||||||
# only print intro under 10 items, otherwise progressbar will print this and then it will be printed double
|
# only print intro under 10 items, otherwise progressbar will print this and then it will be printed double
|
||||||
message_(intro_txt, appendLF = FALSE, as_note = FALSE)
|
message_(intro_txt, appendLF = FALSE, as_note = FALSE)
|
||||||
}
|
}
|
||||||
p <- progress_ticker(n = nrow(df_unique), n_min = 10, title = font_blue(intro_txt), only_bar_percent = TRUE)
|
p <- progress_ticker(n = nrow(df_unique), n_min = 10, title = intro_txt, only_bar_percent = TRUE)
|
||||||
has_progress_bar <- !is.null(import_fn("progress_bar", "progress", error_on_fail = FALSE)) && nrow(df_unique) >= 10
|
has_progress_bar <- !is.null(import_fn("progress_bar", "progress", error_on_fail = FALSE)) && nrow(df_unique) >= 10
|
||||||
on.exit(close(p))
|
on.exit(close(p))
|
||||||
|
|
||||||
if (nrow(breakpoints) == 0) {
|
if (nrow(breakpoints) == 0) {
|
||||||
# apparently no breakpoints found
|
# apparently no breakpoints found
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
message(font_grey_bg(font_black(" NO BREAKPOINTS ")))
|
message_(font_grey_bg(font_black(" NO BREAKPOINTS ")), as_note = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
load_mo_uncertainties(metadata_mo)
|
load_mo_uncertainties(metadata_mo)
|
||||||
@@ -1500,8 +1538,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))
|
||||||
|
|
||||||
@@ -1636,11 +1674,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)),
|
||||||
@@ -1734,31 +1772,51 @@ as_sir_method <- function(method_short,
|
|||||||
""
|
""
|
||||||
),
|
),
|
||||||
"\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
|
||||||
@@ -1774,27 +1832,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"),
|
||||||
@@ -1803,6 +1896,12 @@ 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 <- gsub("\n\n", "\n", trimws2(notes_current), fixed = TRUE)
|
notes_current <- gsub("\n\n", "\n", trimws2(notes_current), fixed = TRUE)
|
||||||
notes_current[notes_current == ""] <- NA_character_
|
notes_current[notes_current == ""] <- NA_character_
|
||||||
@@ -1814,13 +1913,13 @@ 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),
|
||||||
guideline = vectorise_log_entry(guideline_current, length(rows)),
|
guideline = vectorise_log_entry(guideline_current, length(rows)),
|
||||||
ref_table = vectorise_log_entry(breakpoints_current[, "ref_tbl", drop = TRUE], length(rows)),
|
ref_table = vectorise_log_entry(breakpoints_current[, "ref_tbl", drop = TRUE], length(rows)),
|
||||||
uti = vectorise_log_entry(breakpoints_current[, "uti", drop = TRUE], length(rows)),
|
uti = vectorise_log_entry(breakpoints_current[, "uti", drop = TRUE], length(rows)),
|
||||||
@@ -1845,21 +1944,21 @@ as_sir_method <- function(method_short,
|
|||||||
notes <- notes[!trimws2(notes) %in% c("", NA_character_)]
|
notes <- notes[!trimws2(notes) %in% c("", NA_character_)]
|
||||||
if (length(notes) > 0) {
|
if (length(notes) > 0) {
|
||||||
if (isTRUE(rise_warning)) {
|
if (isTRUE(rise_warning)) {
|
||||||
message(font_rose_bg(" WARNING "))
|
message_(font_rose_bg("\u00a0WARNING\u00a0"), as_note = FALSE)
|
||||||
} else {
|
} else {
|
||||||
message(font_yellow_bg(" NOTE "))
|
message_(font_yellow_bg("\u00a0NOTE\u00a0"), as_note = FALSE)
|
||||||
}
|
}
|
||||||
notes <- unique(notes)
|
notes <- unique(notes)
|
||||||
# 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_(notes[i], as_note = FALSE)
|
||||||
}
|
}
|
||||||
} 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("\u00a0\u00a0", 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))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message(font_green_bg(" OK "))
|
message_(font_green_bg("\u00a0OK\u00a0"), as_note = FALSE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1897,7 +1996,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 {.val 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"]
|
||||||
@@ -1911,12 +2010,19 @@ pillar_shaft.sir <- function(x, ...) {
|
|||||||
if (has_colour()) {
|
if (has_colour()) {
|
||||||
# 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)] <- pillar::style_subtle(" NA")
|
||||||
out[x == "S"] <- font_green_bg(" S ")
|
out[x == "S"] <- font_green_bg(" S ") # has font_black internally
|
||||||
out[x == "SDD"] <- font_green_lighter_bg(" SDD ")
|
out[x == "SDD"] <- font_green_lighter_bg(" SDD ") # has font_black internally
|
||||||
out[x == "I"] <- font_orange_bg(" I ")
|
if (getOption("AMR_guideline", "EUCAST")[1] == "EUCAST") {
|
||||||
out[x == "R"] <- font_rose_bg(" R ")
|
out[x == "I"] <- font_green_lighter_bg(" I ") # has font_black internally
|
||||||
out[x == "NI"] <- font_grey_bg(font_black(" NI "))
|
} else {
|
||||||
|
out[x == "I"] <- font_orange_bg(" I ") # has font_black internally
|
||||||
|
}
|
||||||
|
out[x == "R"] <- font_rose_bg(" R ") # has font_black internally
|
||||||
|
out[x == "NI"] <- font_grey_bg(font_black(" NI ", adapt = FALSE))
|
||||||
|
out[x == "WT"] <- font_green_bg(" WT ") # has font_black internally
|
||||||
|
out[x == "NWT"] <- font_rose_bg(" NWT ") # has font_black internally
|
||||||
|
out[x == "NS"] <- font_rose_bg(" NS ") # has font_black internally
|
||||||
}
|
}
|
||||||
create_pillar_column(out, align = "left", width = 5)
|
create_pillar_column(out, align = "left", width = 5)
|
||||||
}
|
}
|
||||||
@@ -1974,10 +2080,10 @@ 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) {
|
||||||
# TODO add here in AMR 3.1.0 details about guideline
|
# TODO #170 add here in AMR 3.1.0 details about guideline
|
||||||
skimr::sfl(
|
skimr::sfl(
|
||||||
skim_type = "sir",
|
skim_type = "sir",
|
||||||
# guideline = function(x) "EUCAST 2025", # or "Multiple"
|
# guideline = function(x) "EUCAST 2026", # or "Multiple"
|
||||||
# origin = function(x) "MIC", # or "Multiple"
|
# origin = function(x) "MIC", # or "Multiple"
|
||||||
count_S = count_S,
|
count_S = count_S,
|
||||||
count_I = count_I,
|
count_I = count_I,
|
||||||
@@ -1994,7 +2100,7 @@ get_skimmers.sir <- function(column) {
|
|||||||
#' @noRd
|
#' @noRd
|
||||||
print.sir <- function(x, ...) {
|
print.sir <- function(x, ...) {
|
||||||
x_name <- deparse(substitute(x))
|
x_name <- deparse(substitute(x))
|
||||||
cat("Class 'sir'\n")
|
cat(format_inline_("Class {.cls sir}\n"))
|
||||||
# TODO for #170
|
# TODO for #170
|
||||||
# if (!is.null(attributes(x)$guideline) && !all(is.na(attributes(x)$guideline))) {
|
# if (!is.null(attributes(x)$guideline) && !all(is.na(attributes(x)$guideline))) {
|
||||||
# cat(font_blue(word_wrap("These values were interpreted using ",
|
# cat(font_blue(word_wrap("These values were interpreted using ",
|
||||||
@@ -2013,9 +2119,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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2133,10 +2239,13 @@ 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 {.help [clinical_breakpoints](AMR::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)
|
bad_col <- names(class_ref[class_sir != class_ref][1])
|
||||||
|
bad_cls <- gsub("<|>", "", class_ref[class_sir != class_ref][1])
|
||||||
|
exp_cls <- gsub("<|>", "", class_sir[class_sir != class_ref][1])
|
||||||
|
stop_("{.arg reference_data} must be the same structure as the {.help [clinical_breakpoints](AMR::clinical_breakpoints)} data set. Column ", paste0("{.field ", font_bold(bad_col, collapse = NULL), "}"), " is of class ", paste0("{.cls ", bad_cls, "}"), ", but should be of class ", paste0("{.cls ", exp_cls, "}"), call = .call_depth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-19
@@ -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)
|
||||||
@@ -60,11 +60,6 @@ sir_calc <- function(...,
|
|||||||
dots <- eval(substitute(alist(...)))
|
dots <- eval(substitute(alist(...)))
|
||||||
stop_if(length(dots) == 0, "no variables selected", call = -2)
|
stop_if(length(dots) == 0, "no variables selected", call = -2)
|
||||||
|
|
||||||
stop_if("also_single_tested" %in% names(dots),
|
|
||||||
"`also_single_tested` was replaced by `only_all_tested`.\n",
|
|
||||||
"Please read Details in the help page (`?proportion`) as this may have a considerable impact on your analysis.",
|
|
||||||
call = -2
|
|
||||||
)
|
|
||||||
ndots <- length(dots)
|
ndots <- length(dots)
|
||||||
|
|
||||||
if (is.data.frame(dots_df)) {
|
if (is.data.frame(dots_df)) {
|
||||||
@@ -117,6 +112,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)
|
||||||
@@ -142,15 +139,15 @@ sir_calc <- function(...,
|
|||||||
FUN = min
|
FUN = min
|
||||||
)
|
)
|
||||||
if ("SDD" %in% ab_result && "SDD" %in% y && message_not_thrown_before("sir_calc", only_count, ab_result, entire_session = TRUE)) {
|
if ("SDD" %in% ab_result && "SDD" %in% y && 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 {.fun ", ifelse(only_count, "count", "proportion"), "_", ifelse("S" %in% ab_result, "S", ""), "I", ifelse("R" %in% ab_result, "R", ""), "} will also include dose-dependent susceptibility, {.val SDD}. This note will be shown once for this session.", as_note = FALSE)
|
||||||
}
|
}
|
||||||
numerator <- sum(!is.na(y) & y %in% as.double(ab_result), na.rm = TRUE)
|
numerator <- sum(!is.na(y) & y %in% as.double(ab_result), na.rm = TRUE)
|
||||||
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 {.fun ", ifelse(only_count, "count", "proportion"), "_", ifelse("S" %in% ab_result, "S", ""), "I", ifelse("R" %in% ab_result, "R", ""), "} will also include dose-dependent susceptibility, {.val SDD}. This note will be shown once for this session.", as_note = FALSE)
|
||||||
}
|
}
|
||||||
numerator <- sum(vapply(FUN.VALUE = logical(1), x_transposed, function(y) any(y %in% ab_result, na.rm = TRUE)))
|
numerator <- sum(vapply(FUN.VALUE = logical(1), x_transposed, function(y) any(y %in% ab_result, na.rm = TRUE)))
|
||||||
denominator <- sum(vapply(FUN.VALUE = logical(1), x_transposed, function(y) !(all(y %in% other_values) & anyNA(y))))
|
denominator <- sum(vapply(FUN.VALUE = logical(1), x_transposed, function(y) !(all(y %in% other_values) & anyNA(y))))
|
||||||
@@ -162,16 +159,16 @@ sir_calc <- function(...,
|
|||||||
print_warning <- TRUE
|
print_warning <- TRUE
|
||||||
}
|
}
|
||||||
if ("SDD" %in% ab_result && "SDD" %in% x && message_not_thrown_before("sir_calc", only_count, ab_result, entire_session = TRUE)) {
|
if ("SDD" %in% ab_result && "SDD" %in% x && 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, {.val 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 {.cls 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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -207,7 +204,7 @@ sir_calc <- function(...,
|
|||||||
ifelse(denominator == 0, "no", paste("only", denominator)),
|
ifelse(denominator == 0, "no", paste("only", denominator)),
|
||||||
" results available",
|
" results available",
|
||||||
data_vars,
|
data_vars,
|
||||||
" (`minimum` = ", minimum, ").",
|
" (whilst {.arg minimum = ", minimum, "}).",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
fraction <- NA_real_
|
fraction <- NA_real_
|
||||||
@@ -259,13 +256,13 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
|
|||||||
for (i in seq_len(ncol(data))) {
|
for (i in seq_len(ncol(data))) {
|
||||||
# transform SIR columns
|
# transform SIR columns
|
||||||
if (is.sir(data[, i, drop = TRUE])) {
|
if (is.sir(data[, i, drop = TRUE])) {
|
||||||
data[, i] <- as.character(data[, i, drop = TRUE])
|
data[, i] <- as.character(as.sir(data[, i, drop = TRUE]))
|
||||||
|
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"
|
||||||
if (isTRUE(combine_SI)) {
|
if (isTRUE(combine_SI)) {
|
||||||
if ("SDD" %in% data[, i, drop = TRUE] && message_not_thrown_before("sir_calc_df", combine_SI, entire_session = TRUE)) {
|
data[which(data[, i, drop = TRUE] %in% c("I", "S")), i] <- "SI"
|
||||||
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[, i] <- gsub("(I|S|SDD)", "SI", data[, i, drop = TRUE])
|
|
||||||
}
|
}
|
||||||
|
data[which(!data[, i, drop = TRUE] %in% c("S", "SI", "I", "R")), i] <- NA_character_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,20 +1,21 @@
|
|||||||
#' AMR Extensions for Tidymodels
|
#' AMR Extensions for Tidymodels
|
||||||
#'
|
#'
|
||||||
#' This family of functions allows using AMR-specific data types such as `<mic>` and `<sir>` inside `tidymodels` pipelines.
|
#' This family of functions allows using AMR-specific data types such as `<sir>` and `<mic>` inside `tidymodels` pipelines.
|
||||||
#' @inheritParams recipes::step_center
|
#' @inheritParams recipes::step_center
|
||||||
#' @details
|
#' @details
|
||||||
#' You can read more in our online [AMR with tidymodels introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
|
#' You can read more in our online [AMR with tidymodels introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
|
||||||
#'
|
#'
|
||||||
#' Tidyselect helpers include:
|
#' Tidyselect helpers include:
|
||||||
#' - [all_mic()] and [all_mic_predictors()] to select `<mic>` columns
|
#' - [all_sir()] and [all_sir_predictors()] to select [`<sir>`][as.sir()] columns
|
||||||
#' - [all_sir()] and [all_sir_predictors()] to select `<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:
|
#' Pre-processing pipeline steps include:
|
||||||
#' - [step_mic_log2()] to convert MIC columns to numeric (via `as.numeric()`) and apply a log2 transform, to be used with [all_mic_predictors()]
|
|
||||||
#' - [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_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.
|
#' 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.mic()], [as.sir()]
|
#' @seealso [recipes::recipe()], [as.sir()], [as.mic()], [as.disk()]
|
||||||
#' @name amr-tidymodels
|
#' @name amr-tidymodels
|
||||||
#' @keywords internal
|
#' @keywords internal
|
||||||
#' @export
|
#' @export
|
||||||
@@ -66,48 +67,69 @@
|
|||||||
#' bind_cols(out_testing)
|
#' bind_cols(out_testing)
|
||||||
#'
|
#'
|
||||||
#' # Evaluate predictions using standard classification metrics
|
#' # Evaluate predictions using standard classification metrics
|
||||||
#' our_metrics <- metric_set(accuracy, kap, ppv, npv)
|
#' our_metrics <- metric_set(accuracy,
|
||||||
|
#' recall,
|
||||||
|
#' precision,
|
||||||
|
#' sensitivity,
|
||||||
|
#' specificity,
|
||||||
|
#' ppv,
|
||||||
|
#' npv)
|
||||||
#' metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
|
#' metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
|
||||||
#'
|
#'
|
||||||
#' # Show performance
|
#' # Show performance
|
||||||
#' metrics
|
#' metrics
|
||||||
#' }
|
#' }
|
||||||
all_mic <- function() {
|
|
||||||
x <- tidymodels_amr_select(levels(NA_mic_))
|
|
||||||
names(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname amr-tidymodels
|
|
||||||
#' @export
|
|
||||||
all_mic_predictors <- function() {
|
|
||||||
x <- tidymodels_amr_select(levels(NA_mic_))
|
|
||||||
intersect(x, recipes::has_role("predictor"))
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname amr-tidymodels
|
|
||||||
#' @export
|
|
||||||
all_sir <- function() {
|
all_sir <- function() {
|
||||||
x <- tidymodels_amr_select(levels(NA_sir_))
|
x <- tidymodels_amr_select(class = "sir")
|
||||||
names(x)
|
names(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rdname amr-tidymodels
|
#' @rdname amr-tidymodels
|
||||||
#' @export
|
#' @export
|
||||||
all_sir_predictors <- function() {
|
all_sir_predictors <- function() {
|
||||||
x <- tidymodels_amr_select(levels(NA_sir_))
|
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"))
|
intersect(x, recipes::has_role("predictor"))
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rdname amr-tidymodels
|
#' @rdname amr-tidymodels
|
||||||
#' @export
|
#' @export
|
||||||
step_mic_log2 <- function(
|
step_mic_log2 <- function(
|
||||||
recipe,
|
recipe,
|
||||||
...,
|
...,
|
||||||
role = NA,
|
role = NA,
|
||||||
trained = FALSE,
|
trained = FALSE,
|
||||||
columns = NULL,
|
columns = NULL,
|
||||||
skip = FALSE,
|
skip = FALSE,
|
||||||
id = recipes::rand_id("mic_log2")) {
|
id = recipes::rand_id("mic_log2")
|
||||||
|
) {
|
||||||
recipes::add_step(
|
recipes::add_step(
|
||||||
recipe,
|
recipe,
|
||||||
step_mic_log2_new(
|
step_mic_log2_new(
|
||||||
@@ -160,7 +182,6 @@ bake.step_mic_log2 <- function(object, new_data, ...) {
|
|||||||
print.step_mic_log2 <- function(x, width = max(20, options()$width - 35), ...) {
|
print.step_mic_log2 <- function(x, width = max(20, options()$width - 35), ...) {
|
||||||
title <- "Log2 transformation of MIC columns"
|
title <- "Log2 transformation of MIC columns"
|
||||||
recipes::print_step(x$columns, x$terms, x$trained, title, width)
|
recipes::print_step(x$columns, x$terms, x$trained, title, width)
|
||||||
invisible(x)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_mic_log2)
|
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_mic_log2)
|
||||||
@@ -177,13 +198,14 @@ tidy.step_mic_log2 <- function(x, ...) {
|
|||||||
#' @rdname amr-tidymodels
|
#' @rdname amr-tidymodels
|
||||||
#' @export
|
#' @export
|
||||||
step_sir_numeric <- function(
|
step_sir_numeric <- function(
|
||||||
recipe,
|
recipe,
|
||||||
...,
|
...,
|
||||||
role = NA,
|
role = NA,
|
||||||
trained = FALSE,
|
trained = FALSE,
|
||||||
columns = NULL,
|
columns = NULL,
|
||||||
skip = FALSE,
|
skip = FALSE,
|
||||||
id = recipes::rand_id("sir_numeric")) {
|
id = recipes::rand_id("sir_numeric")
|
||||||
|
) {
|
||||||
recipes::add_step(
|
recipes::add_step(
|
||||||
recipe,
|
recipe,
|
||||||
step_sir_numeric_new(
|
step_sir_numeric_new(
|
||||||
@@ -236,7 +258,6 @@ bake.step_sir_numeric <- function(object, new_data, ...) {
|
|||||||
print.step_sir_numeric <- function(x, width = max(20, options()$width - 35), ...) {
|
print.step_sir_numeric <- function(x, width = max(20, options()$width - 35), ...) {
|
||||||
title <- "Numeric transformation of SIR columns"
|
title <- "Numeric transformation of SIR columns"
|
||||||
recipes::print_step(x$columns, x$terms, x$trained, title, width)
|
recipes::print_step(x$columns, x$terms, x$trained, title, width)
|
||||||
invisible(x)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_sir_numeric)
|
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(recipes::tidy, step_sir_numeric)
|
||||||
@@ -250,13 +271,13 @@ tidy.step_sir_numeric <- function(x, ...) {
|
|||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
tidymodels_amr_select <- function(check_vector) {
|
tidymodels_amr_select <- function(class) {
|
||||||
df <- get_current_data()
|
df <- get_current_data()
|
||||||
ind <- which(
|
ind <- which(
|
||||||
vapply(
|
vapply(
|
||||||
FUN.VALUE = logical(1),
|
FUN.VALUE = logical(1),
|
||||||
df,
|
df,
|
||||||
function(x) all(x %in% c(check_vector, NA), na.rm = TRUE) & any(x %in% check_vector),
|
function(x) inherits(x, class),
|
||||||
USE.NAMES = TRUE
|
USE.NAMES = TRUE
|
||||||
),
|
),
|
||||||
useNames = TRUE
|
useNames = TRUE
|
||||||
@@ -62,7 +62,7 @@ top_n_microorganisms <- function(x, n, property = "species", n_for_each = NULL,
|
|||||||
meet_criteria(col_mo, allow_class = "character", has_length = 1, allow_NULL = TRUE, is_in = colnames(x))
|
meet_criteria(col_mo, allow_class = "character", has_length = 1, allow_NULL = TRUE, is_in = colnames(x))
|
||||||
if (is.null(col_mo)) {
|
if (is.null(col_mo)) {
|
||||||
col_mo <- search_type_in_df(x = x, type = "mo", info = TRUE)
|
col_mo <- search_type_in_df(x = x, type = "mo", info = TRUE)
|
||||||
stop_if(is.null(col_mo), "`col_mo` must be set")
|
stop_if(is.null(col_mo), "{.arg col_mo} must be set")
|
||||||
}
|
}
|
||||||
|
|
||||||
x.bak <- x
|
x.bak <- x
|
||||||
|
|||||||
+23
-15
@@ -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)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -263,19 +263,27 @@ translate_into_language <- function(from,
|
|||||||
df_trans$pattern[df_trans$regular_expr == TRUE] <- gsub("$$", "$", df_trans$pattern[df_trans$regular_expr == TRUE], fixed = TRUE)
|
df_trans$pattern[df_trans$regular_expr == TRUE] <- gsub("$$", "$", df_trans$pattern[df_trans$regular_expr == TRUE], fixed = TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
lapply(
|
# non-regex part
|
||||||
# starting with longest pattern, since more general translations are shorter, such as 'Group'
|
translate_exec <- function(term) {
|
||||||
order(nchar(df_trans$pattern), decreasing = TRUE),
|
# sort trans file on length of pattern
|
||||||
function(i) {
|
trns <- df_trans[order(nchar(df_trans$pattern), decreasing = TRUE), ]
|
||||||
from_unique_translated <<- gsub(
|
for (i in seq_len(nrow(trns))) {
|
||||||
pattern = df_trans$pattern[i],
|
term <- gsub(
|
||||||
replacement = df_trans[i, lang, drop = TRUE],
|
pattern = trns$pattern[i],
|
||||||
x = from_unique_translated,
|
replacement = trns[i, lang, drop = TRUE],
|
||||||
ignore.case = !df_trans$case_sensitive[i] & df_trans$regular_expr[i],
|
x = term,
|
||||||
fixed = !df_trans$regular_expr[i],
|
ignore.case = !trns$case_sensitive[i] & trns$regular_expr[i],
|
||||||
perl = df_trans$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
|
||||||
@@ -285,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
-1
@@ -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),
|
||||||
|
|||||||
@@ -115,35 +115,41 @@ 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(format_inline_(
|
||||||
|
"Assuming ", AMR::clinical_breakpoints$guideline[1], " as the default AMR guideline, see {.topic [AMR-options](AMR::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$") {
|
||||||
packageStartupMessage("The file with custom antimicrobials must be an RDS file. Set the option `AMR_custom_ab` to another path.")
|
packageStartupMessage(format_inline_("The file with custom antimicrobials must be an RDS file. Set the option {.code AMR_custom_ab} to another path."))
|
||||||
} else {
|
} else {
|
||||||
packageStartupMessage("Adding custom antimicrobials from '", getOption("AMR_custom_ab"), "'...", appendLF = FALSE)
|
packageStartupMessage(format_inline_("Adding custom antimicrobials from '", getOption("AMR_custom_ab"), "'..."), appendLF = FALSE)
|
||||||
x <- readRDS_AMR(getOption("AMR_custom_ab"))
|
x <- readRDS_AMR(getOption("AMR_custom_ab"))
|
||||||
tryCatch(
|
tryCatch(
|
||||||
{
|
{
|
||||||
suppressWarnings(suppressMessages(add_custom_antimicrobials(x)))
|
suppressWarnings(suppressMessages(add_custom_antimicrobials(x)))
|
||||||
packageStartupMessage("OK.")
|
packageStartupMessage("OK.")
|
||||||
},
|
},
|
||||||
error = function(e) packageStartupMessage("Failed: ", conditionMessage(e))
|
error = function(e) packageStartupMessage(format_inline_("Failed: ", conditionMessage(e)))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# if custom mo option is available, load it
|
# if custom mo option is available, load it
|
||||||
if (!is.null(getOption("AMR_custom_mo")) && file.exists(getOption("AMR_custom_mo", default = ""))) {
|
if (!is.null(getOption("AMR_custom_mo")) && file.exists(getOption("AMR_custom_mo", default = ""))) {
|
||||||
if (getOption("AMR_custom_mo") %unlike% "[.]rds$") {
|
if (getOption("AMR_custom_mo") %unlike% "[.]rds$") {
|
||||||
packageStartupMessage("The file with custom microorganisms must be an RDS file. Set the option `AMR_custom_mo` to another path.")
|
packageStartupMessage(format_inline_("The file with custom microorganisms must be an RDS file. Set the option {.code AMR_custom_mo} to another path."))
|
||||||
} else {
|
} else {
|
||||||
packageStartupMessage("Adding custom microorganisms from '", getOption("AMR_custom_mo"), "'...", appendLF = FALSE)
|
packageStartupMessage(format_inline_("Adding custom microorganisms from '", getOption("AMR_custom_mo"), "'..."), appendLF = FALSE)
|
||||||
x <- readRDS_AMR(getOption("AMR_custom_mo"))
|
x <- readRDS_AMR(getOption("AMR_custom_mo"))
|
||||||
tryCatch(
|
tryCatch(
|
||||||
{
|
{
|
||||||
suppressWarnings(suppressMessages(add_custom_microorganisms(x)))
|
suppressWarnings(suppressMessages(add_custom_microorganisms(x)))
|
||||||
packageStartupMessage("OK.")
|
packageStartupMessage("OK.")
|
||||||
},
|
},
|
||||||
error = function(e) packageStartupMessage("Failed: ", conditionMessage(e))
|
error = function(e) packageStartupMessage(format_inline_("Failed: ", conditionMessage(e)))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Overview:
|
|||||||
even WISCA
|
even WISCA
|
||||||
- Provides the **full microbiological taxonomy** of ~79 000 distinct
|
- Provides the **full microbiological taxonomy** of ~79 000 distinct
|
||||||
species and extensive info of ~620 antimicrobial drugs
|
species and extensive info of ~620 antimicrobial drugs
|
||||||
- Applies **CLSI 2011-2025** and **EUCAST 2011-2025** clinical and
|
- Applies **CLSI 2011-2026** and **EUCAST 2011-2026** clinical and
|
||||||
veterinary breakpoints, and ECOFFs, for MIC and disk zone
|
veterinary breakpoints, and ECOFFs, for MIC and disk zone
|
||||||
interpretation
|
interpretation
|
||||||
- Corrects for duplicate isolates, **calculates** and **predicts** AMR
|
- Corrects for duplicate isolates, **calculates** and **predicts** AMR
|
||||||
|
|||||||
+6
-4
@@ -234,7 +234,7 @@ reference:
|
|||||||
- "`antimicrobials`"
|
- "`antimicrobials`"
|
||||||
- "`clinical_breakpoints`"
|
- "`clinical_breakpoints`"
|
||||||
- "`example_isolates`"
|
- "`example_isolates`"
|
||||||
# TODO - "`esbl_isolates`"
|
- "`esbl_isolates`"
|
||||||
- "`microorganisms.codes`"
|
- "`microorganisms.codes`"
|
||||||
- "`microorganisms.groups`"
|
- "`microorganisms.groups`"
|
||||||
- "`intrinsic_resistant`"
|
- "`intrinsic_resistant`"
|
||||||
@@ -245,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`"
|
||||||
|
|||||||
@@ -141,6 +141,32 @@ import numpy as np
|
|||||||
# Import the AMR R package
|
# Import the AMR R package
|
||||||
amr_r = importr('AMR')
|
amr_r = importr('AMR')
|
||||||
|
|
||||||
|
def convert_to_r(value):
|
||||||
|
"""Convert Python lists/tuples to typed R vectors.
|
||||||
|
|
||||||
|
rpy2's default_converter passes Python lists to R as R lists, not as
|
||||||
|
character/numeric vectors. This causes element-wise type-check functions
|
||||||
|
such as is.mic(), is.sir(), and is.disk() to return a logical vector
|
||||||
|
rather than a single logical, breaking R's scalar && operator.
|
||||||
|
|
||||||
|
This helper converts Python lists and tuples to the appropriate R vector
|
||||||
|
type based on the element types, so R always receives a proper vector."""
|
||||||
|
if isinstance(value, (list, tuple)):
|
||||||
|
if len(value) == 0:
|
||||||
|
return StrVector([])
|
||||||
|
# bool must be checked before int because bool is a subclass of int
|
||||||
|
if all(isinstance(v, bool) for v in value):
|
||||||
|
return robjects.vectors.BoolVector(value)
|
||||||
|
if all(isinstance(v, int) for v in value):
|
||||||
|
return IntVector(value)
|
||||||
|
if all(isinstance(v, float) for v in value):
|
||||||
|
return FloatVector(value)
|
||||||
|
if all(isinstance(v, str) for v in value):
|
||||||
|
return StrVector(value)
|
||||||
|
# Mixed types: coerce all to string
|
||||||
|
return StrVector([str(v) for v in value])
|
||||||
|
return value
|
||||||
|
|
||||||
def convert_to_python(r_output):
|
def convert_to_python(r_output):
|
||||||
# Check if it's a StrVector (R character vector)
|
# Check if it's a StrVector (R character vector)
|
||||||
if isinstance(r_output, StrVector):
|
if isinstance(r_output, StrVector):
|
||||||
@@ -166,10 +192,13 @@ def convert_to_python(r_output):
|
|||||||
return r_output
|
return r_output
|
||||||
|
|
||||||
def r_to_python(r_func):
|
def r_to_python(r_func):
|
||||||
"""Decorator that runs an rpy2 function under a localconverter
|
"""Decorator that converts Python list/tuple inputs to typed R vectors,
|
||||||
and then applies convert_to_python to its output."""
|
runs the rpy2 function under a localconverter, and converts the output
|
||||||
|
to a Python type."""
|
||||||
@functools.wraps(r_func)
|
@functools.wraps(r_func)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
|
args = tuple(convert_to_r(a) for a in args)
|
||||||
|
kwargs = {k: convert_to_r(v) for k, v in kwargs.items()}
|
||||||
with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
|
with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
|
||||||
return convert_to_python(r_func(*args, **kwargs))
|
return convert_to_python(r_func(*args, **kwargs))
|
||||||
return wrapper
|
return wrapper
|
||||||
@@ -312,4 +341,3 @@ cd ../PythonPackage/AMR
|
|||||||
pip3 install build
|
pip3 install build
|
||||||
python3 -m build
|
python3 -m build
|
||||||
# python3 setup.py sdist bdist_wheel
|
# python3 setup.py sdist bdist_wheel
|
||||||
|
|
||||||
|
|||||||
+167
-17
@@ -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 ---------------------------------------------------------------
|
||||||
@@ -679,5 +828,6 @@ if (files_changed("README.Rmd") ||
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 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,30 +35,37 @@ 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!
|
||||||
|
|
||||||
|
# For non-interactive use
|
||||||
|
if (!interactive()) {
|
||||||
|
View <- glimpse
|
||||||
|
}
|
||||||
|
|
||||||
# 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_raw <- 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_raw <- 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_raw <- 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)
|
||||||
|
|
||||||
# MICROORGANISMS WHONET CODES ----
|
# MICROORGANISMS WHONET CODES ----
|
||||||
|
|
||||||
whonet_organisms <- whonet_organisms |>
|
whonet_organisms <- whonet_organisms_raw |>
|
||||||
select(ORGANISM_CODE, ORGANISM, SPECIES_GROUP, GBIF_TAXON_ID) |>
|
select(ORGANISM_CODE, ORGANISM, SPECIES_GROUP, GBIF_TAXON_ID) |>
|
||||||
mutate(
|
mutate(
|
||||||
# this one was called Issatchenkia orientalis, but it should be:
|
# this one was called Issatchenkia orientalis, but it should be:
|
||||||
@@ -108,6 +115,13 @@ organisms <- matched |> transmute(code = toupper(ORGANISM_CODE), group = SPECIES
|
|||||||
mutate(name = mo_name(mo, keep_synonyms = TRUE)) |>
|
mutate(name = mo_name(mo, keep_synonyms = TRUE)) |>
|
||||||
arrange(code)
|
arrange(code)
|
||||||
|
|
||||||
|
# self-defined codes in the MO table must be retained
|
||||||
|
existing_codes <- microorganisms$fullname[microorganisms$fullname %like% ".* \\("]
|
||||||
|
existing_codes <- gsub(".*\\((.*)\\)", "\\1", existing_codes)
|
||||||
|
|
||||||
|
organisms <- organisms |>
|
||||||
|
filter(!code %in% existing_codes)
|
||||||
|
|
||||||
# some subspecies exist, while their upper species do not, add them as the species level:
|
# some subspecies exist, while their upper species do not, add them as the species level:
|
||||||
subspp <- organisms |>
|
subspp <- organisms |>
|
||||||
filter(mo_species(mo, keep_synonyms = TRUE) == mo_subspecies(mo, keep_synonyms = TRUE) &
|
filter(mo_species(mo, keep_synonyms = TRUE) == mo_subspecies(mo, keep_synonyms = TRUE) &
|
||||||
@@ -137,9 +151,10 @@ organisms <- organisms |> filter(code != "XXX")
|
|||||||
# 2023-07-08 SGM is also Strep gamma in WHONET, must only be Slowly-growing Mycobacterium
|
# 2023-07-08 SGM is also Strep gamma in WHONET, must only be Slowly-growing Mycobacterium
|
||||||
# 2024-06-14 still the case
|
# 2024-06-14 still the case
|
||||||
# 2025-04-20 still the case
|
# 2025-04-20 still the case
|
||||||
|
# 2026-03-27 still the case, but fixed using `existing_codes` above
|
||||||
organisms |> filter(code == "SGM")
|
organisms |> filter(code == "SGM")
|
||||||
organisms <- organisms |>
|
# organisms <- organisms |>
|
||||||
filter(!(code == "SGM" & name %like% "Streptococcus"))
|
# filter(!(code == "SGM" & name %like% "Streptococcus"))
|
||||||
# this must be empty:
|
# this must be empty:
|
||||||
organisms$code[organisms$code |> duplicated()]
|
organisms$code[organisms$code |> duplicated()]
|
||||||
|
|
||||||
@@ -160,7 +175,7 @@ microorganisms.codes2 <- microorganisms.codes |>
|
|||||||
# new codes:
|
# new codes:
|
||||||
microorganisms.codes2$code[which(!microorganisms.codes2$code %in% microorganisms.codes$code)]
|
microorganisms.codes2$code[which(!microorganisms.codes2$code %in% microorganisms.codes$code)]
|
||||||
mo_name(microorganisms.codes2$mo[which(!microorganisms.codes2$code %in% microorganisms.codes$code)], keep_synonyms = TRUE)
|
mo_name(microorganisms.codes2$mo[which(!microorganisms.codes2$code %in% microorganisms.codes$code)], keep_synonyms = TRUE)
|
||||||
microorganisms.codes <- microorganisms.codes2
|
microorganisms.codes <- microorganisms.codes2 |> distinct()
|
||||||
|
|
||||||
# Run this part to update ASIARS-Net:
|
# Run this part to update ASIARS-Net:
|
||||||
# 2024-06-14: file not available anymore
|
# 2024-06-14: file not available anymore
|
||||||
@@ -199,10 +214,15 @@ devtools::load_all()
|
|||||||
|
|
||||||
# now that we have the correct MO codes, get the breakpoints and convert them
|
# now that we have the correct MO codes, get the breakpoints and convert them
|
||||||
|
|
||||||
whonet_breakpoints |>
|
whonet_breakpoints_raw |>
|
||||||
count(GUIDELINES, BREAKPOINT_TYPE) |>
|
count(GUIDELINES, BREAKPOINT_TYPE) |>
|
||||||
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
|
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
|
||||||
janitor::adorn_totals(where = c("row", "col"))
|
janitor::adorn_totals(where = c("row", "col"))
|
||||||
|
whonet_breakpoints_raw |>
|
||||||
|
filter(YEAR == format(Sys.Date(), "%Y")) |>
|
||||||
|
count(GUIDELINES, YEAR, BREAKPOINT_TYPE) |>
|
||||||
|
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
|
||||||
|
janitor::adorn_totals(where = c("row", "col"))
|
||||||
# compared to current
|
# compared to current
|
||||||
AMR::clinical_breakpoints |>
|
AMR::clinical_breakpoints |>
|
||||||
count(GUIDELINES = gsub("[^a-zA-Z]", "", guideline), type) |>
|
count(GUIDELINES = gsub("[^a-zA-Z]", "", guideline), type) |>
|
||||||
@@ -211,7 +231,7 @@ AMR::clinical_breakpoints |>
|
|||||||
as.data.frame() |>
|
as.data.frame() |>
|
||||||
janitor::adorn_totals(where = c("row", "col"))
|
janitor::adorn_totals(where = c("row", "col"))
|
||||||
|
|
||||||
breakpoints <- whonet_breakpoints |>
|
breakpoints <- whonet_breakpoints_raw |>
|
||||||
mutate(code = toupper(ORGANISM_CODE)) |>
|
mutate(code = toupper(ORGANISM_CODE)) |>
|
||||||
left_join(bind_rows(microorganisms.codes |> filter(!code %in% c("ALL", "GEN")),
|
left_join(bind_rows(microorganisms.codes |> filter(!code %in% c("ALL", "GEN")),
|
||||||
# GEN (Generic) and ALL (All) are PK/PD codes
|
# GEN (Generic) and ALL (All) are PK/PD codes
|
||||||
@@ -231,7 +251,7 @@ breakpoints <- breakpoints |>
|
|||||||
|
|
||||||
# and these ones have unknown antibiotics according to WHONET itself:
|
# and these ones have unknown antibiotics according to WHONET itself:
|
||||||
breakpoints |>
|
breakpoints |>
|
||||||
filter(!WHONET_ABX_CODE %in% whonet_antibiotics$WHONET_ABX_CODE) |>
|
filter(!WHONET_ABX_CODE %in% whonet_antibiotics_raw$WHONET_ABX_CODE) |>
|
||||||
count(GUIDELINES, WHONET_ABX_CODE) |>
|
count(GUIDELINES, WHONET_ABX_CODE) |>
|
||||||
mutate(ab = as.ab(WHONET_ABX_CODE, fast_mode = TRUE),
|
mutate(ab = as.ab(WHONET_ABX_CODE, fast_mode = TRUE),
|
||||||
ab_name = ab_name(ab))
|
ab_name = ab_name(ab))
|
||||||
@@ -294,7 +314,7 @@ breakpoints_new[which(breakpoints_new$method == "DISK"), "breakpoint_R"] <- as.d
|
|||||||
# regarding animal breakpoints, CLSI has adults and foals for horses, but only for amikacin - only keep adult horses
|
# regarding animal breakpoints, CLSI has adults and foals for horses, but only for amikacin - only keep adult horses
|
||||||
breakpoints_new |>
|
breakpoints_new |>
|
||||||
filter(host %like% "foal") |>
|
filter(host %like% "foal") |>
|
||||||
count(guideline, host)
|
count(guideline, host, ab)
|
||||||
breakpoints_new <- breakpoints_new |>
|
breakpoints_new <- breakpoints_new |>
|
||||||
filter(host %unlike% "foal") |>
|
filter(host %unlike% "foal") |>
|
||||||
mutate(host = ifelse(host %like% "horse", "horse", host))
|
mutate(host = ifelse(host %like% "horse", "horse", host))
|
||||||
@@ -302,7 +322,7 @@ breakpoints_new <- breakpoints_new |>
|
|||||||
# FIXES FOR WHONET ERRORS ----
|
# FIXES FOR WHONET ERRORS ----
|
||||||
m <- unique(as.double(as.mic(levels(as.mic(1)))))
|
m <- unique(as.double(as.mic(levels(as.mic(1)))))
|
||||||
|
|
||||||
# WHONET has no >1024 but instead uses 1025, 513, etc, so as.mic() cannot be used to clean.
|
# WHONET has no >1024 but instead uses 1025, 513, and 129, so as.mic() cannot be used to clean.
|
||||||
# instead, raise these one higher valid MIC factor level:
|
# instead, raise these one higher valid MIC factor level:
|
||||||
breakpoints_new |> filter(method == "MIC" & (!breakpoint_S %in% c(m, NA))) |> distinct(breakpoint_S)
|
breakpoints_new |> filter(method == "MIC" & (!breakpoint_S %in% c(m, NA))) |> distinct(breakpoint_S)
|
||||||
breakpoints_new |> filter(method == "MIC" & (!breakpoint_R %in% c(m, NA))) |> distinct(breakpoint_R)
|
breakpoints_new |> filter(method == "MIC" & (!breakpoint_R %in% c(m, NA))) |> distinct(breakpoint_R)
|
||||||
@@ -316,6 +336,7 @@ anyNA(breakpoints_new$breakpoint_S)
|
|||||||
|
|
||||||
# a lot of R breakpoints are missing, but for CLSI this is required and can be set using as.sir(..., substitute_missing_r_breakpoint = TRUE/FALSE, ...)
|
# a lot of R breakpoints are missing, but for CLSI this is required and can be set using as.sir(..., substitute_missing_r_breakpoint = TRUE/FALSE, ...)
|
||||||
# 2025-04-20/ For EUCAST, this should not be the case, only happens to old guideline now it seems
|
# 2025-04-20/ For EUCAST, this should not be the case, only happens to old guideline now it seems
|
||||||
|
# 2026-03-27/ Now 2026 is in it as well, but making R same to S is fine
|
||||||
breakpoints_new |>
|
breakpoints_new |>
|
||||||
filter(method == "MIC" & guideline %like% "EUCAST" & is.na(breakpoint_R)) |>
|
filter(method == "MIC" & guideline %like% "EUCAST" & is.na(breakpoint_R)) |>
|
||||||
count(guideline)
|
count(guideline)
|
||||||
@@ -323,10 +344,15 @@ breakpoints_new[which(breakpoints_new$method == "MIC" & breakpoints_new$guidelin
|
|||||||
|
|
||||||
|
|
||||||
# fix streptococci in WHONET table of EUCAST: Strep A, B, C and G must only include these groups and not all streptococci:
|
# fix streptococci in WHONET table of EUCAST: Strep A, B, C and G must only include these groups and not all streptococci:
|
||||||
breakpoints_new$mo[breakpoints_new$mo == "B_STRPT" & breakpoints_new$ref_tbl %like% "^strep.* a.* b.*c.*g"] <- as.mo("B_STRPT_ABCG")
|
# 2026-03-27/ Only erroneous in EUCAST until 2024, it's fixed for 2025 and 2026, but we need to fix this historically too
|
||||||
|
breakpoints_new$mo[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$mo == "B_STRPT" & breakpoints_new$ref_tbl %like% "^strep.* a.* b.*c.*g"] <- as.mo("B_STRPT_ABCG")
|
||||||
# Haemophilus same error (must only be H. influenzae)
|
# Haemophilus same error (must only be H. influenzae)
|
||||||
breakpoints_new$mo[breakpoints_new$mo == "B_HMPHL" & breakpoints_new$ref_tbl %like% "^h.* influenzae"] <- as.mo("B_HMPHL_INFL")
|
# 2026-03-27/ Only erroneous in EUCAST until 2024, it's fixed for 2025 and 2026, but we need to fix this historically too
|
||||||
|
breakpoints_new$mo[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$mo == "B_HMPHL" & breakpoints_new$ref_tbl %like% "^h.* influenzae"] <- as.mo("B_HMPHL_INFL")
|
||||||
# EUCAST says that for H. parainfluenzae the H. influenza rules can be used, so add them
|
# EUCAST says that for H. parainfluenzae the H. influenza rules can be used, so add them
|
||||||
|
breakpoints_new |>
|
||||||
|
filter(method == "MIC" & guideline %like% "EUCAST" & mo %like% as.mo("B_HMPHL")) |>
|
||||||
|
count(guideline, mo)
|
||||||
breakpoints_new <- breakpoints_new |>
|
breakpoints_new <- breakpoints_new |>
|
||||||
bind_rows(
|
bind_rows(
|
||||||
breakpoints_new |>
|
breakpoints_new |>
|
||||||
@@ -343,24 +369,56 @@ breakpoints_new |> filter(mo == as.mo("Streptococcus viridans") & ab == "GEH")
|
|||||||
breakpoints_new <- breakpoints_new |> filter(!(mo == as.mo("Streptococcus viridans") & ab == "GEN"))
|
breakpoints_new <- breakpoints_new |> filter(!(mo == as.mo("Streptococcus viridans") & ab == "GEN"))
|
||||||
# Nitrofurantoin in Staph (EUCAST) only applies to S. saprophyticus, while WHONET has the DISK correct but the MIC on genus level
|
# Nitrofurantoin in Staph (EUCAST) only applies to S. saprophyticus, while WHONET has the DISK correct but the MIC on genus level
|
||||||
breakpoints_new$mo[breakpoints_new$mo == "B_STPHY" & breakpoints_new$ab == "NIT" & breakpoints_new$guideline %like% "EUCAST"] <- as.mo("B_STPHY_SPRP")
|
breakpoints_new$mo[breakpoints_new$mo == "B_STPHY" & breakpoints_new$ab == "NIT" & breakpoints_new$guideline %like% "EUCAST"] <- as.mo("B_STPHY_SPRP")
|
||||||
|
|
||||||
|
# WHONET contains breakpoint for EUCAST that are not actually in EUCAST:
|
||||||
|
# IPM in M. morganii is not in it since v10
|
||||||
|
wrong <- with(breakpoints_new, guideline %like% "EUCAST" & ab == "IPM" & mo == as.mo("M. morganii") & ref_tbl != "ECOFF")
|
||||||
|
breakpoints_new |> filter(wrong)
|
||||||
|
breakpoints_new <- breakpoints_new |> filter(!wrong)
|
||||||
|
# Breakpoints for COPS were part of EUCAST until v11
|
||||||
|
wrong <- with(breakpoints_new, guideline %like% "EUCAST" & mo == as.mo("CoPS") & ref_tbl != "ECOFF")
|
||||||
|
breakpoints_new |> filter(wrong)
|
||||||
|
breakpoints_new <- breakpoints_new |> filter(!wrong)
|
||||||
|
|
||||||
# WHONET sets the 2023 breakpoints for SAM to MIC of 16/32 for Enterobacterales, should be MIC 8/32 like AMC (see issue #123 on github.com/msberends/AMR)
|
# WHONET sets the 2023 breakpoints for SAM to MIC of 16/32 for Enterobacterales, should be MIC 8/32 like AMC (see issue #123 on github.com/msberends/AMR)
|
||||||
# 2024-02-22/ fixed now
|
# 2024-02-22/ fixed now
|
||||||
|
|
||||||
# There's a problem with C. diff in EUCAST where breakpoint_R is missing - they are listed as normal human breakpoints but are ECOFF
|
# There's a problem with C. diff in EUCAST where breakpoint_R is missing - they are listed as normal human breakpoints but are ECOFF
|
||||||
# 2025-04-20/ fixed now
|
# 2025-04-20/ fixed now
|
||||||
|
|
||||||
# determine rank again now that some changes were made on taxonomic level (genus -> species)
|
# WHONET sets for EUCAST 2026 TMP breakpoints for all Klebsiella, but this is now only for non-aerogenes species
|
||||||
breakpoints_new <- breakpoints_new |>
|
kleb_spp <- microorganisms |> filter(rank == "species", genus == "Klebsiella", !species %in% c("", "aerogenes")) |> pull(mo)
|
||||||
mutate(rank_index = case_when(
|
kleb_tmp_mic <- breakpoints_new |>
|
||||||
mo_rank(mo, keep_synonyms = TRUE) %like% "(infra|sub)" ~ 1,
|
filter(guideline == "EUCAST 2026", method == "MIC", ab == "TMP", mo == as.mo("Klebsiella")) |>
|
||||||
mo_rank(mo, keep_synonyms = TRUE) == "species" ~ 2,
|
uncount(length(kleb_spp)) |>
|
||||||
mo_rank(mo, keep_synonyms = TRUE) == "species group" ~ 2.5,
|
mutate(mo = kleb_spp)
|
||||||
mo_rank(mo, keep_synonyms = TRUE) == "genus" ~ 3,
|
kleb_tmp_disk <- breakpoints_new |>
|
||||||
mo_rank(mo, keep_synonyms = TRUE) == "family" ~ 4,
|
filter(guideline == "EUCAST 2026", method == "DISK", ab == "TMP", mo == as.mo("Klebsiella")) |>
|
||||||
mo_rank(mo, keep_synonyms = TRUE) == "order" ~ 5,
|
uncount(length(kleb_spp)) |>
|
||||||
mo != "UNKNOWN" ~ 6, # for B_ANAER, etc.
|
mutate(mo = kleb_spp)
|
||||||
TRUE ~ 7
|
breakpoints_new <- breakpoints_new |>
|
||||||
))
|
filter(!(guideline == "EUCAST 2026" & method == "MIC" & ab == "TMP" & mo == as.mo("Klebsiella"))) |>
|
||||||
|
bind_rows(kleb_tmp_mic,
|
||||||
|
kleb_tmp_disk)
|
||||||
|
|
||||||
|
# WHONET contains wrong EUCAST breakpoints for enterococci/SXT: disk should be 23/23, not 21/50, and MIC should be 1/1, not 0.032/1
|
||||||
|
# applies to all previous years, since v11 (2011)
|
||||||
|
breakpoints_new |> filter(guideline %like% "EUCAST", ab == "SXT", mo == as.mo("Enterococcus"), type == "human")
|
||||||
|
breakpoints_new$breakpoint_S[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "SXT" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "DISK"] <- 23
|
||||||
|
breakpoints_new$breakpoint_R[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "SXT" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "DISK"] <- 23
|
||||||
|
breakpoints_new$breakpoint_S[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "SXT" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "MIC"] <- 1
|
||||||
|
breakpoints_new$breakpoint_R[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "SXT" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "MIC"] <- 1
|
||||||
|
# Also wrong EUCAST breakpoints for enterococci/TMP: disk should be 21/21, not 21/50, and MIC should be 1/1, not 0.032/1
|
||||||
|
breakpoints_new |> filter(guideline %like% "EUCAST", ab == "TMP", mo == as.mo("Enterococcus"), type == "human")
|
||||||
|
breakpoints_new$breakpoint_S[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "TMP" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "DISK"] <- 21
|
||||||
|
breakpoints_new$breakpoint_R[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "TMP" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "DISK"] <- 21
|
||||||
|
breakpoints_new$breakpoint_S[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "TMP" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "MIC"] <- 1
|
||||||
|
breakpoints_new$breakpoint_R[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$ab == "TMP" & breakpoints_new$mo == as.mo("Enterococcus") & breakpoints_new$type == "human" & breakpoints_new$method == "MIC"] <- 1
|
||||||
|
|
||||||
|
# WHONET still contains PK/PD rules for EUCAST >= 2024, but this was ended from v14 (2024) on
|
||||||
|
breakpoints_new <- breakpoints_new |>
|
||||||
|
filter(!(guideline %like% "EUCAST (2024|2025|2026)" & ref_tbl == "PK/PD"))
|
||||||
|
|
||||||
|
|
||||||
# WHONET adds one log2 level to the R breakpoint for their software, e.g. in AMC in Enterobacterales:
|
# WHONET adds one log2 level to the R breakpoint for their software, e.g. in AMC in Enterobacterales:
|
||||||
# EUCAST 2023 guideline: S <= 8 and R > 8
|
# EUCAST 2023 guideline: S <= 8 and R > 8
|
||||||
@@ -381,24 +439,24 @@ breakpoints_new <- breakpoints_new |>
|
|||||||
breakpoint_R
|
breakpoint_R
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
# check the strange duplicates
|
# check the strange duplicates
|
||||||
breakpoints_new |>
|
breakpoints_new |>
|
||||||
mutate(id = paste(guideline, type, host, method, site, mo, ab, uti)) %>%
|
mutate(id = paste(guideline, type, host, method, site, mo, ab, uti)) %>%
|
||||||
filter(id %in% .$id[which(duplicated(id))]) |>
|
filter(id %in% .$id[which(duplicated(id))]) |>
|
||||||
arrange(desc(guideline)) |>
|
arrange(desc(guideline)) |>
|
||||||
View()
|
View()
|
||||||
# 2024-06-19/ mostly ECOFFs, but there's no explanation in the whonet_breakpoints file, we have to remove duplicates
|
# 2024-06-19/ mostly ECOFFs, but there's no explanation in the whonet_breakpoints_raw df, we have to remove duplicates
|
||||||
# 2025-04-20/ same, most important one seems M. tuberculosis in CLSI (also in 2025)
|
# 2025-04-20/ same, most important one seems M. tuberculosis in CLSI (also in 2025)
|
||||||
breakpoints_new <- breakpoints_new |>
|
breakpoints_new <- breakpoints_new |>
|
||||||
distinct(guideline, type, host, method, site, mo, ab, uti, .keep_all = TRUE)
|
distinct(guideline, type, host, method, site, mo, ab, uti, .keep_all = TRUE)
|
||||||
|
|
||||||
|
|
||||||
# CHECKS AND SAVE TO PACKAGE ----
|
# CHECKS ----
|
||||||
|
|
||||||
# check again
|
breakpoints_new |> filter(guideline == "EUCAST 2026", ab == "AMC", mo == "B_[ORD]_ENTRBCTR", method == "MIC")
|
||||||
breakpoints_new |> filter(guideline == "EUCAST 2025", ab == "AMC", mo == "B_[ORD]_ENTRBCTR", method == "MIC")
|
|
||||||
# compare with current version
|
# compare with current version
|
||||||
clinical_breakpoints |> filter(guideline == "EUCAST 2024", ab == "AMC", mo == "B_[ORD]_ENTRBCTR", method == "MIC")
|
clinical_breakpoints |> filter(guideline == "EUCAST 2025", ab == "AMC", mo == "B_[ORD]_ENTRBCTR", method == "MIC")
|
||||||
|
|
||||||
# must have "human" and "ECOFF"
|
# must have "human" and "ECOFF"
|
||||||
breakpoints_new |> filter(mo == "B_STRPT_PNMN", ab == "AMP", guideline == "EUCAST 2020", method == "MIC")
|
breakpoints_new |> filter(mo == "B_STRPT_PNMN", ab == "AMP", guideline == "EUCAST 2020", method == "MIC")
|
||||||
@@ -407,6 +465,24 @@ breakpoints_new |> filter(mo == "B_STRPT_PNMN", ab == "AMP", guideline == "EUCAS
|
|||||||
dim(breakpoints_new)
|
dim(breakpoints_new)
|
||||||
dim(clinical_breakpoints)
|
dim(clinical_breakpoints)
|
||||||
|
|
||||||
|
|
||||||
|
# SAVE TO PACKAGE ----
|
||||||
|
|
||||||
|
# determine rank again now that some changes were made on taxonomic level (genus -> species)
|
||||||
|
breakpoints_new <- breakpoints_new |>
|
||||||
|
mutate(rank_index = case_when(
|
||||||
|
mo_rank(mo, keep_synonyms = TRUE) %like% "(infra|sub)" ~ 1,
|
||||||
|
mo_rank(mo, keep_synonyms = TRUE) == "species" ~ 2,
|
||||||
|
mo_rank(mo, keep_synonyms = TRUE) == "species group" ~ 2.5,
|
||||||
|
mo_rank(mo, keep_synonyms = TRUE) == "genus" ~ 3,
|
||||||
|
mo_rank(mo, keep_synonyms = TRUE) == "family" ~ 4,
|
||||||
|
mo_rank(mo, keep_synonyms = TRUE) == "order" ~ 5,
|
||||||
|
mo != "UNKNOWN" ~ 6, # for B_ANAER, etc.
|
||||||
|
TRUE ~ 7
|
||||||
|
)) |>
|
||||||
|
# and arrange
|
||||||
|
arrange(desc(guideline), mo, ab, type, host, method)
|
||||||
|
|
||||||
clinical_breakpoints <- breakpoints_new
|
clinical_breakpoints <- breakpoints_new
|
||||||
clinical_breakpoints <- clinical_breakpoints |> dataset_UTF8_to_ASCII()
|
clinical_breakpoints <- clinical_breakpoints |> dataset_UTF8_to_ASCII()
|
||||||
usethis::use_data(clinical_breakpoints, overwrite = TRUE, compress = "xz", version = 2)
|
usethis::use_data(clinical_breakpoints, overwrite = TRUE, compress = "xz", version = 2)
|
||||||
|
|||||||
@@ -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)))
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
d12f1c78feaecbb4d1631f9c735ad49b
|
11aade8a39bfdff02d01fb52b04eacdc
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
c7062e60fa4fbc2eee233044d15903ce
|
45068afc4cd9770dea329782c1aed045
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,497 +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,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"
|
"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" "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"
|
"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" "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"
|
"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" "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"
|
"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,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"
|
"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" "NA" "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,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"
|
"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"
|
||||||
"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" "zol" "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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2832,6 +2832,7 @@
|
|||||||
"FU-" "B_FSBCTR"
|
"FU-" "B_FSBCTR"
|
||||||
"FUA.SP" "F_FUSRM"
|
"FUA.SP" "F_FUSRM"
|
||||||
"FUL" "B_FSBCTR_ULCR"
|
"FUL" "B_FSBCTR_ULCR"
|
||||||
|
"FUO" "F_FUSRM_OXYS"
|
||||||
"FUR" "F_FUSRM"
|
"FUR" "F_FUSRM"
|
||||||
"FUROXY" "F_FUSRM_OXYS"
|
"FUROXY" "F_FUSRM_OXYS"
|
||||||
"FURPET" "F_FUSRM_PTRL"
|
"FURPET" "F_FUSRM_PTRL"
|
||||||
@@ -2936,6 +2937,7 @@
|
|||||||
"GLO.SP" "B_GLBCT"
|
"GLO.SP" "B_GLBCT"
|
||||||
"GLOSAN" "B_GLBCT_SNGN"
|
"GLOSAN" "B_GLBCT_SNGN"
|
||||||
"GLOSPP" "B_GLBCT"
|
"GLOSPP" "B_GLBCT"
|
||||||
|
"GLS" "B_GLSSR"
|
||||||
"GM+" "B_GRAMP"
|
"GM+" "B_GRAMP"
|
||||||
"GM-" "B_GRAMN"
|
"GM-" "B_GRAMN"
|
||||||
"GMO" "B_GEMLL_MRBL"
|
"GMO" "B_GEMLL_MRBL"
|
||||||
@@ -3026,7 +3028,6 @@
|
|||||||
"HABSPP" "B_HMTBC"
|
"HABSPP" "B_HMTBC"
|
||||||
"HAC" "B_AGGRG_ACTN"
|
"HAC" "B_AGGRG_ACTN"
|
||||||
"HACEK" "B_HACEK"
|
"HACEK" "B_HACEK"
|
||||||
"HACEK" "B_HACEK"
|
|
||||||
"HAE" "B_HMPHL"
|
"HAE" "B_HMPHL"
|
||||||
"HAE.SP" "B_HMPHL"
|
"HAE.SP" "B_HMPHL"
|
||||||
"HAEAEG" "B_HMPHL_AEGY"
|
"HAEAEG" "B_HMPHL_AEGY"
|
||||||
@@ -3122,7 +3123,7 @@
|
|||||||
"HPL" "B_HMPHL_PRPH"
|
"HPL" "B_HMPHL_PRPH"
|
||||||
"HPO" "F_OGATA"
|
"HPO" "F_OGATA"
|
||||||
"HPOSPP" "F_HNDRS_ASTR"
|
"HPOSPP" "F_HNDRS_ASTR"
|
||||||
"HPR" "B_HMPHL_PRSS"
|
"HPR" "B_GLSSR_PRSS"
|
||||||
"HPU" "B_HLCBCT_PLLR"
|
"HPU" "B_HLCBCT_PLLR"
|
||||||
"HPY" "B_HLCBCT_PYLR"
|
"HPY" "B_HLCBCT_PYLR"
|
||||||
"HRB" "B_HRBSP"
|
"HRB" "B_HRBSP"
|
||||||
@@ -3471,6 +3472,7 @@
|
|||||||
"LQU" "B_LGNLL_QTRN"
|
"LQU" "B_LGNLL_QTRN"
|
||||||
"LRC" "B_LPTSP_INTR"
|
"LRC" "B_LPTSP_INTR"
|
||||||
"LRE" "B_LCTBC_RETR"
|
"LRE" "B_LCTBC_RETR"
|
||||||
|
"LRF" "B_LCTCC_RFFN"
|
||||||
"LRI" "B_LMNRL_RCHR"
|
"LRI" "B_LMNRL_RCHR"
|
||||||
"LRU" "B_LGNLL_RBRL"
|
"LRU" "B_LGNLL_RBRL"
|
||||||
"LSA" "B_LCTBC_SLVR"
|
"LSA" "B_LCTBC_SLVR"
|
||||||
@@ -3760,6 +3762,7 @@
|
|||||||
"MNE" "B_MYCBC_NERM"
|
"MNE" "B_MYCBC_NERM"
|
||||||
"MNL" "B_MRXLL_NNLQ"
|
"MNL" "B_MRXLL_NNLQ"
|
||||||
"MNO" "B_MYCBC_NNCH"
|
"MNO" "B_MYCBC_NNCH"
|
||||||
|
"MNT" "B_MYCBC"
|
||||||
"MNV" "B_MNNHM_VRGN"
|
"MNV" "B_MNNHM_VRGN"
|
||||||
"MO-" "B_MRXLL"
|
"MO-" "B_MRXLL"
|
||||||
"MO.BOV" "B_MRXLL_BOVS"
|
"MO.BOV" "B_MRXLL_BOVS"
|
||||||
@@ -4295,6 +4298,7 @@
|
|||||||
"PAT.SP" "B_PANTO"
|
"PAT.SP" "B_PANTO"
|
||||||
"PAU" "B_SLMNL_ENTR_ENTR"
|
"PAU" "B_SLMNL_ENTR_ENTR"
|
||||||
"PAV" "B_AVBCT_AVIM"
|
"PAV" "B_AVBCT_AVIM"
|
||||||
|
"PBA" "B_PSDCL_ALBA"
|
||||||
"PBC" "B_PRVTL_BCCL"
|
"PBC" "B_PRVTL_BCCL"
|
||||||
"PBE" "B_PSTRL_BTTY"
|
"PBE" "B_PSTRL_BTTY"
|
||||||
"PBI" "B_PRBCT"
|
"PBI" "B_PRBCT"
|
||||||
@@ -4591,6 +4595,7 @@
|
|||||||
"PSA" "F_PSDLL"
|
"PSA" "F_PSDLL"
|
||||||
"PSA.SP" "F_PSDLL"
|
"PSA.SP" "F_PSDLL"
|
||||||
"PSASPP" "F_PSDLL"
|
"PSASPP" "F_PSDLL"
|
||||||
|
"PSB" "B_PSDCL"
|
||||||
"PSC" "F_PSDCH"
|
"PSC" "F_PSDCH"
|
||||||
"PSCSPP" "B_PSDCL"
|
"PSCSPP" "B_PSDCL"
|
||||||
"PSD" "B_STPHY_PSDN"
|
"PSD" "B_STPHY_PSDN"
|
||||||
@@ -4706,6 +4711,7 @@
|
|||||||
"RAH.SP" "B_RHNLL"
|
"RAH.SP" "B_RHNLL"
|
||||||
"RAHAQU" "B_RHNLL_AQTL"
|
"RAHAQU" "B_RHNLL_AQTL"
|
||||||
"RAHSPP" "B_RHNLL"
|
"RAHSPP" "B_RHNLL"
|
||||||
|
"RAI" "B_RLSTN_INSD"
|
||||||
"RAK" "B_RTTSA_AKAR"
|
"RAK" "B_RTTSA_AKAR"
|
||||||
"RAL" "B_RLSTN"
|
"RAL" "B_RLSTN"
|
||||||
"RAL.SP" "B_RLSTN"
|
"RAL.SP" "B_RLSTN"
|
||||||
@@ -4800,6 +4806,7 @@
|
|||||||
"ROD" "B_RDNTB"
|
"ROD" "B_RDNTB"
|
||||||
"RODPNE" "B_RDNTB_PNMT"
|
"RODPNE" "B_RDNTB_PNMT"
|
||||||
"RODSPP" "B_RDNTB"
|
"RODSPP" "B_RDNTB"
|
||||||
|
"ROK" "B_ROTHI_KRST"
|
||||||
"ROL" "F_RHZPS_MCRS"
|
"ROL" "F_RHZPS_MCRS"
|
||||||
"ROM" "B_RSMNS"
|
"ROM" "B_RSMNS"
|
||||||
"ROMMUC" "B_RSMNS"
|
"ROMMUC" "B_RSMNS"
|
||||||
@@ -5042,8 +5049,10 @@
|
|||||||
"SAV" "B_SLMNL_ARCH"
|
"SAV" "B_SLMNL_ARCH"
|
||||||
"SB2" "B_STRPT_BOVS"
|
"SB2" "B_STRPT_BOVS"
|
||||||
"SBA" "B_SLMNL_BRLL"
|
"SBA" "B_SLMNL_BRLL"
|
||||||
|
"SBC" "B_SLBCL"
|
||||||
"SBE" "B_SHWNL_BNTH"
|
"SBE" "B_SHWNL_BNTH"
|
||||||
"SBG" "B_SLMNL_BNGR"
|
"SBG" "B_SLMNL_BNGR"
|
||||||
|
"SBI" "B_SLBCL_SLVS"
|
||||||
"SBL" "B_SLMNL_BLCK"
|
"SBL" "B_SLMNL_BLCK"
|
||||||
"SBM" "B_SLMNL_BVSM"
|
"SBM" "B_SLMNL_BVSM"
|
||||||
"SBN" "B_SLMNL_BBRG"
|
"SBN" "B_SLMNL_BBRG"
|
||||||
@@ -5078,6 +5087,7 @@
|
|||||||
"SCS" "F_SCLCB_CNST"
|
"SCS" "F_SCLCB_CNST"
|
||||||
"SCT" "B_STRPT_CNST"
|
"SCT" "B_STRPT_CNST"
|
||||||
"SCU" "B_STPHY_CRNS"
|
"SCU" "B_STPHY_CRNS"
|
||||||
|
"SCV" "F_SCPLR_VCLS"
|
||||||
"SCY" "F_SCYTL"
|
"SCY" "F_SCYTL"
|
||||||
"SCYSPP" "F_SCYTL"
|
"SCYSPP" "F_SCYTL"
|
||||||
"SD1" "B_SHGLL_DYSN"
|
"SD1" "B_SHGLL_DYSN"
|
||||||
@@ -5656,6 +5666,7 @@
|
|||||||
"TAYSPP" "B_TYLRL"
|
"TAYSPP" "B_TYLRL"
|
||||||
"TBE" "F_GTRCH_RDLL"
|
"TBE" "F_GTRCH_RDLL"
|
||||||
"TBESPP" "F_TRCHS"
|
"TBESPP" "F_TRCHS"
|
||||||
|
"TBH" "F_TRCHP_BNHM"
|
||||||
"TBN" "B_TRPRL_BRNR"
|
"TBN" "B_TRPRL_BRNR"
|
||||||
"TCA" "F_DBRYM_CHVL"
|
"TCA" "F_DBRYM_CHVL"
|
||||||
"TCASPP" "F_CANDD"
|
"TCASPP" "F_CANDD"
|
||||||
@@ -5841,6 +5852,8 @@
|
|||||||
"TYASPP" "F_TRCHP"
|
"TYASPP" "F_TRCHP"
|
||||||
"TYE" "P_TRYPN_JNSN"
|
"TYE" "P_TRYPN_JNSN"
|
||||||
"TYI" "F_TRCHP_INDT"
|
"TYI" "F_TRCHP_INDT"
|
||||||
|
"TYM" "B_TRPHR"
|
||||||
|
"TYW" "B_TRPHR_WHPP"
|
||||||
"ULO" "F_ULCLD"
|
"ULO" "F_ULCLD"
|
||||||
"UNK" "UNKNOWN"
|
"UNK" "UNKNOWN"
|
||||||
"UPEC" "B_ESCHR_COLI"
|
"UPEC" "B_ESCHR_COLI"
|
||||||
@@ -5850,6 +5863,7 @@
|
|||||||
"UREPAR" "B_URPLS_PRVM"
|
"UREPAR" "B_URPLS_PRVM"
|
||||||
"URESPP" "B_URPLS"
|
"URESPP" "B_URPLS"
|
||||||
"UREURE" "B_URPLS_URLY"
|
"UREURE" "B_URPLS_URLY"
|
||||||
|
"URP" "B_URPLS_PRVM"
|
||||||
"UUR" "B_URPLS_URLY"
|
"UUR" "B_URPLS_URLY"
|
||||||
"V.ALG" "B_VIBRI_ALGN"
|
"V.ALG" "B_VIBRI_ALGN"
|
||||||
"V.CHO" "B_VIBRI_CHLR"
|
"V.CHO" "B_VIBRI_CHLR"
|
||||||
|
|||||||
Binary file not shown.
+1524
-1330
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
|||||||
986d5110a46bbf297ebaeb4dd5179fff
|
6ef98bb1bcd27052fde453bb12c0b285
|
||||||
|
|||||||
Binary file not shown.
@@ -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
|
||||||
|
|||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,7 +10,7 @@
|
|||||||
even WISCA
|
even WISCA
|
||||||
- Provides the **full microbiological taxonomy** of ~79 000 distinct
|
- Provides the **full microbiological taxonomy** of ~79 000 distinct
|
||||||
species and extensive info of ~620 antimicrobial drugs
|
species and extensive info of ~620 antimicrobial drugs
|
||||||
- Applies **CLSI 2011-2025** and **EUCAST 2011-2025** clinical and
|
- Applies **CLSI 2011-2026** and **EUCAST 2011-2026** clinical and
|
||||||
veterinary breakpoints, and ECOFFs, for MIC and disk zone
|
veterinary breakpoints, and ECOFFs, for MIC and disk zone
|
||||||
interpretation
|
interpretation
|
||||||
- Corrects for duplicate isolates, **calculates** and **predicts** AMR
|
- Corrects for duplicate isolates, **calculates** and **predicts** AMR
|
||||||
@@ -68,7 +68,7 @@ species**](./reference/microorganisms.html) (updated June 2024) and all
|
|||||||
drugs**](./reference/antimicrobials.html) by name and code (including
|
drugs**](./reference/antimicrobials.html) by name and code (including
|
||||||
ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all
|
ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all
|
||||||
about valid SIR and MIC values. The integral clinical breakpoint
|
about valid SIR and MIC values. The integral clinical breakpoint
|
||||||
guidelines from CLSI 2011-2025 and EUCAST 2011-2025 are included, even
|
guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even
|
||||||
with epidemiological cut-off (ECOFF) values. It supports and can read
|
with epidemiological cut-off (ECOFF) values. It supports and can read
|
||||||
any data format, including WHONET data. This package works on Windows,
|
any data format, including WHONET data. This package works on Windows,
|
||||||
macOS and Linux with all versions of R since R-3.0 (April 2013). **It
|
macOS and Linux with all versions of R since R-3.0 (April 2013). **It
|
||||||
@@ -171,14 +171,14 @@ example_isolates %>%
|
|||||||
select(bacteria,
|
select(bacteria,
|
||||||
aminoglycosides(),
|
aminoglycosides(),
|
||||||
carbapenems())
|
carbapenems())
|
||||||
#> ℹ Using column 'mo' as input for `mo_fullname()`
|
#> ℹ Using column mo as input for `mo_fullname()`
|
||||||
#> ℹ Using column 'mo' as input for `mo_is_gram_negative()`
|
#> ℹ Using column mo as input for `mo_is_gram_negative()`
|
||||||
#> ℹ Using column 'mo' as input for `mo_is_intrinsic_resistant()`
|
#> ℹ Using column mo as input for `mo_is_intrinsic_resistant()`
|
||||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
||||||
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
||||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
#> (amikacin), and KAN (kanamycin)
|
||||||
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||||
#> # A tibble: 35 × 7
|
#> # A tibble: 35 × 7
|
||||||
#> bacteria GEN TOB AMK KAN IPM MEM
|
#> bacteria GEN TOB AMK KAN IPM MEM
|
||||||
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
||||||
@@ -215,9 +215,9 @@ output format automatically (such as markdown, LaTeX, HTML, etc.).
|
|||||||
``` r
|
``` r
|
||||||
antibiogram(example_isolates,
|
antibiogram(example_isolates,
|
||||||
antimicrobials = c(aminoglycosides(), carbapenems()))
|
antimicrobials = c(aminoglycosides(), carbapenems()))
|
||||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
#> (amikacin), and KAN (kanamycin)
|
||||||
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||||
```
|
```
|
||||||
|
|
||||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||||
@@ -318,6 +318,10 @@ example_isolates %>%
|
|||||||
summarise(across(c(GEN, TOB),
|
summarise(across(c(GEN, TOB),
|
||||||
list(total_R = resistance,
|
list(total_R = resistance,
|
||||||
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
|
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
|
||||||
|
#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I'
|
||||||
|
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
|
||||||
|
#> option to either "CLSI" or "EUCAST", see `?AMR-options`.
|
||||||
|
#> ℹ This message will be shown once per session.
|
||||||
#> # A tibble: 3 × 5
|
#> # A tibble: 3 × 5
|
||||||
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
|
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
|
||||||
#> <chr> <dbl> <chr> <dbl> <chr>
|
#> <chr> <dbl> <chr> <dbl> <chr>
|
||||||
@@ -340,15 +344,15 @@ out <- example_isolates %>%
|
|||||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||||
resistance))
|
resistance))
|
||||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
#> (amikacin), and KAN (kanamycin)
|
||||||
#> ℹ For `polymyxins()` using column 'COL' (colistin)
|
#> ℹ For `polymyxins()` using column COL (colistin)
|
||||||
#> Warning: There was 1 warning in `summarise()`.
|
#> Warning: There was 1 warning in `summarise()`.
|
||||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
||||||
#> ℹ In group 3: `ward = "Outpatient"`.
|
#> ℹ In group 3: `ward = "Outpatient"`.
|
||||||
#> Caused by warning:
|
#> Caused by warning:
|
||||||
#> ! Introducing NA: only 23 results available for KAN in group: ward =
|
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"
|
||||||
#> "Outpatient" (`minimum` = 30).
|
#> (whilst `minimum = 30`).
|
||||||
out
|
out
|
||||||
#> # A tibble: 3 × 6
|
#> # A tibble: 3 × 6
|
||||||
#> ward GEN TOB AMK KAN COL
|
#> ward GEN TOB AMK KAN COL
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user