248 lines
7.4 KiB
PHP
248 lines
7.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');
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
?>
|
|
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
<li class="#">
|
|
<i class="ace-icon fa fa-home home-icon"></i>
|
|
<a href="#">Home</a>
|
|
</li>
|
|
<li class="active">PENDING HYGIENE SURVEILLANCE FORM</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
<form name="flex_medical_form" method="post" action="" id="flex_medical_form">
|
|
|
|
<input type="hidden" name="medical_exam_id" id="medical_exam_id" />
|
|
<input type="hidden" name="patient_id" id="patient_id" />
|
|
<input type="hidden" name="response_id" id="response_id">
|
|
<input type="hidden" name="chs_no" id="chs_no">
|
|
<input type="hidden" name="khs_no" id="khs_no">
|
|
</form>
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
<input type="hidden" name="flex_medical_form" id="flex_medical_form" />
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="pdf_wah.php" />
|
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_wah.php" />
|
|
</form>
|
|
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var w = screen.width * .90;
|
|
|
|
var h = 0;
|
|
h = (window.innerHeight - ($("#navbar").height() + $(".breadcrumbs").height())) * .75;
|
|
$("#flex1").flexigrid({
|
|
url: 'chs_grid_script.php',
|
|
dataType: 'json',
|
|
colModel: [
|
|
|
|
{
|
|
display: 'Sr',
|
|
name: 'count',
|
|
width: w * .04,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
{
|
|
display: 'Location',
|
|
name: 'canteen_location',
|
|
width: w * .16,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Type',
|
|
name: 'type',
|
|
width: w * .16,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Date',
|
|
name: 'medical_entry_date',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: '',
|
|
name: '',
|
|
width: w * .1,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
],
|
|
buttons: [
|
|
|
|
|
|
// {name: 'Download Template', bclass: 'print_excel', onpress : download_template},
|
|
{
|
|
name: 'PDF',
|
|
bclass: 'print',
|
|
onpress: pdf
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
name: 'Excel',
|
|
bclass: 'print_excel',
|
|
onpress: excel
|
|
},
|
|
{
|
|
separator: true
|
|
}
|
|
// {name: 'Upload Excel', bclass: 'print_excel', onpress : upload_excel},
|
|
|
|
],
|
|
searchitems: [
|
|
|
|
{
|
|
display: 'Canteen Location',
|
|
name: 'canteen_location',
|
|
isdefault: true
|
|
},
|
|
|
|
],
|
|
sortname: "a.last_modified",
|
|
sortorder: "desc",
|
|
usepager: true, //pagination
|
|
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
//width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
|
|
function open_chs_form(response_id, chs_no) {
|
|
|
|
$("#response_id").val(response_id);
|
|
$("#chs_no").val(chs_no);
|
|
$("#flex_medical_form").attr('method', 'POST');
|
|
$("#flex_medical_form").attr('action', 'canteen_hygiene_surveillance_questionaire.php');
|
|
$("#flex_medical_form").submit();
|
|
}
|
|
|
|
function open_khs_form(response_id, chs_no) {
|
|
|
|
$("#response_id").val(response_id);
|
|
$("#khs_no").val(chs_no);
|
|
$("#flex_medical_form").attr('method', 'POST');
|
|
$("#flex_medical_form").attr('action', 'kitchen_hygiene_surveillance_questionaire.php');
|
|
$("#flex_medical_form").submit();
|
|
}
|
|
|
|
function open_form_chs_pdf( response_id, chs_no) {
|
|
$("#patient_id").val(patient_id);
|
|
$("#response_id").val(response_id);
|
|
$("#chs_no").val(chs_no);
|
|
$("#flex_medical_form").attr('target', "_blank");
|
|
$("#flex_medical_form").attr('method', 'POST');
|
|
$("#flex_medical_form").attr('action', 'canteen_hygiene_pdf.php');
|
|
$("#flex_medical_form").submit();
|
|
}
|
|
|
|
function pdf() {
|
|
window.open('pdf_wah.php', 'Patient List');
|
|
}
|
|
|
|
function excel() {
|
|
window.open('excel_wah.php', 'Report List');
|
|
}
|
|
function delete_khs_form(response_id, chs_no) {
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete this Kitchen Form?', function(result) {
|
|
if (result) {
|
|
$.ajax({
|
|
url: 'delete_questionaire_chs_form.php',
|
|
type: 'POST',
|
|
data: {
|
|
response_id: response_id,
|
|
chs_no: chs_no
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
if (JSON.parse(data) == 1) {
|
|
BootstrapDialog.alert("Kitchen Form Deleted Successfully");
|
|
$('#flex1').flexReload();
|
|
}
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert(" Error In Deleting Canteen form ");
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function delete_chs_form(response_id, chs_no) {
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete this Canteen Form?', function(result) {
|
|
if (result) {
|
|
$.ajax({
|
|
url: 'delete_questionaire_chs_form.php',
|
|
type: 'POST',
|
|
data: {
|
|
response_id: response_id,
|
|
chs_no: chs_no
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
if (JSON.parse(data) == 1) {
|
|
BootstrapDialog.alert("Canteen Form Deleted Successfully");
|
|
$('#flex1').flexReload();
|
|
}
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert(" Error In Deleting Canteen form ");
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|