Hospital Management System in PHP with Source Code

A fully functional project based on Hospital Management System which uses PHP Language. Following PHP project contains important features which can be in use for the first year, second year IT students for their college projects. It has a number of important features that will allow the users to manage their hospital records, transactions, and more. This system as well as the web application’s concept is all clear, it’s the same as real-life scenarios and well-implemented on it. To download free hospital management system project in PHP MySQL with source code files, please scroll down to the bottom of this post for the Download button.

About Hospital Management System PHP MySQL Project

Moving on, this hospital management system project in PHP focuses mainly on dealing with the patient, doctor, and hospital records. Also, the system displays all the available hospital departments and their respective doctors. In addition, the system allows creating a patient’s personal account too. This project is divided into three categories. They are Admin Panel, Patient Panel, and Doctor Panel. In an overview of this web application, the user can simply make an appointment. Meaning, each user will have to fill up an appointment form from the client side. The form consists of fields such as patient name, address, number, and selection of department and doctor. During this procedure, the system creates personal accounts for each patient too.

Patient’s Account

After making an appointment for the very first time, the user can log in to the system and check their appointment status. By default, each appointment is set to pending status. Which later, the doctor should approve or reject it in order to start their treatment process. Also, the patient can remove their appointments anytime. From a patient’s panel, he/she can update their profile, view treatment records, and prescription records. Under the treatment section, a patient can view all the records such as treatment type, doctor’s name, date, and total charge. Similarly, the prescription section displays the date, name, and quantity of the medicines with the total bill charge.

Doctor’s Panel

Each doctor will have their own personal account which lets them access the system. Here, the doctor can view all the pending appointments. Each appointment has options that allow the doctor to approve or reject them. After approving the appointment, the doctor can view the patient’s profile and appointment record. For the rest, the doctor has to maintain each by filling up their treatments. In order to set a treatment record, the user has to select a treatment type, description, date, and upload treatment files. After the completion of treatment records, the doctor can now proceed towards the prescription section. For the prescription, the doctor has to select available medicine, date, and enter quantity and dosage. After the submission of the prescription record, the system generates the total bill for the patient.

Manage Visiting Hours, Patients, Income Report, and Services

Additionally, a doctor can set up their visiting hours by selecting starting and ending times. In terms of patients record, the doctor can view all the available patients with their respective information. When comes to income report, each doctor will have their own consultancy charge. And these consultancy charges are shown with respect to their number of patients. As a result, these sections will display the doctor’s total earnings. Besides, the doctor can list their services which include their respective department’s attachment to the patient’s name, and treatment details.

Admin Panel

On the other hand, the admin has full control over the system. He/she can view all the existing records of the hospital. An admin can manage patients, doctors, their departments, treatment types, and medical records. An admin has the right to register a doctor’s account. For this, the admin has to set the doctor’s account under various hospital departments too. The admin can view all the appointment records too. Also, the admin has to maintain billing records for each patient’s treatment. In order to maintain the payment of each patient, the user has to enter the discount amount and the reason for it. After the payment, the patient can view all the reports from their own personal accounts.

Manage Hospital Services

Here, the hospital services consist of departments, treatment types, and medicine. For the addition of hospital departments, he/she has to enter the department name, description, and status. These departments are essential during the registration of doctors as well as patient’s appointment. In addition to it, the admin has to set up all the treatment types. For this, the admin has to enter the treatment name, description, total charge, and status. Similarly, the same goes with the medicine section where the user has to enter name, cost, description, and status. Besides, the admin can have a summary of their total patients, doctor, and total hospital earnings.

Last but not least, a clean and simple dashboard is presented with simple color combinations for greater user experience while using this Hospital Management System Project in PHP MySQL. For its UI elements, a modern responsive CSS framework; Materialize is on board with some Vanilla CSS too. Presenting a new Online Hospital Management System PHP MySQL Project which includes an admin panel with patient and doctor panel that contains essential features to follow up, and a knowledgeable resource for learning purposes.

