Reads the exercise deck's answer key: one row per patient card, giving the sighting category the card was written to carry, plus the card's recorded sex, age, clinical findings and vital signs.
Arguments
- path
Path to the codebook workbook (
.xlsx). Read-only; nothing is written to it or beside it.- sheet
Sheet to read.
NULL, the default, takes the sheet whose name begins with"Verteilung", or the only sheet if the workbook has one.- verbose
Report the parsed deck, the guard drops and the cross-checks while reading.
Value
An sdt_gold_standard object: a tibble::tibble() subclass with
one row per card and the columns card ("01"–"46"), triage, sex,
age, findings, vitals and sk_raw. The meta attribute carries the
path, the sheet, the guard drops, the legend cross-check and the working
sheet cross-check.
Details
This is the ground truth the course exports do not contain. An export
records the calls teams made, so any triage number computed from it alone
is inter-team agreement; the field that looks like an answer key is a
round-robin placeholder. Pair this reader with
sdt_apply_gold_standard() and sdt_triage_accuracy() to score calls
against the deck rather than against each other.
The sheet is not a clean rectangle
Codebooks acquire duplicate test rows and legend blocks below the data, and a legend written into shifted columns parses as data if it is not caught. Three guards remove them, all by rule rather than by row position, since row positions are the first thing an edited workbook changes:
blank— every contract column is empty.non_numeric_card— the card id is not a number, which is what catches both duplicate test rows carrying a letter id and the shifted legend.card_out_of_range— the card id is a number outside the deck.
How many rows each guard removed is reported when verbose = TRUE and kept
in the meta attribute, so a silent change in the workbook shows up as a
changed count rather than as a changed result.
Cross-checks rather than a preference
Two independent statements of the same counts are read back and compared
with the parse: the sheet's own SK I/SK II/SK III legend, whose totals
include the duplicate rows the guards removed, and any earlier working sheet
in the same workbook. Disagreements are reported, never resolved by quietly
preferring one source.
See also
sdt_apply_gold_standard() to write it into a cohort,
sdt_triage_accuracy() to score calls against it.
Examples
if (FALSE) { # \dontrun{
gold <- sdt_read_gold_standard("Patienten Codebook.xlsx")
gold
attr(gold, "meta")$guards
} # }