Doctor's Appointment System using PHP Free Source Code

Language

(Updated)

This project helps a certain medical establishment such as a clinic or a hospital clients/patients to request an appointment with a doctor online. This project can also help doctors to manage the schedules of their appointments with their patients. This doctor's appointment system will organize the schedules of each patient's appointment, which will be submitted as a request to the doctor they have selected. The system has 3 sides which are the administrator, the doctor, and the patient. The system admin will populate the list of the doctors with their specialties and along with the doctor's details and system credentials. The patients will browse the doctor's appointment system website to find a doctor that has the specialty of their needs. The patient can check the doctor's weekly schedule to help them to choose the day and time which they can comply for the appointment and they will submit their request for an appointment. After that, the doctors can view all their appointments and the appointment request of the patients for their availability.

Admin's Side

admin

  • Admin can add doctors, edit doctors, delete doctors;

  • Schedule new doctors sessions, remove sessions;

  • View patient details;

  • View booking of patients;

Doctor's Side

doctor

 

  • View their Appointment;
  • view their scheduled sessions;
  • view details of patients;
  • delete account;
  • edit account settings;

Patient's Side

patient

 

  • create accounts themselves;
  • view their old booking;
  • delete account;
  • edit account settings;

HOW TO GET STARTED?

  1. Open your XAMPP Control Panel and start Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. Copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming edoc.
  6. Import the provided SQL file. The file is known as SQL_Database_edoc.sql located inside the source code root folder.
  7. Browse the Doctor's Appointment System in a browser. i.e. http://localhost/edoc-echanneling-main/.

DEFAULT USER ACCOUNTS OF THIS PROJECT

ADMIN

Email: [email protected]
Password: 123

Doctor

Email: [email protected]
Password: 123

Patient

Email: [email protected]
Password: 123

DEMO VIDEO

The Project was developed using the following:

Apache Version: 2.4.39

PHP Version: 7.3.5

Server Software: Apache/2.4.39 (Win64) PHP/7.3.5

MySQL Version: 5.7.26

Web developer: Hashen Udara https://github.com/HashenUdara/

HashenUdara/edoc-doctor-appointment-system: Simple web project that made for e-channeling. (github.com)

More Snapshots:

ss1

ss2

GitHub

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Bro. Go to patient/schedule.php And browse to line 123 , replace $sqlmain variable like this $sqlmain= "select * from schedule inner join doctor on schedule.docid=doctor.docid where schedule.scheduledate>='$today' and (doctor.docname='$keyword' or doctor.docnic like '%$keyword%' or doctor.docnic like '%$keyword'  or doctor.docnic like '$keyword%'  or doctor.docname like '$keyword%' or doctor.docname like '%$keyword' or doctor.docname like '%$keyword%' or schedule.title='$keyword' or schedule.title like '$keyword%' or schedule.title like '%$keyword' or schedule.title like '%$keyword%' or schedule.scheduledate like '$keyword%' or schedule.scheduledate like '%$keyword' or schedule.scheduledate like '%$keyword%' or schedule.scheduledate='$keyword' ) order by schedule.scheduledate asc"; Ss

Bro. Go to patient/schedule.php And browse to line 123 , replace $sqlmain variable like this $sqlmain= "select * from schedule inner join doctor on schedule.docid=doctor.docid where schedule.scheduledate>='$today' and (doctor.docname='$keyword' or doctor.docnic like '%$keyword%' or doctor.docnic like '%$keyword'  or doctor.docnic like '$keyword%'  or doctor.docname like '$keyword%' or doctor.docname like '%$keyword' or doctor.docname like '%$keyword%' or schedule.title='$keyword' or schedule.title like '$keyword%' or schedule.title like '%$keyword' or schedule.title like '%$keyword%' or schedule.scheduledate like '$keyword%' or schedule.scheduledate like '%$keyword' or schedule.scheduledate like '%$keyword%' or schedule.scheduledate='$keyword' ) order by schedule.scheduledate asc"; Ss

In reply to by Hashen (not verified)

Thank you so much

In reply to by Anonymous (not verified)

https://github.com/HashenUdara/edoc-doctor-appointment-system

How to change admin email and password Please help me. There is no any inbuilt option to do it. Thank you

Unfortunately no, You must have to do it on sql database. Go to phpmyadmin and select edoc Then select admin table , add new record Also you need to add same email to webuser table ( account type - a )

Nice

The booking session is working but the limit to book does not work.. I input 5 patient only but is surpasses the number

for example.. I created an appointment schedule and I set the limit of booking to 10 patients only. Even if the limit is only 10 patients, it surpasses the limit of booking like, I can still book even if its already full, it goes to 15 bookings. It doesnt appear some sort of, like (Invalid you cant book anymore) I hope you understand :)

Replace your image with "img\bg01.jpg" 1.rename your own image to "bg01.jpg" 2. Now copy to img folder

Or edit css file 1. Open index.css in "css" folder 2. Edit 2nd line like this background-image: url( **path to your image ** ); Done.