Available Features:
  • Admin Panel
  • Doctor Panel
  • Patient Panel
  • Client-Side
  • Make Appointment
  • Approve/Reject Appointments
  • Treatment Records
  • Prescription Records
  • Manage Billings
  • Payment Report
  • Patient Report Panel
  • Hospital Department Management
  • Treatment Types Management
  • Manage Medicine Records
  • Set Doctor’s Timing
  • Set Doctor’s Personal Charge
  • Update Profile
  • Total Hospital Earnings
Project Name:Hospital Management System
Language/s Used:PHP
PHP version (Recommended):5.6 or Newer
Database:MySQL
Type:Web Application, Website
Developer:Kabir Khyrul
Updates:0
Hospital Management System PHP Project Overview

Instructions: How to Run?

  • After you finish downloading the project, unzip the project file and head over to your XAMPP directory.
  • There you’ll find a folder naming “htdocs”.
  • Inside the “htdocs” folder, paste the project folder (not the .zip one, but the extracted one).
  • Open your favorite browser; we recommend using Google Chrome or Mozilla Firefox.
  • Then, go to URL “http://localhost/phpmyadmin“.
  • Create a Database with a name that is provided inside the “01 LOGIN DETAILS & PROJECT INFO.txt”.
  • Click on the “Import” tab and choose the database file (.sql) which is provided under the folder naming “DATABASE FILE”.
  • After setting up all these, go to URL “http://localhost/[ PROJECT_FOLDER_NAME ]/“
  • All the login details are provided inside the project folder, check that out and enter in order to use it.

And there you have it, a full setup of the Hospital Management System project in PHP MySQL. For this particular PHP project, PHP Version 5.6 or Newer is required because the project might not operate well with the oldest PHP version. So, users with the oldest PHP version (less than 5.6) might face various problems while operating it. As a result, you’ll need to upgrade your PHP version (only if you’re using the oldest version) at the moment. Download Free Hospital Management System Project in PHP MySQL Source Code. So, this Hospital Management System PHP project is a fully functional project for all the beginner levels that broads vast knowledge into such PHP web applications. In conclusion, this whole PHP project with free source code is an absolute project and a meaningful way for the users to learn and explore more about it.

Free Download Hospital Management System Project in PHP MySQL with Source Code:
Click the Download Button Below to Start Downloading

Note: Only for Educational Purpose

