This document describes how the input CSV files are transformed into
the derived patient-level summary
data/derived_patient_status.csv in this demo
repository.
data/sample_patients.csv — one row per patient with
demographics.data/measurements.csv — repeated clinical measurements
per patient (contains date, bp_systolic,
bp_diastolic, weight_kg, etc.).The derivation is performed by the script:
scripts/derive_patient_status.pyYou can inspect or download the script and its runtime requirements here:
This script:
data/sample_patients.csv and
data/measurements.csv.date.sex and
ethnicity (demo-only lookup).weight_category and
bp_category.data/derived_patient_status.csv.Install dependencies (if not already available):
python3 -m pip install -r scripts/requirements.txtRun the script:
python3 scripts/derive_patient_status.pyThis will write data/derived_patient_status.csv and
print the number of rows written.