Data analysis project focusing on monthly time-series trendsof 'flu' cases and treatment costs using a simulated Rwanda clinic database. Provides actionable SQl insights to help the financial planning department forecast peak demand and expenditure periods.
Flu Season and Financial Forecasting Project
**Overview**
This project focuses on a critical business intelligence initiative for a Rwandan clinic's financial planning department.
The goal was to provide a data-driven view of how the annual flu season impacts the clinic's finances to support accurate budget forecasting.
The core task was to analyze time-series data to identify the peak months of flu activity and the corresponding total treatment costs.
**Dataset Schema**
The analysis utilized four distinct relational tables from the clinic's operational database:
Table Name - Key Columns - Description
Doctors - doctorid, speciality - Information about physicians.
Patient_mapping - patientid, insurancetype - Patient demographic and administrative details.
Wellness_activity - patientid, activity type - Records of patient wellness activities.
Patient_records_fact - patientid, visit date, cost, diagnosis, doctor ID - The central fact table containing visit details, costs, and diagnoses.
**Primary Analytical Task**
Title: Analyzing Monthly Trends of Flu Cases and Treatment Costs
Objectives:
Filtering: Isolate records where the diagnosis column equals 'Flu'.
Aggregation: Group the filtered data by Year and Month.
Calculation: Summarize the total case count and the total cost for each month.
Insight: Determine the months representing the absolute peak of the flu season in terms of both case volume and financial expenditure.
💻 SQL Implementation
The analysis was performed by grouping records from the Patient_records_fact table and utilizing date manipulation functions.
Query for Monthly Aggregation
This query generated the time-series summary table for the financial planning department.
SQL
created another column for the month and year
-- Extracts Year and Month for chronological grouping (using SQL server)
alter table patient_records_fact
add Visit_year int,
vist_month int;
update patient_records_fact
set Visit_year = year(visit_date)
update patient_r …