Doctor Appoinment System
Doctor Appoinment System
By
                            Akshata Harage
                          MCA – II, SEM – III
                               2023-2024
                                    To
                     Savitribai Phule Pune University
                               Pune- 411041
1
                                  CERTIFICATE
    This is to certify that Akshata Harage, has successfully completed his/her project work
    entitled “Doctor Appointment System” in partial fulfillment of MCA– I Semester program
    for the year A.Y. 2023-2024. He / She have worked under our guidance and direction.
Examiner 1 Examiner 2
Date:
Place:
2
                              Acknowledgment
    We are the student of MCA first year. Here by we express our thanks to our project guide for
    allowing us to do the project on the Docter Appointment System This project work has
    been the most exciting part of our learning experience which would be an asset for our
    future carrier. We would especially like to thank our guide and mentor Prof. Arati Kadam
    who constantly guided us in developing, pushing us to search for more answers to her
    numerous questions. Also I would like to thank Dr. Vidya Gavekar, project coordinators
    for her support. As a building block of MCA Department, I thank Dr. Manisha Kumbhar,
    HOD, MCA Department for her continuous support and help. We are grateful to many
    classmates who contributed their suggestions. Their hard work and examples push us to
    limits of our capability and encourage us daily.
Thank You…...!
Akshata Harage
3
                                      INDEX
    Chapter                                           Page number
    CHAPTER 1 : INTRODUCTION
    1.1 Existing System                                    8
    1.2 Need for System                                    9
    1.3 Operating Environment Hardware and Software       10
    1.4 Brief Description about Technology Used
    CHAPTER 2 : PROPOSED SYSTEM
    2.1 Proposed System (Introduction of system)         11-12
    2.2 Module specifications (Scope)                    13-14
    2.3 Objectives of System                              14
    CHAPTER 3 : ANALYSIS & DESIGN
    3.1 Use Case Diagrams                                15-20
    3.2 Activity Diagram                                 21-24
    3.3. Sequence Diagram                                 25
    3.4 Class Diagram                                     26
    3.5 Module Hierarchy Diagram                          27
    3.6 Table specifications (Database design)           28-33
    3.7 Data dictionary                                  28-33
    CHAPTER 4 : USER MANUAL
    4.1 User Interface Screens (Input)                   34-50
    4.2 Output Screens with data                         34-50
    4.3 Data Reports
    4.4 Sample program code                              51-82
    4.5 Limitations                                        83
    Bibliography                                           83
4
    1.INTRODUCTION
       Chapter 1: Introduction
5
     The Doctor Appointment System is a web-based application designed to streamline the
    process of booking doctor appointments. It allows patients to view available doctors, select
    time slots, and make appointments online. On the other hand, doctors can manage their
    schedule, view appointments, and communicate with patients. This project utilizes PHP,
    MySQL, HTML, CSS, and JavaScript to develop an interactive and user-friendly platform.
Project Objective
6
    Features
Admin Panel
         Login/Logout: Admin can securely log in and out of the system.
         Manage Doctors: Admin can add, edit, or delete doctors’ information (e.g., name,
            specialty, contact).
         View Appointments: Admin can view all upcoming appointments and patients’
            details.
         Manage Patients: Admin can manage patient records, including adding and deleting
            patients.
         Reports: Admin can generate reports based on doctor availability and patient visits.
3.2 Doctor Panel
         Login/Logout: Doctors can log in to their personal dashboard.
         View Appointments: Doctors can view their scheduled appointments with patient
            details.
         Manage Schedule: Doctors can set availability hours for appointments.
         Patient Communication: Doctors can communicate with patients for appointment
            confirmations or updates.
3.3 Patient Panel
         Login/Registration: Patients can register or log into their account to make
            appointments.
         Book Appointments: Patients can search for available doctors and book
            appointments.
         View Appointments: Patients can view their upcoming and past appointments.
         Cancel Appointments: Patients can cancel appointments within a specific time frame.
7
    An existing Doctor Appointmet system typically refers to a platform or software that allows
    patients to schedule appointments with healthcare providers (doctors) either online or in-
    person. These systems can range from simple booking systems to fully-fledged electronic
    health record (EHR) systems with advanced features. To describe the existing system, we’ll
    look at its general components and functionalities, as well as its limitations.
8
The need for a Hospital management system system arises from several factors and objectives.
  Here are some key reasons why such a system is developed:
          Ability to accept the appointment by the doctor to acknowledge the patient that
           their appointment has been approved.
          User should not be allowed to register if he/she tries to provide the already
           registered email ID.
          The password should be encrypted and the password field shouldn't be displayed in
           the admin panel.
 Implementation of pagination for all the list view across the application.
          Bug fix - Bill payment receipt contains multiple record if the patient has associated
           with the same doctor multiple times.
 Addition of more fields in the prescription statement to make it more specific one.
          Addition of more details on payment - such as date of the payment made, amount
           paid, etc.
9
     Hardware And Software Requirement
