This repository contains the National Health Insurance (NHI) – Machine Learning Project for the Technical Programming 2 module. The project focuses on predicting healthcare service demand in South Africa under the NHI system using real-world clinical data from the MIMIC-III Clinical Database (Demo Version 1.4).
# National Health Insurance (NHI) – Machine Learning Project
**Module:** Technical Programming 2
**Due Date:** 30 August 2025
**Group Members (Alphabetical Order):**
- Mhle L. – 22322987
- Mncwango A. S. – 22334567
- Msane Z. N. – 22415488
- Mthembu S. H. – 22337669
- Ngwadla M. – 22310899
- Shangase S. – 22315517
---
## Project Overview
This project focuses on predicting healthcare service demand under South Africa's National Health Insurance (NHI) system using real-world clinical data from the **MIMIC-III Clinical Database (Demo Version 1.4)**.
The goal is to build a machine learning model where we predict healthcare service demand under the NHI system, using patient demographics, admissions, diagnoses, and treatment data.
## Features
- **Machine Learning Life Cycle:** Includes problem definition, data collection, preparation, EDA, feature engineering, model building, and evaluation.
- **Data Source:** MIMIC-III Demo dataset, multi-relational with tables including patients, admissions, diagnoses, procedures, prescriptions, lab events, and transfers.
- **Predictive Modeling:** Random Forest classifier predicts healthcare service type (Emergency, Elective, Urgent) based on patient demographics and clinical features.
- **Data Insights:** Exploratory data analysis visualizes patient demographics, length of stay, admission types, and common diagnoses.
- **Feature Engineering:** Includes patient age, number of diagnoses, number of procedures, and admission type.
- **Streamlit Dashboard:** Interactive dashboard for exploring data, model results, and application settings.
---
## Streamlit Dashboard – User Interface
The **NHI Dashboard** provides an intuitive interface to explore healthcare data and model predictions. It has a **sidebar menu** and four main tabs:
- **Home** – Overview of the project, its goals (predicting healthcare demand, forecasting costs, evaluating access disparities), and team members.
- **EDA** – Explore datasets with tables, charts for …