127 comments

    1. 👋 I love this project.
      I have been using it for some days now and has been working well. I updated my xammp today and now I have problems in accessing the website. please I need help

  1. AWESOME PROJECT SIR. THANKS
    PLEASE TELL HOW TO AND WHERE TO CHANGE THE CURRENCY SYMBOL
    THANKS IN ADVANCE

      1. Hey actually I am getting trouble to login weather it is admin or doctor I always gets a message something is wrong I entered everything things properly but again and again I get that problem please suggest me some to resolve that issue 🙁🙁

        1. All the login details are provided inside the text file. So, I guess there’s nothing to worry about as you can select login forms from the navigation bar! In fact, everything is simple. Please do check the demo video so that you can get information regarding it!

          1. I figured it out thanks ,,, but am facing some errors.. which platform I can I connect to you so I get help from you?

      1. Solution provided by: FRANCIS AGIBU KARGBO

        A simple fix to all those that are having blank results (web page). Follow the steps below:
        1. Open the htdocs folder.
        2. Open the project name folder and search for “dbconnection” or “dbconnection.php” file.
        3. Open the file with any text editor preferably vs code of sublime text.
        4. Change the if statement from;
        if (mysqli_connect_errno($con))
        {
        echo “Failed to connect to MySQL: ” . mysqli_connect_error();
        }

        TO

        if (!$con)
        {
        echo “Failed to connect to MySQL: ” . mysqli_connect_error();
        }

        5. Save the changes and open the project filename in the browser using
        “localhost/hospital-management/”

          1. Bro i got your problem hahaha it’s funny please type a code manually coz double quoit(” “) is the problem ..don’t copy paste..haha

          2. Your PHP version is too high for the project… Step it down to 5.6, i encountered the same issue and tried this and it worked.

    1. If it’s about “How to run?” then, simply head over to the post’s description there you’ll find all the steps provided in order to run the project (Also, do not forget to check out the recommended PHP version of this particular project).

  2. please Sir, can send to me ERD for this project or Data flow diagram(DFD) for this project because i want to add more events

      1. Solution provided by: FRANCIS AGIBU KARGBO

        A simple fix to all those that are having blank results (web page). Follow the steps below:
        1. Open the htdocs folder.
        2. Open the project name folder and search for “dbconnection” or “dbconnection.php” file.
        3. Open the file with any text editor preferably vs code of sublime text.
        4. Change the if statement from;
        if (mysqli_connect_errno($con))
        {
        echo “Failed to connect to MySQL: ” . mysqli_connect_error();
        }

        TO

        if (!$con)
        {
        echo “Failed to connect to MySQL: ” . mysqli_connect_error();
        }

        5. Save the changes and open the project filename in the browser using
        “localhost/hospital-management/”

  3. Even I’m facing the same “Blank Page” issue. I have followed all the steps. Can someone pls help me with this issue

  4. Dear sir,
    When I open the “LOCALHOST/hospital-management/ ” The window is blank. And i also have the php version 8.0.12

    1. Not sure about this specific “Blank Page” issue as lots of users are complaining here!
      This might be due to their latest PHP version. It works great with PHP 5.6 – 7, but we haven’t tested it with the latest PHP 8.
      So, that might be the case for it.

  5. Thank you Sir for the great work!!!
    A simple fix to all those that are having blank results (web page). Follow the steps below:
    1. Open the htdocs folder.
    2. Open the project name folder and search for “dbconnection” or “dbconnection.php” file.
    3. Open the file with any text editor preferably vs code of sublime text.
    4. Change the if statement from;
    if (mysqli_connect_errno($con))
    {
    echo “Failed to connect to MySQL: ” . mysqli_connect_error();
    }

    TO

    if (!$con)
    {
    echo “Failed to connect to MySQL: ” . mysqli_connect_error();
    }

    5. Save the changes and open the project filename in the browser using
    “localhost/hospital-management/”
    6. Thank You!!!!!!!

    1. A big thank you FRANCIS AGIBU KARGBO! It’s perfectly working now. I was also getting blank page problem. Thanks again!

    1. Solution provided by: FRANCIS AGIBU KARGBO

      A simple fix to all those that are having blank results (web page). Follow the steps below:
      1. Open the htdocs folder.
      2. Open the project name folder and search for “dbconnection” or “dbconnection.php” file.
      3. Open the file with any text editor preferably vs code of sublime text.
      4. Change the if statement from;
      if (mysqli_connect_errno($con))
      {
      echo “Failed to connect to MySQL: ” . mysqli_connect_error();
      }

      TO

      if (!$con)
      {
      echo “Failed to connect to MySQL: ” . mysqli_connect_error();
      }

      5. Save the changes and open the project filename in the browser using
      “localhost/hospital-management/”

          1. TV Good work, I love it. Can you please add inventory, like drug s stock e.t.c

      1. nothing is displayed in the admin login page after all the steps
        all the interfaces using dbconnection.php are not displaying

  6. Hi, I downloaded it today.
    unfortunately all the login pages are not working and the appointment page is not working
    when i open any login page a white blank page appears
    when i open admin login a grey picture appears only.
    Please Help as soon as possible i have to submit my FYP in a day
    Database is uploaded and the change in the code of dbconnection file is done
    Please Guide

    1. Solution provided by user: FRANCIS AGIBU KARGBO

      A simple fix to all those that are having blank results (web page). Follow the steps below:
      1. Open the htdocs folder.
      2. Open the project name folder and search for “dbconnection” or “dbconnection.php” file.
      3. Open the file with any text editor preferably vs code of sublime text.
      4. Change the if statement from;
      if (mysqli_connect_errno($con))
      {
      echo “Failed to connect to MySQL: ” . mysqli_connect_error();
      }

      TO

      if (!$con)
      {
      echo “Failed to connect to MySQL: ” . mysqli_connect_error();
      }

      5. Save the changes and open the project filename in the browser using
      “localhost/hospital-management/”

  7. After doing all the connections and changing the dbconnection the admin panel or any other login panel is not responding only showing a page with a image so please kindly resolve the issue asap

    1. There are no such issues with PHP 5.6 and PHP 7.4 as we’ve tested this project on both versions. Not sure about the latest one [which MIGHT be the case..?]

  8. Still, your project is showing just a blank page. I have downloaded and run another project, and that project is running perfectly. But your project has some problems this is why we all are facing the blank page issue.

    1. That particular “blank page” problem might be due to the latest PHP version as this project was only tested with PHP 5.6 and 7.4 [it works fine there]. Still, one of the solutions for the blank page issue has been provided in the above comments from one of our website visitors!

  9. Hi sir it very powerful code that you have done!
    can you (help me) do it as the admin/ manager can manage user account (doctor,pharmacist, reception) and separate their action!
    Please 🙏🙏🙏🙏i needed it for my final project
    For this week.

  10. I used php 7.4 too but the same blank screen happens again. Really i am feeling bad because your hms project is too good, but I cann’t run it.

  11. sir project is working but login and appointment is not working
    please help me and solve this issues

    1. This issue has been pointed out many times. You should’ve looked at the other comments for the solution. Anyway,

      Solution provided by: FRANCIS AGIBU KARGBO

      A simple fix to all those that are having blank results (web page). Follow the steps below:
      1. Open the htdocs folder.
      2. Open the project name folder and search for “dbconnection” or “dbconnection.php” file.
      3. Open the file with any text editor preferably vs code of sublime text.
      4. Change the if statement from;
      if (mysqli_connect_errno($con))
      {
      echo “Failed to connect to MySQL: ” . mysqli_connect_error();
      }

      TO

      if (!$con)
      {
      echo “Failed to connect to MySQL: ” . mysqli_connect_error();
      }

      5. Save the changes and open the project filename in the browser using
      “localhost/hospital-management/”

  12. Hello,
    Thank You so much for your Source code. it’s very for all
    I want small help from your side,
    Is it possible to send the project report of this project? like all UML diagrams only at end of the day

  13. Thanks for your work so far. I’ve followed all the steps including the dbconnection. After changing the dbconnection, it worked fine (the homepage) but all the login pages still shows blank. Is there any other fix for this.

    1. Please check the above comments for that particular [blank page] issue. Cause a solution to that problem has already been shared by one of our website’s users!

  14. Yes. It worked. It fixed the blank page issue for the homepage only. The login pages are still blank.

    1. What’s your PHP version?
      : We’re not sure if this project works with the latest version of PHP. This project was only tested with PHP 5.6 and PHP 7.4 where it worked well with those mentioned PHP versions.

  15. I could not log in with the admin password . I used ( Password@123) for the password but its saying “change a few thing up and try submitting again”

  16. Hello, First of all I want to thank you for this amazing service providing.
    My whole system is working- except of the appointment and login bar.
    Can you please help me in that it will be very helpful for me.

  17. The payment details are not getting updated in patient report instead it is displaying all the reports details of all patients available.
    The creator blindly written code for only the insert values to work for newly created accounts it’s not working.

  18. i trie to change contente of about.php for exemple or other i don’t see no change in my page plz help me

  19. 👋 I love this project.
    I have been using it for some days now and has been working well. I updated my xammp today and now I have problems in accessing the website. please I need help

Leave a Reply

Your email address will not be published. Required fields are marked *