Skip to contents

[Experimental]

Usage

zhn_prepare_therapy_blocks(df)

Arguments

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.