Prepare OPS-8-544 therapy blocks for downstream analysis
Source:R/parsers.R
zhn_prepare_therapy_blocks.RdArguments
- df
Data frame returned by
zhn_read_therapy().
Value
A therapy_blocks S3 object (inheriting from
data.frame) with at minimum: therapieprotokoll, diagnose,
patient, datum, zyklus, jahr, monat_sort. Empty input returns
a 0-row object with this column set; the patient_cols_used attribute
records which raw columns were coalesced into patient.
Details
Reshapes the raw therapy sheet (as returned by zhn_read_therapy()) into
the per-block tibble the dashboard counts. Counts every numeric
OPS-8-544 entry > 0 as a positive block; falls back to deduplicating
Patient/Datum/Zyklus/Protokoll combinations when no OPS column exists.
See also
Other parsers:
zhn_parse_cytogenetics(),
zhn_parse_oncoprint(),
zhn_prepare_diagnostic_blocks()