Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Clinic Management and Appointment System

A complete, professional clinic management system built with PHP 8, MySQL, and Bootstrap 5.

Project Overview

This is a comprehensive web-based clinic management system designed for healthcare facilities to manage appointments, patients, doctors, and medical records efficiently.

Features

Public Website

  • Professional responsive homepage
  • About Us page
  • Doctors listing with search and filter
  • Services listing
  • Contact form
  • User registration and login

Administrator Dashboard

  • Dashboard with statistics and analytics
  • Manage Doctors (CRUD operations)
  • Manage Patients (CRUD operations)
  • Manage Appointments (view, update status)
  • Manage Services (CRUD operations)
  • Manage Payments
  • User Management
  • Reports (Appointments, Doctors, Patients, Payments)
  • System Settings

Doctor Dashboard

  • Dashboard with today's appointments
  • My Appointments management
  • My Patients list
  • Medical Records management
  • Profile management

Patient Dashboard

  • Dashboard with upcoming appointments
  • Book new appointments
  • Appointment history
  • View medical records
  • Notifications
  • Profile management

Security Features

  • PDO Prepared Statements (SQL Injection prevention)
  • Password hashing using password_hash() and password_verify()
  • CSRF Token protection
  • XSS protection with htmlspecialchars()
  • Role-based access control (RBAC)
  • Session validation
  • Input validation and sanitization

Technology Stack

  • Backend: PHP 8 Native
  • Database: MySQL with PDO
  • Frontend: HTML5, CSS3, Bootstrap 5
  • JavaScript: Vanilla JS, AJAX
  • Server: Apache (XAMPP compatible)

Installation Instructions

Requirements

  • XAMPP (Apache + MySQL)
  • PHP 8.0 or higher
  • MySQL 5.7 or higher

Step-by-Step Installation

  1. Copy Project to htdocs

    Copy the entire `Clinic_System` folder to your XAMPP htdocs directory:
    - Windows: C:\xampp\htdocs\Clinic_System
    - Mac: /Applications/XAMPP/htdocs/Clinic_System
    - Linux: /opt/lampp/htdocs/Clinic_System
    
  2. Start XAMPP Services

    • Open XAMPP Control Panel
    • Start Apache server
    • Start MySQL server
  3. Create Database

    • Open your web browser
    • Go to http://localhost/phpmyadmin
    • Click on "New" to create a new database
    • Name it clinic_db and click Create
    • Select the database
    • Click on "Import" tab
    • Click "Choose File" and select database.sql from the project folder
    • Click "Go" to import
  4. Configure Database Connection

    • Open config/database.php
    • Update the following constants if needed:
      define('DB_HOST', 'localhost');
      define('DB_NAME', 'clinic_db');
      define('DB_USER', 'root');
      define('DB_PASS', '');  // Default XAMPP has no password
  5. Access the Application

Default Login Credentials

Administrator

  • Username: admin
  • Password: password123
  • Access: Full system access

Doctor

  • Username: drsmith (or drjohnson, drwilliams, drbrown)
  • Password: password123
  • Access: Doctor dashboard

Patient

  • Username: johndoe (or janedoe, mikejohnson, etc.)
  • Password: password123
  • Access: Patient dashboard

Directory Structure

Clinic_System/
├── admin/
│   ├── dashboard.php
│   ├── doctors.php
│   ├── patients.php
│   ├── appointments.php
│   ├── services.php
│   ├── payments.php
│   ├── users.php
│   ├── reports.php
│   ├── settings.php
│   ├── profile.php
│   ├── sidebar.php
│   └── footer.php
├── doctor/
│   ├── dashboard.php
│   ├── appointments.php
│   ├── patients.php
│   ├── records.php
│   ├── profile.php
│   ├── ajax_update_status.php
│   ├── sidebar.php
│   └── footer.php
├── patient/
│   ├── dashboard.php
│   ├── appointments.php
│   ├── history.php
│   ├── records.php
│   ├── notifications.php
│   ├── profile.php
│   ├── cancel_appointment.php
│   ├── ajax_slots.php
│   ├── sidebar.php
│   └── footer.php
├── assets/
│   ├── css/
│   │   ├── style.css
│   │   └── dashboard.css
│   ├── js/
│   │   ├── main.js
│   │   └── dashboard.js
│   └── images/
├── config/
│   ├── config.php
│   └── database.php
├── includes/
│   ├── auth.php
│   ├── access_control.php
│   ├── functions.php
│   ├── header.php
│   └── footer.php
├── uploads/
├── index.php
├── login.php
├── register.php
├── logout.php
├── about.php
├── doctors.php
├── services.php
├── contact.php
├── access_denied.php
├── database.sql
├── .htaccess
└── README.md

Database Tables

  1. users - User accounts (username, email, password, etc.)
  2. roles - User roles (Administrator, Doctor, Patient)
  3. patients - Patient profiles (DOB, gender, blood group, etc.)
  4. doctors - Doctor profiles (specialization, qualifications, etc.)
  5. appointments - Appointment records
  6. services - Medical services offered
  7. payments - Payment records
  8. medical_records - Patient medical records
  9. notifications - User notifications
  10. activity_logs - System activity logs
  11. settings - System configuration

Role-Based Access Control

Administrator

  • Full system access
  • Manage all users (doctors, patients, staff)
  • View all appointments and records
  • Generate reports
  • System configuration

Doctor

  • View own appointments only
  • View assigned patients only
  • Create and manage medical records
  • Update appointment status
  • View own profile

Patient

  • Book new appointments
  • Cancel own appointments
  • View own medical records
  • View own notifications
  • Update own profile

Troubleshooting

Database Connection Error

  • Ensure MySQL is running in XAMPP
  • Check database credentials in config/database.php
  • Verify database clinic_db exists

Page Not Found (404)

Login Not Working

  • Clear browser cookies
  • Verify database is imported correctly
  • Check if sessions are working

CSS/JS Not Loading

  • Clear browser cache
  • Check file paths in templates
  • Ensure mod_rewrite is enabled

License

This project is created for educational purposes as part of a university Web Development course.

Author

University Project - Web Development Course

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages