Doctor-Patient Appointment System in Python using Flask — with source code

Abhishek Sharma
4 min readFeb 27, 2023

Hey guys, in this blog we will see a Doctor-Patient Appointment System for Hospitals built in Python using Flask. It is a very interesting project with lots of functionalities. So without any further due, let’s do it…

Read the full article here — https://machinelearningprojects.net/doctor-patient-appointment-system/

Technology Stack

  • Frontend — HTML and CSS
  • Backend — Flask(Python)
  • Database — Sqlite3

Types of Users

We have 3 types of users in our Application:

  • Super Admin — can approve or delete a doctor or patient registration request.
  • Patients — can schedule appointments with doctors.
  • Doctors — can approve or delete appointment requests raised by patients.

Overview of our Doctor-Patient Appointment System Application:

Main Page

On the main page, we have total 5 options:

  • Patient Login
  • Doctor Login
  • Admin Login
  • Patient Registration
  • Doctor Registration

Patient Registration Page

  • This is the Patient Registration Page where a Patient can register himself/herself by entering his/her details.
  • The details that are needed are First Name, Last Name, Date of Birth, Phone No, Login Password, and Address.
  • The Login Password should be of at least 8 characters and should contain numbers and alphabets.
  • As soon as the Patient fills in all his details and clicks on the Register button, the registration request is sent to the super admin who can either approve or delete the registration request.

Doctor Registration Page

  • This is the Doctor Registration Page where a Doctor can register himself/herself by entering his/her details.
  • The details that are needed are First Name, Last Name, Date of Birth, Phone No, Address, Doctor ID, Speciality, and Login Password.
  • The Login Password should be of at least 8 characters and should contain numbers and alphabets.
  • As soon as the Doctor fills in all his details and clicks on the Register button, the registration request is sent to the super admin who can either approve or delete the registration request.

Super Admin Login

This is the Super Admin Login Page where the super admin needs to enter his/her credentials to enter the super admin console.

Super Admin Main Page

  • This is the Super Admin Console.
  • All the registration requests for doctors and patients come here which can be either approved or deleted by the super admin.
  • We can see the registration requests for doctors and patients here.
  • Also, we can see the registered doctors and patients here.

Logged In Patient Page

  • This is what the logged-in patient page looks like.
  • A patient can schedule appointments with any doctor according to the date of their choice.
  • Also, they can see on the left side, which doctors are busy on which all dates.
  • Also, some basic level date logics are implemented like you can’t book appointments on past dates and so on.

Logged In Doctor Page

  • As soon as a patient sends a successful appointment request to a doctor, it reflects in that specific doctor’s console.
  • He can either Approve or Delete that Appointment Request.
  • All the fixed appointments and all the appointment requests for the specific doctor are visible on the screen with all the required details.

Doctor Profile Update

  • Also, there could be a case when a doctor wants to update his/her profile, that’s why we have provided an update profile option from where a logged-in patient can change any of your details.

Patient Profile Update

  • Also, there could be a case when a patient wants to update his/her profile, that’s why we have provided an update profile option from where a logged-in patient can change any of your details.

Functionalities

Functionalities of Doctors:

  • Approve or delete appointment requests from patients.

Functionalities of Patients:

  • Schedule an appointment with a doctor.

Functionalities of Super Admin:

  • Approve/Delete a patient registration request.
  • Approve/Delete a doctor registration request.
  • Delete a registered patient.
  • Delete a registered doctor.

Source Code

Visit my blog for source code — https://machinelearningprojects.net/doctor-patient-appointment-system/#Source_Code

So this is all for this blog folks. Thanks for reading it and I hope you are taking something with you after reading this and till the next time …

Read my last blog — Leaf Disease Detection Flask App

Check out my other machine learning projects, deep learning projects, computer vision projects, NLP projects, and Flask projects at machinelearningprojects.net.

BECOME a WRITER at MLearning.ai

--

--