Hardware Requirements:
Memory Space:
        Minimum – 32 MB
        Recommended – 64 MB
        HDD – To install the software at least 2 GB and the data storage is depending upon the
         organizational setup.
        PROCESSOR – Intel Pentium IV, 1GHZ or above
        RAM – 256MB or above
        VIDEO – 1024×768, 24-bit colours
        KEYBOARD – Standard 104 Keys (QWERTY)
Software Requirements:
10
     2. PROPOSED SYSTEM
11
Our system has the following features
Admin Panel
         Login/Logout: Admin can securely log in and out of the system.
         Manage Doctors: Admin can add, edit, or delete doctors’ information (e.g., name,
            specialty, contact).
         View Appointments: Admin can view all upcoming appointments and patients’
            details.
         Manage Patients: Admin can manage patient records, including adding and deleting
            patients.
         Reports: Admin can generate reports based on doctor availability and patient visits.
3.2 Doctor Panel
         Login/Logout: Doctors can log in to their personal dashboard.
         View Appointments: Doctors can view their scheduled appointments with patient
            details.
         Manage Schedule: Doctors can set availability hours for appointments.
         Patient Communication: Doctors can communicate with patients for appointment
            confirmations or updates.
3.3 Patient Panel
         Login/Registration: Patients can register or log into their account to make
            appointments.
         Book Appointments: Patients can search for available doctors and book
            appointments.
         View Appointments: Patients can view their upcoming and past appointments.
         Cancel Appointments: Patients can cancel appointments within a specific time frame.
12
     Below is a detailed module specification for a Hospital Management System, which breaks
     down the system into functional components and defines their purpose.
13
          Core Features:
              o Invoice Generation: Generate invoices for various services like consultations,
                  lab tests, surgeries, etc.
              o Payment Processing: Accept various payment methods (cash, credit/debit
                  cards, insurance claims, etc.).
              o Insurance Claims: Process and track insurance claims for patients.
              o Tax Management: Calculate applicable taxes on services and products.
              o Payment History: Track patient payment history, including any outstanding
                  balances.
              o Financial Reporting: Generate financial reports like revenue, expenditure, and
                  profit/loss statements.
14
          3. Analysis and Design
15
     3.1.2.Login page
16
     3.1.3 appointment page
17
3.1.4 Doctor Page
18
     3.1.5 : Admin page
19
     3.2 Activity Diagram
20
21
     3.2.1 appointment page
22
     3.2.2 Doctor Page
23
     3.2.3 Admin Page
24
                   3.3    Sequence Diagram
27
     3.6.1 Patient
28
     3.6.2 Appointment
29
     3.6.3 Doctor
30
     3.6.4 Prescription
31
     3.6.5 Admin
                   COLUMN                                 DESCRIPTION
           S NO.
                   NAME         DATA TYPE CONSTRAINTS
3.6.6 Bill
32
     S NO.   COLUMN NAME   DATA TYPE     CONSTRAINTS   DESCRIPTION
33
                                        4.User Manual
     Hospital Management System in php and mysql. This system has a ‘Home’ page from where the
     patient, doctor & administrator can login into their accounts by toggling the tabs accordingly. Fig 1.1
     shows the ‘Home’ page of our project.
34
     About Us' page (Fig 1.2) allows us to get some more information about the quality and the
     services of the hospital.
35
     Patient Module:
         This module allows patients to create their account, book an appointment to see a doctor and see
     their appointment history. The registration page(in the home page itself) asks patients to enter their
     First Name, Last Name, Email ID, Contact Number, Password and radio buttons to select their
     gender.
     Once the patient has created his/her own account after clicking the ‘Register’
     button, then he will be redirected to his/her Dashboard(Fig 1.5).
36
     The Dashboard page allows patients to perform two operations:
         Here, the patients can able to book their appointments to see a doctor. The appointment
     form(Fig 1.6) requires patients to select the doctor that they want to see, Date and Time that they
     want to meet with the doctor. The consultancy fee will be shown accordingly to the patient as it was
     already determined by the doctor.
     After clicking on the ‘Create new entry’ button, the patient will receive an alert
     that acknowledges the successful appointment of the patient.(See Fig 1.7)
37
     2. View patients’ Appointment History:
       Here, the patient can see their appointment history which contains Doctor
     Name, Consultancy Fee, Appointment Date and Time.(See Fig 1.8).
38
     Once the patient has logged out of his account, if he wants to go into his account again, he
     can login his account, instead of register his account again. Fig 1.9 shows the login page.
     Clicking on ‘Login’ button will redirect the patient to his dashboard page which we have
     seen earlier (Fig 1.5)
     This is how the patient module works. On the whole, this module allows patients to register their
     account or login their account(if he/she has one), book an appointment and view his/her
     appointment history.
39
     Doctor Module:
        The doctors can login into their account which can be done by toggling the tab from ‘Patient’ to
     ‘Doctor’. Fig 1.10 shows the login form for a doctor. Registration of a doctor account can be done
     only by admin. We will discuss more about this in Admin Module.
     Once the doctor clicking the ‘Login’ button, they will be redirected to their own dashboard which is
     shown in Fig 1.11
     In this page, doctor can able to see their appointments which has been booked by the patients. Fig
     1.12 shows the appointment of the doctor ‘Ganesh’ which has been booked by the patient ‘Kenny