getting access denied Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\edoc-doctor-appointment-system-main\connection.php:3 Stack trace: #0 C:\xampp\htdocs\edoc-doctor-appointment-system-main\connection.php(3): mysqli->__construct('localhost', 'root', 'test', 'edoc') #1 C:\xampp\htdocs\edoc-doctor-appointment-system-main\login.php(30): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\edoc-doctor-appointment-system-main\connection.php on line 3

Hi, I want to modify this in such a way that instead of sessions, it creates one-on-one appointments and display that in doctor and patient dashboard. I have been messing a lot with schedule.php but it doesn't seem to work at all, can you please help?

Hi, can you please give the ER Diagram of this database. It will be very helpful

In reply to by Iknowiampro (not verified)

do you find it?

Sir can i get documentation related to this project..

sir can you give documentatiuon of this project

hi sir good day! i have some concerns with the system, first is the booking number limitations, still not working when you set a number of bookings. second is the priority number, if a patient is PWD, etc. there is a button on doctors side where certain number is priority. third is that, the button on doctors side when patients appointment is complete thank you sir

where i can add a if statement that will set the limit or max of the nop or the booking limit. sample: if($nop>5) { //Today booked orders is completed } else { //The booked orders is not completed for today } HOP E FOR YOUR RESPONSE

Sir, can i know how i fix this error? Notice: Undefined variable: userrow in C:\xampp\htdocs\doctor\patient\schedule.php on line 47 Fatal error: Uncaught Error: Call to a member function fetch_assoc() on null in C:\xampp\htdocs\doctor\patient\schedule.php:47 Stack trace: #0 {main} thrown in C:\xampp\htdocs\doctor\patient\schedule.php on line 47

When I search doctor session in the patient id, then this error occurs. Help me to solve this. Warning: Undefined variable $userrow in C:\xampp\htdocs\edoc-doctor-appointment-system-main\patient\schedule.php on line 47 Fatal error: Uncaught Error: Call to a member function fetch_assoc() on null in C:\xampp\htdocs\edoc-doctor-appointment-system-main\patient\schedule.php:47 Stack trace: #0 {main} thrown in C:\xampp\htdocs\edoc-doctor-appointment-system-main\patient\schedule.php on line 47

sir how to fix this please help me The requested URL was not found on this server. Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0 Server at localhost Port 80

Hi

 

Can doctors integrate their calendar with the system so the appointments are booked direftly into their calendar?

sir how to fix this please help me The requested URL was not found on this server. Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0 Server at localhost Port 80

hello sir, i have warning in patient page when i want to make sessions for a doctor, how to fix it ? ---------------------------------------------------------------- Warning: Attempt to read property "num_rows" on bool in C:\wamp64\www\edoc-doctor-appointment-system-main\patient\schedule.php on line 206 ----------------------------------------------------------------- Warning: Attempt to read property "num_rows" on bool in C:\wamp64\www\edoc-doctor-appointment-system-main\patient\schedule.php on line 227 ----------------------------------------------------------------- ----------------------------------------------------------------- and i have this warning in all doctors page for a patient ----------------------------------------------------------------- Warning: Undefined variable $action in C:\wamp64\www\edoc-doctor-appointment-system-main\patient\doctors.php on line 431

Dear friend, thank you very much for the project, but there is a problem with the booking limit, could you please provide a fix ^)

created an appointment schedule and I set the limit of booking to 10 patients only. Even if the limit is only 10 patients, it surpasses the limit of booking like, I can still book even if its already full, it goes to 15 bookings. It doesnt appear some sort of, like (Invalid you cant book anymore) I hope you understand :)

At the outset, I would like to extend a big congratulations to you for this really wonderful project. This project works well after trying it. I wish you would add a page to price each service the patient received and bill the expenses and print them, thus the project will be completed. Thank you

Can I know what to do here Sir/Maam. '; $result= $database->query("select * from webuser where email='$email'"); if($result->num_rows==1){ $utype=$result->fetch_assoc()['usertype']; if ($utype=='p'){ //TODO $checker = $database->query("select * from patient where pemail='$email' and ppassword='$password'"); if ($checker->num_rows==1){ // Patient dashbord $_SESSION['user']=$email; $_SESSION['usertype']='p'; header('location: patient/index.php'); }else{ $error='Wrong credentials: Invalid email or password'; } }elseif($utype=='a'){ //TODO $checker = $database->query("select * from admin where aemail='$email' and apassword='$password'"); if ($checker->num_rows==1){ // Admin dashbord $_SESSION['user']=$email; $_SESSION['usertype']='a'; header('location: admin/index.php'); }else{ $error='Wrong credentials: Invalid email or password'; } }elseif($utype=='d'){ //TODO $checker = $database->query("select * from doctor where docemail='$email' and docpassword='$password'"); if ($checker->num_rows==1){ // doctor dashbord $_SESSION['user']=$email; $_SESSION['usertype']='d'; header('location: doctor/index.php'); }else{ $error='Wrong credentials: Invalid email or password'; } } }else{ $error='We cant found any acount for this email.'; } }else{ $error=' '; } ?>

Add new comment