0% found this document useful (0 votes)
98 views46 pages

E-Health System: Appointment Cardinality

Uploaded by

APCAC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views46 pages

E-Health System: Appointment Cardinality

Uploaded by

APCAC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

INTRODUCTION

OBJECTIVE:

E-Health Care System is virtual healthcare that means online patient care. E-Health
system is highly specialized experts are deeply experienced in treating rare and complex
conditions. This system is web-base which is write in PHP and MYSQL. Continuously,
consists of one main component user side. Users can get an appointment from here. For
getting an appointment at first you need to log in at this site. If users are not registered
already, Register here, please. They can still get locations about other nearest hospitals from
here.

In E-Health system, users can see the home page where they can see the hospital
location. Eventually, that page can show the user with all the locations with the hospital
names. E-Health Different doctors with their professions. They can even see the contact list
of the admin.

1
SYSTEM ANALYSIS
1. EXISTING SYSTEM
Medical care is one of the most essential and in-demand services for all. It requires a
lot of attention and high-quality service that also causes health care workers to do a lot of
effort. These issues also add to the situations where there’s a need for a physical attendant for
every patient wherein it could be automated and handled with technology.

DISADVANTAGES:
Lack of immediate retrievals:
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
in in convenienceand wastage of time.
Lack of immediate information storage:
The information generated by various transactions takes time and efforts to be stored at right
place.
Lack of prompt updating:
Various changes to information like patient details or immunization details of child are
difficult to make as paper work is involved.
Error prone manual calculation:
Manual calculations are error prone and take a lot of time this may result in incorrect
information. For example calculation of patient’s bill based on various treatments.
Preparation of accurate and prompt reports:
This becomes a difficult task as information is difficult to collect from various register.
SOLUTION: To address the issues faced by hospitals, a system named Hospital
Management System is proposed. This system will handle information such as patients with
mild diagnoses and prescriptions. The idea of having automated patient management is a big
help for our health care workers and physicians to monitor and take good care of the patients.
SCOPE: The hospital management system could handle specific tasks such as securing
various information of the patients. This will help them secure the data to keep patient-doctor
confidentiality as well as assure them of their healing factors. It can also improve the
productivity of the health care workers and could let them accommodate more patients.

2
SYSTEM SPECIFICATIONS
Hardware Requirements:
 Dual Core(Processor).
 256 MB Ram
 512 KB Cache Memory
 Hard disk 10 GB
 Microsoft Compatible 101 or more Key Board
Software Requirements:
Technology Implemented : Apache Server
Language Used : PHP 5.62 (Developed in Core PHP)
Database : My SQL
User Interface Design : HTML, AJAX,JQUERY,JAVASCRIPT
Web Browser : Mozilla, Google Chrome, IE8,OPERA
Software : XAMPP Server

3
DESIGN

