191 lines
5.7 KiB
PHP
191 lines
5.7 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_opd_id'];
|
|
|
|
|
|
//echo $id;
|
|
|
|
$query = "select * from patient_master where id = '".$id."' ";
|
|
//echo $query;
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
|
|
} else{
|
|
$row=@mysqli_fetch_array($result);
|
|
@extract($row);
|
|
}
|
|
$page=$_REQUEST['page'];
|
|
?>
|
|
<?php
|
|
$sicknessId =$_REQUEST['flex_sickness_id'];
|
|
|
|
|
|
//echo $id;
|
|
|
|
$query = "select s.*, e.patient_name from sickness s, patient_master e where s.emp_id=e.id and s.sickness_id = '".$sicknessId."' ";
|
|
$query;
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
|
|
} else{
|
|
$row=@mysqli_fetch_array($result);
|
|
@extract($row);
|
|
}
|
|
?>
|
|
<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">Patient Sickness</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">
|
|
Sickness 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">
|
|
<?php
|
|
$flex_opd_id=($_REQUEST['flex_opd_id']!=''?$_REQUEST['flex_opd_id']:$_REQUEST['flex_patient_id']);
|
|
?>
|
|
History
|
|
<?php
|
|
$num_rows_count_records=0;
|
|
$sql_count_records="select count(*) count from sickness where emp_id='".$flex_opd_id."'";
|
|
$result_count_records = @mysqli_query($conn,$sql_count_records);
|
|
if(mysqli_num_rows($result_count_records) > 0) {
|
|
if ($row = mysqli_fetch_assoc($result_count_records)) {
|
|
$num_rows_count_records = $row['count'];
|
|
}
|
|
}
|
|
|
|
|
|
?>
|
|
<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('view_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 : $("#sickness_form_employee").serialize(),
|
|
|
|
success : function(data) {
|
|
var history_record= $("#history_record").text();
|
|
|
|
$('#history_record').text(parseInt(history_record)+1);
|
|
|
|
var data = $.parseJSON(data);
|
|
|
|
if(data[0].sickness_id!=null){
|
|
//$("#id").val(data[0].sickness_id);
|
|
$("#sickness_id").val(data[0].sickness_id);
|
|
|
|
}
|
|
|
|
BootstrapDialog.alert('Sickness Form Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Saving Sickness Form');
|
|
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);
|
|
$("#justifiable_from").val(myDateFormater(data.justifiable_from));
|
|
$("#justifiable_to").val(myDateFormater(data.justifiable_to));
|
|
$("#agency").val(data.agency);
|
|
$("#name").val(data.name);
|
|
$("#des").val(data.des);
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Populating Sickness Form ');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<?php include('common_ace.php'); ?>
|
|
|