Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 87

Patient Care Management System

Dissertation
Arshad Ahmad

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR


THE AWARD OF THE DEGREE OF

Bachelor of Science (Hons.)

Computer Applications

By

Arshad Ahmad
Patient Care Management System

Department of Computer Science

Aligarh Muslim University

Aligarh

2021-2022
2021-2022
CERTIFICATE

This is to certify that the dissertation/project work entitled "…Patient Care Management System…" being
submitted by Arshad Ahmad in partial fulfilment of the requirements for the award of the degree of Bachelor
in Science (Hons.)

Computer Applications, Aligarh Muslim University, Aligarh, is a record of the student’s own work, carried
out under my/our supervision and guidance.

It is further certified that the student has worked on Windows, at Department of Computer Science, AMU for
completion of this work from ………………. (date) ………….to… .................... (date).

(Mr. Shahid Masood)


ACKNOWLEDGEMENT

I have taken efforts in this project. However, it would not have been possible without the kind support and
help of many individuals and organizations. I would like to extend my sincere thanks to all of them.

I am highly indebted to Mr. Shahid Masood and Mr. Md. Zeyauddin for their guidance and constant
supervision as well as for providing necessary information regarding the project and also for their support in
completing the project.
I would like to express my gratitude towards my teachers of the Computer Science Department for their kind
co-operation and encouragement which helped me in the completion of this project.

My thanks and appreciations also go to my colleagues in developing the project and people who have
willingly helped me out with their abilities.
CONTENTS

Certification …………………………………………………………....

Acknowledgement ……………………………………………….........

Abstract ……………………………………………………………….

Chapter 1: INTRODUCTION……………………………………………….…….1
1.1 Importance of Computer Applications ………………………………………......3
1.2 Literature Survey …………………………………………………………………4
1.2 Present state of art and its shortcoming …………………………………………...5
1.3 Introduction of problem or work to be taken up ………………………………….5
1.4 Broad outline of the work (chapter wise) …………………………………………5

Chapter 2: PROBLEM FORMULATION…………………………………………5


2.1 Various aspects of the problem ………………………………………………….5
2.2 Significance of the work …………………………………………………………5

Chapter 3: SYSTEM ANALYSIS AND DESIGN ………………………………...6


3.1 Requirement specification …………………………………………………….….6
3.2 Analysis and development of actual solution (system) ………………………….8
3.3 Description of various Modules ………………………………………………….8
3.5 Choice of language………………………………………………………………...9
3.6 Choice of system for implementation …………………………………………….10

Chapter 4: SYSTEM IMPLEMENTATION AND TESTING……………………......11


4.1 Hardware requirement ………………………………………………………………11
4.2 Software requirement ……………………………………………………………….11
4.3 System testing

Chapter 5: APPLICATION AND SCOPE……………………………………………...12


5.1 Application areas …………………………………………………………………….12
5.2 Scope of the work …………………………………………………………………….12
5.3 Limitations…………………...13

1
Abstract
It was not long ago when we realized the need to improvise the medical space and facility on a
big scale. The covid times had taught us to keep our medical standards up and high and be
ready with a plan for any calamity.

So here, I have made a project with an idea to bring together different tasks at one platform so
that we can make easier what was complex and time-consuming yesterday.

The project Patient Care Management System includes registration of patients, storing their
details into the system, and also computerized billing in the pharmacy and labs. The software
has the facility to give a unique id for every patient and stores the clinical details of every
patient and hospitals tests done automatically. It includes a search facility to know the current
status of each patient. User can search details of a patient using the id. The Patient Care
Management System can be entered using a username and password. It is accessible either by
an administrator or receptionist. Only they can add data into the database. The data can be
retrieved easily. The interface is very user-friendly. The data are well protected for personal use
and makes the data processing very fast.

2
CHAPTER 1
INTRODUCTION
1.1 Importance of Computer Applications

Computers are now a fact of life. Computers have created a very effective information system to help
streamline the management of an organization. This makes it a much needed tool for every business,
banking, government, entertainment, daily life, industry, education, and administration. It can be said of all
large organizations, whether the department government or private, use a computer for a variety of their daily
business and it is the fastest growing industries in the world today. Each organization usually has one or more
large computer systems and a number of microcomputer. The system is a great computer for data processing
tasks, while many small microcomputer to use as word processing. Computers have become part of our lives
is essential.

Farmers use innovations in computer technology to determine the best time to plant, fertilize, harvest and sell
crops. The Internet offers weather and stock market reports in real-time, and its global network of potential
buyers is more expansive than local merchants.

The importance of computer technology in the services industry is increasing. Computer technology includes
any machines that receive commands and perform calculations or services accordingly.
Major motion pictures and television programs use some form of visual, audio and animation effects in their
production. Video games employ graphics produced by a computer, and each game plugs into a computer-
based home entertainment system. Players can play by themselves or with others over the Internet. Some
game systems can sell downloadable programs and stream movies online.

The importance of computer technology in communication has greatly increased since the start of the 21st
century. People correspond with friends, family, acquaintances and business associates through social media,
email, texting and instant messaging.

A computer is a useful tool for advancing educationally in traditional and non-traditional ways. Colleges and
universities offer online courses for adults who are looking to obtain a degree without quitting their job.
Younger students rely on computers to research and access information, or to submit their work to their
teacher. Professional or volunteer tutors can be found online to gain help on a variety of topics.

The basic functions of modern vehicles are controlled through computer chips and circuitry. Engine
microprocessors calculate the proper mix of air and fuel for combustion, and a circuit board regulates the
timing of the spark plugs. Certain safety features or luxuries, such as airbags, cruise control, anti-lock brakes
and automatic transmission, all rely on computer technology to function.

3
1.2 Literature Survey

The literature survey for research was done by referring to the journal papers, conference papers, articles,
books, internet and databases. Based on the review of the advantages and disadvantages, this project discusses
the most suitable ways to build an ecommerce website for sports accessories.

This project is a new initiative for a better coordination between doctors and patients and thus giving a chance
to form a more efficient and fast responsive system.

1.3 Present state of art and its shortcoming (Subject)


Presently there are healthcare websites but there are very few of them that are active in small towns and cities.
The information is very difficult to retrieve and to find particular information like- E.g. - To find out about
the patient’s history, the user has to go through various registers. This results inconvenience and wastage of
time.

1.4 Introduction of problem or work to be taken up

Everyone in this world wants a good health. But sometimes there can be some mishappenings
too.Today
strokes, diabetes and other diseases are getting normal. That’s when hospitals and medicine comes into
the play.
In hospitals everyone wants there work to be done fast, but it is not so because of the old and slow
information storing and retrieving techniques. The information is very difficult to retrieve and to find
particular information like- E.g. - To find out about the patient’s history, the user has to go through various
registers.
This results inconvenience and wastage of time. Various changes to information like patient details or
immunization details of child are difficult to make as paper work is involved.

1.5 Broad outline of the work (chapter wise)


The next chapter is the Problem Formulation section of this document, it gives an overview of the various
problems in the existing system, significance of the work and introduction to proposed system-methods of
solutions. The third chapter System Analysis and Design, of this document gives an overview of the
requirement specification, analysing the system and provides description of various modules and the
4
language for system development. The fourth chapter consist of the hardware and software requirements and
system testing. The last chapter deals with the application and scope of the work it also includes the
advantages, limitations and future work of our proposed system.

CHAPTER 2

PROBLEM FORMULATION

2.1 Various aspects of the problem


There is a lack of immediate retrieval of information. The information is very difficult to retrieve
and

to find particular information like- E.g. - To find out about the patient’s history, the user has to go

through various registers. This results inconvenience and wastage of time. The information
generated

by various transactions takes time and efforts to be stored at right place. There is an urgent need of
a

fast, secure and efficient system to store, update, share and retrieve information of patients, doctors,

medicines and for smooth and less time consuming medical service.

2.2 Significance of the work


The website developed is one of its kinds. Patient Care Management System is designed for multi

speciality hospitals, to cover a wide range of hospital administration and management processes. It
is

an integrated end-to-end Patient Care Management System that provides relevant information across

the hospital to support effective decision making for patient care, hospital administration and
critical

financial accounting, in a seamless flow.

5
CHAPTER 3

SYSTEM ANALYSIS AND DESIGN


3.1 Requirement Specification

3.1.1 Performance Requirement

The system must be interactive and the delays involved must be less. In every action-response of the system,
there are no immediate delays.

• The overall system should be fast and error free.


• It should have built in error checking and correction facilities.
• The system should be able to handle large amount of data comfortably.
• The system shall function in real-time  Admin and Users do not have to wait for their request
to be completed.

3.1.2 Safety Requirement

The database may get crashed at any certain time due to virus or operating system failure. Therefore, it is
required to take the database backup so that the database is not lost. If there is extensive damage to a wide
portion of the database due to catastrophic failure, such as a disk crash, the recovery method restores a past
copy of the database that was backed up to archival storage (typically tape) and reconstructs a more current
state by reapplying or redoing the operations of committed transactions from the backed up log, up to the time
of failure.

3.1.3 Security Requirement

In order to use certain features of the system, users must first authenticate themselves by name and password.
The system shall not allow access if the user fails to provide correct login information. The system should
automatically perform log out if the user has been idle for a specific period (e.g. 30 minutes). Physical access
to the computer(s) storing the Student and teacher Database shall be restricted to authorized personnel.

• System will use secured database.

6
• Normal users can just read information but they cannot edit or modify anything except their
personal and some other information.
• System will have different types of users and every user has access constraints.
• Proper user authentication should be provided.
• No one should be able to hack user’s password.
• There should be separate accounts for admin and members such that no member can access the
database and only admin has the rights to update the database.

3.1.4 Availability Requirement

• The system should be available all the time. If a user has to access the system using any web
browser he/she can easily access it except in case of server down condition.
• In case of a hardware failure or database corruption, backups of the database should be available
to be retrieved with the MySQL server and saved by the administrator.

3.1.5 Portability Requirement

As the application is a Web-based application, therefore it must be independent of the Operating system. The
end-user part is fully portable and any user from any web browser can be able to access the application.

Feasibility Study

The prime focus of the feasibility is evaluating the practicality of the proposed system keeping in mind a
number of factors. The following factors are taken into account before deciding in favour of the new system.
It is of three types:

• Economic Feasibility
• Technical Feasibility
• Operational feasibility

Economic Feasibility

Economic feasibility is concerned with cost savings, increased profits & reduction in efforts. It shows how
much beneficial is the new developed system over the existing system. Now days, the price of the computer
has been very low, while the performance has made considerable progress. Report generation in the proposed
system in precise that is reports are generated as per user requirements, which reduces the use of papers and
manual labour.

Technical Feasibility

7
It deals with the existing technology, software and hardware requirements of the proposed system. The design
and development on the technology of this system and the condition of the hardware are satisfied, therefore, it
is technically feasible.

Operational Feasibility

Operational feasibility is the willingness and ability of the management, employees, users and others to use
and support a proposed system. A definition of the corporate and legal structure of the business; this may
include information about the founders, their professional background and the skills they possess necessary to
get the company off the ground and keep it operational.

3.2 Analysis and development of actual solution (system)

Once we are done with the gathering all the requirements, it is important to analyse them before developing
the new system. Analysis phase is important because the system developer has to fulfil the requirements of
the client, so they have to gather their requirements and developed a system that can meet the client needs.
After the analysis phase the next phase in the development of the system is the design phase.

The purpose of design phase is to plan a solution of the problem specified by the requirement analysis
documents. This phase is the first step in moving from the problem domain. In other words, starting with
what is needed, design takes us how to satisfy the needs. The design of a system is perhaps the most critical
factor affecting the quality of the software and has major effect on the testing and maintenance of the system,
the different steps in designing the system arc as follows:

