Skip to main content
AI Platform ↗
02. The Clinical Data Cleaning Masterclass9 min readFree Lesson

The 10-Check Automated Cleaning Pipeline

How deterministic rules combined with human verification and an audit trail turn raw spreadsheets into reproducible research tables.

In this lesson you will learn

  • 1Trace how deterministic checks flag impossible physiological ranges, negative values, and duplicate participant rows.
  • 2Understand why human review must sit between automated detection and final table modification.
  • 3Explain why a timestamped Audit Trail Log is essential for peer-review reproducibility.
On this page▼
01

Interactive Cleaning Sandbox: Auditing & Logging in Action

What this section is about

This section walks through a structured 4-stage cleaning workflow: raw upload, deterministic cell-level detection, researcher approval, and audit-log generation.

Why it matters for your study

Modifying raw spreadsheets manually without saving a change log makes it impossible to defend how outliers or duplicates were handled if questioned by an examiner.

Rigorous data preparation follows an evidence-first workflow: automated checks scan every row and cell to surface concrete anomalies, and the researcher decides which corrections to apply while preserving the original file intact.

In the interactive lab below, click "Audit Dataset" to highlight seven distinct data-entry faults across patient records, then click "1-Click Analysez Clean" to inspect the harmonised table and its complete audit log.

1. Raw UploadOutliers, strings, dupes2. Deterministic ScanExact row/cell evidence3. Researcher ReviewApprove or reject each fix4. Audit Trail LogReproducible recipe log
Figure:An auditable cleaning workflow pairs automated cell detection with human review and a permanent transformation log.

Interactive Clinical Data Cleaning Sandbox

Experience how Analysez's 10-point audit catches fatal flaws and sanitizes real research data

Raw unprocessed dataset as received from hospital forms. Click 'Audit Dataset' to detect silent corruptions.
IDAgeGenderSystolic BPFasting GlucoseGroup
P001142"Male"12896Control
P00245" Male "135104Treatment
P00352"female"120 mmHg110Treatment
P00461"Female"142N/AControl
P00539"Male"-1588Control
P00658"FEMALE"130999Treatment
P00245"Male"135104Treatment

Clinical Example

During pre-analysis screening of a 200-patient cardiology spreadsheet, row 14 shows Age = 142 years and row 88 repeats Patient ID P002 verbatim.

Row 14: ID=P001, Age=142 (Source chart confirms 42) | Row 88: Duplicate of Row 2 (ID=P002) → Removed 1 duplicate row

Interpretation: Flagging Age = 142 prompts source-chart verification (correcting a typo for 42), while removing the exact duplicate row restores independence of observations.

Common Pitfall

Overwriting the only copy of the raw spreadsheet during cleaning, leaving no way to undo a mistake or verify original values.

Key takeaways

  • 1Deterministic cleaning rules inspect each column for physiological bounds, whitespace, embedded units, sentinel codes, and duplicate IDs before analysis.
  • 2Every cleaning action should remain optional and human-reviewed so clinical domain knowledge guides whether an extreme value is a typo or a critical patient.
  • 3Recording every cell transformation in an Audit Log allows co-authors, supervisors, and journal reviewers to reproduce the exact path from raw file to final table.
Self-Assessment

Check your understanding

One question per screen with immediate methodological rationale after each answer

1 of 5
Question 1 of 5

In an adult cardiology dataset, a participant's age is recorded as '142'. How should a structured cleaning workflow handle this value?

Finished reading this lesson?

Mark as completed to track your progress through the handbook

The 10-Check Automated Cleaning Pipeline | Biostatistics Handbook | Analysez