40
     Sebastian’ (Fig 1.6). This means that the doctor ‘Ganesh’ will have an appointment with the patient
     ‘Kenny Sebastian’ on 10-10-2019 10AM.
     In real-time, the doctors will have thousands of appointments. It will be easier for a doctor to search
     for appointment in the case of more appointments. To make it easier, I have a ‘Search’ box in the
     navigation bar (See Fig 1.12) which allows doctors to search for a patient by their contact number.
     Once everything is done, the doctor can logout of their account. Thus, in general, a doctor can login
     into his/her account, view their appointments and search for a patient. This is all about Doctor
     Module.
Admin Module:
41
         This module is the heart of our project where an admin can see the list of all patients. Doctors
     and appointments and the feedback/queries received from the ‘Contact’ page. Also admin can add
     doctor too.    Login into admin account can be done by toggling into admin tab of the Home page.
     Fig 1.13 shows the login page for admin.     username: admin, password: admin123
     On clicking the ‘Login’ button, the admin will be redirected to his/her dashboard as shown in Fig
     1.14.
42
     1. View the list of all patients registered:
        Admin can able to view all the patients registered. This includes the patients’ First Name, Last
     Name, Email ID, Contact Number and Password. (See Fig 1.15).As like in doctor module, admin can
     also search for a patient by their contact number in the search box.
43
     2. View the list of all doctors registered:
        Details of the doctors can also be viewed by the admin. This details include the Name of the
     doctor, Password, Email and Consultancy fees, shown in Fig 1.16. Searching for a doctor can be done
     by using the doctor’s Email ID in the search box.
44
     3. View the Appointment lists:
        Admin can also able to see the entire details of the appointment that shows the appointment
     details of the patients with their respective doctors. This includes the First Name, Last Name, Email
     and Contact Number of patients, doctor’s name, Appointment Date, Time and the Consultancy Fees.
     (See Fig 1.17).
45
     4. Add Doctor:
         Admin alone can add a new doctor since anyone can register as a doctor if we put this section on
     the home page. This form asks Doctor’s Name, Email ID, Password and his/her Consultancy Fees.(See
     Fig 1.18)
     After adding a new doctor, if we check the doctor’s list, we will see the details of new doctor is
     added to the list as shown in the Fig 1.19
46
     View User’s feedback/Queries:
        Admin is allowed to view the feedback/Query that has been given by the user in the ‘Contact’
     page (Refer Fig 1.3). This includes User’s Name, Email Id, Contact Number and the
     message(Feedback/ Query) as shown in the Fig 1.20.
1. Cancel Appointments
     If the patient deletes the last record (for doctor Ganesh), then a label "deleted by you" will be
     displayed in the column 'Current Status' and the action will change to cancel state.
47
     Now if we login to the doctor Ganesh's account and view his appointment details, then it will look
     like this:
     Similarly doctors can also delete their appointments and patients can view their updated
     appointment details.
48
     2. Remove Doctors by Admin
        Admin can also delete the doctors from the system. This let admin to have more control over the
     system.
49
                                     4.3 Sample program code
     Index page
     <?php
     include("header.php");
     ?>
     <!DOCTYPE html>
     <html lang="en">
      <head>
       <!-- Required meta tags -->
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      </head>
      <style type="text/css">
       #inputbtn:hover{cursor:pointer;}
       .card{
50
          background: #f8f9fa;
          border-top-left-radius: 5% 5%;
          border-bottom-left-radius: 5% 5%;
          border-top-right-radius: 5% 5%;
          border-bottom-right-radius: 5% 5%;
     }
         </style>
      <body style="background: -webkit-linear-gradient(left, #3931af, #00c6ff); background-size:
     cover;">
          <nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="mainNav" >
          <div class="container">
51
          <li class="nav-item">
            <a class="nav-link js-scroll-trigger" href="contact.html" style="color: white;font-
     family: 'IBM Plex Sans', sans-serif;"><h6>CONTACT</h6></a>
          </li>
         </ul>
        </div>
       </div>
      </nav>
</div>
52
         <div class="col-md-4" style="margin-top: 5%;right: 8%">
          <div class="card" style="font-family: 'IBM Plex Sans', sans-serif;">
           <div class="card-body">
            <center>
             <i class="fa fa-hospital-o fa-3x" aria-hidden="true" style="color:#0062cc"></i>
             <br>
            <h3 style="margin-top: 10%">Patient Login</h3><br>
            <form class="form-group" method="POST" action="func.php">
             <div class="row" style="margin-top: 10%">
              <div class="col-md-4"><label>Email-ID: </label></div>
              <div class="col-md-8"><input type="text" name="email" class="form-control"
     placeholder="enter email ID" required/></div><br><br>
              <div class="col-md-4" style="margin-top: 8%"><label>Password: </label></div>
               <div class="col-md-8" style="margin-top: 8%"><input type="password"
     class="form-control" name="password2" placeholder="enter password"
     required/></div><br><br><br>
             </div>
             <div class="row">
              <div class="col-md-4" style="padding-left: 160px;margin-top: 10%">
                <center><input type="submit" id="inputbtn" name="patsub" value="Login"
     class="btn btn-primary"></center></div>
              <!-- <div class="col-md-8" style="margin-top: 10%">
                  <a href="index.php" class="btn btn-primary">Back</a></div> -->
             </div>
            </form>
           </center>
           </div>
          </div>
         </div>
