Skip to content

Commit d461c79

Browse files
committed
Initial Commit
1 parent dce2561 commit d461c79

5 files changed

+237
-73
lines changed

admin-panel.php

+12-3
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
#inputbtn:hover{cursor:pointer;}
136136
</style>
137137
<body style="padding-top:50px;">
138+
138139
<div class="container-fluid" style="margin-top:50px;">
139140
<h3 style = "margin-left: 40%; padding-bottom: 20px; font-family: 'IBM Plex Sans', sans-serif;"> Welcome &nbsp<?php echo $username ?>
140141
</h3>
@@ -233,7 +234,7 @@ function clickDiv(id) {
233234
<div class="col-md-8">
234235
<select name="spec" class="form-control" id="spec">
235236
<option value="" disabled selected>Select Specialization</option>
236-
<?php display_specs();?>
237+
<?php display_specs();?>
237238
</select>
238239
<script>
239240
document.getElementById('spec').onchange = function updateFees(e) {
@@ -378,8 +379,15 @@ function clickDiv(id) {
378379
$con=mysqli_connect("localhost","root","","myhmsdb");
379380
global $con;
380381

381-
$query = "select doctor,ID,appdate,apptime,disease,allergy,prescription from prestb where fname ='$fname' and lname='$lname' and pid='$pid';";
382+
$query = "select doctor,ID,appdate,apptime,disease,allergy,prescription from prestb where pid='$pid';";
383+
// purila doctor field save pannalaya?
384+
// indha patient oda pid ku prescribe assign aagala..
382385
$result = mysqli_query($con,$query);
386+
if(!$result){
387+
echo mysqli_error($con);
388+
}
389+
390+
383391
while ($row = mysqli_fetch_array($result)){
384392
?>
385393
<tr>
@@ -392,7 +400,8 @@ function clickDiv(id) {
392400
<td><?php echo $row['prescription'];?></td>
393401

394402
</tr>
395-
<?php } ?>
403+
<?php }
404+
?>
396405
</tbody>
397406
</table>
398407
<br>

admin-panel1.php

+105-15
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,15 @@ function alphaOnly(event) {
126126
</style>
127127
<body style="padding-top:50px;">
128128
<div class="container-fluid" style="margin-top:50px;">
129-
<h3 style = "margin-left: 40%; padding-bottom: 20px;font-family: 'IBM Plex Sans', sans-serif;"> WELCOME ADMIN </h3>
129+
<h3 style = "margin-left: 40%; padding-bottom: 20px;font-family: 'IBM Plex Sans', sans-serif;"> WELCOME RECEPTIONIST </h3>
130130
<div class="row">
131131
<div class="col-md-4" style="max-width:25%;margin-top: 3%;">
132132
<div class="list-group" id="list-tab" role="tablist">
133133
<a class="list-group-item list-group-item-action active" id="list-dash-list" data-toggle="list" href="#list-dash" role="tab" aria-controls="home">Dashboard</a>
134134
<a class="list-group-item list-group-item-action" href="#list-doc" id="list-doc-list" role="tab" aria-controls="home" data-toggle="list">Doctor List</a>
135135
<a class="list-group-item list-group-item-action" href="#list-pat" id="list-pat-list" role="tab" data-toggle="list" aria-controls="home">Patient List</a>
136136
<a class="list-group-item list-group-item-action" href="#list-app" id="list-app-list" role="tab" data-toggle="list" aria-controls="home">Appointment Details</a>
137+
<a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list" role="tab" data-toggle="list" aria-controls="home">Prescription List</a>
137138
<a class="list-group-item list-group-item-action" href="#list-settings" id="list-adoc-list" role="tab" data-toggle="list" aria-controls="home">Add Doctor</a>
138139
<a class="list-group-item list-group-item-action" href="#list-settings1" id="list-ddoc-list" role="tab" data-toggle="list" aria-controls="home">Delete Doctor</a>
139140
<a class="list-group-item list-group-item-action" href="#list-mes" id="list-mes-list" role="tab" data-toggle="list" aria-controls="home">Queries</a>
@@ -148,7 +149,7 @@ function alphaOnly(event) {
148149
<div class="tab-pane fade show active" id="list-dash" role="tabpanel" aria-labelledby="list-dash-list">
149150
<div class="container-fluid container-fullw bg-white" >
150151
<div class="row">
151-
<div class="col-sm-4" style="left: 10%">
152+
<div class="col-sm-4" style="left: 5%">
152153
<div class="panel panel-white no-radius text-center">
153154
<div class="panel-body">
154155
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-users fa-stack-1x fa-inverse"></i> </span>
@@ -167,7 +168,7 @@ function clickDiv(id) {
167168
</div>
168169
</div>
169170

170-
<div class="col-sm-4" style="left: 15%">
171+
<div class="col-sm-4" style="left: 10%">
171172
<div class="panel panel-white no-radius text-center">
172173
<div class="panel-body" >
173174
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-users fa-stack-1x fa-inverse"></i> </span>
@@ -181,9 +182,9 @@ function clickDiv(id) {
181182
</div>
182183
</div>
183184
</div>
184-
</div>
185+
185186

186-
<div class="col-sm-4" style="left: 10%;margin-top: 5%;">
187+
<div class="col-sm-4" style="left: 12%">
187188
<div class="panel panel-white no-radius text-center">
188189
<div class="panel-body" >
189190
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-paperclip fa-stack-1x fa-inverse"></i> </span>
@@ -197,9 +198,26 @@ function clickDiv(id) {
197198
</div>
198199
</div>
199200
</div>
201+
</div>
202+
203+
<div class="row">
204+
<div class="col-sm-4" style="left: 20%;margin-top: 5%;">
205+
<div class="panel panel-white no-radius text-center">
206+
<div class="panel-body" >
207+
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-list-ul fa-stack-1x fa-inverse"></i> </span>
208+
<h4 class="StepTitle" style="margin-top: 5%;">Prescription List</h4>
209+
210+
<p class="cl-effect-1">
211+
<a href="#list-pres" onclick="clickDiv('#list-pres-list')">
212+
View Prescriptions
213+
</a>
214+
</p>
215+
</div>
216+
</div>
217+
</div>
200218

201219

202-
<div class="col-sm-4" style="left: 50%;margin-top: -15%">
220+
<div class="col-sm-4" style="left: 24%;margin-top: 5%">
203221
<div class="panel panel-white no-radius text-center">
204222
<div class="panel-body" >
205223
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-plus fa-stack-1x fa-inverse"></i> </span>
@@ -215,7 +233,9 @@ function clickDiv(id) {
215233
</div>
216234
</div>
217235
</div>
218-
236+
</div>
237+
238+
219239

220240

221241
</div>
@@ -243,8 +263,9 @@ function clickDiv(id) {
243263
<thead>
244264
<tr>
245265
<th scope="col">Doctor Name</th>
246-
<th scope="col">Password</th>
266+
<th scope="col">Specialization</th>
247267
<th scope="col">Email</th>
268+
<th scope="col">Password</th>
248269
<th scope="col">Fees</th>
249270
</tr>
250271
</thead>
@@ -256,14 +277,16 @@ function clickDiv(id) {
256277
$result = mysqli_query($con,$query);
257278
while ($row = mysqli_fetch_array($result)){
258279
$username = $row['username'];
259-
$password = $row['password'];
280+
$spec = $row['spec'];
260281
$email = $row['email'];
282+
$password = $row['password'];
261283
$docFees = $row['docFees'];
262284

263285
echo "<tr>
264286
<td>$username</td>
265-
<td>$password</td>
287+
<td>$spec</td>
266288
<td>$email</td>
289+
<td>$password</td>
267290
<td>$docFees</td>
268291
</tr>";
269292
}
@@ -288,6 +311,7 @@ function clickDiv(id) {
288311
<table class="table table-hover">
289312
<thead>
290313
<tr>
314+
<th scope="col">Patient ID</th>
291315
<th scope="col">First Name</th>
292316
<th scope="col">Last Name</th>
293317
<th scope="col">Gender</th>
@@ -303,6 +327,7 @@ function clickDiv(id) {
303327
$query = "select * from patreg";
304328
$result = mysqli_query($con,$query);
305329
while ($row = mysqli_fetch_array($result)){
330+
$pid = $row['pid'];
306331
$fname = $row['fname'];
307332
$lname = $row['lname'];
308333
$gender = $row['gender'];
@@ -311,6 +336,7 @@ function clickDiv(id) {
311336
$password = $row['password'];
312337

313338
echo "<tr>
339+
<td>$pid</td>
314340
<td>$fname</td>
315341
<td>$lname</td>
316342
<td>$gender</td>
@@ -327,6 +353,71 @@ function clickDiv(id) {
327353
</div>
328354

329355

356+
<div class="tab-pane fade" id="list-pres" role="tabpanel" aria-labelledby="list-pres-list">
357+
358+
<div class="col-md-8">
359+
360+
<div class="row">
361+
362+
363+
364+
<table class="table table-hover">
365+
<thead>
366+
<tr>
367+
<th scope="col">Doctor</th>
368+
<th scope="col">Patient ID</th>
369+
<th scope="col">Appointment ID</th>
370+
<th scope="col">First Name</th>
371+
<th scope="col">Last Name</th>
372+
<th scope="col">Appointment Date</th>
373+
<th scope="col">Appointment Time</th>
374+
<th scope="col">Disease</th>
375+
<th scope="col">Allergy</th>
376+
<th scope="col">Prescription</th>
377+
</tr>
378+
</thead>
379+
<tbody>
380+
<?php
381+
$con=mysqli_connect("localhost","root","","myhmsdb");
382+
global $con;
383+
$query = "select * from prestb";
384+
$result = mysqli_query($con,$query);
385+
while ($row = mysqli_fetch_array($result)){
386+
$doctor = $row['doctor'];
387+
$pid = $row['pid'];
388+
$ID = $row['ID'];
389+
$fname = $row['fname'];
390+
$lname = $row['lname'];
391+
$appdate = $row['appdate'];
392+
$apptime = $row['apptime'];
393+
$disease = $row['disease'];
394+
$allergy = $row['allergy'];
395+
$pres = $row['prescription'];
396+
397+
398+
echo "<tr>
399+
<td>$doctor</td>
400+
<td>$pid</td>
401+
<td>$ID</td>
402+
<td>$fname</td>
403+
<td>$lname</td>
404+
<td>$appdate</td>
405+
<td>$apptime</td>
406+
<td>$disease</td>
407+
<td>$allergy</td>
408+
<td>$pres</td>
409+
</tr>";
410+
}
411+
412+
?>
413+
</tbody>
414+
</table>
415+
<br>
416+
</div>
417+
</div>
418+
</div>
419+
420+
330421

331422

332423
<div class="tab-pane fade" id="list-app" role="tabpanel" aria-labelledby="list-pat-list">
@@ -342,6 +433,8 @@ function clickDiv(id) {
342433
<table class="table table-hover">
343434
<thead>
344435
<tr>
436+
<th scope="col">Appointment ID</th>
437+
<th scope="col">Patient ID</th>
345438
<th scope="col">First Name</th>
346439
<th scope="col">Last Name</th>
347440
<th scope="col">Gender</th>
@@ -363,13 +456,10 @@ function clickDiv(id) {
363456
$query = "select * from appointmenttb;";
364457
$result = mysqli_query($con,$query);
365458
while ($row = mysqli_fetch_array($result)){
366-
367-
#$fname = $row['fname'];
368-
#$lname = $row['lname'];
369-
#$email = $row['email'];
370-
#$contact = $row['contact'];
371459
?>
372460
<tr>
461+
<td><?php echo $row['ID'];?></td>
462+
<td><?php echo $row['pid'];?></td>
373463
<td><?php echo $row['fname'];?></td>
374464
<td><?php echo $row['lname'];?></td>
375465
<td><?php echo $row['gender'];?></td>

doctor-panel.php

+53-23
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<div class="list-group" id="list-tab" role="tablist">
108108
<a class="list-group-item list-group-item-action active" href="#list-dash" role="tab" aria-controls="home" data-toggle="list">Dashboard</a>
109109
<a class="list-group-item list-group-item-action" href="#list-app" id="list-app-list" role="tab" data-toggle="list" aria-controls="home">Appointments</a>
110-
<a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list" role="tab" data-toggle="list" aria-controls="home"> Prescribe</a>
110+
<a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list" role="tab" data-toggle="list" aria-controls="home"> Prescription List</a>
111111

112112
</div><br>
113113
</div>
@@ -232,7 +232,7 @@ function clickDiv(id) {
232232
<?php if(($row['userStatus']==1) && ($row['doctorStatus']==1))
233233
{ ?>
234234

235-
<a href="prescribe.php?pid=<?php echo $row['pid']?>&ID=<?php echo $row['ID']?>&appdate=<?php echo $row['appdate']?>&apptime=<?php echo $row['apptime']?>"
235+
<a href="prescribe.php?pid=<?php echo $row['pid']?>&ID=<?php echo $row['ID']?>&fname=<?php echo $row['fname']?>&lname=<?php echo $row['lname']?>&appdate=<?php echo $row['appdate']?>&apptime=<?php echo $row['apptime']?>"
236236
tooltip-placement="top" tooltip="Remove" title="prescribe">
237237
<button class="btn btn-success">Prescibe</button></a>
238238
<?php } else {
@@ -250,28 +250,58 @@ function clickDiv(id) {
250250
<br>
251251
</div>
252252

253+
254+
253255
<div class="tab-pane fade" id="list-pres" role="tabpanel" aria-labelledby="list-pres-list">
254-
<form class="form-group" name="prescribeform" method="get" action="doctor-panel.php">
255-
<div class="row">
256-
<div class="col-md-4"><label>Disease:</label></div>
257-
<div class="col-md-8">
258-
<!-- <input type="text" class="form-control" name="disease" required> -->
259-
<textarea id="disease" cols="86" rows ="5" name="disease" required></textarea>
260-
</div><br><br>
261-
262-
<div class="col-md-4"><label>Allergies:</label></div>
263-
<div class="col-md-8">
264-
<!-- <input type="text" class="form-control" name="allergy" required> -->
265-
<textarea id="allergy" cols="86" rows ="5" name="allergy" required></textarea>
266-
</div><br><br>
267-
<div class="col-md-4"><label>Prescription:</label></div>
268-
<div class="col-md-8">
269-
<!-- <input type="text" class="form-control" name="prescription" required> -->
270-
<textarea id="prescription" cols="86" rows ="10" name="prescription" required></textarea>
271-
</div><br><br>
272-
273-
<input type="submit" name="prescribe" value="Prescribe" class="btn btn-primary">
274-
</form>
256+
<table class="table table-hover">
257+
<thead>
258+
<tr>
259+
260+
<th scope="col">Patient ID</th>
261+
262+
<th scope="col">First Name</th>
263+
<th scope="col">Last Name</th>
264+
<th scope="col">Appointment ID</th>
265+
<th scope="col">Appointment Date</th>
266+
<th scope="col">Appointment Time</th>
267+
<th scope="col">Disease</th>
268+
<th scope="col">Allergy</th>
269+
<th scope="col">Prescribe</th>
270+
</tr>
271+
</thead>
272+
<tbody>
273+
<?php
274+
275+
$con=mysqli_connect("localhost","root","","myhmsdb");
276+
global $con;
277+
278+
$query = "select pid,fname,lname,ID,appdate,apptime,disease,allergy,prescription from prestb where doctor='$doctor';";
279+
280+
$result = mysqli_query($con,$query);
281+
if(!$result){
282+
echo mysqli_error($con);
283+
}
284+
285+
286+
while ($row = mysqli_fetch_array($result)){
287+
?>
288+
<tr>
289+
<td><?php echo $row['pid'];?></td>
290+
<td><?php echo $row['fname'];?></td>
291+
<td><?php echo $row['lname'];?></td>
292+
<td><?php echo $row['ID'];?></td>
293+
294+
<td><?php echo $row['appdate'];?></td>
295+
<td><?php echo $row['apptime'];?></td>
296+
<td><?php echo $row['disease'];?></td>
297+
<td><?php echo $row['allergy'];?></td>
298+
<td><?php echo $row['prescription'];?></td>
299+
300+
</tr>
301+
<?php }
302+
?>
303+
</tbody>
304+
</table>
275305
</div>
276306

277307

0 commit comments

Comments
 (0)