• Database Design
• User Interface Design
• Process Design  Output Design

3.3 Description of various modules

Login module: Login module will help in authentication of patients and administrator accounts.

Patients who have valid login id and password can only login into their respective accounts.

Listing module: Suppose there are hundreds of doctors registered in our project so we can view
their

total active and new patients in the administrator panel. Thus it will help to view the active doctors

and the administrator also can edit and update there details.

Registration Module and Account Management: This module will help doctors and patients to
get

8
registered from anywhere if internet is present. This module will really simplify the task of on paper

registration. Also after successful registration the user can update information and change their

password and their basic details as and when required.

User Management: This module will help the administrator in updating the records of various

treatments and reports from their admin panel.

3.4 Choice of language

The project is designed and developed in Hypertext Mark-up Language (HTML) and Cascading Style Sheet
(CSS) as a front end language and Hypertext Pre-processor (PHP) and SQL as a back end language.

3.4.1 HTML

• Hypertext Markup Language (HTML) is the standard mark-up language for creating web pages
and web applications.
• Hypertext is the method by which we move around on the web- by clicking on special text
called hyperlinks which bring you to the next page.
• Markup is what HTML tags do to the text inside them. They mark it as a certain type of text
(italicized text, for example).
• The text is saved as an html file, and viewed through a browser, like Internet Explorer or
Netscape Navigator.
• HTML describes the structure of a web page semantically and originally included cues for the
appearance of the document.
• HTML elements are the building blocks of HTML pages. HTML elements are delineated by
tags, written using angle brackets.
• Web documents contain three main sections: the head, title, and body.
• Hyperlinks allow the user to move easily within web pages and between websites stored on
different servers.

3.4.2 CSS

CSS is a style sheet language used for describing the presentation of a document written in a mark-up
language.

• CSS has a simple syntax and uses a number of English keywords to specify the names of various
style properties.
• A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors,
and a declaration block.
9
• A declaration block consists of a list of declarations in braces. Each declaration itself consists of
a property, a colon, and a value.

• CSS information can be provided from various sources. These sources can be the web browser,
the user and the author.
• Inheritance is a key feature in CSS; it relies on the ancestor-descendant relationship to operate.
• Whitespace between properties and selectors is ignored.
• Without CSS, web designers must typically lay out their pages with techniques such as HTML
tables that hinder accessibility for vision-impaired users.

3.4.3 PHP

• PHP is a server scripting language and a powerful tool for making dynamic and interactive
pages.
• PHP is widely use, free and efficient alternative to competitors such as Microsoft’s ASP.
• In PHP there is no need to specify data types for variable declaration. Rather than it can be
determined at the time of execution depends on the value of the variable. So PHP is called a loosely
typed language.
• PHP provides cross platform compatibility, unlike some other server side scripting language.
• PHP has a set of predefined variables called super global which will start by $_.Some of them
are $_GET, $_POST.
• In PHP the name of the variable can be changed dynamically.
• This language contains access monitoring capability to create logs as the summary of recent
accesses.
• PHP supports extended regular expression that leads extensive pattern matching with remarkable
speed.

3.4.4 MYSQL

• MySQL is an open source relational database management system.


• MYSQL is a central component of XAMPP open source web application software stack.
XAMPP is an acronym for “Cross platform, Apache, MySQL, PHP, and Perl”.
• It is very easy to use: With only a few simple SQL statements you can build and interact with
MySQL.
• It’s secure: It includes solid data security layers and protects sensitive data. Passwords are
encrypted.
• It is inexpensive: MySQL is included for free with Netware @6.5 and available by free
download from MySQL Web site.
• It is very fast. In the interest of speed MySQL designers made a decision to offer fewer features.

10
3.5 Choice of system for implementation

For implementing this project in real time we need several types of hardware and system software
requirements. Choosing only correct options for system makes a user of the website holder using and
providing it to clients in a more convenient and better way. For this system specifications are consulted to
the web application holder which it was made on work upon. These are Windows 10 (64-bit) and i-5
processor

CHAPTER 4

SYSTEM IMPLEMENTATION AND TESTING

4.1 Hardware Requirement


The hardware requirements for developing this system are as follows:-

• Processor - Pentium IV or higher  Hard Disk – 1GB of available


hard disk space
• RAM – 2GB

4.2 Software Requirement


The software requirements for developing this system are as follows:-

 WAMPP server 
Internet browser

4.3 System Testing


Testing is the process of executing a program with the intent of finding an error. Testing begins at the module
level and works “outward” towards the integration of the entire computer-based system. This system is tested
for errors and whether the codes are correctly implemented or not. The user can surf throughout the website.
There is no issue in linking of any page. A user is made to login, sign up and register for various events and it
is made sure that the values are stored in the database.

4.3.1 Testing Process

Developer has to tests the software with a set of test data so as to find out the errors in it. These design errors
11
are very costly to repair when the system has been started to operate. Therefore, it is quite obvious to repair
them at early stage of the system. So, testing is the most important process of any project.

CHAPTER 5

APPLICATION, SCOPE AND CONCLUSION

5.1 Application areas


Since the system is highly user-friendly so a person with minimum knowledge of computer and organization
can work on it.

Patient Care Management System is powerful, flexible, and easy to use and is designed and developed to
deliver real conceivable benefits to hospitals.The system is extremely user-friendly with well-defined output
screens. The data is well protected for personal use and makes the data processing very fast.

5.2 Scope of the work


Patient Care Management System is designed for multi speciality hospitals, to cover a wide range of

hospital administration and management processes. It is an integrated end-to-end Patient Care

Management System that provides relevant information across the hospital to support effective

decision making for patient care, hospital administration and critical financial accounting, in a

seamless flow.

Patient Care Management System is a software product suite designed to improve the quality and
management
of Patient Care Management in the areas of clinical process analysis and activity based costing. Patient Care
Management System enables you to develop your organization and improve its effectiveness and quality of
work. Managing the key processes efficiently is critical to the success of the hospital helps you manage your
processes.The various benefits that can be realized from this project are:

12
• Easy maintenance of information.

• Saves time and effort.

5.3Limitations
• The main limitation or work point of this project is that the whole system generic
because it is totally based on Hospital’s Dealing Policies.

• For the working of this project the -Visual Run Time- must be installed to execute the
form and report as well the MS Access must be on bookend as the Database.

• No multilingual support.

5.4 Future extension


Future Scope for extension in this project include a smart phone application with different OS platforms like
android, IOS and Windows. As this system already consist of many features but still there can be some errors
which can overcome in future release. The project is easily extensible and can be improved by further
incremental releases of the same. New modules can be easily added as it requires only an addition of a new
package. Forum can be upgraded with new features. Some of the future enhancements that can be done to this
system are:

• Because it is based on object-oriented design, any further changes can be easily adaptable.
• Based on the future security issues, security can be improved using emerging technologies.

13
CHAPTER 10
UML Diagram/ER Diagram/DFD

Introduction to UML

UML Design
The Unified Modeling Language (UML) is a standard language for specifying,
visualizing, constructing, and documenting the software system and its components. It is a
graphical language , which provides a vocabulary and set of semantics and rules. The UML
focuses on the conceptual and physical representation of the system. It captures the
decisions and understandings about systems that must be constructed. It is used to
understand, design, configure, maintain, and control information about the systems. The
UML is a language for:

Visualizing

Specifying

Constructing

Documenting

Visualizing

Through UML we see or visualize an existing system and ultimately we visualize


how the system is going to be after implementation. Unless we think, we cannot
implement. UML helps to visualize, how the components of the system
communicate and interact with each other.

Specifying

14
Specifying means building, models that are precise, unambiguous and complete
UML addresses the specification of all the important analysis design,
implementation decisions that must be made in developing and deploying a
software system.

Constructing
UML models can be directly connected to a variety of programming language
through mapping a model from UML to a programming language like JAVA or C+
+ or VB.
Forward Engineering and Reverse Engineering is possible through UML.

Documenting
The Deliverables of a project apart from coding are some Artifacts, which are
critical in controlling, measuring and communicating about a system during its
developing requirements, architecture, desire, source code, project plans, tests,
prototypes releasers, etc...

UML Approach

UML Diagram

A diagram is the graphical presentation of a set of elements, most often rendered as a


connected graph of vertices and arcs . you draw diagram to visualize a system from
different perspective, so a diagram is a projection into a system. For all but most trivial
systems, a diagram represents an elided view of the elements that make up a system. The
same element may appear in all diagrams, only a few diagrams , or in no diagrams at all. In
theory, a diagram may contain any combination of things and relationships. In practice,
however, a small number of common combinations arise, which are consistent with the five
most useful views that comprise the architecture of a softwareintensive system. For this
reason, the UML includes nine such diagrams:

1. Class diagram

2. Object diagram

3. Use case diagram

15
4. Sequence diagram

5. Collaboration diagram

6. State chart diagram

7. Activity diagram

8. Component diagram

9. Deployment diagram

USE CASE DIAGRAM:

A usecase diagram in the Unified Modeling Language(UML) is atype of behavioral diagram


defined by and created from a use-case analysis.its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their
goals(represented as use cases),and any dependencies between those use cases.
Use case diagrams are formally included in two modeling languages defined by the

OMG:theunfied modeling language(UML) and the systems modeling language(sysML)

16
Use case diagram of our project:

17
18
Class Diagram:
A Class is a category or group of things that has similar attributes and common behaviour. A Rectangle is
the icon that represents the class it is divided into three areas. The upper most area contains the name, the
middle; area contains the attributes and the lowest areas show the operations. Class diagrams provides the
representation that developers work from. Class diagrams help on the analysis side, too.
Sequence diagram:
A Sequence Diagram is an interaction diagram that emphasis the time ordering of
messages; a collaboration diagram is an interaction diagram that emphasizes the structural
organization of the objects that send and receive messages. Sequence diagrams and
collaboration diagrams are isomorphic, meaning that you can take one and transform it into
the other.

ii
Collaboration diagram:
A Collaboration Diagram also called a communication diagram or interaction diagram, is
an illustration of the relationships and interactions among software objects. The concept is
more than a decade old although it has been refined as modeling paradigms have evolved.

iii
Deployment diagram:
A Deployment Diagram shows the configuration of run-time processing nodes and the
components that live on them. Deployment diagrams address the static deployment view of
architecture. They are related to component diagrams in that a node typically encloses one or
more components.

iv
State chart Diagrams:
The state diagram shows the states of an object and represents activities as arrows
connecting the states. The Activity Diagram highlights the activities. Each activity is
represented by a rounded rectangle-narrower and more oval-shaped than the state icon. An
arrow represents the transition from the one activity to the next. The activity diagram has a
starting point represented by filled-in circle, and an end point represented by bulls eye.

v
ER Diagram

vi
DFD

LEVEL 0 DFD

vii
LEVEL 1 DFD

viii
Appendix:

Code
Change password

<?php require_once"db/session.php";?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | SignUp Page</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
           
            <div id="page-wrapper">
                <div class="main-page login-page ">
                    <h3 class="title1">Change Password</h3>
                    <div class="widget-shadow">
                        <div class="login-body">
                            <form method="post" id="change_pass">
                                <input type="password"  class="lock"  id="opassword"
placeholder="Enter Old Password">
                                <input type="password" class="lock"  id="password"
placeholder="Enter New Password">
                                <input type="password" class="lock"  id="cpassword"
placeholder="Confirm Password">
                               
                                <p class="myerror" id="error"></p>
                               
                                <input type="submit"  id="login_check" value="Change
Password">
                               
                            </form>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                </div>
            </div>