53
        </div>
       </div>
Login page
54
     <?php
     session_start();
     session_destroy();
     ?>
     <!DOCTYPE html>
     <html lang="en">
      <head>
       <!-- Required meta tags -->
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     Doctor page
     <!DOCTYPE html>
     <?php
     include('func1.php');
55
     $con=mysqli_connect("localhost","root","","myhmsdb");
     $doctor = $_SESSION['dname'];
     if(isset($_GET['cancel']))
       {
         $query=mysqli_query($con,"update appointmenttb set doctorStatus='0' where ID = '".
     $_GET['ID']."'");
         if($query)
         {
           echo "<script>alert('Your appointment successfully cancelled');</script>";
         }
       }
// if(isset($_GET['prescribe'])){
      // $pid = $_GET['pid'];
      // $ID = $_GET['ID'];
      // $appdate = $_GET['appdate'];
      // $apptime = $_GET['apptime'];
      // $disease = $_GET['disease'];
      // $allergy = $_GET['allergy'];
      // $prescription = $_GET['prescription'];
      // $query=mysqli_query($con,"insert into
     prestb(doctor,pid,ID,appdate,apptime,disease,allergy,prescription) values ('$doctor',$pid,
     $ID,'$appdate','$apptime','$disease','$allergy','$prescription');");
      // if($query)
      // {
      // echo "<script>alert('Prescribed successfully!');</script>";
      // }
      // else{
      // echo "<script>alert('Unable to process your request. Try again!');</script>";
      // }
      // }
     ?>
     <html lang="en">
      <head>
56
       <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" />
       <link rel="stylesheet"
     href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
     integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6
     M" crossorigin="anonymous">
       <link rel="stylesheet"
     href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
     integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2
     MZw1T" crossorigin="anonymous">
       <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans&display=swap"
     rel="stylesheet">
         <nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
      <a class="navbar-brand" href="#"><i class="fa fa-user-plus" aria-hidden="true"></i> Global
     Hospital </a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-
     target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
     expanded="false" aria-label="Toggle navigation">
       <span class="navbar-toggler-icon"></span>
      </button>
       <style >
        .btn-outline-light:hover{
          color: #25bef7;
          background-color: #f8f9fa;
          border-color: #f8f9fa;
        }
       </style>
      <style >
       .bg-primary {
       background: -webkit-linear-gradient(left, #3931af, #00c6ff);
     }
     .list-group-item.active {
        z-index: 2;
        color: #fff;
        background-color: #342ac1;
        border-color: #007bff;
     }
     .text-primary {
        color: #342ac1!important;
     }
       </style>
57
         <li class="nav-item">
          <a class="nav-link" href="logout1.php"><i class="fa fa-sign-out"
     aria-hidden="true"></i>Logout</a>
         </li>
         <li class="nav-item">
          <a class="nav-link" href="#"></a>
         </li>
       </ul>
       <form class="form-inline my-2 my-lg-0" method="post" action="search.php">
         <input class="form-control mr-sm-2" type="text" placeholder="Enter contact number"
     aria-label="Search" name="contact">
         <input type="submit" class="btn btn-outline-light" id="inputbtn" name="search_submit"
     value="Search">
       </form>
      </div>
     </nav>
      </head>
      <style type="text/css">
       button:hover{cursor:pointer;}
       #inputbtn:hover{cursor:pointer;}
      </style>
      <body style="padding-top:50px;">
       <div class="container-fluid" style="margin-top:50px;">
       <h3 style = "margin-left: 40%; padding-bottom: 20px;font-family:'IBM Plex Sans', sans-
     serif;"> Welcome  <?php echo $_SESSION['dname'] ?> </h3>
       <div class="row">
      <div class="col-md-4" style="max-width:18%;margin-top: 3%;">
       <div class="list-group" id="list-tab" role="tablist">
         <a class="list-group-item list-group-item-action active" href="#list-dash" role="tab" aria-
     controls="home" data-toggle="list">Dashboard</a>
         <a class="list-group-item list-group-item-action" href="#list-app" id="list-app-list"
     role="tab" data-toggle="list" aria-controls="home">Appointments</a>
         <a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list"
     role="tab" data-toggle="list" aria-controls="home"> Prescription List</a>
       </div><br>
      </div>
      <div class="col-md-8" style="margin-top: 3%;">
       <div class="tab-content" id="nav-tabContent" style="width: 950px;">
        <div class="tab-pane fade show active" id="list-dash" role="tabpanel" aria-
     labelledby="list-dash-list">
58
                <div class="panel-body">
                 <span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x
     text-primary"></i> <i class="fa fa-list fa-stack-1x fa-inverse"></i> </span>
                 <h4 class="StepTitle" style="margin-top: 5%;"> View Appointments</h4>
                 <script>
                  function clickDiv(id) {
                    document.querySelector(id).click();
                  }
                 </script>
                 <p class="links cl-effect-1">
                  <a href="#list-app" onclick="clickDiv('#list-app-list')">
                    Appointment List
                  </a>
                 </p>
                </div>
               </div>
              </div>
            </div>
           </div>
          </div>
59
               <th scope="col">Last Name</th>
               <th scope="col">Gender</th>
               <th scope="col">Email</th>
               <th scope="col">Contact</th>
               <th scope="col">Appointment Date</th>
               <th scope="col">Appointment Time</th>
               <th scope="col">Current Status</th>
               <th scope="col">Action</th>
               <th scope="col">Prescribe</th>
               </tr>
              </thead>
              <tbody>
               <?php
                $con=mysqli_connect("localhost","root","","myhmsdb");
                global $con;
                $dname = $_SESSION['dname'];
                $query = "select
     pid,ID,fname,lname,gender,email,contact,appdate,apptime,userStatus,doctorStatus from
     appointmenttb where doctor='$dname';";
                $result = mysqli_query($con,$query);
                while ($row = mysqli_fetch_array($result)){
                  ?>
                  <tr>
                  <td><?php echo $row['pid'];?></td>
                   <td><?php echo $row['ID'];?></td>
                   <td><?php echo $row['fname'];?></td>
                   <td><?php echo $row['lname'];?></td>
                   <td><?php echo $row['gender'];?></td>
                   <td><?php echo $row['email'];?></td>
                   <td><?php echo $row['contact'];?></td>
                   <td><?php echo $row['appdate'];?></td>
                   <td><?php echo $row['apptime'];?></td>
                   <td>
                <?php if(($row['userStatus']==1) && ($row['doctorStatus']==1))
                {
                  echo "Active";
                }
                if(($row['userStatus']==0) && ($row['doctorStatus']==1))
                {
                  echo "Cancelled by Patient";
                }
60
                  ?></td>
                <td>
                  <?php if(($row['userStatus']==1) && ($row['doctorStatus']==1))
                  { ?>
                      echo "Cancelled";
                      } ?>
</td>
<td>
                    echo "-";
                    } ?>
</td>
                </tr></a>
               <?php } ?>
             </tbody>
            </table>
         <br>
        </div>