INTRODUCTION:
Design is the first step in the development phase for any techniques and principles for the
purpose of defining a device, a process or system in sufficient detail to permit its physical
realization.
Once the software requirements have been analyzed and specified the software design
involves three technical activities - design, coding, implementation and testing that are
required to build and verify the software.
The design activities are of main importance in this phase, because in this activity,
decisions ultimately affecting the success of the software implementation and its ease of
maintenance are made. These decisions have the final bearing upon reliability and
maintainability of the system. Design is the only way to accurately translate the customer’s
requirements into finished software or a system.
Design is the place where quality is fostered in development. Software design is a
process through which requirements are translated into a representation of software. Software
design is conducted in two steps. Preliminary design is concerned with the transformation of
requirements into data.
3.1 UML Diagrams:
Actor:
A coherent set of roles that users of use cases play when interacting with the use
`cases.

Use case:
A description of sequence of actions, including variants, that a system performs that yields an
observable result of value of an actor.

4
UML stands for Unified Modeling Language. UML is a language for specifying, visualizing
and documenting the system. This is the step while developing any product after analysis.
The goal from this is to produce a model of the entities involved in the project which later
need to be built. The representation of the entities that are to be used in the product being
developed need to be designed.
There are various kinds of methods in software design:
They are as follows:
 Use case Diagram
 Sequence Diagram
 Collaboration Diagram
 Activity Diagram
 State chat Diagram

USECASE DIAGRAMS:
Use case diagrams model behavior within a system and helps the developers
understand of what the user require. The stick man represents what’s called an actor.
Use case diagram can be useful for getting an overall view of the system and clarifying who
can do and more importantly what they can’t do.
Use case diagram consists of use cases and actors and shows the interaction between the use
case and actors.

 The purpose is to show the interactions between the use case and actor.
 To represent the system requirements from user’s perspective.
 An actor could be the end-user of the system or an external system.

USECASE DIAGRAM:

A Use case is a description of set of sequence of actions. Graphically it is rendered as


an ellipse with solid line including only its name. Use case diagram is a behavioral diagram
that shows a set of use cases and actors and their relationship. It is an association between
the use cases and actors. An actor represents a real-world object. Primary Actor – Sender,
Secondary Actor Receiver.

5
Use Case Diagram for User and admin

SEQUENCE DIAGRAM:

Sequence diagram and collaboration diagram are called INTERACTION


DIAGRAMS. An interaction diagram shows an interaction, consisting of set of objects and
their relationship including the messages that may be dispatched among them.
A sequence diagram is an introduction that empathizes the time ordering of messages.
Graphically a sequence diagram is a table that shows objects arranged along the X-axis and
messages ordered in increasing time along the Y-axis

6
COLLABORATION DIAGRAM:

A collaboration diagram is an introduction diagram that emphasizes the structural


organization of the objects that send and receive messages. Graphically a collaboration
diagram is a collection of vertices and arcs.

7
CLASS DIAGRAM:

Class is nothing but a structure that contains both variables and methods. The Class Diagram
shows a set of classes, interfaces, and collaborations and their relating ships. There is most
common diagram in modeling the object oriented systems and are used to give the static view
of a system. It shows the dependency between the classes that can be used in our system.
The interactions between the modules or classes of our projects are shown below. Each
block contains Class Name, Variables and Methods.
CLASS:
A description of set of objects that share the same attributes, operations, relationships, and
semantics

DATA FLOW DIAGRAMS:

The DFD takes an input-process-output view of a system i.e. data objects flow into
the software, are transformed by processing elements, and resultant data objects flow out of
the software.

8
Data objects represented by labeled arrows and transformation are represented by
circles also called as bubbles. DFD is presented in a hierarchical fashion i.e. the first data
flow model represents the system as a whole. Subsequent DFD refine the context diagram
(level 0 DFD), providing increasing details with each subsequent level.

The DFD enables the software engineer to develop models of the information domain
& functional domain at the same time. As the DFD is refined into greater levels of details, the
analyst perform an implicit functional decomposition of the system. At the same time, the
DFD refinement results in a corresponding refinement of the data as it moves through the
process that embody the applications.

A context-level DFD for the system the primary external entities produce information
for use by the system and consume information generated by the system. The labeled arrow
represents data objects or object hierarchy.

RULES FOR DFD:

 Fix the scope of the system by means of context diagrams.

 Organize the DFD so that the main sequence of the actions

 Reads left to right and top to bottom.

 Identify all inputs and outputs.

 Identify and label each process internal to the system with Rounded circles.

 A process is required for all the data transformation and Transfers. Therefore,
never connect a data store to a data Source or the destinations or another data store
with just a Data flow arrow.

 Do not indicate hardware and ignore control information.

 Make sure the names of the processes accurately convey everything the process is
done.

 There must not be unnamed process.

 Indicate external sources and destinations of the data, with Squares.

 Number each occurrence of repeated external entities.

9
 Identify all data flows for each process step, except simple Record retrievals.

 Label data flow on each arrow.

 Use details flow on each arrow.

 Use the details flow arrow to indicate data movements.

3.8 DATAFLOW DIAGRAMS:

10
11
E-R Diagrams:

The Entity-Relationship (ER) model was originally proposed by Peter in 1976 [Chen76] as a
way to unify the network and relational database views. Simply stated the ER model is a
conceptual data model that views the real world as entities and relationships. A basic
component of the model is the Entity-Relationship diagram which is used to visually
represents data objects. Since Chen wrote his paper the model has been extended and today it
is commonly used for database design For the database designer, the utility of the ER model
is:

 it maps well to the relational model. The constructs used in the ER model can easily
be transformed into relational tables.
 it is simple and easy to understand with a minimum of training. Therefore, the model
can be used by the database designer to communicate the design to the end user.
 In addition, the model can be used as a design plan by the database developer to
implement a data model in a specific database management software.

Connectivity and Cardinality

The basic types of connectivity for relations are: one-to-one, one-to-many, and many-to-
many. A one-to-one (1:1) relationship is when at most one instance of a entity A is associated
with one instance of entity B. For example, "employees in the company are each assigned
their own office. For each employee there exists a unique office and for each office there
exists a unique employee.

A one-to-many (1:N) relationships is when for one instance of entity A, there are zero, one, or
many instances of entity B, but for one instance of entity B, there is only one instance of
entity A. An example of a 1:N relationships is a department has many employees each
employee is assigned to one department A many-to-many (M:N) relationship, sometimes
called non-specific, is when for one instance of entity A, there are zero, one, or many
instances of entity B and for one instance of entity B there are zero, one, or many instances of
entity A. The connectivity of a relationship describes the mapping of associated

ER Notation

There is no standard for representing data objects in ER diagrams. Each modeling


methodology uses its own notation. The original notation used by Chen is widely used in
academics texts and journals but rarely seen in either CASE tools or publications by non-

12
academics. Today, there are a number of notations used, among the more common are
Bachman, crow's foot, and IDEFIX.

All notational styles represent entities as rectangular boxes and relationships as lines
connecting boxes. Each style uses a special set of symbols to represent the cardinality of a
connection. The notation used in this document is from Martin. The symbols used for the
basic ER constructs are:

 entities are represented by labeled rectangles. The label is the name of the entity.

Entity names should be singular nouns.

 relationships are represented by a solid line connecting two entities. The name of the

relationship is written above the line. Relationship names should be verbs.

 attributes, when included, are listed inside the entity rectangle. Attributes which are

identifiers are underlined. Attribute names should be singular nouns.

 cardinality of many is represented by a line ending in a crow's foot. If the crow's foot

is omitted, the cardinality is one.

 existence is represented by placing a circle or a perpendicular bar on the line.

Mandatory existence is shown by the bar (looks like a 1) next to the entity for an

instance is required. Optional existence is shown by placing a circle next to the entity

that is optional

13
ER DIAGRAM

14
SYSTEM IMPLEMENTATION
Sample Coding
[Link]
<?php
require "config/[Link]";
session_start();
if(isset($_SESSION["uid"])){
header("location:[Link]");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Khan Store</title>
<link rel="stylesheet" href="css/[Link]"/>
<script src="js/[Link]"></script>
<script src="js/[Link]"></script>
<script src="[Link]"></script>
<link rel="stylesheet" type="text/css" href="[Link]">
<style></style>
</head>
<body>
<div class="wait overlay">
<div class="loader"></div>
</div>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#collapse" aria-expanded="false">
<span class="sr-only">navigation</span>

15
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand">Khan Store</a>
</div>
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li><a href="[Link]"><span class="glyphicon glyphicon-
home"></span>Home</a></li>
<li><a href="[Link]"><span class="glyphicon glyphicon-
modal-window"></span>Product</a></li>
</ul>
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search"
id="search">
</div>
<button type="submit" class="btn btn-primary" id="search_btn"><span
class="glyphicon glyphicon-search"></span></button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle" data-
toggle="dropdown"><span class="glyphicon glyphicon-shopping-cart"></span>Cart<span
class="badge">0</span></a>
<div class="dropdown-menu" style="width:400px;">
<div class="panel panel-success">
<div class="panel-heading">
<div class="row">
<div class="col-md-
3">[Link]</div>
<div class="col-md-
3">Product Image</div>

16
<div class="col-md-
3">Product Name</div>
<div class="col-md-
3">Price in <?php echo CURRENCY; ?></div>
</div>
</div>
<div class="panel-body">
<div id="cart_product">
<!--<div class="row">
<div class="col-md-
3">[Link]</div>
<div class="col-md-
3">Product Image</div>
<div class="col-md-
3">Product Name</div>
<div class="col-md-
3">Price in $.</div>
</div>-->
</div>
</div>
<div class="panel-footer"></div>
</div>
</div>
</li>
<li><a href="#" class="dropdown-toggle" data-
toggle="dropdown"><span class="glyphicon glyphicon-user"></span>SignIn</a>
<ul class="dropdown-menu">
<div style="width:300px;">
<div class="panel panel-primary">
<div class="panel-
heading">Login</div>
<div class="panel-heading">
<form onsubmit="return
false" id="login">
17
<label
for="email">Email</label>
<input
type="email" class="form-control" name="email" id="email" required/>
<label
for="email">Password</label>
<input
type="password" class="form-control" name="password" id="password" required/>
<p><br/></p>
<a href="#"
style="color:white; list-style:none;">Forgotten Password</a><input type="submit"
class="btn btn-success" style="float:right;">
</form>
</div>
<div class="panel-footer"
id="e_msg"></div>
</div>
</div>
</ul>
</li>
</ul>
</div>
</div>
</div>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<div class="container-fluid">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-2 col-xs-12">
<div id="get_category">
</div>
<!--<div class="nav nav-pills nav-stacked">
18
<li class="active"><a
href="#"><h4>Categories</h4></a></li>
<li><a href="#">Categories</a></li>
<li><a href="#">Categories</a></li>
<li><a href="#">Categories</a></li>
<li><a href="#">Categories</a></li>
</div> -->
<div id="get_brand">
</div>
<!--<div class="nav nav-pills nav-stacked">
<li class="active"><a
href="#"><h4>Brand</h4></a></li>
<li><a href="#">Categories</a></li>
<li><a href="#">Categories</a></li>
<li><a href="#">Categories</a></li>
<li><a href="#">Categories</a></li>
</div> -->
</div>
<div class="col-md-8 col-xs-12">
<div class="row">
<div class="col-md-12 col-xs-12" id="product_msg">
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">Products</div>
<div class="panel-body">
<div id="get_product">
<!--Here we get product jquery Ajax
Request-->
</div>
<!--<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-
heading">Samsung Galaxy</div>
19
<div class="panel-body">
<img
src="product_images/[Link]"/>
</div>
<div class="panel-
heading">$.500.00
<button
style="float:right;" class="btn btn-danger btn-xs">AddToCart</button>
</div>
</div>
</div> -->
</div>
<div class="panel-footer">&copy; 2016</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
</body>
</html>

[Link]
<?php
session_start();
$ip_add = getenv("REMOTE_ADDR");
include "[Link]";
if(isset($_POST["category"])){
$category_query = "SELECT * FROM categories";
$run_query = mysqli_query($con,$category_query) or die(mysqli_error($con));
echo "
<div class='nav nav-pills nav-stacked'>
<li class='active'><a href='#'><h4>Categories</h4></a></li>
";
if(mysqli_num_rows($run_query) > 0){
20
while($row = mysqli_fetch_array($run_query)){
$cid = $row["cat_id"];
$cat_name = $row["cat_title"];
echo "
<li><a href='#' class='category'
cid='$cid'>$cat_name</a></li>
";
}
echo "</div>";
}
}
if(isset($_POST["brand"])){
$brand_query = "SELECT * FROM brands";
$run_query = mysqli_query($con,$brand_query);
echo "
<div class='nav nav-pills nav-stacked'>
<li class='active'><a href='#'><h4>Brands</h4></a></li>
";
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$bid = $row["brand_id"];
$brand_name = $row["brand_title"];
echo "
<li><a href='#' class='selectBrand'
bid='$bid'>$brand_name</a></li>
";
}
echo "</div>";
}
}
if(isset($_POST["page"])){
$sql = "SELECT * FROM products";
$run_query = mysqli_query($con,$sql);
$count = mysqli_num_rows($run_query);
21
$pageno = ceil($count/9);
for($i=1;$i<=$pageno;$i++){
echo "
<li><a href='#' page='$i' id='page'>$i</a></li>
";
}
}
if(isset($_POST["getProduct"])){
$limit = 9;
if(isset($_POST["setPage"])){
$pageno = $_POST["pageNumber"];
$start = ($pageno * $limit) - $limit;
}else{
$start = 0;
}
$product_query = "SELECT * FROM products LIMIT $start,$limit";
$run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
echo "
<div class='col-md-4'>
<div class='panel panel-info'>
<div class='panel-
heading'>$pro_title</div>
<div class='panel-body'>
<img
src='product_images/$pro_image' style='width:160px; height:250px;'/>
</div>
22
<div class='panel-
heading'>".CURRENCY." $pro_price.00
<button pid='$pro_id'
style='float:right;' id='product' class='btn btn-danger btn-xs'>AddToCart</button>
</div>
</div>
</div>
";
}
}
}
if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) ||
isset($_POST["search"])){
if(isset($_POST["get_seleted_Category"])){
$id = $_POST["cat_id"];
$sql = "SELECT * FROM products WHERE product_cat = '$id'";
}else if(isset($_POST["selectBrand"])){
$id = $_POST["brand_id"];
$sql = "SELECT * FROM products WHERE product_brand = '$id'";
}else {
$keyword = $_POST["keyword"];
$sql = "SELECT * FROM products WHERE product_keywords LIKE '%
$keyword%'";
}

$run_query = mysqli_query($con,$sql);
while($row=mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
echo "
23
<div class='col-md-4'>
<div class='panel panel-info'>
<div class='panel-
heading'>$pro_title</div>
<div class='panel-body'>
<img
src='product_images/$pro_image' style='width:160px; height:250px;'/>
</div>
<div class='panel-heading'>$.
$pro_price.00
<button pid='$pro_id'
style='float:right;' id='product' class='btn btn-danger btn-xs'>AddToCart</button>
</div>
</div>
</div>
";
}
}

if(isset($_POST["addToCart"])){

$p_id = $_POST["proId"];

if(isset($_SESSION["uid"])){

$user_id = $_SESSION["uid"];

$sql = "SELECT * FROM cart WHERE p_id = '$p_id' AND user_id =


'$user_id'";
$run_query = mysqli_query($con,$sql);
24
$count = mysqli_num_rows($run_query);
if($count > 0){
echo "
<div class='alert alert-warning'>
<a href='#' class='close' data-dismiss='alert' aria-
label='close'>&times;</a>
<b>Product is already added into the cart
Continue Shopping..!</b>
</div>
";//not in video
} else {
$sql = "INSERT INTO `cart`
(`p_id`, `ip_add`, `user_id`, `qty`)
VALUES ('$p_id','$ip_add','$user_id','1')";
if(mysqli_query($con,$sql)){
echo "
<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-
label='close'>&times;</a>
<b>Product is Added..!</b>
</div>
";
}
}
}else{
$sql = "SELECT id FROM cart WHERE ip_add = '$ip_add' AND p_id
= '$p_id' AND user_id = -1";
$query = mysqli_query($con,$sql);
if (mysqli_num_rows($query) > 0) {
echo "
<div class='alert alert-warning'>
<a href='#' class='close' data-
dismiss='alert' aria-label='close'>&times;</a>

25
<b>Product is already added into the cart
Continue Shopping..!</b>
</div>";
exit();
}
$sql = "INSERT INTO `cart`
(`p_id`, `ip_add`, `user_id`, `qty`)
VALUES ('$p_id','$ip_add','-1','1')";
if (mysqli_query($con,$sql)) {
echo "
<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-
label='close'>&times;</a>
<b>Your product is Added Successfully..!</b>
</div>
";
exit();
}

//Count User cart item


if (isset($_POST["count_item"])) {
//When user is logged in then we will count number of item in cart by using user
session id
if (isset($_SESSION["uid"])) {
$sql = "SELECT COUNT(*) AS count_item FROM cart WHERE user_id =
$_SESSION[uid]";
}else{
26
//When user is not logged in then we will count number of item in cart by
using users unique ip address
$sql = "SELECT COUNT(*) AS count_item FROM cart WHERE ip_add =
'$ip_add' AND user_id < 0";
}

$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
echo $row["count_item"];
exit();
}
//Count User cart item

//Get Cart Item From Database to Dropdown menu


if (isset($_POST["Common"])) {

if (isset($_SESSION["uid"])) {
//When user is logged in this query will execute
$sql = "SELECT
a.product_id,a.product_title,a.product_price,a.product_image,[Link],[Link] FROM products
a,cart b WHERE a.product_id=b.p_id AND b.user_id='$_SESSION[uid]'";
}else{
//When user is not logged in this query will execute
$sql = "SELECT
a.product_id,a.product_title,a.product_price,a.product_image,[Link],[Link] FROM products
a,cart b WHERE a.product_id=b.p_id AND b.ip_add='$ip_add' AND b.user_id < 0";
}
$query = mysqli_query($con,$sql);
if (isset($_POST["getCartItem"])) {
//display cart item in dropdown menu
if (mysqli_num_rows($query) > 0) {
$n=0;
while ($row=mysqli_fetch_array($query)) {
$n++;
27
$product_id = $row["product_id"];
$product_title = $row["product_title"];
$product_price = $row["product_price"];
$product_image = $row["product_image"];
$cart_item_id = $row["id"];
$qty = $row["qty"];
echo '
<div class="row">
<div class="col-md-3">'.$n.'</div>
<div class="col-md-3"><img class="img-
responsive" src="product_images/'.$product_image.'" /></div>
<div class="col-md-3">'.$product_title.'</div>
<div class="col-md-3">'.CURRENCY.''.
$product_price.'</div>
</div>';

}
?>
<a style="float:right;" href="[Link]" class="btn btn-
warning">Edit&nbsp;&nbsp;<span class="glyphicon glyphicon-edit"></span></a>
<?php
exit();
}
}
if (isset($_POST["checkOutDetails"])) {
if (mysqli_num_rows($query) > 0) {
//display user cart item with "Ready to checkout" button if user is not
login
echo "<form method='post' action='login_form.php'>";
$n=0;
while ($row=mysqli_fetch_array($query)) {
$n++;
$product_id = $row["product_id"];
$product_title = $row["product_title"];
28
$product_price = $row["product_price"];
$product_image = $row["product_image"];
$cart_item_id = $row["id"];
$qty = $row["qty"];

echo
'<div class="row">
<div class="col-md-2">
<div class="btn-group">
<a href="#"
remove_id="'.$product_id.'" class="btn btn-danger remove"><span class="glyphicon
glyphicon-trash"></span></a>
<a href="#"
update_id="'.$product_id.'" class="btn btn-primary update"><span class="glyphicon
glyphicon-ok-sign"></span></a>
</div>
</div>
<input type="hidden"
name="product_id[]" value="'.$product_id.'"/>
<input type="hidden" name=""
value="'.$cart_item_id.'"/>
<div class="col-md-2"><img
class="img-responsive" src="product_images/'.$product_image.'"></div>
<div class="col-md-2">'.
$product_title.'</div>
<div class="col-md-2"><input
type="text" class="form-control qty" value="'.$qty.'" ></div>
<div class="col-md-2"><input
type="text" class="form-control price" value="'.$product_price.'"
readonly="readonly"></div>
<div class="col-md-2"><input
type="text" class="form-control total" value="'.$product_price.'"
readonly="readonly"></div>
</div>';
29
}

echo '<div class="row">


<div class="col-md-8"></div>
<div class="col-md-4">
<b class="net_total" style="font-
size:20px;"> </b>
</div>';
if (!isset($_SESSION["uid"])) {
echo '<input type="submit" style="float:right;"
name="login_user_with_product" class="btn btn-info btn-lg" value="Ready to Checkout" >
</form>';

}else if(isset($_SESSION["uid"])){
//Paypal checkout form
echo '
</form>
<form
action="[Link] method="post">
<input type="hidden" name="cmd"
value="_cart">
<input type="hidden" name="business"
value="shoppingcart@[Link]">
<input type="hidden" name="upload"
value="1">';

$x=0;
$sql = "SELECT
a.product_id,a.product_title,a.product_price,a.product_image,[Link],[Link] FROM products
a,cart b WHERE a.product_id=b.p_id AND b.user_id='$_SESSION[uid]'";
$query = mysqli_query($con,$sql);

while($row=mysqli_fetch_array($query)){
$x++;
30
echo
'<input type="hidden"
name="item_name_'.$x.'" value="'.$row["product_title"].'">
<input type="hidden"
name="item_number_'.$x.'" value="'.$x.'">
<input type="hidden"
name="amount_'.$x.'" value="'.$row["product_price"].'">
<input type="hidden"
name="quantity_'.$x.'" value="'.$row["qty"].'">';
}

echo
'<input type="hidden"
name="return" value="[Link]
<input type="hidden" name="notify_url"
value="[Link]
<input type="hidden"
name="cancel_return" value="[Link]
<input type="hidden"
name="currency_code" value="USD"/>
<input type="hidden"
name="custom" value="'.$_SESSION["uid"].'"/>
<input
style="float:right;margin-right:80px;" type="image" name="submit"

src="[Link]
[Link]" alt="PayPal Checkout"
alt="PayPal - The
safer, easier way to pay online">
</form>';
}
}
}

31
}

//Remove Item From cart


if (isset($_POST["removeItemFromCart"])) {
$remove_id = $_POST["rid"];
if (isset($_SESSION["uid"])) {
$sql = "DELETE FROM cart WHERE p_id = '$remove_id' AND user_id =
'$_SESSION[uid]'";
}else{
$sql = "DELETE FROM cart WHERE p_id = '$remove_id' AND ip_add =
'$ip_add'";
}
if(mysqli_query($con,$sql)){
echo "<div class='alert alert-danger'>
<a href='#' class='close' data-dismiss='alert' aria-
label='close'>&times;</a>
<b>Product is removed from cart</b>
</div>";
exit();
}
}

//Update Item From cart


if (isset($_POST["updateCartItem"])) {
$update_id = $_POST["update_id"];
$qty = $_POST["qty"];
if (isset($_SESSION["uid"])) {
$sql = "UPDATE cart SET qty='$qty' WHERE p_id = '$update_id' AND
user_id = '$_SESSION[uid]'";
}else{
$sql = "UPDATE cart SET qty='$qty' WHERE p_id = '$update_id' AND
ip_add = '$ip_add'";
32
}
if(mysqli_query($con,$sql)){
echo "<div class='alert alert-info'>
<a href='#' class='close' data-dismiss='alert' aria-
label='close'>&times;</a>
<b>Product is updated</b>
</div>";
exit();
}
}
?>

Admin Module
[Link]
<?php
session_start();
if (!isset($_SESSION['admin_id'])) {
header("location:[Link]");
}

include "./templates/[Link]";

?>

<?php include "./templates/[Link]"; ?>

<div class="container-fluid">
<div class="row">

<?php include "./templates/[Link]"; ?>

<!-- <canvas class="my-4 w-100" id="myChart" width="900" height="380"></canvas>


-->

33
<h2>Other Admins</h2>
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Email</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="admin_list">
<tr>
<td>1,001</td>
<td>Lorem</td>
<td>ipsum</td>
<td>dolor</td>
<td>sit</td>
</tr>
</tbody>
</table>
</div>
</main>
</div>
</div>

<?php include "./templates/[Link]"; ?>

<script type="text/javascript" src="./js/[Link]"></script>


[Link]
<?php session_start(); ?>
<?php include_once("./templates/[Link]"); ?>
34
<?php include_once("./templates/[Link]"); ?>
<div class="container-fluid">
<div class="row">

<?php include "./templates/[Link]"; ?>

<div class="row">
<div class="col-10">
<h2>Product List</h2>
</div>
<div class="col-2">
<a href="#" data-toggle="modal" data-target="#add_product_modal"
class="btn btn-primary btn-sm">Add Product</a>
</div>
</div>

<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Image</th>
<th>Price</th>
<th>Quantity</th>
<th>Category</th>
<th>Brand</th>
<th>Action</th>
</tr>
</thead>
<tbody id="product_list">
<!-- <tr>
<td>1</td>
<td>ABC</td>
35
<td>[Link]</td>
<td>122</td>
<td>eLECTRONCS</td>
<td>aPPLE</td>
<td><a class="btn btn-sm btn-info"></a><a class="btn btn-sm btn-
danger">Delete</a></td>
</tr> -->
</tbody>
</table>
</div>
</main>
</div>
</div>

<!-- Add Product Modal start -->


<div class="modal fade" id="add_product_modal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Add Product</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form id="add-product-form" enctype="multipart/form-data">
<div class="row">
<div class="col-12">
<div class="form-group">
<label>Product Name</label>

36
<input type="text" name="product_name" class="form-
control" placeholder="Enter Product Name">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Brand Name</label>
<select class="form-control brand_list" name="brand_id">
<option value="">Select Brand</option>
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Category Name</label>
<select class="form-control category_list"
name="category_id">
<option value="">Select Category</option>
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Description</label>
<textarea class="form-control" name="product_desc"
placeholder="Enter product desc"></textarea>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Qty</label>
<input type="number" name="product_qty" class="form-control"
placeholder="Enter Product Quantity">
</div>
37
</div>
<div class="col-12">
<div class="form-group">
<label>Product Price</label>
<input type="number" name="product_price" class="form-
control" placeholder="Enter Product Price">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Keywords <small>(eg: apple, iphone,
mobile)</small></label>
<input type="text" name="product_keywords" class="form-
control" placeholder="Enter Product Keywords">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Image <small>(format: jpg, jpeg,
png)</small></label>
<input type="file" name="product_image" class="form-
control">
</div>
</div>
<input type="hidden" name="add_product" value="1">
<div class="col-12">
<button type="button" class="btn btn-primary add-product">Add
Product</button>
</div>
</div>

</form>
</div>
</div>
38
</div>
</div>
<!-- Add Product Modal end -->

<!-- Edit Product Modal start -->


<div class="modal fade" id="edit_product_modal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Add Product</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form id="edit-product-form" enctype="multipart/form-data">
<div class="row">
<div class="col-12">
<div class="form-group">
<label>Product Name</label>
<input type="text" name="e_product_name" class="form-control"
placeholder="Enter Product Name">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Brand Name</label>
<select class="form-control brand_list" name="e_brand_id">
<option value="">Select Brand</option>
</select>
</div>
</div>
<div class="col-12">
39
<div class="form-group">
<label>Category Name</label>
<select class="form-control category_list" name="e_category_id">
<option value="">Select Category</option>
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Description</label>
<textarea class="form-control" name="e_product_desc" placeholder="Enter
product desc"></textarea>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Qty</label>
<input type="number" name="e_product_qty" class="form-control"
placeholder="Enter Product Quantity">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Price</label>
<input type="number" name="e_product_price" class="form-control"
placeholder="Enter Product Price">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label>Product Keywords <small>(eg: apple, iphone, mobile)</small></label>
<input type="text" name="e_product_keywords" class="form-control"
placeholder="Enter Product Keywords">
</div>
40
</div>
<div class="col-12">
<div class="form-group">
<label>Product Image <small>(format: jpg, jpeg, png)</small></label>
<input type="file" name="e_product_image" class="form-control">
<img src="../product_images/[Link]" class="img-fluid" width="50">
</div>
</div>
<input type="hidden" name="pid">
<input type="hidden" name="edit_product" value="1">
<div class="col-12">
<button type="button" class="btn btn-primary submit-edit-product">Add
Product</button>
</div>
</div>

</form>
</div>
</div>
</div>
</div>
<!-- Edit Product Modal end -->

<?php include_once("./templates/[Link]"); ?>

<script type="text/javascript" src="./js/[Link]"></script>

41
IMPLEMNTATION AND SYSTEM TESTING
After all phase have been perfectly done, the system will be implemented to the server and
the system can be used.

SYSTEM TESTING
The goal of the system testing process was to determine all faults in our project .The
program was subjected to a set of test inputs and many explanations were made and based
on these explanations it will be decided whether the program behaves as expected or not.
Our Project went through two levels of testing.
1. Unit testing
2. Integration testing

UNIT TESTING

Unit testing is commenced when a unit has been created and effectively reviewed .In order
to test a single module we need to provide a complete environment i.e. besides the section
we would require
• The procedures belonging to other units that the unit under test calls

• Non local data structures that module accesses

• A procedure to call the functions of the unit under test with appropriate
parameters

1. Test for the admin module

• Testing admin login form-This form is used for log in of administrator of the
system. In this form we enter the username and password if both are correct
administration page will open otherwise if any of data is wrong it will get redirected
back to the login page and again ask the details.
• Report Generation: admin can generate report from the main database.

INTEGRATION TESTING

In the Integration testing we test various combination of the project module by


providing the input.

The primary objective is to test the module interfaces in order to confirm that no
errors are occurring when one module invokes the other module.

42
EVALUATION
Project URL: [Link]

Home Page

43
CONCLUSION:
It has been concluded that cloud based web application of E-Health Care Management
system will provide comprehensive, effective and efficient solution for carrying out
management of hospitals and clinics fulfilling the needs and requirements of all
stakeholders such as doctors, patients and staffs. This system has nighty percent been
implemented. It has also future scope and more features will be added with time.
To conclude the description about the project : The project, developed using PHP and
MySQL is based on the requirement specification of the user and the analysis of the
existing system, with flexibility for future enhancement. The expanded functionality of
today’s software requires an appropriate approach towards software development. This
ecommerce software is designed E-commerce site project is developed using PHP, CSS,
Bootstrap, and JavaScript. Talking about the project, it has all the required essential
features. This project has a user side where he/she can view product category and add
products to cart and proceed for checkout whereas from administration side he/she can
view sales, number of product, users, daily sales report, add product and categories. The
user can also leave comments on each product if he/she wants. In this project, all the main
functions are performed from the Admin side.

44
References
1.[Link]
[Link]
2.[Link]
3. [Link]
featuresobjectives-62eeb13f4fc4
4. [Link]
5. [Link]
6. [Link]
ent_and_information_systems/download
7- [Link]
8- [Link] 9-
[Link]
e_tcm100-[Link]
10- [Link]
ource=lnms&tbm=isch&sa=X&ved=0ahUKEwjfvozP0PnhAhVHKFAKHb_iBT8Q_AUI
DigB&biw=1366&bih=657#imgrc=yUQ6IANdWMap_M
11- [Link]

For PHP
• [Link]
• [Link]
• [Link]

For MySQL
• [Link]
• [Link]

For XAMPP
• [Link]

45
46

You might also like