ix
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
            $(window).load(function(){
                $("#change_pass").submit(function(){
                    var password = $("#password").val();
                    password = $.trim(password);
                    var cpassword = $("#cpassword").val();
                    cpassword = $.trim(cpassword);
                    var opassword = $("#opassword").val();
                    opassword = $.trim(opassword);
                    if(opassword.length==0)
                    {
                        $("#opassword").focus();
                        $("#opassword").css('border','2px solid #ec000069');
                        $("#error").text('Please Input Old Password');
                        alertify.error('Please Input Old Password');
                        return false;
                    }
                    $("#opassword").css('border','1px solid green');
                    if(opassword.length<5)
                    {
                        $("#opassword").focus();
                        $("#opassword").css('border','2px solid #ec000069');
                        $("#error").text('Old Password Must Be 6 Charachter');
                        alertify.error('Old Password Must Be 6 Charachter');
                        return false;
                    }
                    $("#opassword").css('border','1px solid green');
                    if(password.length<5)
                    {
                        $("#password").focus();
                        $("#password").css('border','2px solid #ec000069');
                        $("#error").text('Password Must Be 6 Charachter');
                        alertify.error('Password Must Be 6 Charachter');
                        return false;
                    }
                    $("#password").css('border','1px solid green');
                    if(password!=cpassword)
                    {
                        $("#cpassword").focus();
                        $("#password").css('border','2px solid #ec000069');
                        $("#cpassword").css('border','2px solid #ec000069');
                        $("#error").text('Password And Confirm Password Not Match');
                        alertify.error('Password And Confirm Password Not Match');
                        return false;
                    }
                    $("#cpassword").css('border','1px solid green');
                    $("#error").text('');

x
                   
                    $.ajax({
                        url : "ajax/user.php",
                        method:"post",
                        data:
{"opassword":opassword,"password":password,"cpassword":cpassword,"change_pass":1},
                        success:function(data){
                            if(data==1)
                            {
                                $(this).attr("disabled","disabled");
                                $("#opassword").css('border','1px solid #D3D3D3');
                                $("#opassword").val('');
                                $("#password").css('border','1px solid #D3D3D3');
                                $("#password").val('');
                                $("#cpassword").css('border','1px solid #D3D3D3');
                                $("#cpassword").val('');
                                alertify.alert("Password Changed", function(){
                                alertify.success('Password Changed');
                                });
                            }
                            else if(data==0)
                            { alertify.success("No Change"); }
                            else if(data==2)
                            {
                                $("input").each(function(){
                                    $(this).css('border','1px solid #D3D3D3');
                                });
                                $("#opassword").css('border','2px solid #ec000069');
                                $("#opassword").focus();
                                $("#error").text("Incorrect Old Password");
                                alertify.error("Incorrect Old Password");
                               
                            }
                        }
                    });
                   
                    return false;
                });
            });
        </script>
    </body>
</html>

xi
Edit prescriptions
<?php require_once"db/session.php"; require_once"db/db_config.php";
    if(!isset($_REQUEST['patientid']))
    {
        echo "<script>alert('Patient Not
Found');window.location='view_active_patients.php'</script>";
        exit();
    }
?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Edit Prescription</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page login-page" style="width:60%;">
                    <h3 class="title1">Edit Prescription</h3>
                    <div class="widget-shadow">
                        <div class="login-body">
                            <form method="post" id="update_presc">
                                <?php
                                    $query = "SELECT * from patients WHERE patientid='".
$_REQUEST['patientid']."'";
                                    extract(mysqli_fetch_array(select($query)));
                                ?>
                                <div class="md-form">
                                    <textarea type="text" id="textareaPrefix" class="form-
control symptoms md-textarea animated rotateInUpLeft" placeholder="Patient Symptoms"
rows="3"><?=$symptoms?></textarea>
                                </div>
                                <div class="md-form">
                                    <textarea type="text" id="textareaPrefix" class="form-
