The KNH Sentiment System is a Flask-AI tool for Kenyatta National Hospital. It uses Machine Learning to classify English/Swahili feedback as Positive, Negative, or Neutral. Highlights: AI Analysis: Real-time sentiment scoring. Smart Routing: Auto-detects departments. Secure Portal: Staff-only login. Stack: Python, SQLite, Scikit-learn.
# 🏥 KNH — Patient Feedback Sentiment System
Intelligent Analysis Through AI & Human Oversight
Proof-of-Concept Feedback Routing for Kenyatta National Hospital
| Owner | Version | Effective Date | Project Type |
| :--- | :--- | :--- | :--- |
| 📋 **Document Owner:** Wuisgoinglegit | 📄 **Version:** 2.0 | 📅 **Last Updated:** 2026-08-01 (EAT) | 🎓 **Type:** Institution Semester Project |
---
## 🎓 Academic Project Status
The KNH Sentiment System is a personal semester project designed as a proof-of-concept. Rather than being deployed and tested in live hospital environments, the system is an actively evolving technical demonstration. I am incrementally expanding the system by adding new department categories and refining the dynamic routing logic over time to showcase how such a platform could scale. By prioritizing a Human-in-the-Loop (HITL) approach early on, this project demonstrates how AI efficiency can be safely paired with human medical expertise.
**Current System Capabilities**
| Capability | Target | Actual | Status |
| :--- | :--- | :--- | :--- |
| **Sentiment Analysis** | Real-time scoring | *"Exploring healthcare excellence through simulated patient listening at scale and precision feedback routing."*
---
## 🎯 Executive Statement
Welcome to the core repository for the KNH Sentiment System. Designed as a semester project simulating workflows for Kenyatta National Hospital, this Flask-based application leverages Scikit-learn to classify patient feedback into **Positive**, **Neutral**, or **Negative** categories.
This system operates on a fundamental principle: AI should assist, not dictate. By implementing a Human-in-the-Loop feature, the project demonstrates how authorized users could override a machine learning model, ensuring that nuanced feedback is never misinterpreted by an algorithm.
---
## ⚕️ System Demonstration (Access Control)
To demonstrate Role-Based Access Control (RBAC), the project features simulated clearance levels:
**1. Staff Manag …