168 lines
5.0 KiB
PHP
168 lines
5.0 KiB
PHP
|
|
<?php include('techsyn_header.php'); ?>
|
||
|
|
<!-- Main Content Container for side bar and body-->
|
||
|
|
<div class="main-container ace-save-state" id="main-container">
|
||
|
|
<script type="text/javascript">
|
||
|
|
try{ace.settings.loadState('main-container')}catch(e){}
|
||
|
|
</script>
|
||
|
|
<?php include('techsyn_sidebar.php'); ?>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
error_reporting(E_ERROR | E_PARSE);
|
||
|
|
$id =$_REQUEST['flex_sickness_id'];
|
||
|
|
|
||
|
|
$existingAilmentList ="";
|
||
|
|
|
||
|
|
//echo $id;
|
||
|
|
|
||
|
|
$query = "select s.*, e.patient_name from sickness s, patient_master e where s.emp_id=e.id and s.sickness_id = '".$id."' ";
|
||
|
|
//echo $query;
|
||
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
||
|
|
exit(mysqli_error($conn));
|
||
|
|
|
||
|
|
} else{
|
||
|
|
$row=@mysqli_fetch_array($result);
|
||
|
|
@extract($row);
|
||
|
|
$existingAilmentList= $row['ailment_name'];
|
||
|
|
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
<div class="main-content">
|
||
|
|
<div class="main-content-inner">
|
||
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
||
|
|
<ul class="breadcrumb">
|
||
|
|
<li>
|
||
|
|
<i class="ace-icon fa fa-home home-icon"></i>
|
||
|
|
<a href="#">Home</a>
|
||
|
|
</li>
|
||
|
|
<li class="#">Patient Management</li><li class="active">Fitness Review</li>
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="page-content">
|
||
|
|
<div id="flexigridDiv" class="table-responsive">
|
||
|
|
<div class="row" id="sickness_form_id">
|
||
|
|
<div class="col-xs-12">
|
||
|
|
<div class="widget-box">
|
||
|
|
<div class="widget-body">
|
||
|
|
<div class="widget-main">
|
||
|
|
<div class="row">
|
||
|
|
<div style="margin:5px;">
|
||
|
|
<div class="tabbable">
|
||
|
|
<ul class="nav nav-tabs" id="myTab">
|
||
|
|
<li class="active">
|
||
|
|
<a data-toggle="tab" href="#appointment" aria-expanded="false">
|
||
|
|
Fitness Form
|
||
|
|
<span class="badge badge-success">+</span>
|
||
|
|
</a>
|
||
|
|
</li>
|
||
|
|
<!-- <li class="">
|
||
|
|
<a data-toggle="tab" href="#home" aria-expanded="false">
|
||
|
|
<i class="green ace-icon fa fa-user bigger-120"></i>
|
||
|
|
<?php echo $patient_name?>'s Profile
|
||
|
|
</a>
|
||
|
|
</li> -->
|
||
|
|
<li class="">
|
||
|
|
<a data-toggle="tab" href="#history" aria-expanded="false">
|
||
|
|
History
|
||
|
|
<?php
|
||
|
|
|
||
|
|
$sql_count_records="select * from sickness where emp_id='".$row['emp_id']."'";
|
||
|
|
$result_count_records = @mysqli_query($conn,$sql_count_records);
|
||
|
|
$num_rows_count_records=@mysqli_num_rows($result_count_records);
|
||
|
|
if( $num_rows_count_records=="" || $num_rows_count_records==null)
|
||
|
|
$num_rows_count_records=0;
|
||
|
|
?>
|
||
|
|
<span class="badge badge-danger" id="history_record"><?php echo $num_rows_count_records;?></span>
|
||
|
|
</a>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<div class="tab-content">
|
||
|
|
<div id="appointment" class="tab-pane fade in active " >
|
||
|
|
<?php include('fitness_form.php'); ?>
|
||
|
|
</div>
|
||
|
|
<!-- <div id="home" class="tab-pane fade">
|
||
|
|
|
||
|
|
</div> -->
|
||
|
|
<div id="history" class="tab-pane fade">
|
||
|
|
<?php include('history_sickness.php'); ?>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div><!--end tab table-->
|
||
|
|
</div><!--end of inner row-->
|
||
|
|
</div><!--end of widget-main -->
|
||
|
|
</div><!--end of inner widgetbody-->
|
||
|
|
</div><!--end of inner widgetbox-->
|
||
|
|
</div><!--end of xs-->
|
||
|
|
</div><!--end of inner widgetbody-->
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div><!--end of outer col-xs-12">-->
|
||
|
|
</div><!--end of outer row-->
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<script>
|
||
|
|
|
||
|
|
function save(){
|
||
|
|
|
||
|
|
flag=1;
|
||
|
|
$.ajax({
|
||
|
|
url : 'save_sickness_form.php',
|
||
|
|
type : "POST",
|
||
|
|
data : $("#fitness_form_employee").serialize(),
|
||
|
|
|
||
|
|
success : function(data) {
|
||
|
|
var history_record= $("#history_record").text();
|
||
|
|
|
||
|
|
$('#history_record').text(parseInt(history_record)+1);
|
||
|
|
|
||
|
|
BootstrapDialog.alert('Fitness Details Saved Successfully.');
|
||
|
|
$("#flex1").flexReload();
|
||
|
|
return;
|
||
|
|
|
||
|
|
},
|
||
|
|
error : function(data) {
|
||
|
|
BootstrapDialog.alert('Error Saving Fitness Details');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function opens(id,action) {
|
||
|
|
$.ajax({
|
||
|
|
url : 'select_sickness_form.php?id='+id+'',
|
||
|
|
type : 'POST',
|
||
|
|
success : function(data) {
|
||
|
|
//alert(data);
|
||
|
|
var data = $.parseJSON(data);
|
||
|
|
//alert(data);
|
||
|
|
|
||
|
|
$("#sickness_id").val(data.sickness_id);
|
||
|
|
$("#date_absent").val(data.date_absent);
|
||
|
|
$("#date_return").val(data.date_return);
|
||
|
|
$("#date_not_just").val(data.date_not_just);
|
||
|
|
$("#date_not_just_to").val(data.date_not_just_to);
|
||
|
|
$("#agency").val(data.agency);
|
||
|
|
$("#name").val(data.name);
|
||
|
|
$("#des").val(data.des);
|
||
|
|
},
|
||
|
|
error : function(data) {
|
||
|
|
BootstrapDialog.alert('Error Populating Sickness Form ');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|