mirror of
https://github.com/msberends/AMR.git
synced 2026-05-31 19:01:42 +02:00
Generalise interpretive rules for multi-guideline support (#268)
- Rename data-raw/eucast_rules.tsv → interpretive_rules.tsv; add rule.provider column (value: "EUCAST") to distinguish future CLSI rows - Rename EUCAST_RULES_DF → INTERPRETIVE_RULES_DF in _pre_commit_checks.R; filter by rule.provider == guideline when applying rules in interpretive_rules() - Rename custom_eucast_rules() → custom_interpretive_rules() with new S3 class "custom_interpretive_rules"; old function becomes a deprecated wrapper in zz_deprecated.R; backward-compat S3 dispatch shims added for old class - Remove stop_if(guideline == "CLSI", ...) so clsi_rules() no longer errors - Add .onLoad shim in zzz.R to create INTERPRETIVE_RULES_DF from EUCAST_RULES_DF for transitional compatibility until sysdata.rda is regenerated https://claude.ai/code/session_01D46BTsfJSPo3HnLWp3PRkP
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
# how to conduct AMR data analysis: https://amr-for-r.org #
|
||||
# ==================================================================== #
|
||||
|
||||
# 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/interpretive_rules.tsv" and clinical_breakpoints
|
||||
# (sourcing "data-raw/_pre_commit_checks.R" will process the TSV file)
|
||||
EUCAST_VERSION_BREAKPOINTS <- list(
|
||||
"16.0" = list(
|
||||
@@ -221,6 +221,7 @@ globalVariables(c(
|
||||
"reference.rule",
|
||||
"reference.rule_group",
|
||||
"reference.version",
|
||||
"rule.provider",
|
||||
"rowid",
|
||||
"rule_group",
|
||||
"rule_name",
|
||||
|
||||
Reference in New Issue
Block a user