Set the order of sites in as.sir(), and add the veterinary sites

Sites now go from systemic, IV, meningitis, endocarditis, pneumonia and mastitis to UTI, topical and screen. A breakpoint without a site takes the position of "other", as both mean any site that is not listed next to it. A second site breaks a tie on the first one.

The veterinary sites are now fixed codes as well: mastitis (includes Mammary gland), respiratory, metritis, genital, soft tissue and wounds (includes Abscesses). Sites that are part of each other do not contradict.

site = "other" now leaves out every breakpoint limited to an indication, and prefers a breakpoint without a site.

A rebuild of clinical_breakpoints with this order gives the same data, so the same blocking rows stay.
This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-11-02 20:20:05 +01:00
1 parent 414f41ba22
commit e7077081b9
28 files changed
+2947 -16052

No files matched your search

+1 -1
View File
@@ -182,7 +182,7 @@ The default \code{"standard"} setting ensures cautious handling of uncertain val
\item{conserve_capped_values}{Deprecated, use \code{capped_mic_handling} instead.}
\item{site}{The site or route that the isolate is interpreted for: a \link{character} vector or a column name, in the fixed codes \code{"meningitis"}, \code{"non-meningitis"}, \code{"endocarditis"}, \code{"non-endocarditis"}, \code{"pneumonia"}, \code{"non-pneumonia"}, \code{"systemic"}, \code{"extraintestinal"}, \code{"other"}, \code{"intestinal"}, \code{"skin"}, \code{"inhaled"}, \code{"oral"}, \code{"prophylaxis"}, \code{"uti"}, \code{"iv"} and \code{"topical"}, which can be combined with a comma, e.g. \code{"iv, meningitis"}. If \code{site} is \code{NA} (default), any breakpoint matching all other criteria can apply, taken from most to least systemic site in the order just given, with \code{"iv"} directly after \code{"endocarditis"}; a breakpoint without a site is taken after \code{"other"}. If \code{site} is set, a breakpoint for a contradicting site is left out, e.g. \code{"meningitis"} leaves out \code{Non-meningitis}, while a breakpoint without a site still applies. The result is \code{NA} if only contradicting sites are available, also when PK/PD breakpoints exist. All choices are noted in \code{\link[=sir_interpretation_history]{sir_interpretation_history()}}.}
\item{site}{The site or route that the isolate is interpreted for: a \link{character} vector or a column name, in the fixed codes \code{"systemic"}, \code{"iv"}, \code{"meningitis"}, \code{"endocarditis"}, \code{"pneumonia"}, \code{"mastitis"}, \code{"respiratory"}, \code{"metritis"}, \code{"genital"}, \code{"intestinal"}, \code{"other"}, \code{"non-meningitis"}, \code{"non-endocarditis"}, \code{"non-pneumonia"}, \code{"extraintestinal"}, \code{"soft tissue"}, \code{"skin"}, \code{"wounds"}, \code{"inhaled"}, \code{"oral"}, \code{"prophylaxis"}, \code{"uti"} and \code{"topical"}, which can be combined with a comma, e.g. \code{"iv, meningitis"}. If \code{site} is \code{NA} (default), any breakpoint matching all other criteria can apply, taken from most to least systemic site in the order just given; a breakpoint without a site takes the position of \code{"other"}, as both mean any site that is not listed next to it. If \code{site} is set, a breakpoint for a contradicting site is left out, e.g. \code{"meningitis"} leaves out \code{Non-meningitis}, while a breakpoint without a site still applies. \code{"other"} leaves out every breakpoint limited to an indication, and prefers a breakpoint without a site. Related sites do not contradict each other: \code{"pneumonia"} and \code{"respiratory"}, \code{"metritis"} and \code{"genital"}, and \code{"soft tissue"}, \code{"skin"} and \code{"wounds"}. The code \code{"mastitis"} includes \verb{Mammary gland}, and \code{"wounds"} includes \code{Abscesses}. The result is \code{NA} if only contradicting sites are available, also when PK/PD breakpoints exist. All choices are noted in \code{\link[=sir_interpretation_history]{sir_interpretation_history()}}.}
\item{col_mo}{Column name of the names or codes of the microorganisms (see \code{\link[=as.mo]{as.mo()}}) - the default is the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}