How blitzbugg/hms works
Project type and purpose
• This is a full-stack web application—specifically a Hospital Management System (HMS) built on a LAMP stack (HTML/CSS/JS front-end, PHP back-end, MySQL database).
• It handles patient/appointment management, medical records, billing, and separate user roles (Admin, Doctor, Patient).
File structure
• Top-level PHP entry points: index.php, account.php, adminlogin.php, doctorlogin.php, patientlogin.php.
• Role-specific directories:
• admin/ (admin dashboard, approval, reporting, slot management)
• doctor/ (appointment handling, discharge, patient view)
• patient/ (book/cancel appointments, invoice generation)
• / holds shared logic (DB connection, common header).
• css/, img/ store static assets.
• sql/hms.sql defines database schema.
Key insights from the README
• Three user roles with distinct modules.
• Emphasis on scheduling, records, billing.
• Technology: front-end (HTML/CSS/JS), back-end (PHP), DB (MySQL).
Main components
a. Presentation Layer (Client browser)
• UI pages for Admin, Doctor, Patient (served as PHP-rendered HTML + CSS + JS).
b. Application Layer (Web Server + PHP)
• Authentication & Session Management (login, logout scripts).
• Role Modules:
– Admin Module (slot management, user/patient management, billing, reports)
– Doctor Module (appointment handling, medical records, discharge)
– Patient Module (booking, profile, invoices)
• Shared Services: DB Connection (include/connection.php), common header/navbar (include/header.php).
c. Data Layer (MySQL)
• Tables for users, patients, appointments, medical_records, invoices, slots.
d. Optional External Service
• Payment Gateway (if online payment is enabled).
Relationships and data flow
• Client → HTTP → Web Server
• Web Server (PHP) → SQL queries → MySQL
• PHP returns HTML/JSON → Client
• For payments: PHP → REST API → Payment Gateway → PHP → MySQL
Architectural patterns & design principles
• Three-tier architecture: Presentation / Business Logic / Data.
• Role-based module separation: each user role has its own folder/controller.
• Shared include files for DRY (connection.php, header.php).
• Maintain separation of concerns: CSS/JS in static folders, PHP logic in dedicated directories.
Technologies, frameworks, libraries
• Apache (or Nginx) with PHP interpreter
• MySQL / MariaDB
• HTML5, CSS3 (with separate CSS files per module), vanilla JavaScript
• Folders act as micro-controllers for each user role.