Oscar Echesirim Data Analyst
All work

Hospital Operations Analysis

An unclean extract of 5,075 hospital visit records, profiled and cleaned in MySQL to find where demand and resource pressure concentrate.

Records received
5,075
Records analysed
5,0755,000
Period covered
Jan 2023 – Dec 2024
Distinct patients
5,000
Departments
8
Missing visit dates
0
SQL scripts
5
Data-quality issues logged
11

What it found

75 rows that looked like repeat patients were exact copies of other rows.

75 of 5,075 rows received

Found by comparing all 22 columns, not just the patient identifier. Removing them is why the analysed count is 5,000 and why every patient identifier in the clean table is unique.

Ventilator demand comes almost entirely from critical visits. Mild and moderate visits never need one.

56.6% of 401 critical visits

Severity, not department, is what predicts a ventilator here. That makes ventilator planning a question about how many critical cases arrive, which is a different question from how many beds a department needs.

How it was done

  1. Setup Create the database and load the raw extract. The raw table is never altered after this point, so every later figure can be traced back to what arrived.
  2. Raw profiling Count rows, distinct values, blanks and format variants before changing anything. Case-insensitive collation hides case variants, so duplicate checks were re-run under a binary collation to see them.
  3. Cleaning Build a separate clean table rather than editing the original: de-duplicate across all 22 columns, trim and standardise labels, convert three different date formats to real dates, derive month, weekday and season from the date, and add flags for the rows that contradict themselves.
  4. Validation Nine read-only checks against the clean table: row and distinct counts, completeness, flag counts, date range, and one collation across every text column. All nine matched.
  5. Analysis Answer the six business questions on demand, length of stay, resource needs, bed and ICU capacity pressure, and 30-day readmissions.

Every cleaning decision, and why

Eleven data-quality issues were found and logged. Six were fixed, three were flagged and deliberately left alone, and two were accepted as they are. The three I chose not to fix are the ones worth reading.

What this analysis cannot tell you