61
        <div class="tab-pane fade" id="list-pres" role="tabpanel" aria-labelledby="list-pres-list">
         <table class="table table-hover">
              <thead>
               <tr>
                $con=mysqli_connect("localhost","root","","myhmsdb");
                global $con;
                $query = "select
     pid,fname,lname,ID,appdate,apptime,disease,allergy,prescription from prestb where
     doctor='$doctor';";
                $result = mysqli_query($con,$query);
                if(!$result){
                  echo mysqli_error($con);
                }
</tr>
62
            <?php }
            ?>
          </tbody>
         </table>
     </div>
            $con=mysqli_connect("localhost","root","","myhmsdb");
            global $con;
             #$fname = $row['fname'];
             #$lname = $row['lname'];
             #$email = $row['email'];
             #$contact = $row['contact'];
           ?>
             <tr>
              <td><?php echo $row['fname'];?></td>
              <td><?php echo $row['lname'];?></td>
              <td><?php echo $row['email'];?></td>
              <td><?php echo $row['contact'];?></td>
              <td><?php echo $row['doctor'];?></td>
              <td><?php echo $row['docFees'];?></td>
              <td><?php echo $row['appdate'];?></td>
63
                 <td><?php echo $row['apptime'];?></td>
                </tr>
               <?php } ?>
             </tbody>
            </table>
         <br>
        </div>
