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
Submitted byTerot (not verified)on Fri, 06/24/2022 - 09:23

In reply to by Hashen (not verified)

Thank you so much
Submitted byniko84 (not verified)on Fri, 07/22/2022 - 13:40

In reply to by Anonymous (not verified)

https://github.com/HashenUdara/edoc-doctor-appointment-system
Submitted byTerot (not verified)on Fri, 06/24/2022 - 09:26

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 )
Submitted byAnonymous (not verified)on Thu, 07/07/2022 - 16:57

Nice
Submitted byGru (not verified)on Mon, 08/08/2022 - 13:33

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.
Submitted byCRL 6Mans (not verified)on Mon, 10/31/2022 - 09:09

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
Submitted byDvij (not verified)on Thu, 11/10/2022 - 08:28

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?
Submitted byIknowiampro (not verified)on Sat, 11/19/2022 - 18:43

Hi, can you please give the ER Diagram of this database. It will be very helpful
Submitted byRany ran (not verified)on Thu, 08/03/2023 - 03:05

In reply to by Iknowiampro (not verified)

do you find it?
Submitted byShobhesh Mohite (not verified)on Thu, 12/01/2022 - 02:52

Sir can i get documentation related to this project..
Submitted byDiljith Robin (not verified)on Mon, 12/12/2022 - 01:03

sir can you give documentatiuon of this project
Submitted bystudent x (not verified)on Fri, 12/23/2022 - 10:47

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
Submitted bySINDIKATO (not verified)on Thu, 01/19/2023 - 00:28

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
Submitted byKavya Sathaiah… (not verified)on Tue, 02/28/2023 - 03:13

What we can do to access other doctor & not your default one?
Submitted byjpanda (not verified)on Sat, 03/04/2023 - 10:09

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
Submitted byMd. Nazmus Sakib (not verified)on Tue, 03/28/2023 - 13:40

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
Submitted byhariff madrasa (not verified)on Sun, 04/02/2023 - 15:01

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
Submitted bymssmon Sat, 04/15/2023 - 05:36

Hi

 

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

Submitted byethanski (not verified)on Thu, 04/20/2023 - 23:37

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
Submitted byfaraj (not verified)on Wed, 04/26/2023 - 00:15

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
Submitted byWerty (not verified)on Mon, 05/08/2023 - 20:38

Dear friend, thank you very much for the project, but there is a problem with the booking limit, could you please provide a fix ^)
Submitted byJohn Mtawa (not verified)on Tue, 05/23/2023 - 16:32

How to go back to the home page when i done with Admin,User or Doctor page
Submitted byMnishaa (not verified)on Tue, 06/20/2023 - 17:41

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 :)
Submitted byalijury (not verified)on Thu, 06/22/2023 - 14:30

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
Submitted byStudent Programmer27 (not verified)on Wed, 07/19/2023 - 16:58

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=' '; } ?>
Submitted byAnonymous (not verified)on Tue, 11/14/2023 - 14:20

$utype=$result->fetch_assoc()['usertype']; Parse error: syntax error, unexpected '[' in C:\xampp\htdocs\edoc-echanneling-main\login.php on line 52 howww??

Add new comment