Who asked: the data governance lead at Cedar Ridge Health, a fictional health system.
Why: three raw extracts load into the warehouse next week. Every problem that gets in shows up later in patient counts, length of stay and diagnosis reports, where it is far harder to trace.
The data: hd_registrations_raw (registrations from the clinic and emergency systems), hd_encounters_raw (inpatient and observation stays), hd_diagnoses_raw (a diagnosis feed) and hd_icd10_ref (the valid codes). The extracts were pulled on 1 July 2026.
What done looks like: one query per check, each giving the number of rows affected: the registration profile, duplicate people, impossible birth dates, diagnosis codes still invalid after normalization, impossible stays and rows loaded twice. Then a recommendation on what to fix first, and why.
A project in seven steps on Cedar Ridge's raw extracts. Each of the first six steps is one check written as SQL, counted so the governance lead can see the size of each problem. The last step is your recommendation.