"Patient Treatment Outcome Analysis & Cost Optimization"

By Amit Gond Data Analyst Intern(Skilled Up)

Data-Driven Hospital Insights: A Case Study On Automating Weekly Kpi Dashboards with Python & Power Bi

Introduction

In the rapidly evolving world of healthcare, data is the new lifeline. Our project, "Patient Treatment Outcome Analysis & Cost Optimization," leverages healthcare data to extract meaningful insights that can improve patient care and optimize hospital costs. Using a combination of Python, SQL, and Power BI, we conducted end-to-end analysis, from raw data cleaning to visualization and machine learning predictions.

                                                       Project Objectives

  • Analyze patient treatment outcomes across departments and hospitals.

  • Reduce unnecessary readmissions and optimize treatment duration.

  • Track and visualize billing patterns and cost inefficiencies.

  • Deliver real-time insights through KPI dashboards.                                                                                                                                                                                                                                    Data Preprocessing


  • Date of Admission & Discharge

  • Medical Condition & Outcome

  • Insurance & Billing Amount

  • Hospital, Doctor, Age, Gender

Key preprocessing steps:

  • Converted admission/discharge dates to datetime.

  • Calculated Length of Stay using DATEDIFF.

  • Created binary Readmission flag based on average stay.

  • Cleaned null/mismatched values.

Exploratory Data Analysis (EDA) Using Python (Pandas, Seaborn, Matplotlib), we explored:

  • Top Hospitals by Billing Amount

  • Department-wise Treatment Distribution

  • Readmission Frequency by Age Group

  • Correlation between Cost and Length of Stay

  • Patient Visit Frequencies


visualization:





SQL-Based Data Integration We normalized our data into 4 core tables:

  • Patients

  • Treatments

  • Admissions

  • Billing

SQL joins and nested queries helped extract:

  • Patient-wise cost summaries

  • Departmental performance

  • Emergency-based high-risk conditions

link of sql bigquery:

Sample query:



KPI Dashboards in Power BI We developed interactive dashboards to display:

  • Total Billing per Hospital

  • Test result Distribution by Condition

  • Discharge Delays and Penalty Triggers

  • Readmission Risk by Diagnosis




. Machine Learning for Readmission Prediction Using a Random Forest Classifier:

  • Feature: Age, Length of Stay

  • Target: Readmitted (0 or 1)

  • Achieved 100% accuracy on our balanced test dataset




A/B Testing for Treatment Plans We performed A/B testing using scipy.stats to compare two treatment plans (A & B) for diabetic patients.

Outcome:


Conclusion 

Our project shows how combining analytics, visualization, and machine learning can enhance patient outcomes and operational efficiency in healthcare. The insights from Power BI and Python not only helped us identify cost-saving opportunities but also contributed toward data-driven clinical decision-making.





Comments