231 lines
6.3 KiB
PHP
231 lines
6.3 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'); ?>
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
<li class="#">Data Setup</li>
|
|
<li class="#">Masters</li>
|
|
<li class="active">Rule Generation</li>
|
|
</ul>
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content">
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
<form name="f1" method="post" action="" id="flex_rule_gene">
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
<input type="hidden" name="flex_rule_equation_id" id="flex_rule_equation_id" />
|
|
|
|
<input type="hidden" name="toPage" id="toPage" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!-- grid -->
|
|
|
|
|
|
<!-- grid -->
|
|
</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: 'rule_details_script.php',
|
|
dataType: 'json',
|
|
colModel: [{
|
|
display: '',
|
|
name: 'link',
|
|
width: w * .10,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Sr',
|
|
name: 'count',
|
|
width: w * .04,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Rule equation',
|
|
name: 'rule_equation',
|
|
width: w * .20,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Text Comparison Rule?',
|
|
name: 'is_string_rule',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Result',
|
|
name: 'result_disp',
|
|
width: w * .10,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Abnormality',
|
|
name: 'abnormality',
|
|
width: w * .10,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Result Field',
|
|
name: 'result',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
}, {
|
|
display: 'Risks',
|
|
name: 'risks',
|
|
width: w * .3,
|
|
sortable: true,
|
|
align: 'left'
|
|
}, {
|
|
display: 'Advices',
|
|
name: 'advices',
|
|
width: w * .3,
|
|
sortable: true,
|
|
align: 'left'
|
|
}, {
|
|
display: 'Color',
|
|
name: 'color',
|
|
width: w * .08,
|
|
sortable: true,
|
|
align: 'left'
|
|
}, {
|
|
display: 'Range Type',
|
|
name: 'range_type',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
}
|
|
],
|
|
buttons: [
|
|
|
|
{
|
|
name: 'Add',
|
|
bclass: 'add',
|
|
onpress: add
|
|
},
|
|
|
|
|
|
{
|
|
separator: true
|
|
}
|
|
],
|
|
searchitems: [
|
|
|
|
{
|
|
display: 'Checkup Form Section',
|
|
name: 'checkup_form_section',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Result',
|
|
name: 'reuslt'
|
|
},
|
|
|
|
],
|
|
sortname: "parameter_name",
|
|
sortorder: "asc",
|
|
usepager: true, //pagination
|
|
|
|
useRp: true,
|
|
rp: 20, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
//width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
function add() {
|
|
window.location = 'rule_gen.php';
|
|
|
|
}
|
|
|
|
|
|
function open_rule_form(rule_equation_id, action) {
|
|
console.log(rule_equation_id + ':' + action);
|
|
|
|
if (rule_equation_id != null && rule_equation_id != '') {
|
|
|
|
$("#flex_rule_equation_id").val(rule_equation_id);
|
|
$("#toPage").val(action);
|
|
$("#flex_rule_gene").attr('method', 'POST');
|
|
$("#flex_rule_gene").attr('action', 'rule_gen_edit.php');
|
|
$("#flex_rule_gene").submit();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
function delete_rule_form(rule_eq_id) {
|
|
|
|
$.ajax({
|
|
url: 'delete_rule_details.php',
|
|
data: {
|
|
rule_eq_id: rule_eq_id
|
|
},
|
|
type: 'POST',
|
|
success: function(data) {
|
|
let result = JSON.parse(data);
|
|
// alert(result);
|
|
if (result == "SUCCESS") {
|
|
|
|
BootstrapDialog.alert('Deleted Details Successfully');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Ambulance Details Successfully');
|
|
return;
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<?php include('form/add_rule.php'); ?>
|