control medicine md-textarea animated rotateInUpLeft" placeholder="Medicine Prescribed."
rows="3"><?=$medicine?></textarea>
                                </div>
                                <p class="myerror" id="error"></p>
                                <div class="col-md-12">
                                    <?php
                                        extract(mysqli_fetch_array(select("select * from
patient_information where student_id='$userid'")));
                                        $query2 = "select * from patients where
userid='$userid' and patientid!='".$_REQUEST['patientid']."'";
                                        $old_patients_res = select($query2);
                                    ?>
xii
                                    <h4 class="text-center">Patient Details</h4>
                                    <div class="col-md-12">
                                        <table class="table table-hover  table-bordered">
                                            <tbody>
                                                <?php if(!empty($name)){ ?>
                                                    <tr>
                                                        <th scope="row">Name</th> <td><?
=$name?></td>
                                                    </tr>
                                                <?php } ?>
                                                <?php if(!empty($gender)){ ?>
                                                    <tr>
                                                        <th scope="row">Gender</th> <td><?
=$gender?></td>
                                                    </tr>
                                                <?php } ?>
                                                <?php if(!empty($date_of_birth)){ ?>
                                                    <tr>
                                                        <th scope="row">Date Of Birth</th>
<td><?=date('d-m-Y', strtotime($date_of_birth))?></td>
                                                    </tr>
                                                <?php } ?>
                                                <?php if(!empty($address)){ ?>
                                                    <tr>
                                                        <th scope="row">Address</th> <td><?
=$address?></td>
                                                    </tr>
                                                <?php } ?>
                                                <?php if(!empty($description)){ ?>
                                                    <tr>
                                                        <th scope="row">Description</th>
<td><?=$description?></td>
                                                    </tr>
                                                <?php } ?>
                                            </tbody>
                                        </table>
                                    </div>
                                    <h4 class="text-center">Old Records</h4>
                                    <table class="table table-hover table-responsive  table-
bordered">
                                        <tbody>
                                            <tr>
                                                <th scope="row" style="width:10%;">S.
No.</th>
                                                <th scope="row"
style="width:25%;">Symptoms</th>
                                                <th scope="row"
style="width:25%;">Medicine</th>
                                                <th scope="row" style="width:15%;">Date.</th>
                                                <th scope="row"
style="width:15%;">Amount</th>
                                            </tr>

xiii
                                            <?php
                                                $d_counts=1;
                                                while($rows2 =
mysqli_fetch_array($old_patients_res)) {
                                                    extract($rows2);
                                                ?>
                                                <tr>
                                                    <td style="word-break: break-all;"><?
=$d_counts;?> .</td>
                                                    <td style="word-break: break-all;"><?
=$medicine?></td>
                                                    <td style="word-break: break-all;"><?
=$symptoms?></td>
                                                    <td style="word-break: break-all;"><?
=date('d-m-Y', strtotime($date))?></td>
                                                    <td style="word-break: break-all;"><?php
if(!empty($amount)){ ?> Rs. <?=$amount?><?php } ?></td>
                                                </tr>
                                            <?php $d_counts++; } ?>
                                        </tbody>
                                    </table>
                                </div>
                                <input type="submit" class="animated pulse" value="Update
Prescription">
                            </form>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
            $(window).load(function(){
                $("#update_presc").submit(function(){
                    var symptoms = $.trim($(".symptoms").val());
                    var medicine = $.trim($(".medicine").val());
                    if(symptoms.length<3)
                    {
                        $(".symptoms").focus();
                        $(".symptoms").css('border','2px solid #ec000069');
                        $("#error").text('Invalid symptoms');
                        alertify.error('Invalid symptoms');
                        return false;
                    }

xiv
                    $(".symptoms").css('border','1px solid green');
                    if(medicine.length<3)
                    {
                        $(".medicine").focus();
                        $(".medicine").css('border','2px solid #ec000069');
                        $("#error").text('Invalid medicine');
                        alertify.error('Invalid medicine');
                        return false;
                    }
                    $(".medicine").css('border','1px solid green');
                    $("#error").text('');
                    $.ajax({
                        url : "ajax/user.php",
                        method:"post",
                        data:{"symptoms":symptoms,"medicine":medicine,"patientid":<?
=$_REQUEST['patientid']?>,"update_presc":1},
                        success:function(data){
                            if(data==1)
                            {
                                alertify.alert("Prescription Updated", function(){
                                    window.location="view_active_patients.php";
                                });
                            }
                            else if(data==0)
                            {
                                alertify.success("No Change");
                                $("input").each(function(){
                                    $(this).css('border','none');
                                });
                                $("textarea").each(function(){
                                    $(this).css('border','none');
                                });
                            }
                        }
                    });
                    return false;
                });
            });
        </script>
    </body>
</html>

Footer

<div class="footer">
           <p>&copy; &emsp;<?=date('Y');?> Patient Care Management.</p>
        </div>

xv
Footer scripts

    <!-- Classie -->


        <script src="js/classie.js"></script>
        <script>
            var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
                showLeftPush = document.getElementById( 'showLeftPush' ),
                body = document.body;
               
            showLeftPush.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( body, 'cbp-spmenu-push-toright' );
                classie.toggle( menuLeft, 'cbp-spmenu-open' );
                disableOther( 'showLeftPush' );
            };
           

            function disableOther( button ) {


                if( button !== 'showLeftPush' ) {
                    classie.toggle( showLeftPush, 'disabled' );
                }
            }
        </script>
    <!--scrolling js-->
    <script src="js/jquery.nicescroll.js"></script>
    <script src="js/scripts.js"></script>
    <!--//scrolling js-->
    <!-- Bootstrap Core JavaScript -->
   <script src="js/bootstrap.js"> </script>

xvi
Forget
<?php require_once"db/session2.php";?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Login Page</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <!--left-fixed -navigation-->
            <?php include_once"sidebar.php";?>
            <!--left-fixed -navigation-->
            <!-- header-starts -->
            <?php include_once"header.php";?>
            <!-- //header-ends -->
            <!-- main content start-->
            <div id="page-wrapper">
                <div class="main-page login-page ">
                    <h3 class="title1">Forget Password</h3>
                    <div class="widget-shadow">
                        <div class="login-top">
                            <h4>Forgetted Your Password ! <br> Remember Password ? <a
href="login.php">  Login Now »</a> </h4>
                        </div>
                        <div class="login-body">
                            <form method="post" id="login_form">
                                <input type="text" class="user" id="email" name="email"
placeholder="Enter your email">
                                <p class="myerror" id="error"></p>
                                <input type="submit"  id="login_check" value="Forget
Password">
                                <div class="forgot-grid">
                                    <div class="forgot">
                                        <a href="login.php">Login Now ?</a>
                                    </div>
                                    <div class="clearfix"> </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                </div>
            </div>
           
            <!--footer-->
            <?php include_once"footer.php";?>

xvii
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
            $(window).load(function(){
                $("#reg").hide();
                $("#login_form").submit(function(){
                    var email = $("#email").val();
                    email = $.trim(email);
                    var email_valid = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|
(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
                    if(email=="")
                    {
                        alertify.error('Please Provide a Email');
                        $("#email").focus();
                        $("#email").css('border','2px solid #ec000069');
                        $("#error").text('Please Provide a Email');
                        return false;
                    }
                    if(!email_valid.test(email))
                    {
                        alertify.error('Invalid Email');
                        $("#email").focus();
                        $("#email").css('border','2px solid #ec000069');
                        $("#error").text('Invalid Email');
                        return false;
                    }
                $("#email").css('border','1px solid green');
                $.ajax({
                url:'ajax/user.php',
                method:'post',
                data:{'email':email,'forget':1},
                success:function(data){
                if(data==1)
                {
                $("#error").text('');
                $("input").each(function(){
                $(this).val('');
                });
                alertify.alert("Password Reseted", function(){
                window.location="resetpassword.php";
                });
                }
                else
                {
                alertify.error("Email Not Exists");
                $("#email").css('border','2px solid #ec000069');
                $("#reg").fadeIn();
                $("#lg").fadeOut();
                $("#error").text('Email Not Registered');
                }
                }

xviii
                });
                return false;
                });
                });
                </script>
                </body>
                </html>            

Head files
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); }
</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- font CSS -->
<!-- font-awesome icons -->
<link href="css/font-awesome.css" rel="stylesheet">
<link href="alertifyjs/alertify.min.css" rel="stylesheet">
<!-- //font-awesome icons -->
 <!-- js-->
<script src="alertifyjs/alertify.min.js"></script>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/modernizr.custom.js"></script>
<!--webfonts-->
<link href='//fonts.googleapis.com/css?
family=Roboto+Condensed:400,300,300italic,400italic,700,700italic' rel='stylesheet'
type='text/css'>
<!--//webfonts-->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
<script src="js/wow.min.js"></script>
    <script>
         new WOW().init();
    </script>
<!--//end-animate-->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--Calender-->
<link rel="stylesheet" href="css/clndr.css" type="text/css" />
<script src="js/underscore-min.js" type="text/javascript"></script>
xix
<script src= "js/moment-2.2.1.js" type="text/javascript"></script>
<script src="js/clndr.js" type="text/javascript"></script>
<script src="js/site.js" type="text/javascript"></script>
<!--End Calender-->
<!-- Metis Menu -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<link href="css/custom.css" rel="stylesheet">
<!--//Metis Menu -->

Header

<div class="sticky-header header-section ">


            <div class="header-left">
                <!--toggle button start-->
                <button id="showLeftPush"><i class="fa fa-bars"></i></button>
                <!--toggle button end-->
                <!--logo -->
                <div class="logo">
                    <a href="index.php">
                        <h1>Patient Care</h1>
                        <span>Manage</span>
                    </a>
                </div>
                <!--//logo-->
               
                <div class="clearfix"> </div>
            </div>
            <div class="header-right">
           
                <?php if(isset($_SESSION['adminid'])) {?>
                <div class="profile_details">      
                    <ul>
                        <li class="dropdown profile_details_drop">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-
expanded="false">
                                <div class="profile_img">  
                                    <span class="prfil-img"><img
style="width:60px;height:60px;" src="images/<?php if(empty($_SESSION['userimage'])) echo
"users.png"; else echo $_SESSION['userimage']; ?>" alt=""> </span>
                                    <div class="user-name">
                                        <p><?=ucwords($_SESSION['adminname']);?></p>
                                    </div>
                                    <i class="fa fa-angle-down lnr"></i>
                                    <i class="fa fa-angle-up lnr"></i>
                                    <div class="clearfix"></div>    
xx
                                </div>  
                            </a>
                            <ul class="dropdown-menu drp-mnu">
                                <li> <a href="change_password.php"><i class="fa fa-cog"></i>
Settings</a> </li>
                                <li> <a href="logout.php"><i class="fa fa-sign-out"></i>
Logout</a> </li>
                            </ul>
                        </li>
                    </ul>
                </div>
               
               
                <?php } else { ?>
                <div class="profile_details">      
                    <ul>
                        <li class="dropdown profile_details_drop">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-
expanded="false">
                                <div class="profile_img">  
                                    <div class="user-name">
                                        <p>Login</p>
                                    </div>
                                    <i class="fa fa-angle-down lnr"></i>
                                    <i class="fa fa-angle-up lnr"></i>
                                    <div class="clearfix"></div>    
                                </div>  
                            </a>
                            <ul class="dropdown-menu drp-mnu">
                                <li> <a href="login.php"><i class="fa fa-user"></i>Login</a>
</li>
                                <li> <a href="forget.php"><i class="fa fa-key"></i>
Forget</a> </li>
                            </ul>
                        </li>
                    </ul>
                </div>
               
                <?php } ?>
                <div class="clearfix"> </div>              
            </div>
            <div class="clearfix"> </div>  
        </div>

Index

xxi
<?php
   
    require_once"db/session.php";
    require_once"db/db_config.php";
   
    extract(mysqli_fetch_array(select("SELECT COUNT(userid) as total_patients FROM user")));
    extract(mysqli_fetch_array(select("SELECT COUNT(doctorid) as total_doctors FROM
doctor")));
    $query = "SELECT COUNT(patientid) FROM patients group by userid";
    $res= select($query);
    $total_active_patients = 0;
    while($row= mysqli_fetch_array($res))
    {
        $total_active_patients++;
    }
    ?>
<!DOCTYPE HTML>
<html>
<head>
<title>Healthcare | Home</title>
<?php include_once"head_files.php";?>
</head>
<body class="cbp-spmenu-push">
    <div class="main-content">
        <!--left-fixed -navigation-->
        <?php include_once"sidebar.php";?>
        <!--left-fixed -navigation-->
        <!-- header-starts -->
        <?php include_once"header.php";?>
        <!-- //header-ends -->
        <!-- main content start-->
        <div id="page-wrapper">
            <div class="main-page">
                <div class="row-one">
                    <a href="view_all_doctors.php" >
                    <div class="col-md-4 widget">
                        <div class="stats-left ">
                            <h5>Today</h5>
                            <h4>Doctors</h4>
                        </div>
                        <div class="stats-right">
                            <label> <?=$total_doctors?></label>
                        </div>
                        <div class="clearfix"> </div>  
                    </div>
                    </a>
                    <a href="view_all_doctors.php" >
                    <div class="col-md-4 widget states-mdl">
                        <div class="stats-left">
                            <h5>Today</h5>
                            <h4>Patients</h4>
                        </div>

xxii
                        <div class="stats-right">
                            <label> <?=$total_patients?></label>
                        </div>
                        <div class="clearfix"> </div>  
                    </div>
                    </a>
                    <a href="view_active_patients.php" >
                    <div class="col-md-4 widget states-last">
                        <div class="stats-left">
                            <h5>Today</h5>
                            <h4>Active Patients</h4>
                        </div>
                        <div class="stats-right">
                            <label><?=$total_active_patients?></label>
                        </div>
                        <div class="clearfix"> </div>  
                    </div>
                    </a>
                    <div class="clearfix"> </div>  
                </div>
               
                <div class="row calender widget-shadow">
                    <h4 class="title">Calender</h4>
                    <div class="cal1">
                       
                    </div>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>
        <!--footer-->
        <?php include_once"footer.php";?>
        <!--//footer-->
    </div>
<?php include_once"footer_scripts.php";?>
</body>
</html>

xxiii
Login

<?php require_once"db/session2.php";?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Login Page</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <!--left-fixed -navigation-->
            <?php include_once"sidebar.php";?>
            <!--left-fixed -navigation-->
            <!-- header-starts -->
            <?php include_once"header.php";?>
            <!-- //header-ends -->
            <!-- main content start-->
            <div id="page-wrapper">
                <div class="main-page login-page ">
                    <h3 class="title1">Admin</h3>
                    <div class="widget-shadow">
                        <div class="login-top">
                            <h4>Welcome back to Healthcare AdminPanel ! <br>
                        </div>
                        <div class="login-body">
                            <form method="post" id="login_form">
                                <input type="text" class="user" id="email" name="email"
placeholder="Enter your email">
                                <input type="password"  id="password"  name="password"
class="lock" placeholder="Password">
                                <p class="myerror" id="error"></p>
                                <input type="submit"  id="login_check" value="Sign In">
                                <div class="forgot-grid">
                                    <label class="checkbox"><input type="checkbox"
name="checkbox" checked=""><i></i>Remember me</label>
                                    <div class="forgot">
                                        <a href="forget.php">Forgot password?</a>
                                    </div>
                                    <div class="clearfix"> </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
xxiv
        <?php include_once"footer_scripts.php";?>
        <script>
            $(window).load(function(){
                $("#login_form").submit(function(){
                    var email = $("#email").val();
                    email = $.trim(email);
                    var password = $("#password").val();
                    password = $.trim(password);
                    var email_valid = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|
(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
                    if(email=="")
                    {
                        alertify.error('Please Provide a Email');
                        $("#email").focus();
                        $("#email").css('border','2px solid #ec000069');
                        $("#error").text('Please Provide a Email');
                        return false;
                    }
                    if(!email_valid.test(email))
                    {
                        alertify.error('Invalid Email');
                        $("#email").focus();
                        $("#email").css('border','2px solid #ec000069');
                        $("#error").text('Invalid Email');
                        return false;
                    }
                    $("#email").css('border','1px solid green');
                    if(password.length<1)
                    {
                        alertify.error('Please Provide a Password');
                        $("#password").focus();
                        $("#password").css('border','2px solid #ec000069');
                        $("#error").text('Please Provide a Password');
                        return false;
                    }
                    else if(password.length<5)
                    {
                        alertify.error('Password Must Be 6 Charachter');
                        $("#password").focus();
                        $("#password").css('border','2px solid #ec000069');
                        $("#error").text('Password Must Be 6 Charachter');
                        return false;
                    }
                    $("#password").css('border','1px solid green');
                    $.ajax({
                        url:'ajax/user.php',
                        method:'post',
                        data:{'email':email,'password':password,'signin':1},
                        success:function(data){
                            if(data==1)
                            {
                                $(this).attr("disabled","disabled");

xxv
                                $("input").each(function(){
                                    $(this).val('');
                                });
                                alertify.success('Login Success');
                                window.location="index.php";
                            }
                            else if(data==2)
                            {
                                $("#email").css('border','2px solid #ec000069');
                                $("#email").focus();
                                $("#error").text("Email Not Registered");
                                $("#password").css('border','2px solid #A8A8A8');
                                alertify.error("Email Not Registered");
                            }
                            else if(data==3)
                            {
                                $("#password").css('border','2px solid #ec000069');
                                $("#password").focus();
                                $("#error").text("Credentials Wrong");
                                alertify.error("Credentials Wrong");
                            }
                        }
                    });
                    return false;
                });
            });
        </script>
    </body>
</html>

Logout

?php
    session_start();
    session_destroy();
    if(isset($_SESSION['adminid']))
    header("location:index.php");
    else
    header("location:login.php");
?>

xxvi
Old patient

<?php require_once"db/session.php"; require_once"db/db_config.php"; ?>


<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | New Patient</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page login-page" style="width:60%;">
                    <h3 class="title1">Active Patient</h3>
                    <div class="widget-shadow">
                        <div class="login-body">
                            <form method="post" id="new_patient">
                                <p>Patient Name</p>
                                <?php
                                    $query = "SELECT user.*,patients.* FROM patients INNER
JOIN user on patients.userid = user.userid group by patients.userid ";
                                ?>
                                <select class="form-control" name="userid" id="userid">
                                    <?php
                                        $res = select($query);
                                        $k = 1;
                                        while($rows = mysqli_fetch_array($res)){
extract($rows);
                                            if($k==1){ $fuserid = $userid;  }
                                        ?>
                                        <option value="<?=$userid?>"><?=$name?></option>
                                    <?php $k++; } ?>
                                </select>
                                <div id="res">
                                </div>
                                <p class="myerror" id="error"></p>
                                <input type="submit" class="animated pulse" value="Create
Prescription">
                            </form>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                </div>
            </div>
xxvii
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
            function get_user_details(userid1)
            {
                $.ajax({
                    url : "ajax/user.php",
                    method:"post",
                    data:{"userid":userid1,"oldpatient_detail":1},
                    success:function(res){
                        $("#res").html(res);
                    }
                });
            }
            $(window).load(function(){
                get_user_details(<?=$fuserid?>);
                $("#userid").focus();
                $("#userid").change(function(){
                    get_user_details($(this).val());
                });
                $("#new_patient").submit(function(){
                    var doctorid = $.trim($("#doctorid").val());
                    var userid = $.trim($("#userid").val());
                    var symptoms = $.trim($(".symptoms").val());
                    var medicine = $.trim($(".medicine").val());
                    var amount = $.trim($("#amount").val());
                    if(userid<1)
                    {
                        $("#userid").focus();
                        $("#userid").css('border','2px solid #ec000069');
                        $("#error").text('Please Select Patient');
                        alertify.error('Please Select Patient');
                        return false;
                    }
                    $("#userid").css('border','1px solid green');
                    if(symptoms.length<3)
                    {
                        $(".symptoms").focus();
                        $(".symptoms").css('border','2px solid #ec000069');
                        $("#error").text('Invalid symptoms');
                        alertify.error('Invalid symptoms');
                        return false;
                    }
                    $(".symptoms").css('border','1px solid green');
                    if(medicine.length<3)
                    {
                        $(".medicine").focus();
                        $(".medicine").css('border','2px solid #ec000069');
                        $("#error").text('Invalid medicine');

xxviii
                        alertify.error('Invalid medicine');
                        return false;
                    }
                    $(".medicine").css('border','1px solid green');
                    if(amount<100)
                    {
                        $("#amount").focus();
                        $("#amount").css('border','2px solid #ec000069');
                        $("#amount").text('Invalid amount');
                        alertify.error('Invalid amount');
                        return false;
                    }
                    $("#amount").css('border','1px solid green');
                    $("#error").text('');
                    $.ajax({
                        url : "ajax/user.php",
                        method:"post",
                        data:
{"userid":userid,"symptoms":symptoms,"medicine":medicine,"doctorid":doctorid,"amount":amount,
"new_patient":1},
                        success:function(data){
                            if(data==1)
                            {
                                $(this).attr("disabled","disabled");
                                $("#contact_no").css('border','none');
                                $("#dob").css('border','none');
                                $("textarea").each(function(){
                                    $(this).css('border','none');
                                    $(this).val('');
                                });
                                $("#amount").css('border','none');
                                $("#amount").val('');
                                alertify.alert("Patient Treatment Success", function(){
                                    window.location="view_active_patients.php";
                                });
                            }
                            else if(data==0)
                            {
                                alertify.success("Something Wrong");
                                location.reload();
                            }
                        }
                    });
                    return false;
                });
            });
        </script>
    </body>
</html>

xxix
Particular patients

<?php require_once"db/session.php"; ?>


<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Profile Picture</title>
        <?php include_once"head_files.php";?>
        <link href='css/rotating-card.css' rel='stylesheet' />
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page" style="min-height: 531px;">
                    <h3 class="title1">Patients List</h3>
                    <div class="inbox-page">
                        <?php
                            $query = "SELECT patients.*,user.*,patient_information.* FROM
patients INNER JOIN user on patients.userid = user.userid left join patient_information on
user.userid = patient_information.student_id where patients.doctorid='".
$_SESSION['doctorid']."' group by patients.userid ";
                            $res = select($query);
                            if(mysqli_num_rows($res)>0)
                            {
                                $i=1;
                                while($row = mysqli_fetch_array($res)){
                                    extract($row);
                                ?>
                                <div class="inbox-row widget-shadow" id="accordion<?=$i?>"
role="tablist" aria-multiselectable="true">
                                    <a role="button" data-toggle="collapse" data-
parent="#accordion" href="#collapse<?=$i?>" aria-expanded="true" aria-controls="collapse<?
=$i?>">
                                        <div class="mail mail-name"><h6>Patient Name : <?
=$name?></h6></div>
                                        <div class="mail mail-name"><h6>Patient Contact : <?
=$contact_no?></h6></div>
                                        <div class="mail-right">
                                        </div>
                                        <div class="mail-right"><p><?=$date?></p></div>
                                        <div class="clearfix"> </div>
                                    </a>
                                    <div id="collapse<?=$i?>" class="panel-collapse collapse"
role="tabpanel" aria-labelledby="heading<?=$i?>" aria-expanded="true" style="">
                                        <div class="mail-body">
                                            <div class="row">
xxx
                                                <div class="col-md-6">
                                                    <img src="../images/<?=$image?>">
                                                </div>
                                                <div class="col-md-6">
                                                    <table class="table table-hover  table-
bordered">
                                                        <tbody>
                                                            <?php if(!empty($name)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Name</th> <td><?=$name?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($gender)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Gender</th> <td><?=$gender?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($date_of_birth))
{ ?>
                                                                <tr>
                                                                    <th scope="row">Date Of
Birth</th> <td><?=date('d-m-Y', strtotime($date_of_birth))?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($address)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Address</th> <td><?=$address?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($description)){
?>
                                                                <tr>
                                                                    <th
scope="row">Description</th> <td><?=$description?></td>
                                                                </tr>
                                                            <?php } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="col-md-12">
                                                    <?php
                                                        $query2 = "select * from patients
where userid='$userid'";
                                                        $old_patients_res = select($query2);
                                                    ?>
                                                    <h4 class="text-center">Old Records</h4>
                                                    <table class="table table-hover table-
responsive  table-bordered">
                                                        <tbody>

xxxi
                                                            <tr>
                                                                <th scope="row"
style="width:10%;">S. No.</th>
                                                                <th scope="row"
style="width:22.5%;">Symptoms</th>
                                                                <th scope="row"
style="width:22.5%;">Medicine</th>
                                                                <th scope="row"
style="width:15%;">Date.</th>
                                                                <th scope="row"
style="width:15%;">Amount</th>
                                                                <th scope="row"
style="width:5%;">Edit</th>
                                                            </tr>
                                                            <?php
                                                                $d_counts=1;
                                                                while($rows2 =
mysqli_fetch_array($old_patients_res)) {
                                                                    extract($rows2);
                                                                ?>
                                                                <tr>
                                                                    <td style="word-break:
break-all;"><?=$d_counts;?> .</td>
                                                                    <td style="word-break:
break-all;"><?=$symptoms?></td>
                                                                    <td style="word-break:
break-all;"><?=$medicine?></td>
                                                                    <td style="word-break:
break-all;"><?=date('d-m-Y', strtotime($date))?></td>
                                                                    <td style="word-break:
break-all;"><?php if(!empty($amount)){ ?> Rs. <?=$amount?><?php } ?></td>
                                                                    <td style="word-break:
break-all;"><a href="edit_prescripton.php?patientid=<?=$patientid?>"><i class="fa fa-
edit"></i></a></td>
                                                                </tr>
                                                            <?php $d_counts++; } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="col-md-12">
                                                    <?php
                                                        $query3 = "select * from report where
userid='$userid'";
                                                        $old_patients_reposts =
select($query3);
                                                       
if(mysqli_num_rows($old_patients_reposts)>0){
                                                    ?>
                                                    <h4 class="text-center">Reports</h4>
                                                    <table class="table table-hover table-
responsive  table-bordered">
                                                        <tbody>

xxxii
                                                            <tr>
                                                                <th scope="row" >S. No.</th>
                                                                <th scope="row" >Image</th>
                                                                <th scope="row" >Date</th>
                                                                <th scope="row" >Delete</th>
                                                            </tr>
                                                            <?php
                                                                $d_counts=1;
                                                                while($rows3 =
mysqli_fetch_array($old_patients_reposts)) {
                                                                    extract($rows3);
                                                                ?>
                                                                <tr>
                                                                    <td style="word-break:
break-all;"><?=$d_counts?> .</td>
                                                                    <td style="word-break:
break-all;"><img src="../reports/<?=$path?>" style="width:100px"></td>
                                                                    <td style="word-break:
break-all;"><?=$report_date?></td>
                                                                    <td style="word-break:
break-all;"><a href="ajax/user.php?del_report=1&del_report_id=<?=$report_id?>">Delete</a></
td>
                                                                </tr>
                                                        <?php $d_counts++; } } else { ?>
                                                        <h4 class="text-center">No Reports
Available </h4>
                                                   
                                                        <?php } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                    $i++; }
                                }
                                else
                                {
                                    echo "No recode_file";
                                }
                            ?>
                        </div>
                    </div>
                </div>
                <!--footer-->
                <?php include_once"footer.php";?>
                <!--//footer-->
            </div>
            <?php include_once"footer_scripts.php";?>
        </body>

xxxiii
    </html>

Reset password

<?php require_once"db/session2.php";
   
if(!isset($_SESSION['reset_code_admin']))
{
    header("location:forget.php");
    exit();
}
?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | SignUp Page</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page signup-page">
                    <h3 class="title1">SignUp Here</h3>
                    <div class="sign-up-row widget-shadow">
                    <form method="post">
                        <div class="sign-u">
                            <div class="sign-up1">
                                <h4>Reset Code* :</h4>
                            </div>
                            <div class="sign-up2">
                                <input type="text"  value="<?=$_SESSION['reset_code_admin']?
>" readonly id="resetcode">
                            </div>
                            <div class="clearfix"> </div>
                        </div>
                        <div class="sign-u">
                            <div class="sign-up1">
                                <h4>Password* :</h4>
                            </div>
                            <div class="sign-up2">
                                <input type="password"  id="signup_password">
                            </div>
                            <div class="clearfix"> </div>
                        </div>
                        <div class="sign-u">
                            <div class="sign-up1">
                                <h4>Confirm Password* :</h4>

xxxiv
                            </div>
                            <div class="sign-up2">
                                <input type="password" id="signup_cpassword">
                            </div>
                            <div class="clearfix"> </div>
                        </div>
                        <p class="myerror" id="error"></p>
                        <div class="sub_home">
                            <input type="submit"   id="reset" value="Update Password">
                            <div class="clearfix"> </div>
                        </div>
                        </form>
                    </div>
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
            $(window).load(function(){
                $("#reset").click(function(){
                    var password = $("#signup_password").val();
                    password = $.trim(password);
                    var cpassword = $("#signup_cpassword").val();
                    cpassword = $.trim(cpassword);
                    var resetcode = $("#resetcode").val();
                    resetcode = $.trim(resetcode);
                    if(resetcode.length<32)
                    {
                        $("#resetcode").focus();
                        $("#resetcode").css('border','2px solid #ec000069');
                        $("#error").text('Invalid Reset Code');
                        alertify.error('Invalid Reset Code');
                        return false;
                    }
                    $("#resetcode").css('border','1px solid green');
                    if(password.length<5)
                    {
                        $("#signup_password").focus();
                        $("#signup_password").css('border','2px solid #ec000069');
                        $("#error").text('Password Must Be 6 Charachter');
                        alertify.error('Password Must Be 6 Charachter');
                        return false;
                    }
                    $("#signup_password").css('border','1px solid green');
                    if(password!=cpassword)
                    {
                        $("#signup_cpassword").focus();
                        $("#signup_password").css('border','2px solid #ec000069');
                        $("#signup_cpassword").css('border','2px solid #ec000069');

xxxv
                        $("#error").text('Password And Confirm Password Not Match');
                        alertify.error('Password And Confirm Password Not Match');
                        return false;
                    }
                    $("#signup_cpassword").css('border','1px solid green');
                    $("#error").text('');
                    $.ajax({
                        url : "ajax/user.php",
                        method:"post",
                        data:
{"password":password,"cpassword":cpassword,'resetcode':resetcode,"reset_adminid":<?
=$_SESSION['reset_adminid']?>,"reset":1},
                        success:function(data){
                            if(data==1)
                            {
                                $(this).attr("disabled","disabled");
                                $("input").each(function(){
                                    $(this).val('');
                                });
                                alertify.success('Password Reseted');
                                alertify.alert("Password Reseted Successfully", function(){
                                    window.location="login.php";
                                });
                            }
                            else
                            {
                                alertify.error('Invalid Reset Code');
                                $("#resetcode").focus();
                                $("#resetcode").css('border','2px solid #ec000069');
                                $("#error").text('Invalid Reset Code');
                            }
                        }
                    });
                    return false;
                });
            });
        </script>
    </body>
</html>

xxxvi
Side bar

<div class=" sidebar" role="navigation">


            <div class="navbar-collapse">
                <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-
s1">
                    <ul class="nav" id="side-menu">
                       
                        <?php if(isset($_SESSION['adminid'])) {?>
                        <li>
                            <a href="index.php"><i class="fa fa-home
nav_icon"></i>Dashboard</a>
                        </li>
                       
                        <li>
                            <a href="view_active_patients.php"><i class="fa fa-home
nav_icon"></i>All Active Patients</a>
                        </li>
                        <li>
                            <a href="upload_reports.php"><i class="fa fa-home
nav_icon"></i>Upload Reports</a>
                        </li>
                       
                        <li>
                            <a href="old_patient.php"><i class="fa fa-home nav_icon"></i>Add
Prescription</a>
                        </li>
                       
                        <li>
                            <a href="view_all_doctors.php"><i class="fa fa-home
nav_icon"></i>All Doctors</a>
                        </li>
                       
                        <li>
                            <a href="change_password.php"><i class="fa fa-key
nav_icon"></i>Change Password</a>
                        </li>
                       
                        <?php }else { ?>
                       
                        <li>
                            <a href="forget.php"><i class="fa fa-folder"> </i> Forget</a>
                        </li>
                        <?php } ?>
                                               
                    </ul>

xxxvii
                </nav>
            </div>
        </div>

Update doctor details

<?php require_once"db/session.php";
    require_once"db/db_config.php";
    extract(mysqli_fetch_array(select("select doctor.*, doctor_information.* from doctor
INNER JOIN doctor_information on doctor.doctorid=doctor_information.student_id WHERE
doctor.doctorid='".$_REQUEST['doctorid']."'")));
?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Change Password</title>
        <?php include_once"head_files.php";?>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page login-page ">
                    <h3 class="title1">Update Details</h3>
                    <div class="widget-shadow">
                        <div class="login-body">
                            <form method="post" id="update_details">
                                <input type="hidden"  value="<?=$_REQUEST['doctorid']?>"
id="doctorid" readonly>
                                <input type="text"  class="user animated rotateInUpLeft form-
control" value="<?=$name?>" id="doctor_name" placeholder="Doctor Name">
                                <input type="email"  class="animated rotateInUpLeft form-
control" value="<?=$email?>" id="doctor_email" placeholder="Doctor Email">
                                <div class="sign-u gender">
                                    <div class="sign-up1">
                                        <h4 class="animated bounceInLeft">Gender* :</h4>
                                    </div>
                                    <div class="sign-up2">
                                        <label>
                                            <input class="animated fadeInDown" id="gender"
type="radio" name="Gender" value="male" <?php if($gender=="male") echo "checked";?>>
                                            Male
                                        </label>
                                        <label>
                                            <input class="animated fadeInDown" id="gender"
type="radio" name="Gender" value="female" <?php if($gender=="female") echo "checked";?>>
                                            Female
                                        </label>

xxxviii
                                    </div>
                                    <div class="clearfix"> </div>
                                </div>
                                <input type="date"  class="animated rotateInUpLeft form-
control" value="<?=$date_of_birth?>" id="dob" placeholder="<?=date("Y-m-d");?>">
                                <input type="text" class="user animated rotateInUpLeft"
value="<?=$contact_no?>"  id="contact_no" placeholder="Enter Contact No.">
                                <div class="md-form">
                                    <textarea type="text" id="textareaPrefix" class="form-
control address md-textarea animated rotateInUpLeft" placeholder="Enter Your Address."
rows="3"><?=$address?></textarea>
                                </div>
                                <div class="md-form">
                                    <textarea type="text" id="textareaPrefix" class="form-
control desc md-textarea animated rotateInUpLeft" placeholder="Enter Your Description."
rows="3"><?=$description?></textarea>
                                </div>
                                <p class="myerror" id="error"></p>
                                <input type="submit" class="animated pulse" id="login_check"
value="Update Details">
                            </form>
                        </div>
                    </div>
                   
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
            $(window).load(function(){
                $("#update_details").submit(function(){
                    var doctorid = $("#doctorid").val();
                    var doctor_name = $("#doctor_name").val();
                    doctor_name = $.trim(doctor_name);
                    var doctor_email = $("#doctor_email").val();
                    doctor_email = $.trim(doctor_email);
                   
                    var gender = $("input[id='gender']").is(':checked');
                   
                    var mygender = $.trim($("input[id='gender']:checked").val());
                    var email_valid = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|
(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
                    var alphanum_valid = /^[-_ a-zA-Z0-9]+$/;
                   
                    var dob = $("#dob").val();
                    dob = $.trim(dob);
                    var contact_no = $("#contact_no").val();
                    contact_no = $.trim(contact_no);
                    var address = $(".address").val();

xxxix
                    address = $.trim(address);
                    var valid_mob = /^[6789]\d{9}$/;
                    var desc = $(".desc").val();
                    desc = $.trim(desc);
                   
                    if(doctor_name=="")
                    {
                        $("#doctor_name").focus();
                        $("#doctor_name").css('border','2px solid #ec000069');
                        $("#error").text('Please Provide a Name');
                        alertify.error('Please Provide a Name');
                        return false;
                    }
                    if(doctor_name.length<3)
                    {
                        $("#doctor_name").focus();
                        $("#doctor_name").css('border','2px solid #ec000069');
                        $("#error").text('Name Should be Minimum 3 Charachter');
                        alertify.error('Name Should be Minimum 3 Charachter');
                        return false;
                    }
                    if(!alphanum_valid.test(doctor_name))
                    {
                        $("#doctor_name").focus();
                        $("#doctor_name").css('border','2px solid #ec000069');
                        $("#error").text('Name can Only Contains Alpha Numeric Charachter');
                        alertify.error('Name can Only Contains Alpha Numeric Charachter');
                        return false;
                    }
                    $("#doctor_name").css('border','1px solid green');
                    if(doctor_email=="")
                    {
                        $("#doctor_email").focus();
                        $("#doctor_email").css('border','2px solid #ec000069');
                        $("#error").text('Please Provide a Doctor Email');
                        alertify.error('Please Provide a Doctor Email');
                        return false;
                    }
                    if(!email_valid.test(doctor_email))
                    {
                        $("#doctor_email").focus();
                        $("#doctor_email").css('border','2px solid #ec000069');
                        $("#error").text('Invalid Doctor Email');
                        alertify.error('Invalid Doctor Email');
                        return false;
                    }
                    $("#doctor_email").css('border','1px solid green');
                   
                    if(!gender)
                    {
                        $(".gender").focus();
                        $(".gender").css('border','2px solid #ec000069');

xl
                        $("#error").text('Please Select Gender');
                        alertify.error('Please Select Gender');
                        return false;
                    }
                    $(".gender").css('border','none');
                   
                   
                    if(dob=='0000-00-00')
                    {
                        $("#dob").focus();
                        $("#dob").css('border','2px solid #ec000069');
                        $("#error").text('Invalid Date of Birth');
                        alertify.error('Invalid Date of Birth');
                        return false;
                    }
                    $("#dob").css('border','1px solid green');
                    if(!valid_mob.test(contact_no))
                    {
                        $("#contact_no").focus();
                        $("#contact_no").css('border','2px solid #ec000069');
                        $("#error").text('Invalid Mobile No.');
                        alertify.error('Invalid Mobile No.');
                        return false;
                    }
                    $("#contact_no").css('border','1px solid green');
                    if(address.length>0)
                    {
                        if(address.length<3)
                        {
                            $(".address").focus();
                            $(".address").css('border','2px solid #ec000069');
                            $("#error").text('Invalid Address');
                            alertify.error('Invalid Address');
                            return false;
                        }
                    }
                    $(".address").css('border','1px solid green');
                    if(desc.length>0)
                    {
                        if(desc.length<4)
                        {
                            $(".desc").focus();
                            $(".desc").css('border','2px solid #ec000069');
                            $("#error").text('Invalid Description');
                            alertify.error('Invalid Description');
                            return false;
                        }
                    }
                    $(".desc").css('border','1px solid green');
                    $("#error").text('');
                    $.ajax({
                        url : "ajax/user.php",

xli
                        method:"post",
                        data:
{"doctor_name":doctor_name,"doctor_email":doctor_email,"gender":mygender,"doctorid":doctorid,
"dob":dob,"contact_no":contact_no,"address":address,"desc":desc,"update_doctor_details":1},
                        success:function(data){
                            if(data==1)
                            {
                                $(this).attr("disabled","disabled");
                                $("#contact_no").css('border','1px solid #ccc');
                                $("#dob").css('border','1px solid #ccc');
                                $("textarea").each(function(){
                                    $(this).css('border','1px solid #ccc');
                                });
                                alertify.alert("Doctor Details Updated", function(){
                                    window.location="view_all_doctors.php";
                                });
                            }
                            else if(data==0)
                            {
                                alertify.success("No Change");
                                $("input").each(function(){
                                    $(this).css('border','1px solid #ccc');
                                });
                                $("textarea").each(function(){
                                    $(this).css('border','1px solid #ccc');
                                });
                            }
                        }
                    });
                    return false;
                });
            });
        </script>
    </body>
</html>

xlii
Upload records
<?php require_once"db/session.php";
    require_once"db/db_config.php";
    ?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Profile Picture</title>
        <?php include_once"head_files.php";?>
       
        <style>
           
            .file-upload__input {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            font-size: 1;
            width:0;
            height: 100%;
            opacity: 0;
            }
           
            .btn-file {
            position: relative;
            overflow: hidden;
            }
            .btn-file input[type=file] {
            position: absolute;
            top: 0;
            right: 0;
            min-width: 100%;
            min-height: 100%;
            font-size: 100px;
            text-align: right;
            filter: alpha(opacity=0);
            opacity: 0;
            outline: none;
            background: white;
            cursor: inherit;
            display: block;
           
            }
           
            #imagePreview{
            width: 100%;
xliii
            }
            .input-group {
            position: relative;
            display: table;
            width: 100%;
            float: left;
            margin: 0;
            border-collapse: separate;
            }
            .check{
            width: 100%;
            background: #5dc7fb;
            margin: 9px auto;
            color: white;
            font-weight: bolder;}
        </style>
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
           
            <div id="page-wrapper">
                <div class="main-page login-page ">
                    <h3 class="title1 animated pulse">Upload Report</h3>
                    <div class="widget-shadow">
                        <div class="login-body">
                            <form method="post" action="ajax/upload.php" id="change_pic"
enctype="multipart/form-data">
                                <div class="form-group">
                                    <?php
                                    $query = "SELECT user.*,patients.* FROM patients INNER
JOIN user on patients.userid = user.userid  group by patients.userid";
                                    ?>
                                <select class="form-control" name="userid" id="userid">
                                    <?php
                                        $res = select($query);
                                        $k = 1;
                                        while($rows = mysqli_fetch_array($res)){
extract($rows);
                                            if($k==1){ $fuserid = $userid; }
                                        ?>
                                        <option value="<?=$userid?>"><?=$name?></option>
                                    <?php $k++; } ?>
                                </select>
                                <div id="res">
                                </div>
                               
                               
                                <label>Upload Image</label>
                                    <div class="input-group">

xliv
                                        <span class="btn btn-default btn-file check animated
bounceInLeft"  >
                                            Browse…  <input type="file"  class="upload__input
animated bounceInLeft" name="myimage" id="file" onchange="return fileValidation()"/>
                                        </span>
                                    </div>
                                    <div id="imagePreview" style="text-align:center;"></div>
                                </div>
                               
                                <p class="myerror" id="error"></p>
                               
                                <input type="submit" class="animated flipInY"
name="upload_report" id="img_upload" value="Upload Report">
                               
                            </form>
                        </div>
                    </div>
                    <br/><br/>
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
        <script>
       
        function get_user_details(userid1)
            {
                $.ajax({
                    url : "ajax/user.php",
                    method:"post",
                    data:{"userid":userid1,"patient_detail":1},
                    success:function(res){
                        $("#res").html(res);
                    }
                });
            }
           
           
            function fileValidation(){
                var fileInput = document.getElementById('file');
                var imagePreview = document.getElementById('imagePreview');
                var filePath = fileInput.value;
                var allowedExtensions = /(\.jpg|\.jpeg|\.png|\.gif)$/i;
                if(!allowedExtensions.exec(filePath)){
                    alert('Please upload file having extensions .jpeg/.jpg/.png/.gif only.');
                    fileInput.value = '';
                    imagePreview.innerHTML="";
                    return false;
                    }else{
                    //Image preview

xlv
                    if (fileInput.files && fileInput.files[0]) {
                        var reader = new FileReader();
                        reader.onload = function(e) {
                            document.getElementById('imagePreview').innerHTML = '<img
style="width:300px;" src="'+e.target.result+'"/>';
                        };
                        reader.readAsDataURL(fileInput.files[0]);
                    }
                }
            }
           
            $(window).load(function(){
            $("#userid").focus();
           
            get_user_details(<?=$fuserid?>);
            $("#userid").change(function(){
                get_user_details($(this).val());
                });
                $("#change_pic").submit(function(){
                    return true;
                });
            });
        </script>
    </body>
</html>

View active patients

<?php
    require_once"db/session.php";
    require_once"db/db_config.php";
?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Profile Picture</title>
        <?php include_once"head_files.php";?>
        <link href='css/rotating-card.css' rel='stylesheet' />
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page" style="min-height: 531px;">
                    <h3 class="title1">Patients List</h3>
                    <div class="inbox-page">
                        <?php

xlvi
                            $query = "SELECT patients.*,user.*,patient_information.* FROM
patients INNER JOIN user on patients.userid = user.userid left join patient_information on
user.userid = patient_information.student_id group by patients.userid ";
                            $res = select($query);
                            if(mysqli_num_rows($res)>0)
                            {
                                $i=1;
                                while($row = mysqli_fetch_array($res)){
                                    extract($row);
                                ?>
                                <div class="inbox-row widget-shadow" id="accordion<?=$i?>"
role="tablist" aria-multiselectable="true">
                                    <a role="button" data-toggle="collapse" data-
parent="#accordion" href="#collapse<?=$i?>" aria-expanded="true" aria-controls="collapse<?
=$i?>">
                                        <div class="mail mail-name"><h6>Patient Name : <?
=$name?></h6></div>
                                        <div class="mail mail-name"><h6>Patient Contact : <?
=$contact_no?></h6></div>
                                        <div class="mail-right">
                                        </div>
                                        <div class="mail-right"><p><?=$date?></p></div>
                                        <div class="clearfix"> </div>
                                    </a>
                                    <div id="collapse<?=$i?>" class="panel-collapse collapse"
role="tabpanel" aria-labelledby="heading<?=$i?>" aria-expanded="true" style="">
                                        <div class="mail-body">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <img src="../images/<?=$image?>">
                                                </div>
                                                <div class="col-md-6">
                                                    <table class="table table-hover  table-
bordered">
                                                        <tbody>
                                                            <?php if(!empty($name)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Name</th> <td><?=$name?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($gender)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Gender</th> <td><?=$gender?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($date_of_birth))
{ ?>
                                                                <tr>
                                                                    <th scope="row">Date Of
Birth</th> <td><?php echo date('d-m-Y', strtotime($date_of_birth));

xlvii
                                                                        $date = explode("-",
$date_of_birth);
                                                                        $dob = new
DateTime($date[0].'-'.$date[1].'-'.$date[2]);  //DateTime Object
                                                                        $interval = $dob-
>diff(new DateTime); //calculates the difference between two DateTime objects
                                                                        echo "  &nbsp;( Age
: $interval->y )</p>";
                                                                    ?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($address)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Address</th> <td><?=$address?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($description)){
?>
                                                                <tr>
                                                                    <th
scope="row">Description</th> <td><?=$description?></td>
                                                                </tr>
                                                            <?php } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="col-md-12 text-center"
style="margin-top:20px;">
                                                    <a href="update_patient_details.php?
patientid=<?=$userid?>" class="btn btn-primary">Edit Patient Details</a>
                                                </div>
                                                <div class="col-md-12" style="margin-
top:20px;">
                                                    <?php
                                                        $query2 = "select * from patients
where userid='$userid'";
                                                        $old_patients_res = select($query2);
                                                    ?>
                                                    <h4 class="text-center">Old Records</h4>
                                                    <table class="table table-hover table-
responsive  table-bordered">
                                                        <tbody>
                                                            <tr>
                                                                <th scope="row"
style="width:10%;">S. No.</th>
                                                                <th scope="row"
style="width:22.5%;">Symptoms</th>
                                                                <th scope="row"
style="width:22.5%;">Medicine</th>
                                                                <th scope="row"
style="width:15%;">Date.</th>

xlviii
                                                                <th scope="row"
style="width:15%;">Amount</th>
                                                                <th scope="row"
style="width:5%;">Edit</th>
                                                            </tr>
                                                            <?php
                                                                $d_counts=1;
                                                                while($rows2 =
mysqli_fetch_array($old_patients_res)) {
                                                                    extract($rows2);
                                                                ?>
                                                                <tr>
                                                                    <td style="word-break:
break-all;"><?=$d_counts;?> .</td>
                                                                    <td style="word-break:
break-all;"><?=$symptoms?></td>
                                                                    <td style="word-break:
break-all;"><?=$medicine?></td>
                                                                    <td style="word-break:
break-all;"><?=date('d-m-Y', strtotime($date))?></td>
                                                                    <td style="word-break:
break-all;"><?php if(!empty($amount)){ ?> Rs. <?=$amount?><?php } ?></td>
                                                                    <td style="word-break:
break-all;"><a href="edit_prescripton.php?patientid=<?=$patientid?>"><i class="fa fa-
edit"></i></a></td>
                                                                </tr>
                                                            <?php $d_counts++; } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="col-md-12">
                                                    <?php
                                                        $query3 = "select * from report where
userid='$userid'";
                                                        $old_patients_reposts =
select($query3);
                                                       
if(mysqli_num_rows($old_patients_reposts)>0){
                                                        ?>
                                                        <h4 class="text-center">Reports</h4>
                                                        <table class="table table-hover
table-responsive  table-bordered">
                                                            <tbody>
                                                                <tr>
                                                                    <th scope="row" >S.
No.</th>
                                                                    <th scope="row"
>Image</th>
                                                                    <th scope="row"
>Date</th>
                                                                    <th scope="row"
>Delete</th>

xlix
                                                                </tr>
                                                                <?php
                                                                    $d_counts=1;
                                                                    while($rows3 =
mysqli_fetch_array($old_patients_reposts)) {
                                                                        extract($rows3);
                                                                    ?>
                                                                    <tr>
                                                                        <td style="word-
break: break-all;"><?=$d_counts?> .</td>
                                                                        <td style="word-
break: break-all;"><img src="../reports/<?=$path?>" style="width:100px"></td>
                                                                        <td style="word-
break: break-all;"><?=$report_date?></td>
                                                                        <td style="word-
break: break-all;"><a class="btn btn-primary" href="ajax/user.php?
del_report=1&del_report_id=<?=$report_id?>">Delete</a></td>
                                                                    </tr>
                                                                <?php $d_counts++; } ?>
                                                            </tbody>
                                                        </table>
                                                        <?php } else { ?>
                                                        <h4 class="text-center">No Reports
Available </h4>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <?php
                                $i++; }
                            }
                            else
                            { ?>
                            <h4 class="text-center">No Records Found </h4>
                            <?php } ?>
                    </div>
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
    </body>
</html>

l
View all doctors

<?php
    require_once"db/session.php";
    require_once"db/db_config.php";
?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Doctors List</title>
        <?php include_once"head_files.php";?>
        <link href='css/rotating-card.css' rel='stylesheet' />
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page" style="min-height: 531px;">
                    <h3 class="title1">Doctors List</h3>
                    <div class="inbox-page">
                        <?php
                            $query = "SELECT doctor.*,doctor_information.* FROM doctor INNER
JOIN doctor_information on doctor.doctorid = doctor_information.student_id";
                            $res = select($query);
                            if(mysqli_num_rows($res)>0)
                            {
                                $i=1;
                                while($row = mysqli_fetch_array($res)){
                                    extract($row);
                                ?>
                                <div class="inbox-row widget-shadow" id="accordion<?=$i?>"
role="tablist" aria-multiselectable="true">
                                    <a role="button" data-toggle="collapse" data-
parent="#accordion" href="#collapse<?=$i?>" aria-expanded="true" aria-controls="collapse<?
=$i?>">
                                        <div class="mail mail-name"><h6>Name : <?=$name?
></h6></div>
                                        <div class="mail mail-name"><h6>Contact : <?
=$contact_no?> </h6></div>
                                        <div class="mail-right"><p>Email : <?=$email?
></p></div>
                                        <div class="clearfix"> </div>
                                    </a>
                                    <div id="collapse<?=$i?>" class="panel-collapse collapse"
role="tabpanel" aria-labelledby="heading<?=$i?>" aria-expanded="true" style="">

li
                                        <div class="mail-body">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <img src="../doctor/images/<?=$image?>">
                                                </div>
                                                <div class="col-md-6">
                                                    <table class="table table-hover  table-
bordered">
                                                        <tbody>
                                                            <?php if(!empty($name)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Name</th> <td><?=$name?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($gender)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Gender</th> <td><?=$gender?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($date_of_birth))
{ ?>
                                                                <tr>
                                                                    <th scope="row">Date Of
Birth</th> <td><?=date('d-m-Y', strtotime($date_of_birth))?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($address)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Address</th> <td><?=$address?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($description)){
?>
                                                                <tr>
                                                                    <th
scope="row">Description</th> <td><?=$description?></td>
                                                                </tr>
                                                            <?php } ?>
                                                        </tbody>
                                                    </table>
                                                    <a href="update_doctor_details.php?
doctorid=<?=$doctorid?>" class="btn btn-primary">Edit Doctor Details</a>
                                                </div>
                                            </div>
                                            <?php
                                                $query2 = "SELECT
patients.*,user.*,patient_information.* FROM patients INNER JOIN user on patients.userid =
user.userid left join patient_information on user.userid = patient_information.student_id
where patients.doctorid='$doctorid' group by patients.userid ";

lii
                                                $res2 = select($query2);
                                                if(mysqli_num_rows($res2)>0)
                                                {
                                                    $k=1;
                                                    while($row2 = mysqli_fetch_array($res2)){
                                                        extract($row2);
                                                    ?>
                                                    <button  class="myview_buttom" data-
toggle="collapse" data-target="#demo<?=$i?><?=$k?>"><h6 class="mybolder">Patient Name : <?
=$name?></h6> <?=$contact_no?></button>
                                                    <div id="demo<?=$i?><?=$k?>"
class="collapse">
                                                        <div class="row">
                                                            <div class="col-md-6">
                                                                <img src="../images/<?
=$image?>">
                                                            </div>
                                                            <div class="col-md-6">
                                                                <table class="table table-
hover  table-bordered">
                                                                    <tbody>
                                                                        <?php if(!
empty($name)){ ?>
                                                                            <tr>
                                                                                <th
scope="row">Name</th> <td><?=$name?></td>
                                                                            </tr>
                                                                        <?php } ?>
                                                                        <?php if(!
empty($gender)){ ?>
                                                                            <tr>
                                                                                <th
scope="row">Gender</th> <td><?=$gender?></td>
                                                                            </tr>
                                                                        <?php } ?>
                                                                        <?php if(!
empty($date_of_birth)){ ?>
                                                                            <tr>
                                                                                <th
scope="row">Date Of Birth</th> <td><?=date('d-m-Y', strtotime($date_of_birth))?></td>
                                                                            </tr>
                                                                        <?php } ?>
                                                                        <?php if(!
empty($address)){ ?>
                                                                            <tr>
                                                                                <th
scope="row">Address</th> <td><?=$address?></td>
                                                                            </tr>
                                                                        <?php } ?>
                                                                        <?php if(!
empty($description)){ ?>
                                                                            <tr>

liii
                                                                                <th
scope="row">Description</th> <td><?=$description?></td>
                                                                            </tr>
                                                                        <?php } ?>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                            <div class="col-md-12 text-
center" style="margin-top:20px;">
                                                            <a
href="update_patient_details.php?patientid=<?=$userid?>" class="btn btn-primary">Edit Patient
Details</a>
                                                            </div>
                                                            <div class="col-md-12"
style="margin-top:20px;">
                                                                <?php
                                                                    $query2 = "select * from
patients where userid='$userid'";
                                                                    $old_patients_res =
select($query2);
                                                                ?>
                                                                <h4 class="text-center">Old
Records</h4>
                                                                <table class="table table-
hover table-responsive  table-bordered">
                                                                    <tbody>
                                                                        <tr>
                                                                            <th scope="row"
style="width:10%;">S. No.</th>
                                                                            <th scope="row"
style="width:22.5%;">Symptoms</th>
                                                                            <th scope="row"
style="width:22.5%;">Medicine</th>
                                                                            <th scope="row"
style="width:15%;">Date.</th>
                                                                            <th scope="row"
style="width:15%;">Amount</th>
                                                                            <th scope="row"
style="width:5%;">Edit</th>
                                                                        </tr>
                                                                        <?php
                                                                            $d_counts=1;
                                                                            while($rows2 =
mysqli_fetch_array($old_patients_res)) {
                                                                               
extract($rows2);
                                                                            ?>
                                                                            <tr>
                                                                                <td
style="word-break: break-all;"><?=$d_counts;?> .</td>
                                                                                <td
style="word-break: break-all;"><?=$symptoms?></td>

liv
                                                                                <td
style="word-break: break-all;"><?=$medicine?></td>
                                                                                <td
style="word-break: break-all;"><?=date('d-m-Y', strtotime($date))?></td>
                                                                                <td
style="word-break: break-all;"><?php if(!empty($amount)){ ?> Rs. <?=$amount?><?php } ?></td>
                                                                                <td
style="word-break: break-all;"><a href="edit_prescripton.php?patientid=<?=$patientid?>"><i
class="fa fa-edit"></i></a></td>
                                                                            </tr>
                                                                        <?php $d_counts++; }
?>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                            <div class="col-md-12">
                                                                <?php
                                                                    $query3 = "select * from
report where userid='$userid'";
                                                                    $old_patients_reposts =
select($query3);
                                                                   
if(mysqli_num_rows($old_patients_reposts)>0){
                                                                    ?>
                                                                    <h4 class="text-
center">Reports</h4>
                                                                    <table class="table
table-hover table-responsive  table-bordered">
                                                                        <tbody>
                                                                            <tr>
                                                                                <th
scope="row" >S. No.</th>
                                                                                <th
scope="row" >Image</th>
                                                                                <th
scope="row" >Date</th>
                                                                                <th
scope="row" >Delete</th>
                                                                            </tr>
                                                                            <?php
                                                                                $d_counts=1;
                                                                                while($rows3
= mysqli_fetch_array($old_patients_reposts)) {
                                                                                   
extract($rows3);
                                                                                ?>
                                                                                <tr>
                                                                                    <td
style="word-break: break-all;"><?=$d_counts?> .</td>
                                                                                    <td
style="word-break: break-all;"><img src="../reports/<?=$path?>" style="width:100px"></td>

lv
                                                                                    <td
style="word-break: break-all;"><?=$report_date?></td>
                                                                                    <td
style="word-break: break-all;"><a href="ajax/user.php?del_report=1&del_report_id=<?
=$report_id?>">Delete</a></td>
                                                                                </tr>
                                                                            <?php $d_counts+
+; } ?>
                                                                        </tbody>
                                                                    </table>
                                                                <?php   }  else?>
                                                                <?php  { ?>
                                                                    <h4 class="text-
center">No Reports Available </h4>
                                                                <?php } ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php
                                                    $k++; }
                                                }
                                                else
                                                {
                                                    echo "No recode_file";
                                                }
                                            ?>
                                            <!-- -->
                                        </div>
                                    </div>
                                </div>
                                <?php
                                $i++; }
                            }
                            else
                            {
                                echo "<h4 class='text-center'>No Doctors Available </h4>";
                            }
                        ?>
                    </div>
                </div>
            </div>
            <!--footer-->
            <?php include_once"footer.php";?>
            <!--//footer-->
        </div>
        <?php include_once"footer_scripts.php";?>
    </body>
</html>

lvi
View patients

<?php
    require_once"db/session.php";
    require_once"db/db_config.php";
    ?>
<!DOCTYPE HTML>
<html>
    <head>
        <title>Healthcare | Profile Picture</title>
        <?php include_once"head_files.php";?>
        <link href='css/rotating-card.css' rel='stylesheet' />
    </head>
    <body class="cbp-spmenu-push">
        <div class="main-content">
            <?php include_once"sidebar.php";?>
            <?php include_once"header.php";?>
            <div id="page-wrapper">
                <div class="main-page" style="min-height: 531px;">
                    <h3 class="title1">Patients List</h3>
                    <div class="inbox-page">
                        <?php
                            $query = "SELECT user.*,patient_information.* FROM user INNER
JOIN patient_information on user.userid = patient_information.student_id";
                            $res = select($query);
                            if(mysqli_num_rows($res)>0)
                            {
                                $i=1;
                                while($row = mysqli_fetch_array($res)){
                                    extract($row);
                                ?>
                                <div class="inbox-row widget-shadow" id="accordion<?=$i?>"
role="tablist" aria-multiselectable="true">
                                    <a role="button" data-toggle="collapse" data-
parent="#accordion" href="#collapse<?=$i?>" aria-expanded="true" aria-controls="collapse<?
=$i?>">
                                        <div class="mail mail-name"><h6>Patient Name : <?
=$name?></h6></div>
                                        <div class="mail mail-name"><h6>Patient Contact : <?
=$contact_no?></h6></div>
                                        <div class="mail-right">
                                        </div>
                                        <div class="mail-right"><p><?=date('d-m-Y',
strtotime($registration_date))?></p></div>
                                        <div class="clearfix"> </div>
                                    </a>

lvii
                                    <div id="collapse<?=$i?>" class="panel-collapse collapse"
role="tabpanel" aria-labelledby="heading<?=$i?>" aria-expanded="true" style="">
                                        <div class="mail-body">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <img src="../images/<?=$image?>">
                                                </div>
                                                <div class="col-md-6">
                                                    <table class="table table-hover  table-
bordered">
                                                        <tbody>
                                                            <?php if(!empty($name)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Name</th> <td><?=$name?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($gender)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Gender</th> <td><?=$gender?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($date_of_birth))
{ ?>
                                                                <tr>
                                                                    <th scope="row">Date Of
Birth</th> <td><?=date('d-m-Y', strtotime($date_of_birth))?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($address)){ ?>
                                                                <tr>
                                                                    <th
scope="row">Address</th> <td><?=$address?></td>
                                                                </tr>
                                                            <?php } ?>
                                                            <?php if(!empty($description)){
?>
                                                                <tr>
                                                                    <th
scope="row">Description</th> <td><?=$description?></td>
                                                                </tr>
                                                            <?php } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="col-md-12 text-center"
style="margin-top:20px;">
                                                            <a
href="update_patient_details.php?patientid=<?=$userid?>" class="btn btn-primary">Edit Patient
Details</a>
                                                            </div>

lviii
                                                <div class="col-md-12" style="margin-
top:20px;">
                                                    <?php
                                                        $query2 = "select * from patients
where userid='$userid'";
                                                        $old_patients_res = select($query2);
                                                       
if(mysqli_num_rows($old_patients_res)>0) {
                                                    ?>
                                                    <h4 class="text-center">Old Records</h4>
                                                    <table class="table table-hover table-
responsive  table-bordered">
                                                        <tbody>
                                                            <tr>
                                                                <th scope="row"
style="width:10%;">S. No.</th>
                                                                <th scope="row"
style="width:22.5%;">Symptoms</th>
                                                                <th scope="row"
style="width:22.5%;">Medicine</th>
                                                                <th scope="row"
style="width:15%;">Date.</th>
                                                                <th scope="row"
style="width:15%;">Amount</th>
                                                                <th scope="row"
style="width:5%;">Edit</th>
                                                            </tr>
                                                            <?php
                                                                $d_counts=1;
                                                                while($rows2 =
mysqli_fetch_array($old_patients_res)) {
                                                                    extract($rows2);
                                                                   
                                                                ?>
                                                                <tr>
                                                                    <td style="word-break:
break-all;"><?=$d_counts;?> .</td>
                                                                    <td style="word-break:
break-all;"><?=$symptoms?></td>
                                                                    <td style="word-break:
break-all;"><?=$medicine?></td>
                                                                    <td style="word-break:
break-all;"><?=date('d-m-Y', strtotime($date))?></td>
                                                                    <td style="word-break:
break-all;"><?php if(!empty($amount)){ ?> Rs. <?=$amount?><?php } ?></td>
                                                                    <td style="word-break:
break-all;"><a href="edit_prescripton.php?patientid=<?=$patientid?>"><i class="fa fa-
edit"></i></a></td>
                                                                   
                                                                </tr>
                                                            <?php $d_counts++; } ?>
                                                        </tbody>

lix
                                                    </table>
                                                        <?php } else { ?>
                                                        <h4 class="text-center">No Old
Records Found</h4>
                                                        <?php } ?>
                                                       
                                                </div>
                                                <div class="col-md-12">
                                                    <?php
                                                        $query3 = "select * from report where
userid='$userid'";
                                                        $old_patients_reposts =
select($query3);
                                                       
if(mysqli_num_rows($old_patients_reposts)>0){
                                                    ?>
                                                    <h4 class="text-center">Reports</h4>
                                                    <table class="table table-hover table-
responsive  table-bordered">
                                                        <tbody>
                                                            <tr>
                                                                <th scope="row" >S. No.</th>
                                                                <th scope="row" >Image</th>
                                                                <th scope="row" >Date</th>
                                                                <th scope="row" >Delete</th>
                                                            </tr>
                                                            <?php
                                                                $d_counts=1;
                                                                while($rows3 =
mysqli_fetch_array($old_patients_reposts)) {
                                                                    extract($rows3);
                                                                ?>
                                                                <tr>
                                                                    <td style="word-break:
break-all;"><?=$d_counts?> .</td>
                                                                    <td style="word-break:
break-all;"><img src="../reports/<?=$path?>" style="width:100px"></td>
                                                                    <td style="word-break:
break-all;"><?=$report_date?></td>
                                                                    <td style="word-break:
break-all;"><a href="ajax/user.php?del_report=1&del_report_id=<?=$report_id?>">Delete</a></
td>
                                                                </tr>
                                                        <?php $d_counts++; } ?>
                                                        </tbody>
                                                    </table>
                                                        <?php } else { ?>
                                                        <h4 class="text-center">No Reports
Available </h4>
                                                   
                                                        <?php } ?>
                                                       

lx
                                                </div>
                                            </div>
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                    $i++; }
                                }
                                else
                                {
                                    echo "No recode_file";
                                }
                            ?>
                        </div>
                    </div>
                </div>
                <!--footer-->
                <?php include_once"footer.php";?>
                <!--//footer-->
            </div>
            <?php include_once"footer_scripts.php";?>
        </body>
    </html>

Screenshots

SignUp

lxi
SigniIn

Dashboard

lxii
New patient

Active patient

lxiii
lxiv
Profile

Update details
Change password

ii

You might also like