Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kishan0725 committed Mar 13, 2020
1 parent dce2561 commit d461c79
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 73 deletions.
15 changes: 12 additions & 3 deletions admin-panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
#inputbtn:hover{cursor:pointer;}
</style>
<body style="padding-top:50px;">

<div class="container-fluid" style="margin-top:50px;">
<h3 style = "margin-left: 40%; padding-bottom: 20px; font-family: 'IBM Plex Sans', sans-serif;"> Welcome &nbsp<?php echo $username ?>
</h3>
Expand Down Expand Up @@ -233,7 +234,7 @@ function clickDiv(id) {
<div class="col-md-8">
<select name="spec" class="form-control" id="spec">
<option value="" disabled selected>Select Specialization</option>
<?php display_specs();?>
<?php display_specs();?>
</select>
<script>
document.getElementById('spec').onchange = function updateFees(e) {
Expand Down Expand Up @@ -378,8 +379,15 @@ function clickDiv(id) {
$con=mysqli_connect("localhost","root","","myhmsdb");
global $con;

$query = "select doctor,ID,appdate,apptime,disease,allergy,prescription from prestb where fname ='$fname' and lname='$lname' and pid='$pid';";
$query = "select doctor,ID,appdate,apptime,disease,allergy,prescription from prestb where pid='$pid';";
// purila doctor field save pannalaya?
// indha patient oda pid ku prescribe assign aagala..
$result = mysqli_query($con,$query);
if(!$result){
echo mysqli_error($con);
}


while ($row = mysqli_fetch_array($result)){
?>
<tr>
Expand All @@ -392,7 +400,8 @@ function clickDiv(id) {
<td><?php echo $row['prescription'];?></td>

</tr>
<?php } ?>
<?php }
?>
</tbody>
</table>
<br>
Expand Down
120 changes: 105 additions & 15 deletions admin-panel1.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,15 @@ function alphaOnly(event) {
</style>
<body style="padding-top:50px;">
<div class="container-fluid" style="margin-top:50px;">
<h3 style = "margin-left: 40%; padding-bottom: 20px;font-family: 'IBM Plex Sans', sans-serif;"> WELCOME ADMIN </h3>
<h3 style = "margin-left: 40%; padding-bottom: 20px;font-family: 'IBM Plex Sans', sans-serif;"> WELCOME RECEPTIONIST </h3>
<div class="row">
<div class="col-md-4" style="max-width:25%;margin-top: 3%;">
<div class="list-group" id="list-tab" role="tablist">
<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>
<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>
<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>
<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>
<a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list" role="tab" data-toggle="list" aria-controls="home">Prescription List</a>
<a class="list-group-item list-group-item-action" href="#list-settings" id="list-adoc-list" role="tab" data-toggle="list" aria-controls="home">Add Doctor</a>
<a class="list-group-item list-group-item-action" href="#list-settings1" id="list-ddoc-list" role="tab" data-toggle="list" aria-controls="home">Delete Doctor</a>
<a class="list-group-item list-group-item-action" href="#list-mes" id="list-mes-list" role="tab" data-toggle="list" aria-controls="home">Queries</a>
Expand All @@ -148,7 +149,7 @@ function alphaOnly(event) {
<div class="tab-pane fade show active" id="list-dash" role="tabpanel" aria-labelledby="list-dash-list">
<div class="container-fluid container-fullw bg-white" >
<div class="row">
<div class="col-sm-4" style="left: 10%">
<div class="col-sm-4" style="left: 5%">
<div class="panel panel-white no-radius text-center">
<div class="panel-body">
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-users fa-stack-1x fa-inverse"></i> </span>
Expand All @@ -167,7 +168,7 @@ function clickDiv(id) {
</div>
</div>

<div class="col-sm-4" style="left: 15%">
<div class="col-sm-4" style="left: 10%">
<div class="panel panel-white no-radius text-center">
<div class="panel-body" >
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-users fa-stack-1x fa-inverse"></i> </span>
Expand All @@ -181,9 +182,9 @@ function clickDiv(id) {
</div>
</div>
</div>
</div>


<div class="col-sm-4" style="left: 10%;margin-top: 5%;">
<div class="col-sm-4" style="left: 12%">
<div class="panel panel-white no-radius text-center">
<div class="panel-body" >
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-paperclip fa-stack-1x fa-inverse"></i> </span>
Expand All @@ -197,9 +198,26 @@ function clickDiv(id) {
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-4" style="left: 20%;margin-top: 5%;">
<div class="panel panel-white no-radius text-center">
<div class="panel-body" >
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-list-ul fa-stack-1x fa-inverse"></i> </span>
<h4 class="StepTitle" style="margin-top: 5%;">Prescription List</h4>

<p class="cl-effect-1">
<a href="#list-pres" onclick="clickDiv('#list-pres-list')">
View Prescriptions
</a>
</p>
</div>
</div>
</div>


<div class="col-sm-4" style="left: 50%;margin-top: -15%">
<div class="col-sm-4" style="left: 24%;margin-top: 5%">
<div class="panel panel-white no-radius text-center">
<div class="panel-body" >
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-plus fa-stack-1x fa-inverse"></i> </span>
Expand All @@ -215,7 +233,9 @@ function clickDiv(id) {
</div>
</div>
</div>

</div>




</div>
Expand Down Expand Up @@ -243,8 +263,9 @@ function clickDiv(id) {
<thead>
<tr>
<th scope="col">Doctor Name</th>
<th scope="col">Password</th>
<th scope="col">Specialization</th>
<th scope="col">Email</th>
<th scope="col">Password</th>
<th scope="col">Fees</th>
</tr>
</thead>
Expand All @@ -256,14 +277,16 @@ function clickDiv(id) {
$result = mysqli_query($con,$query);
while ($row = mysqli_fetch_array($result)){
$username = $row['username'];
$password = $row['password'];
$spec = $row['spec'];
$email = $row['email'];
$password = $row['password'];
$docFees = $row['docFees'];

echo "<tr>
<td>$username</td>
<td>$password</td>
<td>$spec</td>
<td>$email</td>
<td>$password</td>
<td>$docFees</td>
</tr>";
}
Expand All @@ -288,6 +311,7 @@ function clickDiv(id) {
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Patient ID</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Gender</th>
Expand All @@ -303,6 +327,7 @@ function clickDiv(id) {
$query = "select * from patreg";
$result = mysqli_query($con,$query);
while ($row = mysqli_fetch_array($result)){
$pid = $row['pid'];
$fname = $row['fname'];
$lname = $row['lname'];
$gender = $row['gender'];
Expand All @@ -311,6 +336,7 @@ function clickDiv(id) {
$password = $row['password'];

echo "<tr>
<td>$pid</td>
<td>$fname</td>
<td>$lname</td>
<td>$gender</td>
Expand All @@ -327,6 +353,71 @@ function clickDiv(id) {
</div>


<div class="tab-pane fade" id="list-pres" role="tabpanel" aria-labelledby="list-pres-list">

<div class="col-md-8">

<div class="row">



<table class="table table-hover">
<thead>
<tr>
<th scope="col">Doctor</th>
<th scope="col">Patient ID</th>
<th scope="col">Appointment ID</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Appointment Date</th>
<th scope="col">Appointment Time</th>
<th scope="col">Disease</th>
<th scope="col">Allergy</th>
<th scope="col">Prescription</th>
</tr>
</thead>
<tbody>
<?php
$con=mysqli_connect("localhost","root","","myhmsdb");
global $con;
$query = "select * from prestb";
$result = mysqli_query($con,$query);
while ($row = mysqli_fetch_array($result)){
$doctor = $row['doctor'];
$pid = $row['pid'];
$ID = $row['ID'];
$fname = $row['fname'];
$lname = $row['lname'];
$appdate = $row['appdate'];
$apptime = $row['apptime'];
$disease = $row['disease'];
$allergy = $row['allergy'];
$pres = $row['prescription'];


echo "<tr>
<td>$doctor</td>
<td>$pid</td>
<td>$ID</td>
<td>$fname</td>
<td>$lname</td>
<td>$appdate</td>
<td>$apptime</td>
<td>$disease</td>
<td>$allergy</td>
<td>$pres</td>
</tr>";
}

?>
</tbody>
</table>
<br>
</div>
</div>
</div>




<div class="tab-pane fade" id="list-app" role="tabpanel" aria-labelledby="list-pat-list">
Expand All @@ -342,6 +433,8 @@ function clickDiv(id) {
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Appointment ID</th>
<th scope="col">Patient ID</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Gender</th>
Expand All @@ -363,13 +456,10 @@ function clickDiv(id) {
$query = "select * from appointmenttb;";
$result = mysqli_query($con,$query);
while ($row = mysqli_fetch_array($result)){

#$fname = $row['fname'];
#$lname = $row['lname'];
#$email = $row['email'];
#$contact = $row['contact'];
?>
<tr>
<td><?php echo $row['ID'];?></td>
<td><?php echo $row['pid'];?></td>
<td><?php echo $row['fname'];?></td>
<td><?php echo $row['lname'];?></td>
<td><?php echo $row['gender'];?></td>
Expand Down
76 changes: 53 additions & 23 deletions doctor-panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<div class="list-group" id="list-tab" role="tablist">
<a class="list-group-item list-group-item-action active" href="#list-dash" role="tab" aria-controls="home" data-toggle="list">Dashboard</a>
<a class="list-group-item list-group-item-action" href="#list-app" id="list-app-list" role="tab" data-toggle="list" aria-controls="home">Appointments</a>
<a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list" role="tab" data-toggle="list" aria-controls="home"> Prescribe</a>
<a class="list-group-item list-group-item-action" href="#list-pres" id="list-pres-list" role="tab" data-toggle="list" aria-controls="home"> Prescription List</a>

</div><br>
</div>
Expand Down Expand Up @@ -232,7 +232,7 @@ function clickDiv(id) {
<?php if(($row['userStatus']==1) && ($row['doctorStatus']==1))
{ ?>

<a href="prescribe.php?pid=<?php echo $row['pid']?>&ID=<?php echo $row['ID']?>&appdate=<?php echo $row['appdate']?>&apptime=<?php echo $row['apptime']?>"
<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']?>"
tooltip-placement="top" tooltip="Remove" title="prescribe">
<button class="btn btn-success">Prescibe</button></a>
<?php } else {
Expand All @@ -250,28 +250,58 @@ function clickDiv(id) {
<br>
</div>



<div class="tab-pane fade" id="list-pres" role="tabpanel" aria-labelledby="list-pres-list">
<form class="form-group" name="prescribeform" method="get" action="doctor-panel.php">
<div class="row">
<div class="col-md-4"><label>Disease:</label></div>
<div class="col-md-8">
<!-- <input type="text" class="form-control" name="disease" required> -->
<textarea id="disease" cols="86" rows ="5" name="disease" required></textarea>
</div><br><br>

<div class="col-md-4"><label>Allergies:</label></div>
<div class="col-md-8">
<!-- <input type="text" class="form-control" name="allergy" required> -->
<textarea id="allergy" cols="86" rows ="5" name="allergy" required></textarea>
</div><br><br>
<div class="col-md-4"><label>Prescription:</label></div>
<div class="col-md-8">
<!-- <input type="text" class="form-control" name="prescription" required> -->
<textarea id="prescription" cols="86" rows ="10" name="prescription" required></textarea>
</div><br><br>

<input type="submit" name="prescribe" value="Prescribe" class="btn btn-primary">
</form>
<table class="table table-hover">
<thead>
<tr>

<th scope="col">Patient ID</th>

<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Appointment ID</th>
<th scope="col">Appointment Date</th>
<th scope="col">Appointment Time</th>
<th scope="col">Disease</th>
<th scope="col">Allergy</th>
<th scope="col">Prescribe</th>
</tr>
</thead>
<tbody>
<?php

$con=mysqli_connect("localhost","root","","myhmsdb");
global $con;

$query = "select pid,fname,lname,ID,appdate,apptime,disease,allergy,prescription from prestb where doctor='$doctor';";

$result = mysqli_query($con,$query);
if(!$result){
echo mysqli_error($con);
}


while ($row = mysqli_fetch_array($result)){
?>
<tr>
<td><?php echo $row['pid'];?></td>
<td><?php echo $row['fname'];?></td>
<td><?php echo $row['lname'];?></td>
<td><?php echo $row['ID'];?></td>

<td><?php echo $row['appdate'];?></td>
<td><?php echo $row['apptime'];?></td>
<td><?php echo $row['disease'];?></td>
<td><?php echo $row['allergy'];?></td>
<td><?php echo $row['prescription'];?></td>

</tr>
<?php }
?>
</tbody>
</table>
</div>


Expand Down
Loading

0 comments on commit d461c79

Please sign in to comment.