64
       <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
     integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFN
     mj4" crossorigin="anonymous"></script>
       <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
     integrity="sha384-
     h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
     crossorigin="anonymous"></script>
       <script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.10.1/
     sweetalert2.all.min.js"></script>
      </body>
     </html>
     Doctor search
     <!DOCTYPE html>
      <?php #include("func.php");?>
     <html>
     <head>
              <title>Doctor Details</title>
       <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" />
              <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
     beta/css/bootstrap.min.css"
     integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6
     M" crossorigin="anonymous">
     </head>
     <body>
     <?php
     include("newfunc.php");
     if(isset($_POST['doctor_search_submit']))
     {
              $contact=$_POST['doctor_contact'];
       $query = "select * from doctb where email= '$contact'";
       $result = mysqli_query($con,$query);
       $row=mysqli_fetch_array($result);
       if($row['username']=="" & $row['password']=="" & $row['email']=="" &
     $row['docFees']==""){
         echo "<script> alert('No entries found!');
            window.location.href = 'admin-panel1.php#list-doc';</script>";
       }
       else {
         echo "<div class='container-fluid' style='margin-top:50px;'>
              <div class ='card'>
              <div class='card-body' style='background-color:#342ac1;color:#ffffff;'>
     <table class='table table-hover'>
       <thead>
         <tr>
          <th scope='col'>Username</th>
          <th scope='col'>Password</th>
65
        <th scope='col'>Email</th>
        <th scope='col'>Consultancy Fees</th>
       </tr>
      </thead>
      <tbody>";
              // while ($row=mysqli_fetch_array($result)){
                        $username = $row['username'];
          $password = $row['password'];
          $email = $row['email'];
          $docFees = $row['docFees'];
          echo "<tr>
            <td>$username</td>
            <td>$password</td>
            <td>$email</td>
            <td>$docFees</td>
          </tr>";
              // }
              echo "</tbody></table><center><a href='admin-panel1.php' class='btn btn-
     light'>Back to dashboard</a></div></center></div></div></div>";
     }
       }
     ?>
     <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-
     KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
     crossorigin="anonymous"></script>
       <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
     integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFN
     mj4" crossorigin="anonymous"></script>
       <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
     integrity="sha384-
     h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
     crossorigin="anonymous"></script>
     </body>
     </html>
     Admin page
     <!DOCTYPE html>
     <?php
     $con=mysqli_connect("localhost","root","","myhmsdb");
include('newfunc.php');
if(isset($_POST['docsub']))
66
     {
       $doctor=$_POST['doctor'];
       $dpassword=$_POST['dpassword'];
       $demail=$_POST['demail'];
       $spec=$_POST['special'];
       $docFees=$_POST['docFees'];
       $query="insert into
     doctb(username,password,email,spec,docFees)values('$doctor','$dpassword','$demail','$spec','
     $docFees')";
       $result=mysqli_query($con,$query);
       if($result)
         {
           echo "<script>alert('Doctor added successfully!');</script>";
       }
     }
     if(isset($_POST['docsub1']))
     {
       $demail=$_POST['demail'];
       $query="delete from doctb where email='$demail';";
       $result=mysqli_query($con,$query);
       if($result)
         {
           echo "<script>alert('Doctor removed successfully!');</script>";
       }
       else{
         echo "<script>alert('Unable to delete!');</script>";
       }
     }
     ?>
     <html lang="en">
      <head>
67
     integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzA
     LeQsN6M" crossorigin="anonymous">
         <nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
           <link rel="stylesheet"
     href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
     integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9Jvo
     RxT2MZw1T" crossorigin="anonymous">
       <a class="navbar-brand" href="#"><i class="fa fa-user-plus" aria-hidden="true"></i>
     Global Hospital </a>
       <button class="navbar-toggler" type="button" data-toggle="collapse" data-
     target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
     expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
       </button>
         <script >
           var check = function() {
         if (document.getElementById('dpassword').value ==
           document.getElementById('cdpassword').value) {
           document.getElementById('message').style.color = '#5dd05d';
           document.getElementById('message').innerHTML = 'Matched';
         } else {
           document.getElementById('message').style.color = '#f55252';
           document.getElementById('message').innerHTML = 'Not Matching';
         }
     }
        function alphaOnly(event) {
      var key = event.keyCode;
      return ((key >= 65 && key <= 90) || key == 8 || key == 32);
     };
      </script>
         <style >
          .bg-primary {
          background: -webkit-linear-gradient(left, #3931af, #00c6ff);
     }
     .col-md-4{
       max-width:20% !important;
     }
     .list-group-item.active {
         z-index: 2;
         color: #fff;
         background-color: #342ac1;
         border-color: #007bff;
     }
     .text-primary {
68
         color: #342ac1!important;
     }
     #cpass {
       display: -webkit-box;
     }
     #list-app{
       font-size:15px;
     }
     .btn-primary{
       background-color: #3c50c1;
       border-color: #3c50c1;
     }
       </style>
69
         <a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list"
     role="tab" data-toggle="list" aria-controls="home">Prescription List</a>
         <a class="list-group-item list-group-item-action" href="#list-settings" id="list-adoc-list"
     role="tab" data-toggle="list" aria-controls="home">Add Doctor</a>
         <a class="list-group-item list-group-item-action" href="#list-settings1" id="list-ddoc-list"
     role="tab" data-toggle="list" aria-controls="home">Delete Doctor</a>
         <a class="list-group-item list-group-item-action" href="#list-mes" id="list-mes-list"
     role="tab" data-toggle="list" aria-controls="home">Queries</a>
       </div><br>
      </div>
      <div class="col-md-8" style="margin-top: 3%;">
       <div class="tab-content" id="nav-tabContent" style="width: 950px;">
                   <p class="cl-effect-1">
                    <a href="#app-hist" onclick="clickDiv('#list-pat-list')">
                     View Patients
