A web-based medication adherence and appointment reminder system for small healthcare facilities in Kenya. Built with PHP, MySQL, and JavaScript.
# PAAR — Patient Adherence and Appointment Reminder System
> A web-based system that helps small and medium-sized Kenyan healthcare facilities automate medication reminders, manage appointments, and track patient adherence — built with PHP, MySQL, and vanilla JavaScript.
**Live demo:**
paarsys.gt.tc |
---
## Features
### Hospital Administrator
- Add patients manually or approve self-registered patients
- Assign medications with frequency: once / twice / three times daily, or weekly
- Schedule and manage appointments
- Monitor adherence per patient or across the entire facility
- Analytics: 14-day adherence trend, appointment attendance breakdown, top medications by missed doses
- Send broadcast in-app notifications to all patients
- Export adherence records as CSV
- Full audit log of all administrative actions
### Patient
- View today's medication schedule with one-tap **Confirm taken**
- View upcoming and past appointments
- Personal adherence history with 14-day chart and 30-day statistics
- Adherence streak counter
- In-app notification inbox
- Automated email and in-app reminders for upcoming doses and appointments
### Reminder Engine (`cron.php`)
- Sends medication reminders for doses due within the next 60 minutes
- Sends appointment reminders for visits within the next 24 hours
- Auto-marks expired doses as missed after a 1-hour grace period
- Logs every action to `logs/reminders.log`
---
## Tech Stack
| Layer | Technology |
|-------------|------------------------------------|
| Backend | PHP 8+, procedural |
| Database | MySQL 5.7+ / 8.0+ (utf8mb4) |
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Charts | Chart.js (CDN) |
| Email | PHPMailer over Gmail SMTP |
| Reminders | Cron-compatible `cron.php` script |
No external APIs. No SMS gateway. No AI features. No framework dependencies.
---
## Folder Structure
``` …