-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
IsolationWardDetails.php
241 lines (200 loc) · 6.58 KB
/
IsolationWardDetails.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html>
<head>
<title>Clinitical</title>
<link rel = "icon" href =
"images/logo.png"
type = "image/x-icon">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/IslationWardDetailscss.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" ></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<?php require_once "navbar.php"; ?>
<!-- Main Heading -->
<section id="heading">
<div id="particles-js">
<div class ="container">
<h1>Isolation ward: <?php get_isolation_name () ?> (<?php get_isolation_id () ?>)</h1>
</div>
</div>
</section>
<!-- End Main Heading -->
<!-- General Info -->
<section id="generalinfo">
<h1>Overview</h1>
<div class ="container">
<div class="row generalinfo">
<div class="col-md-4 text-center">
<div class="icon1">
<!-- <img src="images/gif/dialcall_gif.gif" >-->
<!-- <i class="fa fa-h-square" ></i> -->
</div>
<img src="https://img.icons8.com/nolan/64/hospital-room.png" style="width:50px;height:50px; align:left;">
<h3>Patients</h3>
<p><?php get_patients()?></p>
</div>
<div class="col-md-4 text-center">
<img src="https://img.icons8.com/color/48/000000/doctor-male--v1.png" style="width:50px;height:50px; align:left;">
<h3>Doctors</h3>
<p><?php get_doctor ()?></p>
</div>
<div class="col-md-4 text-center">
<img src="https://img.icons8.com/nolan/64/hospital.png/" style="width:50px;height:50px; align:left;">
<h3>Capacity</h3>
<p><?php get_isolation_capacity ()?></p>
</div>
</div>
</section>
<!-- End General Info -->
<!-- Patients record section -->
<section id="viewpatients" style="margin-top:50px;margin-bottom:40px;">
<div class ="container">
<div class "card-body" style="background:#202124;color:#fff; margin:8px;padding:8px;">
<div class="row">
<div class="col-md-6">
<h2>Patient Record</h2>
</div>
<div class="col-md-6">
<form class="form-group" action="search_patients.php" method="post">
<div class="row">
<div class="col-md-7">
<input type="text" name="search_id" class="form-control">
</div>
<div class="col-md-2">
<input type="submit" name="patient_search" class="btn btn-primary" value="Search">
</div>
<div class="col-md-2">
<input type="submit" name="patient_del" class="btn btn-danger" value="Delete">
</div>
</div>
</form>
</div>
<hr/>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover table-dark">
<thead>
<tr>
<th scope="col">Patient ID</th>
<th scope="col">Name</th>
<th scope="col">Age</th>
<th scope="col">Phone</th>
<th scope="col">Email</th>
<th scope="col">City</th>
<th scope="col">Status</th>
<th colspan="2" >Operations</th>
<!-- <td> "?> <button type="button" class="btn btn-success btn-rounded" onclick="location.href='updatepatient.php?id= $ids'">Update</button> "</td>-->
</tr>
</thead>
<tbody>
<?php get_patient_details (); ?>
</tbody>
</table>
</div>
</div>
</section>
<!-- Patients records section ends-->
<!-- scripts -->
<script src="js/particles.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>
<?php
$con=mysqli_connect("localhost","root","asd32145","Covid_19_dbms");
if($con)
{
//echo"Connection OK";
}
else
{
//echo"Connection failed";
}
function get_isolation_name ()
{
$id=$_GET['id'];
$con=mysqli_connect("localhost","root","","covid_19_dbms");
$quary="select isolation_ward_name as name FROM isolation_ward where isolation_ward_id='$id';";
$result=mysqli_query($con,$quary);
$values=mysqli_fetch_assoc($result);
$c=$values['name'];
echo " ".$c;
}
function get_isolation_id ()
{
$id=$_GET['id'];
$con=mysqli_connect("localhost","root","","covid_19_dbms");
$quary="select isolation_ward_id as id FROM isolation_ward where isolation_ward_id='$id';";
$result=mysqli_query($con,$quary);
$values=mysqli_fetch_assoc($result);
$c=$values['id'];
echo " ".$c;
}
function get_patients ()
{
$id=$_GET['id'];
$con=mysqli_connect("localhost","root","","covid_19_dbms");
$quary="select count(*) as id FROM patients where isolation_ward_id='$id';";
$result=mysqli_query($con,$quary);
$values=mysqli_fetch_assoc($result);
$c=$values['id'];
echo " ".$c;
}
function get_doctor ()
{
$id=$_GET['id'];
$con=mysqli_connect("localhost","root","","covid_19_dbms");
$quary="select count(*) as id FROM doctors_tb where isolation_ward_id='$id';";
$result=mysqli_query($con,$quary);
$values=mysqli_fetch_assoc($result);
$c=$values['id'];
echo " ".$c;
}
function get_isolation_capacity ()
{
$id=$_GET['id'];
$con=mysqli_connect("localhost","root","","covid_19_dbms");
$quary="select capacity as id FROM isolation_ward where isolation_ward_id='$id';";
$result=mysqli_query($con,$quary);
$values=mysqli_fetch_assoc($result);
$c=$values['id'];
echo " ".$c;
}
function get_patient_details ()
{
$id=$_GET['id'];
$con=mysqli_connect("localhost","root","","covid_19_dbms");
$quary="select *from patients where isolation_ward_id='$id';";
$result=mysqli_query($con,$quary);
while($row=mysqli_fetch_array($result))
{
$id=$row['patient_id'];
$fname=$row['patient_name'];
$age=$row['patient_age'];
$phone=$row['patient_phone'];
$email=$row['patient_email'];
$city=$row['patient_city'];
$status=$row['patient_status'];
$ids='100011';
echo"
<tr>
<td>$id</td>
<td>$fname</td>
<td>$age</td>
<td>$phone</td>
<td>$email</td>
<td>$city</td>
<td>$status</td>
<td><a href='updatepatient.php?id=$row[patient_id]'>Update</a></td>
<td><a href='delpatientfunc.php?del=$row[patient_id]'>Delete</a></td>
</tr>";
}
}
?>