A comprehensive, modern Hospital Management System built with PHP (Vanilla), MySQL, and Vanilla JS. This system mimics a high-end SaaS platform with a premium UI, role-based access control (RBAC), and integrated AI features for clinical decision support.
- Patient Management: Electronic Medical Records (EMR), history, and vitals tracking.
- Doctor Portal: Appointment scheduling, patient queues, and prescription writing.
- Pharmacy & Inventory: Real-time stock tracking, dispensing logic, and low-stock alerts.
- Laboratory: Lab order management and result entry.
- Emergency: Triage system and real-time ER dashboard.
- AI Symptom Checker: Interactive tool for preliminary diagnosis based on symptoms and patient history.
- Clinical Decision Support: Automated interaction checks and vital sign analysis.
- AI Performance Monitor: Admin dashboard to track AI diagnostic accuracy.
- Global Settings: Configure system defaults, toggle modules, and manage themes.
- RBAC: Granular permission management for Admins, Doctors, Pharmacists, Nurses, and Patients.
- Audit Logs: Comprehensive tracking of system activities.
- Backend: PHP 8.0+ (No framework, custom MVC architecture)
- Database: MySQL 8.0
- Frontend: HTML5, CSS3 (Custom Design System), JavaScript (Vanilla)
- Security: CSRF Protection, XSS Filtering, Secure Session Management
-
Clone the Repository
git clone https://github.com/yourusername/hms-portal.git cd hms-portal -
Configure Environment Copy
.env.exampleto.envand update database credentials:DB_HOST=localhost DB_NAME=hms_master DB_USER=root DB_PASS= APP_URL=http://localhost/mms
-
Setup Database Import the SQL schema from
database/schema.sql(anddatabase/seeds.sqlfor demo data).mysql -u root -p hms_master < database/schema.sql -
Install Dependencies
composer install
-
Run Application Serve via Apache (XAMPP/WAMP) or PHP built-in server:
php -S localhost:8000 -t public
| Role | Username | Password |
|---|---|---|
| Admin | admin |
password123 |
| Doctor | doctor |
password123 |
| Nurse | nurse |
password123 |
| Pharmacist | pharma |
password123 |
| Patient | patient |
password123 |
/hms-portal
├── config/ # App configuration
├── public/ # Web root (index.php, css, js)
├── src/ # Application Source
│ ├── Controllers/ # Request Handlers
│ ├── Core/ # Framework Core (Router, DB, View)
│ ├── Models/ # Data Models
│ └── Services/ # Business Logic (AI, Auth, etc.)
├── storage/ # Logs and Uploads
├── views/ # PHP View Templates
└── .env # Environment Variables
- Fork the repository.
- Create a feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
License: MIT Version: 1.0.0
