Power Bi Project
Power Bi Project
FIGURE
NUMBER CONTENT PAGE.NO
5.1 OUT PATIENT DATA 8
5.3 9
ALL DATA
5.6 11
CARDS
5.7 11
TOGGLE BUTTON
5.8 12
SUMMARY DSHBOARD
This project examines healthcare waitlist data to uncover trends and insights crucial for
optimizing hospital management and improving patient care. Analyzing data from January
2018 to March 2021, the goal was to understand variations in waitlist durations across medical
specialties, patient types, and age groups.
The analysis began with data preparation, including cleaning, standardizing, and merging
multiple CSV files representing Inpatient and Outpatient data. This process involved renaming
fields for consistency, addressing formatting issues, and creating a unified dataset.
Using Power BI, we developed two key analytical pages: a Summary page and a Detailed page.
The Summary page features dynamic metrics and visualizations, such as comparisons of
current versus previous month waitlists, and toggle buttons for average versus median wait
times. It includes visualizations like donut charts for case type distribution, stacked column
charts for time band and age profile relationships, and line charts showing trends over time.
The Detailed page provides a matrix view of waitlists segmented by case type, age profile, time
band, specialty, and archive date.
This project investigates patient waitlist data from 2018 to 2021, focusing on three patient
categories: Outpatient, Inpatient, and Day Case. Outpatient patients receive care and return
home the same day, Inpatient patients stay in the hospital for one or more nights for serious
treatment, and Day Case patients require more extensive care than Outpatients but are
discharged on the same day.
The project aims to track the current status of the patient waitlist, analyze historical trends by
patient category, and perform detailed analyses of specialties and age profiles. The analysis
begins with a Summary dashboard, designed to provide an overview of key metrics such as
month-to-month waitlist comparisons and trends. For example, the Summary dashboard
highlights a significant 26% increase in Outpatient waitlists over the past three years, while
Inpatient and Day Case waitlists have remained relatively stable. Additionally, it identifies the
Top 10 specialties with the longest wait times.
To facilitate deeper exploration, a Detailed View page was created. This interactive page allows
users to filter data by case type, specialty, age, and time band, providing a granular analysis
that supports more informed decision-making. This comprehensive approach aims to enhance
understanding of waitlist dynamics and improve hospital resource management and patient
care.
CHAPTER - 2
PROBLEM STATEMENT
The aim of this project is to enhance the management of patient waitlists by analyzing data
from 2018 to 2021. Specifically, the project seeks to track current waitlist figures and compare
them to historical data to identify changes and trends. It also aims to analyze historical monthly
trends across Outpatient, Inpatient, and Day Case categories to uncover patterns in wait times.
Additionally, the project will perform a detailed analysis of wait times by medical specialty
and age group to highlight areas with significant delays and high-demand specialties. The goal
is to provide actionable insights that will support better resource allocation, improve patient
management, and optimize overall hospital efficiency.
CHAPTER - 3
TECHNOLOGY ADOPTED
3.1. Power BI
Power BI is utilized in this project as the primary tool for analyzing patient waitlist data,
focusing on the Outpatient, Inpatient, and Day Case categories. The tool provides the ability to
create interactive dashboards and reports that allow for comprehensive monitoring of the
current waitlist status. It also facilitates in-depth analysis of historical trends, enabling a better
understanding of how wait times and patient demographics have evolved over time.
Additionally, Power BI supports detailed specialty and age profile analysis, allowing for
targeted insights into specific patient groups.
4.1 Power BI
Power BI is a business analytics tool used for interactive data visualization and business
intelligence. For this project, Power BI was essential for loading, transforming, and visualizing
patient waitlist data. The tool's DAX functions were crucial for calculating dynamic metrics
and enabling toggle features for comparing average and median waitlist times. Its user-friendly
interface and strong data modeling capabilities made it the primary tool for building both
summary and detailed dashboards.
4.2 Python
Python was employed for initial data exploration and pre-processing tasks. Libraries like
Pandas and NumPy facilitated efficient manipulation and transformation of the CSV files
containing patient waitlist data. Python’s flexibility in handling large datasets and integrating
with various data sources was key to preparing the data for analysis in Power BI.
4.3 Excel
Excel was used for quick data checks and calculations. It also served as the storage medium
for the Mapping Specialty file, which was later imported into Power BI to create relationships
between specialties and their respective groups. Excel’s simplicity and familiarity made it a
convenient tool for managing reference data and performing initial data validations.
Web scraping was used to collect relevant datasets from online sources. Tools and libraries
such as Beautiful Soup and Scrapy were utilized to extract data from websites and online
databases. The collected data was integrated with existing datasets, providing a comprehensive
view of patient waitlists and supporting more accurate analysis.
CHAPTER - 5
SOLUTION OF THE PROBLEM
5.1 Dataset
• Outpatient: A patient attending for a short consultation or appointment.
• Inpatient: A patient admitted to stay in the hospital for one or more nights.
• Day Case: A patient undergoing a procedure that allows them to leave the same day.
• Archive_Date: The date of record.
• Specialty_HIPE: The specialty code.
• Specialty: The medical specialty being waited for.
• Case_Type: The classification of the patient (Inpatient/Day Case/Outpatient).
• Age_Profile: The age group of the person on the waitlist.
• Time_Bands: The waitlist time intervals.
1. Summary Page: This page will include dynamic cards for current vs. previous month
waitlists, Average vs. Median toggle buttons, and visualizations such as a donut chart
for case types, a stacked column chart for time bands vs. age profiles, and line charts
for Inpatients and Outpatients. A multi-row card will also display the top 5 specialties
based on waitlist metrics.
2. Detailed Page: This page will feature a matrix visualization to provide a detailed
breakdown of the waitlist data, including dimensions like Case_Type, Age_Profile,
Time_Band, Specialty, and Archive_Date, offering a comprehensive view of the data.
5.5 Data Visualization
We created dynamic DAX measures to compare the current month's waitlist with the
previous month and the same month from the previous year. These measures allow for real-
time updates on the Power BI dashboard, ensuring accurate comparisons in the visualizations.
To address data outliers, we created toggle buttons that allow users to switch between
viewing the average and median waitlist values in the charts. We added slicers for "Average"
and "Median" and used DAX measures to calculate both. A final measure combines the two,
enabling dynamic chart updates based on the selected toggle option. This ensures flexible and
accurate data visualization.
The waitlist has grown from 640K last year to 709K this year, mostly affecting outpatients.
The longest waits are 0-3 months and 18+ months. Inpatient and Day Case waitlists are stable,
while outpatient numbers continue to rise. The top 5 specialties with the highest wait times are
Accident & Emergency, Dermatology, Clinical Genetics, Cardiology, and Pain Relief.
Fig 5.9 (Detail Page)
The Detailed page will include a matrix that shows the total patient waitlist, organized by
Case_Type, Age_Profile, Time_Band, Specialty, and Archive_Date. This setup will allow us
to analyse trends and patterns in the data across different categories, providing a clear and
detailed view of the waitlist.
CHAPTER - 6
CONCLUSION
This project provided a detailed analysis of patient waitlist data from 2018 to
2021, utilizing Power BI and Python to convert raw data into actionable insights.
Through comprehensive data preprocessing, including feature scaling, date
handling, and feature-target splitting, the project ensured high data integrity. The
visualizations in Power BI offered interactive dashboards with features like
average vs. median toggles and specialty-specific charts, enabling in-depth
analysis of waitlist trends across Outpatient, Inpatient, and Day Case categories.
Additionally, predictive and classification models allowed for future trend
forecasting, aiding healthcare management in resource allocation and strategic
planning. This work highlights the potential of data-driven approaches to
optimize patient care and enhance healthcare system efficiency.
CHAPTER - 7
FUTURE ENHANCEMENTS
Now create one more measure that will allow us to interact with the slicer buttons:
INPATIENT DATASET
Patient_id Admission_date Discharge Specialty Waiting Patient type Age Gender Severity_
_date days level
OUTPATIENT DATASET
1001
2021-01-15 Dermatology 15 Routine 40 M Medium
1002
2021-02-10 Paediatrics 20 Routine 30 F Low
1003
2021-03-20 Orthopaedics 12 Emergency 55 M High
1004
2021-04-10 Neurology 25 Routine 60 F Medium
1005
2021-05-25 General 10 Emergency 50 M Low
1006
2021-06-15 Dermatology 18 Routine 35 F High
1007
2021-07-05 Pediatrics 22 Emergency 28 M Medium
DAY CASE DATA
Patient_id Procedure date Specialty Waiting Patient type Age Gender Severity_
days level