Emergency Department Utilization & Revisits Analysis

Overview

This project analyzes emergency department (ED) utilization and short-term revisit risk using hospital EHR data derived from the MIMIC-IV dataset. Raw MIMIC-IV files were sourced from Hugging Face and transformed into a structured MIMIC Hospital EHR relational database built in SQL Server using Python (pyodbc).

The objective of the analysis is to identify patterns in repeat ED encounters, evaluate 72-hour and 7-day revisit risk, and surface patient-level risk indicators that may inform healthcare operations and quality improvement efforts.

Using SQL-based data modeling and Tableau visual analytics, the final dashboard highlights:

  • Repeat ED utilization patterns
  • Short-term revisit risk (72-hour and 7-day windows)
  • Patient risk signals derived from abnormal triage vitals
  • Visit-level trends that may indicate opportunities for early intervention

Data & Tools Used

Data

  • MIMIC-IV Hospital EHR
    • Raw files sourced from Hugging Face
    • Transformed into a relational SQL Server database
    • ED tables: ed_stays, triage_assessments, diagnoses

Tools & Technologies 🛠️

  • GitHub â€“ documentation, version control, and project transparency
  • Python (pyodbc) â€“ data ingestion, transformation, and database loading
  • SQL Server â€“ relational database design, data modeling, analytical views
  • SQL â€“ joins, aggregations, and validation logic
  • Jupyter Lab â€“ exploratory analysis and data validation
  • Tableau Desktop & Tableau Public â€“ interactive dashboard development

Methodology

This analysis follows an end-to-end healthcare analytics workflow, from raw flat files to a production-style analytical view and interactive dashboard.

Data Ingestion & Database Construction

  • Raw MIMIC-IV files were downloaded from Hugging Face.
  • Using Python and pyodbc, the raw files were cleaned, transformed, and loaded into SQL Server.
  • A relational MIMIC Hospital EHR database was designed to reflect ED encounter workflows and support analytical querying.

Data Preparation & Modeling

  • Core ED tables (ed_stays, triage_assessments, diagnoses) were extracted and standardized.
  • Intermediate summary views were created, including:
    • ED_Stays_Summary
    • ED_Revisits_Summary
    • ED_Primary_Diagnosis
  • Sanity checks were performed to validate revisit identifiers prior to joining revisit data to ED stays.

Analytical View Creation

  • A final analytical view, ED_Encounter_Analytics, was created using a left join on stay_id, ensuring:
    • One row per ED encounter
    • Preservation of all ED stays regardless of revisit status
    • Enrichment with revisit metrics and primary diagnosis information

This view serves as the primary data source for analysis and dashboard reporting.

Visualization & Metrics

  • A Tableau parameter enables dynamic selection of revisit windows within the dashboard.
  • Revisit flags and rates (72-hour, 7-day, and 30-day) were calculated in Tableau.
  • Abnormal vital signs were flagged and aggregated into a composite Abnormal Vital Burden to support patient risk stratification.

Project Documentation

View Full Project on GitHub