EUCAST import: blocking rows, note restrictions, PK-PD and parser fixes (#310)

Make the EUCAST Clinical Breakpoint Tables import (2019-2026) fail-safe:

- Add blocking rows (NA breakpoints, reason in `note`) where EUCAST gives
  no breakpoint for an organism (IE, "-", Note, brackets, "except"
  clauses, table scope), so as.sir() no longer falls back to broader taxa
- Apply restrictions from EUCAST notes via a curated rule table with a
  completeness guard (e.g. zone diameters for E. coli only)
- Import PK-PD (non-species related) breakpoints 2019-2023, H.
  parainfluenzae MIC breakpoints, and explicit screening thresholds from
  notes (high-level aminoglycosides, cefoxitin MIC, unidentified CoNS)
- Parser fixes: lost Staphylococcus sheets 2019/2020, note keys and
  bodies, struck-through cells, hidden sheets, missing disk contents,
  organism groups, site vocabulary, MIC dilution levels, off-scale
  breakpoints stored as 0.0001
- Keep EUCAST antifungal breakpoints 2019-2025 from WHONET; code WHONET
  streptomycin as STR1 instead of STR (streptoduocin)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Matthijs BerendsandClaude Opus 5.5 authored and GitHub committed 2026-10-02 06:01:58 +02:00
1 parent 5d9974e2b9
commit dab4c47e86
25 files changed
+83693 -58604

No files matched your search

+15 -18
View File
@@ -27,12 +27,9 @@
<div style="display: flex; font-size: 0.8em;">
<p style="text-align:left; width: 50%;">
<small><a href="https://amr-for-r.org/">amr-for-r.org</a></small>
</p>
<p style="text-align:right; width: 50%;">
<small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">doi.org/10.18637/jss.v104.i03</a></small>
</p>
@@ -62,7 +59,7 @@ times](https://scholar.google.com/citations?view_op=view_citation&hl=en&citation
in scientific research.
After installing this package, R knows [**~97 000 distinct microbial
species**](./reference/microorganisms.html) (updated May 2026) and all
species**](./reference/microorganisms.html) (updated mei 2026) and all
[**~620 antimicrobial and antiviral
drugs**](./reference/antimicrobials.html) by name and code (including
ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all
@@ -227,8 +224,8 @@ wisca(example_isolates,
```
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|
| 70.2% (64.6-75.4%) | 93.6% (92.1-95%) | 89.9% (87-92.5%) |
|:------------------------|:-------------------------------------|:-------------------------------------|
| 70% (64.9-75.3%) | 93.6% (92.1-95%) | 89.9% (87.1-92.3%) |
WISCA supports stratification by any clinical variable, so you can
generate syndrome-specific or ward-specific coverage estimates:
@@ -242,10 +239,10 @@ wisca(example_isolates,
```
| Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---|
| Clinical | 74.7% (68.9-80.8%) | 93.7% (92.1-95.2%) | 90.5% (87-93.2%) |
| ICU | 57% (48.2-65.7%) | 86.8% (83.4-89.8%) | 83% (78-87.6%) |
| Outpatient | 57.2% (46.2-68.9%) | 76.6% (70.1-82.1%) | 67.7% (57.6-77.5%) |
|:----------------|:------------------------|:-------------------------------------|:-------------------------------------|
| Clinical | 74.8% (69.1-80.2%) | 93.6% (92.1-95.1%) | 90.4% (87.2-93.1%) |
| ICU | 57.2% (49.2-65.6%) | 86.7% (83.4-89.9%) | 82.9% (78.1-87.2%) |
| Outpatient | 57.6% (46.3-69.2%) | 76.5% (70.5-82%) | 67.6% (57.3-77.1%) |
**For AMR surveillance**, traditional antibiograms remain the right tool
for tracking resistance per species over time:
@@ -257,10 +254,10 @@ antibiogram(example_isolates,
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
```
| Pathogen | Amoxicillin/clavulanic acid | Imipenem | Meropenem | Piperacillin/tazobactam |
|:---|:---|:---|:---|:---|
| Gram-negative | 76% (73-79%,N=726) | 99% (98-100%,N=631) | 100% (99-100%,N=626) | 88% (85-91%,N=641) |
| Gram-positive | 76% (74-79%,N=1138) | 81% (75-85%,N=257) | 77% (70-82%,N=203) | 86% (82-89%,N=345) |
| Pathogen | Amoxicillin/clavulanic acid | Imipenem | Meropenem | Piperacillin/tazobactam |
|:--------------|:----------------------------|:--------------------|:---------------------|:------------------------|
| Gram-negative | 76% (73-79%,N=726) | 99% (98-100%,N=631) | 100% (99-100%,N=626) | 88% (85-91%,N=641) |
| Gram-positive | 76% (74-79%,N=1138) | 81% (75-85%,N=257) | 77% (70-82%,N=203) | 86% (82-89%,N=345) |
Combination antibiograms show the additional coverage gained by adding a
second agent, stratified by species:
@@ -271,10 +268,10 @@ antibiogram(example_isolates,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
```
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---|
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:--------------|:------------------------|:-------------------------------------|:-------------------------------------|
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
Like many other functions in this package, `antibiogram()` and `wisca()`
come with support for 28 languages that are often detected automatically