70
                   </a>
                  </p>
                </div>
               </div>
              </div>
              <div class="col-sm-4">
               <div class="panel panel-white no-radius text-center">
                <div class="panel-body" >
                 <span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-
     primary"></i> <i class="fa fa-paperclip fa-stack-1x fa-inverse"></i> </span>
                 <h4 class="StepTitle" style="margin-top: 5%;">Appointment Details</h4>
                  <p class="cl-effect-1">
                   <a href="#app-hist" onclick="clickDiv('#list-app-list')">
                    View Appointments
                   </a>
                  </p>
                </div>
               </div>
              </div>
              </div>
              <div class="row">
              <div class="col-sm-4" style="left: 13%;margin-top: 5%;">
               <div class="panel panel-white no-radius text-center">
                <div class="panel-body" >
                 <span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-
     primary"></i> <i class="fa fa-list-ul fa-stack-1x fa-inverse"></i> </span>
                 <h4 class="StepTitle" style="margin-top: 5%;">Prescription List</h4>
                  <p class="cl-effect-1">
                   <a href="#list-pres" onclick="clickDiv('#list-pres-list')">
                    View Prescriptions
                   </a>
                  </p>
                </div>
               </div>
              </div>
<p class="cl-effect-1">
71
                   <a href="#app-hist" onclick="clickDiv('#list-adoc-list')">Add Doctors</a>
                    |
                   <a href="#app-hist" onclick="clickDiv('#list-ddoc-list')">
                    Delete Doctors
                   </a>
                  </p>
                </div>
               </div>
              </div>
              </div>
             </div>
            </div>
              <div class="col-md-8">
         <form class="form-group" action="doctorsearch.php" method="post">
          <div class="row">
          <div class="col-md-10"><input type="text" name="doctor_contact" placeholder="Enter
     Email ID" class = "form-control"></div>
          <div class="col-md-2"><input type="submit" name="doctor_search_submit" class="btn
     btn-primary" value="Search"></div></div>
         </form>
       </div>
              <table class="table table-hover">
               <thead>
                <tr>
                  <th scope="col">Doctor Name</th>
                  <th scope="col">Specialization</th>
                  <th scope="col">Email</th>
                  <th scope="col">Password</th>
                  <th scope="col">Fees</th>
                </tr>
               </thead>
               <tbody>
                <?php
72
                 $con=mysqli_connect("localhost","root","","myhmsdb");
                 global $con;
                 $query = "select * from doctb";
                 $result = mysqli_query($con,$query);
                 while ($row = mysqli_fetch_array($result)){
                  $username = $row['username'];
                  $spec = $row['spec'];
                  $email = $row['email'];
                  $password = $row['password'];
                  $docFees = $row['docFees'];
                     echo "<tr>
                      <td>$username</td>
                      <td>$spec</td>
                      <td>$email</td>
                      <td>$password</td>
                      <td>$docFees</td>
                     </tr>";
                 }
                ?>
              </tbody>
             </table>
         <br>
        </div>
         <div class="col-md-8">
         <form class="form-group" action="patientsearch.php" method="post">
          <div class="row">
          <div class="col-md-10"><input type="text" name="patient_contact" placeholder="Enter
     Contact" class = "form-control"></div>
          <div class="col-md-2"><input type="submit" name="patient_search_submit" class="btn
     btn-primary" value="Search"></div></div>
         </form>
       </div>
73
           </thead>
           <tbody>
            <?php
              $con=mysqli_connect("localhost","root","","myhmsdb");
              global $con;
              $query = "select * from patreg";
              $result = mysqli_query($con,$query);
              while ($row = mysqli_fetch_array($result)){
               $pid = $row['pid'];
               $fname = $row['fname'];
               $lname = $row['lname'];
               $gender = $row['gender'];
               $email = $row['email'];
               $contact = $row['contact'];
               $password = $row['password'];
                 echo "<tr>
                  <td>$pid</td>
                  <td>$fname</td>
                  <td>$lname</td>
                  <td>$gender</td>
                  <td>$email</td>
                  <td>$contact</td>
                  <td>$password</td>
                 </tr>";
             }
             ?>
           </tbody>
          </table>
      <br>
     </div>
<div class="col-md-8">
<div class="row">
74
             <th scope="col">Appointment Date</th>
             <th scope="col">Appointment Time</th>
             <th scope="col">Disease</th>
             <th scope="col">Allergy</th>
             <th scope="col">Prescription</th>
           </tr>
          </thead>
          <tbody>
           <?php
             $con=mysqli_connect("localhost","root","","myhmsdb");
             global $con;
             $query = "select * from prestb";
             $result = mysqli_query($con,$query);
             while ($row = mysqli_fetch_array($result)){
              $doctor = $row['doctor'];
              $pid = $row['pid'];
              $ID = $row['ID'];
              $fname = $row['fname'];
              $lname = $row['lname'];
              $appdate = $row['appdate'];
              $apptime = $row['apptime'];
              $disease = $row['disease'];
              $allergy = $row['allergy'];
              $pres = $row['prescription'];
                echo "<tr>
                 <td>$doctor</td>
                 <td>$pid</td>
                 <td>$ID</td>
                 <td>$fname</td>
                 <td>$lname</td>
                 <td>$appdate</td>
                 <td>$apptime</td>
                 <td>$disease</td>
                 <td>$allergy</td>
                 <td>$pres</td>
                </tr>";
            }
             ?>
           </tbody>
          </table>
      <br>
     </div>
     </div>
     </div>
