219 lines
8.4 KiB
PHP
219 lines
8.4 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;
|
|
$Rolecodes= explode(',',$_SESSION ['RoleCode']) ;
|
|
$rolecode=$_SESSION ['RoleCode'];
|
|
$query = "select s.*, e.patient_name from sickness s, patient_master e where s.emp_id=e.id and s.sickness_id = '".$id."' ";
|
|
error_log($query);
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
|
|
} else{
|
|
$row=@mysqli_fetch_array($result);
|
|
@extract($row);
|
|
|
|
$emp_id = $row['emp_id'];
|
|
$sickness_id = $row['sickness_id'];
|
|
$past_ticket_no = $row['ticket_no'];
|
|
$past_agency = $row['agency'];
|
|
$past_des = $row['des_future'];
|
|
$past_from_date = $row['from_date'];
|
|
$past_to_date = $row['to_date'];
|
|
$past_date_absent = $row['date_absent'];
|
|
$past_date_absent_to = $row['date_absent_to'];
|
|
$past_date_return = $row['date_return'];
|
|
$existingAilmentList = $row['ailment_name'];
|
|
$ailment_id = $row['ailment_system'];
|
|
$height = $row['height'];
|
|
$weight = $row['weight'];
|
|
$bp = $row['bp'];
|
|
$pulse = $row['pulse'];
|
|
$chest_ex = $row['chest_ex'];
|
|
$chest_uex = $row['chest_uex'];
|
|
$nose = $row['nose'];
|
|
$throat = $row['throat'];
|
|
$rs = $row['rs'];
|
|
$cvs = $row['cvs'];
|
|
$cns = $row['cns'];
|
|
$blood = $row['blood'];
|
|
|
|
}
|
|
?>
|
|
|
|
<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.show({
|
|
message: 'Fitness Details Saved Successfully.',
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function(dialogItself) {
|
|
dialogItself.close();
|
|
location.href = "fitness_list.php";
|
|
}
|
|
}]
|
|
|
|
});
|
|
|
|
|
|
|
|
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>
|