75
        <div class="tab-pane fade" id="list-app" role="tabpanel" aria-labelledby="list-pat-list">
           <div class="col-md-8">
         <form class="form-group" action="appsearch.php" method="post">
          <div class="row">
          <div class="col-md-10"><input type="text" name="app_contact" placeholder="Enter
     Contact" class = "form-control"></div>
          <div class="col-md-2"><input type="submit" name="app_search_submit" class="btn
     btn-primary" value="Search"></div></div>
         </form>
       </div>
                $con=mysqli_connect("localhost","root","","myhmsdb");
                global $con;
76
                    <td><?php echo $row['appdate'];?></td>
                    <td><?php echo $row['apptime'];?></td>
                    <td>
                 <?php if(($row['userStatus']==1) && ($row['doctorStatus']==1))
                 {
                   echo "Active";
                 }
                 if(($row['userStatus']==0) && ($row['doctorStatus']==1))
                 {
                   echo "Cancelled by Patient";
                 }
77
               <div class="col-md-8"><input type="password" class="form-control"
     onkeyup='check();' name="dpassword" id="dpassword" required></div><br><br>
               <div class="col-md-4"><label>Confirm Password:</label></div>
               <div class="col-md-8" id='cpass'><input type="password" class="form-control"
     onkeyup='check();' name="cdpassword" id="cdpassword" required>   <span
     id='message'></span> </div><br><br>
               </div>
           <input type="submit" name="docsub1" value="Delete Doctor" class="btn btn-
     primary" onclick="confirm('do you really want to delete?')">
          </form>
         </div>
           <div class="col-md-8">
         <form class="form-group" action="messearch.php" method="post">
          <div class="row">
          <div class="col-md-10"><input type="text" name="mes_contact" placeholder="Enter
     Contact" class = "form-control"></div>
          <div class="col-md-2"><input type="submit" name="mes_search_submit" class="btn
     btn-primary" value="Search"></div></div>
         </form>
       </div>
78
               <tr>
                 <th scope="col">User Name</th>
                 <th scope="col">Email</th>
                 <th scope="col">Contact</th>
                 <th scope="col">Message</th>
               </tr>
              </thead>
              <tbody>
               <?php
                 $con=mysqli_connect("localhost","root","","myhmsdb");
                 global $con;
                  #$fname = $row['fname'];
                  #$lname = $row['lname'];
                  #$email = $row['email'];
                  #$contact = $row['contact'];
                ?>
                  <tr>
                   <td><?php echo $row['name'];?></td>
                   <td><?php echo $row['email'];?></td>
                   <td><?php echo $row['contact'];?></td>
                   <td><?php echo $row['message'];?></td>
                  </tr>
                 <?php } ?>
              </tbody>
             </table>
         <br>
        </div>
        </div>
      </div>
     </div>
       </div>
        <!-- Optional JavaScript -->
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-
     KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
     crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
     integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKa
     MNFNmj4" crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
     integrity="sha384-
79
     h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
     crossorigin="anonymous"></script>
       <script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.10.1/
     sweetalert2.all.min.js"></script>
      </body>
     </html>
     Logout page
     <?php
     session_start();
     session_destroy();
     ?>
     <!DOCTYPE html>
     <html lang="en">
      <head>
       <!-- Required meta tags -->
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
80
                                  4.4: Limitations and Bibliography
81
     2. Complexity in Implementation
          Integration Issues: Many hospitals already use legacy systems, and integrating new
            HMS solutions with existing software can be complex. Data migration and
            synchronization can be difficult, leading to potential errors or delays.
          Customization: The system may need to be tailored to the specific needs of a hospital,
            which can increase the complexity of setup and maintenance.
     3. Data Security Risks
          Sensitive Information: HMS often stores sensitive patient data, such as medical
            histories and personal information. If the system is not properly secured, it could be
            vulnerable to hacking, data breaches, or unauthorized access.
          Compliance: Hospitals need to ensure that their system complies with health data
            protection regulations (e.g., HIPAA in the U.S.). Compliance can be challenging,
            especially for smaller institutions or hospitals in developing countries.
     4. User Training and Adoption
          Learning Curve: Hospital staff may find it difficult to adapt to the new system,
            especially if they are not technologically inclined. Proper training and ongoing
            support are necessary, which can be time-consuming and expensive.
          Resistance to Change: Some employees, particularly those used to traditional
            methods, may resist the implementation of a new system, leading to inefficiencies and
            reduced adoption.
     5. Technical Issues
          System Downtime: Like any software, an HMS can experience technical issues such
            as system crashes, downtime, or bugs. This could lead to disruptions in patient care or
            administrative tasks.
          Dependence on Technology: The system may be vulnerable to internet or power
            outages, which could cause interruptions in hospital operations.
Bibliography
82