1258 lines
67 KiB
PHP
1258 lines
67 KiB
PHP
<?php
|
|
// include('includes/functions.php');
|
|
$enabledSections = array();
|
|
$allSectionids = array();
|
|
//SELECT * FROM checkup_form where emp_id='$id' AND is_test_completed='Y'AND DATE (checkup_date)<DATE(NOW()-INTERVAL 24 HOUR) order by checkup_id desc limit 1
|
|
//yogi changes
|
|
$checkup_type_id = Null;
|
|
|
|
$query = "SELECT * FROM checkup_form where emp_id='$id' AND is_test_completed='Y'AND DATE (checkup_date)<DATE(NOW()-INTERVAL 24 HOUR) order by checkup_id desc limit 1";
|
|
error_log("#check :" . $query);
|
|
$result = @mysqli_query($conn, $query);
|
|
$row = mysqli_fetch_array($result);
|
|
// $checkup_id = '29';
|
|
// $row['checkup_id']=29;
|
|
// echo $query;
|
|
?>
|
|
<?php
|
|
|
|
|
|
$new_sqll = "SELECT checkup_section_ids, is_test_completed, checkup_id ,checkup_type_id FROM checkup_form WHERE emp_id = '" . (isset($id) ? $id : $_REQUEST['patient_id']) . "' AND checkup_id = '" . $row['checkup_id'] . "' ";
|
|
error_log("chekup_id " . $new_sqll);
|
|
$resultl = mysqli_query($conn, $new_sqll);
|
|
if (mysqli_num_rows($resultl) > 0) {
|
|
$rowl = @mysqli_fetch_array($resultl);
|
|
// print_r($rowl);
|
|
$param_present = (explode(',', $rowl['checkup_section_ids']));
|
|
$is_test_completed = $rowl['is_test_completed'];
|
|
$checkup_id = $rowl['checkup_id'];
|
|
$checkup_type_id = $row1['checkup_type_id'];
|
|
}
|
|
if ($checkup_type_id == Null) {
|
|
$checkup_type_id = $_REQUEST['checkup_type_id'];
|
|
}
|
|
|
|
$sql11 = "select * from checkup_type where checkup_type_id='" . $checkup_type_id . "'";
|
|
error_log("sql11" . $sql11);
|
|
$result11 = @mysqli_query($conn, $sql11);
|
|
$row11 = mysqli_fetch_array($result11);
|
|
$checkup_type_section_ids = $row11['checkup_form_section_ids'];
|
|
error_log("checkup_type_id" . $checkup_type_id);
|
|
?>
|
|
|
|
<style>
|
|
#profile_link {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* #checkup_section_header {
|
|
display: none;
|
|
} */
|
|
|
|
.button span {
|
|
font-size: 10px !important;
|
|
}
|
|
|
|
.button {
|
|
text-decoration: none !important;
|
|
font-size: 10px;
|
|
font-weight: 500;
|
|
padding: 15px;
|
|
margin: 10px !important;
|
|
width: 50px;
|
|
background: #ebeef1;
|
|
cursor: pointer;
|
|
border: none;
|
|
color: black;
|
|
border-radius: 50px;
|
|
box-shadow: 10px 10px 10px -1px rgba(10, 99, 169, 0.16),
|
|
-10px -10px 10px -1px rgba(255, 255, 255, 0.70);
|
|
|
|
}
|
|
|
|
table {
|
|
box-shadow: 1px 1px lightblue;
|
|
transition: box-shadow 1s;
|
|
}
|
|
|
|
table:hover {
|
|
box-shadow: 10px 10px lightblue;
|
|
}
|
|
|
|
input {
|
|
width: 100px;
|
|
}
|
|
|
|
th {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* @media (min-width : 768px) .col-sm-12 {
|
|
width:
|
|
|
|
|
|
|
|
|
|
103%;
|
|
} */
|
|
|
|
input,
|
|
input::-webkit-input-placeholder {
|
|
font-size: 10px;
|
|
}
|
|
|
|
#panel-title1>a,
|
|
#panel-title1>a:active {
|
|
display: block;
|
|
font-size: 12px;
|
|
font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial,
|
|
sans-serif;
|
|
color: #337ab7;
|
|
height: 17px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* #panel-heading1 a:before {
|
|
font-family: 'Glyphicons Halflings';
|
|
content: "\e114";
|
|
float: right;
|
|
transition: all 0.5s;
|
|
} */
|
|
|
|
#panel-heading1.active a:before {
|
|
-webkit-transform: rotate(180deg);
|
|
-moz-transform: rotate(180deg);
|
|
transform: rotate(180deg);
|
|
}
|
|
</style>
|
|
<script>
|
|
function load_checkup_header(checkup_type_id) {
|
|
document.checkup_form_employee.submit();
|
|
}
|
|
|
|
function showHeaderSection(section_id) {
|
|
// alert("hii");
|
|
if ($("#" + section_id).prop('checked')) {
|
|
$("#pannel_" + section_id).show();
|
|
} else {
|
|
$("#pannel_" + section_id).hide();
|
|
}
|
|
console.log(section_id);
|
|
//alert(section_id);
|
|
}
|
|
|
|
function add_multi_value(ids) {
|
|
val_arr = new Array();
|
|
let idv = ids.id;
|
|
let idh = "multi" + idv;
|
|
let va = document.getElementById(idh);
|
|
val_arr = va.value.split(",");
|
|
$("#" + ids.id).val(val_arr);
|
|
$("#" + ids.id).trigger("chosen:updated");
|
|
}
|
|
</script>
|
|
|
|
|
|
<form name="checkup_form_employee" id="checkup_form_employee" method="POST">
|
|
<input type="hidden" id="checkup_section_ids" name="checkup_section_ids[]">
|
|
<div class="mainPanel">
|
|
<div class="panel-group" id="accordion">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" id="panel-heading1" style="padding: 5px 15px;">
|
|
<h5 class="widget-title"
|
|
style="display: block; font-size: 12px; color: #337ab7; height: 17px; text-decoration: none; font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
|
|
Patient - <?= $patient_name ?> <i style="margin-left:10px; font-size: 17px;" class="fa fa-user"
|
|
target="_blank" id="profile_link" onclick="open_dashboard(<?= $patient_id ?>)"></i> </h5>
|
|
<div align='right'>
|
|
<!-- <?php $checkupTypeId = getFieldFromTable('checkup_type_id', 'checkup_form', 'checkup_id', $_REQUEST['flex_checkup_id']); ?> -->
|
|
<a class="button" style="visibility: hidden;" id="forwardButton" tabindex="0"
|
|
aria-controls="dynamic-table" title="Save " style="width: 80px;">
|
|
<span><i class="ace-icon fa fa-save"></i> SAVE
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<a class="button" id="generateButton" tabindex="0" aria-controls="dynamic-table"
|
|
onclick="rule_gen(<?= $checkup_type_id ?>);" title="Generate Abnormality">
|
|
<span><i class="ace-icon fa fa-print"></i>
|
|
Add Calculations
|
|
</span>
|
|
</a>
|
|
<?php if (isset($_REQUEST['returnPage'])) { ?>
|
|
|
|
<a href="<?= $_REQUEST['returnPage'] . '&backButon=back' ?>" class="button ">Back</a>
|
|
<?php } ?>
|
|
|
|
<input type="hidden" name="attendedStatus" id="attendedStatus"
|
|
value="<?= $__STATUS_LAB_ATTENDED ?>" />
|
|
<input type="hidden" name="rule_param_id_onc" id="rule_param_id_onc" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="row">
|
|
<?php
|
|
|
|
$emp_id = $_REQUEST['patient_id'] != '' ? $_REQUEST['patient_id'] : $_REQUEST['emp_id_history'];
|
|
$sql_employee = "select * from patient_master where id='$emp_id'";
|
|
$result = mysqli_query($conn, $sql_employee);
|
|
// $checkup_id = $_REQUEST['flex_checkup_id'];
|
|
$sql_checkup = "select * from checkup_form where checkup_id='$checkup_id'";
|
|
// echo $sql_checkup;
|
|
error_log("sql_checkup" . $sql_checkup);
|
|
$checkup_result = mysqli_query($conn, $sql_checkup);
|
|
$row_checkup = mysqli_fetch_assoc($checkup_result);
|
|
while ($row_employee = mysqli_fetch_assoc($result)) {
|
|
?>
|
|
<input type="hidden" id="checkup_emp_id" name="checkup_emp_id"
|
|
value="<?php echo ($_REQUEST['patient_id'] != '' && $_REQUEST['patient_id'] != null) ? $_POST['patient_id'] : $_REQUEST['emp_id_history']; ?>">
|
|
<input type="hidden" name="checkup_type_id" id="checkup_type_id"
|
|
value="<?php echo $checkup_type_id ?>">
|
|
|
|
<input type="hidden" style="height: 30px;" class="col-xs-4" id="hiddenHighlighter"
|
|
name="hiddenHighlighter" />
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Ticket No</th>
|
|
<th>Patient ID</th>
|
|
|
|
<th>Employee Code</th>
|
|
<th>Employee Name</th>
|
|
<th>Employee Designation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<?php
|
|
if ($row_checkup['ticket_no'] == null || $row_checkup['ticket_no'] == '') {
|
|
$ticket_no = creatingCheckupTicketNo();
|
|
echo $ticket_no;
|
|
} else {
|
|
$ticket_no = $row_checkup['ticket_no'];
|
|
echo $ticket_no;
|
|
}
|
|
|
|
?>
|
|
<input id="ticket_no" type="hidden" style="height: 30px"
|
|
class="form-control" name="ticket_no"
|
|
value="<?php echo $ticket_no ?>" />
|
|
<input type="hidden" name="pat_age" id="pat_age"
|
|
value="<?= $row_employee['dob'] ?>" />
|
|
<input type="hidden" name="pat_gender" id="pat_gender"
|
|
value="<?= $row_employee['gender'] ?>" />
|
|
</td>
|
|
|
|
<td> <?= $_REQUEST['patient_id'] ?></td>
|
|
<td> <?= $row_employee['emp_code'] ?></td>
|
|
<td> <?php echo ($row_employee['patient_name']) ?></td>
|
|
<td><?php echo $employee_designation = getTableFieldValue('designation', 'designation_name', 'designation_id', $row_employee['designation_id']); ?>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th>Checkup Date</th>
|
|
</tr>
|
|
<tr>
|
|
<input type="hidden" name="checkup_id" id="checkup_id"
|
|
value="<?php echo $checkup_id ?>">
|
|
<input type="hidden" name="isHiperTensed" id="isHiperTensed">
|
|
<input type="hidden" name="is_test_completed" id="is_test_completed" value="Y">
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="checkdown_date" name="checkdown_date" type="text"
|
|
class="form-control date-timepicker" style="height: 30px" />
|
|
<span class="input-group-addon"> <i style="height: 5px"
|
|
class="fa fa-calendar-o bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div style="margin-left: 10px;">
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th>Comments</th>
|
|
</tr>
|
|
<tr>
|
|
<td><textarea class="form-control" rows="1" name="remarks"
|
|
id="remarks"><?php echo $row['remarks']; ?></textarea></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div style="margin-left: 10px;">
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th>Referred By</th>
|
|
</tr>
|
|
<tr>
|
|
<td><select name="ref_by_doc" id="ref_by_doc"
|
|
class="form-control chosen-select">
|
|
<option value="">Select Doc Name</option>
|
|
<?php echo generate_options("SELECT doctor_id,trim(concat(ifnull(doctor_name,''),' ',ifnull(doctor_desc,''))) doc_name FROM doctors_master",'','doctor_id', 'doc_name','',''); ?>
|
|
|
|
|
|
</select></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row" id="checkup_section_header">
|
|
<div class="col-sm-12">
|
|
<div style="margin-left: 10px;">
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th colspan="4">Checkup Section Header</th>
|
|
</tr>
|
|
<tr>
|
|
<?php
|
|
$sql_section = "select * from checkup_form_section where Status='Active' and section_id in ($checkup_type_section_ids) order by section_id asc";
|
|
error_log("sql_section=" . $sql_section);
|
|
// echo $sql_section;
|
|
$count = 1;
|
|
$result_section = mysqli_query($conn, $sql_section);
|
|
while ($row_section = mysqli_fetch_assoc($result_section)) {
|
|
if ($count == 4) {
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<tr><?php
|
|
}
|
|
?>
|
|
<td>
|
|
<input type="checkbox" id="<?php echo $row_section['section_desc']; ?>"
|
|
name="<?php echo $row_section['section_id']; ?>"
|
|
onclick="showHeaderSection('<?php echo $row_section['section_desc']; ?>')"
|
|
<?php
|
|
array_push($allSectionids, $row_section['section_desc']);
|
|
if (mysqli_num_rows($resultl) > 0) {
|
|
foreach ($param_present as $x => $val) {
|
|
if ($val == $row_section['section_id']) {
|
|
echo 'checked';
|
|
array_push($enabledSections, $row_section['section_desc']);
|
|
}
|
|
}
|
|
}
|
|
?>>
|
|
<?php
|
|
|
|
echo $row_section['section_name'];
|
|
?>
|
|
</td>
|
|
<?php
|
|
|
|
if ($count % 3 == 0) {
|
|
?>
|
|
</tr><?php
|
|
}
|
|
$count++;
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<?php
|
|
//yogi changes
|
|
$sql_checkup_parameter_range = "select * from checkup_parameter where enabled='Y' and checkup_form_section_id in ('$checkup_type_section_ids')";
|
|
$result_checkup_parameter_range = mysqli_query($conn, $sql_checkup_parameter_range);
|
|
$i = 0;
|
|
$parameter_names = array();
|
|
$starting_ranges = array();
|
|
$ending_ranges = array();
|
|
$less_risks = array();
|
|
$more_risks = array();
|
|
$less_advices = array();
|
|
$more_advices = array();
|
|
$column_names = array();
|
|
while ($row_checkup_parameter_range = mysqli_fetch_assoc($result_checkup_parameter_range)) {
|
|
$parameter_names[$i] = $row_checkup_parameter_range['parameter_name'];
|
|
$column_names[$i] = $row_checkup_parameter_range['column_name'];
|
|
$starting_ranges[$i] = $row_checkup_parameter_range['starting_range'];
|
|
$ending_ranges[$i] = $row_checkup_parameter_range['ending_range'];
|
|
$less_advices[$i] = $row_checkup_parameter_range['less_advices'];
|
|
$more_advices[$i] = $row_checkup_parameter_range['more_advices'];
|
|
$less_risks[$i] = $row_checkup_parameter_range['less_risks'];
|
|
$more_risks[$i] = $row_checkup_parameter_range['more_risks'];
|
|
$i = $i + 1;
|
|
}
|
|
?>
|
|
<?php
|
|
//$checkup_type_id = $_REQUEST['checkup_type_id_db'] != '' ? $_REQUEST['checkup_type_id_db'] : $_REQUEST['checkup_type_id'];
|
|
$sql_checkup_parameter_section = "select * from checkup_form_section where section_id in ($checkup_type_section_ids) order by section_id asc";
|
|
//$sql_checkup_parameter_section = "select section_id,section_name,section_desc from checkup_parameter a inner join checkup_form_section b on a.checkup_form_section_id=b.section_id where b.Status='Active' group by checkup_form_section_id";
|
|
// echo $sql_checkup_parameter_section;
|
|
error_log("sql_checkup_parameter_section" . $sql_checkup_parameter_section);
|
|
?>
|
|
|
|
<?php
|
|
// echo $sql_checkup_parameter_section;
|
|
$i1 = 0;
|
|
$result_checkup_parameter_section = mysqli_query($conn, $sql_checkup_parameter_section);
|
|
while ($row_checkup_parameter_section = mysqli_fetch_assoc($result_checkup_parameter_section)) {
|
|
?>
|
|
<div class="panel panel-default" id="pannel_<?php echo $row_checkup_parameter_section['section_desc'] ?>"
|
|
style="display: none;">
|
|
<div class="panel-heading" id="panel-heading1">
|
|
<h5 class="panel-title" id="panel-title1">
|
|
<a role="button" data-toggle="collapse" href="#collapseOne<?php echo $i1; ?>"
|
|
aria-expanded="true" aria-controls="collapseOne">
|
|
<?php echo $row_checkup_parameter_section['section_name'] ?>
|
|
</a>
|
|
</h5>
|
|
</div>
|
|
<div id="collapseOne<?php echo $i1; ?>" class="panel-collapse collapse">
|
|
<div class="panel-body">
|
|
|
|
<div style="margin-bottom: 20px" class="panel panel-default">
|
|
<?php
|
|
$checkup_section_id = $row_checkup_parameter_section['section_id'];
|
|
// echo $checkup_section_id;
|
|
$sql_questionnaire_sections = "select * from checkup_form_section where Status='Active' and section_id = $checkup_section_id";
|
|
error_log("sql_questionnaire_sections" . $sql_questionnaire_sections);
|
|
// echo $sql_questionnaire_sections;
|
|
$result_questionnaire_sections = @mysqli_query($conn, $sql_questionnaire_sections);
|
|
$countSection = 0;
|
|
$count = 0;
|
|
$j = 0;
|
|
while ($row_questionnaire_sections = @mysqli_fetch_array($result_questionnaire_sections)) {
|
|
$section_id = $row_questionnaire_sections['section_id'];
|
|
$section_desc = $row_questionnaire_sections['section_desc'];
|
|
// echo $section_desc;
|
|
$sql_questionnaire = "select * from questionnaire where question_section_id='$section_id'";
|
|
error_log("#Quetinary :" . $sql_questionnaire);
|
|
$result_questionnaire = @mysqli_query($conn, $sql_questionnaire);
|
|
$no_of__question_rows = mysqli_num_rows($result_questionnaire);
|
|
$srNo = 0;
|
|
?>
|
|
|
|
|
|
|
|
<div class="panel-heading" id="panel-heading1">
|
|
<h5 class="panel-title" id="panel-title1">
|
|
<a role="button" data-toggle="collapse"
|
|
href="#collapseOne<?php echo $section_desc; ?>" aria-expanded="true"
|
|
aria-controls="collapseOne">
|
|
Questionnaire </a>
|
|
</h5>
|
|
</div>
|
|
<div id="collapseOne<?php echo $section_desc; ?>" class="panel-collapse collapse">
|
|
<div class="panel-body">
|
|
<?php if ($no_of__question_rows > 0) { ?>
|
|
<table class="table table-condensed table-bordered" width="100%" border=1
|
|
id="familyMembersTable" class="table-hover">
|
|
<tbody>
|
|
<tr bgcolor="#d3d3d3">
|
|
<th>Sr</th>
|
|
<th>Question</th>
|
|
<th>Answer</th>
|
|
</tr>
|
|
<?php
|
|
if ($no_of__question_rows > 0) {
|
|
?>
|
|
<input type="hidden" name="querowCount" id="querowCount"
|
|
value="<?php echo $no_of_all_question_rows; ?>" />
|
|
<?php } else { ?>
|
|
<input type="hidden" name="querowCount" id="querowCount" value="1" />
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($no_of__question_rows > 0) {
|
|
while ($row_questionnaire = @mysqli_fetch_array($result_questionnaire)) {
|
|
$ques_id = $row_questionnaire['question_id'];
|
|
$sql_ans = "select * from questionnaire_ans where que_id='$ques_id' and emp_id=$emp_id";
|
|
// echo $sql_ans;
|
|
$result_ans = @mysqli_query($conn, $sql_ans);
|
|
$row_ans = @mysqli_fetch_array($result_ans);
|
|
?>
|
|
<tr id="queTableRow<?= $count; ?>">
|
|
<td> <?= $srNo + 1; ?></td>
|
|
<td><?php echo $row_questionnaire['question_name'] ?> <input
|
|
name="que_id<?= $count; ?>"
|
|
value="<?= $row_questionnaire['question_id'] ?>" type="hidden">
|
|
</td>
|
|
<td align="center"><?php if ($row_ans['answer'] == null || $row_ans['answer'] == "") {
|
|
echo "Not answered";
|
|
} else {
|
|
echo $row_ans['answer'];
|
|
} ?></td>
|
|
</tr>
|
|
<?php
|
|
++$count;
|
|
++$srNo;
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<?php } else { ?>
|
|
<center>No Questions Available</center>
|
|
<?php } ?>
|
|
</div>
|
|
<center>
|
|
<button class="btn-primary"
|
|
onclick="goto_employee_questionnaire(<?php echo $emp_id ?>);">
|
|
Edit Questionnaire</button>
|
|
</center>
|
|
</div>
|
|
<?php $countSection++; ?>
|
|
</div>
|
|
|
|
<?php
|
|
//yogi changes
|
|
error_log("yogichanges");
|
|
$sql_group_by = "SELECT count(*) as total FROM checkup_parameter WHERE checkup_form_section_id = '" . $row_checkup_parameter_section['section_id'] . "' and enabled='Y' group by group_id order by column_order asc";
|
|
// echo $sql_group_by;
|
|
$result_group_by = mysqli_query($conn, $sql_group_by);
|
|
// $data_group_by=mysqli_fetch_assoc($result_group_by);
|
|
// $no_of_tables= $data_group_by['total'];
|
|
// echo "shu".$no_of_tables[0]['total'];
|
|
$rows_no_groups = array();
|
|
$h = 0;
|
|
while ($data_group_by = mysqli_fetch_array($result_group_by)) {
|
|
$rows_no_groups[$h] = $data_group_by['total'];
|
|
$h++;
|
|
}
|
|
if ($row_checkup != null && $row_checkup != '') {
|
|
$sql_checkup_parameter_col = "select * from (select * from checkup_parameter where enabled='Y') a inner join checkup_form_key_value b on b.checkup_form_key=a.column_name where checkup_form_section_id='" . $row_checkup_parameter_section['section_id'] . "' and b.checkup_form_id='" . $row_checkup['checkup_id'] . "' order by column_order asc";
|
|
} else {
|
|
$sql_checkup_parameter_col = "select * from checkup_parameter where checkup_form_section_id='" . $row_checkup_parameter_section['section_id'] . "' and enabled='Y' order by column_order asc";
|
|
}
|
|
// echo $sql_checkup_parameter_col;
|
|
error_log("sql_checkup_parameter_col" . $sql_checkup_parameter_col);
|
|
$result_checkup_parameter_col = mysqli_query($conn, $sql_checkup_parameter_col);
|
|
$no_of_rows = mysqli_num_rows($result_checkup_parameter_col);
|
|
if ($no_of_rows == 0) {
|
|
$sql_checkup_parameter_col = "select * from checkup_parameter where checkup_form_section_id='" . $row_checkup_parameter_section['section_id'] . "' and enabled='Y' order by column_order asc";
|
|
// echo $sql_checkup_parameter_col;
|
|
$result_checkup_parameter_col = mysqli_query($conn, $sql_checkup_parameter_col);
|
|
$no_of_rows = mysqli_num_rows($result_checkup_parameter_col);
|
|
// echo $no_of_rows;
|
|
}
|
|
// $no_of_rows=ceil($no_of_rows/9);
|
|
// $no_of_rows=ceil($no_of_rows/9);
|
|
// echo $no_of_rows;
|
|
$data = array();
|
|
$count = 0;
|
|
$flag_rows = 0;
|
|
while ($row_checkup_parameter_col = mysqli_fetch_assoc($result_checkup_parameter_col)) {
|
|
$data[] = $row_checkup_parameter_col;
|
|
if ($row_checkup_parameter_col['checkup_form_section_id'] == 1 && $flag_rows == 0) {
|
|
$no_of_rows = ($no_of_rows / 10);
|
|
// echo $no_of_rows;
|
|
$flag_rows = 1;
|
|
}
|
|
}
|
|
if ($flag_rows == 0) {
|
|
$no_of_rows = ceil(count($rows_no_groups) / 3);
|
|
}
|
|
$counter = 0;
|
|
$h = 0;
|
|
$k = 0;
|
|
for ($i = 0; $i < $no_of_rows; $i++) {
|
|
?>
|
|
<div class="row">
|
|
<?php
|
|
for ($k = 0; $k < 3; $k++) {
|
|
$flag = 0;
|
|
?><div class="col-sm-4">
|
|
<div class="table-responsive" style="margin-left: 10px;">
|
|
<table class="table table-bordered">
|
|
<?php
|
|
$grp=$h+1;
|
|
$tital=getTableFieldValue('checkup_parameter_group','group_tital','group_section',$row_checkup_parameter_section['section_id'],'group_no',$grp);
|
|
if($tital!='' || $tital!=null ){?>
|
|
<tr>
|
|
<td colspan="<?=$rows_no_groups[$h]?>">
|
|
<b style=" font-size: 11px; font-weight: 600"><?=$tital?></b>
|
|
</td>
|
|
</tr>
|
|
|
|
<?php }?>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
<!-- -->
|
|
|
|
|
|
<?php
|
|
for ($j = 0; $j < $rows_no_groups[$h]; $j++) {
|
|
?>
|
|
<th><?php
|
|
echo $data[$count]['parameter_name'];
|
|
$count++;
|
|
if ($count == count($data)) {
|
|
$flag = 1;
|
|
break;
|
|
}
|
|
?></th>
|
|
<?php
|
|
}
|
|
?>
|
|
</tr>
|
|
<tr>
|
|
<?php
|
|
for ($j = 0; $j < $rows_no_groups[$h]; $j++) {
|
|
$parameter_values = $data[$counter]['parameter_value'];
|
|
if ($parameter_values != "" || $parameter_values != null) {
|
|
$parameter_values_array = explode(",", $parameter_values);
|
|
$input_type = $data[$counter]['input_type'];
|
|
|
|
if ($input_type == 'select') {
|
|
|
|
?>
|
|
<td><select id="<?= $data[$counter]['column_name'] ?>"
|
|
name="<?= $data[$counter]['column_name'] ?>" style="width: 51px;">
|
|
<?php
|
|
echo "<option value='' selected >select</option>";
|
|
for ($p = 0; $p < count($parameter_values_array); $p++) {
|
|
$parameter_name = getTableFieldValue('checkup_parameter_value', 'parameter_value_name', 'parameter_value_id', $parameter_values_array[$p]);
|
|
if ($data[$counter]['checkup_form_value'] == $parameter_values_array[$p]) {
|
|
echo "<option value='" . $parameter_values_array[$p] . "' selected >" . $parameter_name . "</option>";
|
|
} else {
|
|
echo "<option value='" . $parameter_values_array[$p] . "'>" . $parameter_name . "</option>";
|
|
}
|
|
}
|
|
?>
|
|
</select></td>
|
|
<?php
|
|
} else if ($input_type == 'multiselect') {
|
|
?>
|
|
<td>
|
|
<input type="hidden" name="multi<?= $data[$counter]['column_name'] ?>"
|
|
id="multi<?= $data[$counter]['column_name'] ?>"
|
|
value="<?= $data[$counter]['checkup_form_value'] ?>" />
|
|
<select class="form-control chosen-select" multiple
|
|
name="<?= $data[$counter]['column_name'] ?>[]"
|
|
id="<?= $data[$counter]['column_name'] ?>" style="width: 51px;">
|
|
<?php
|
|
for ($p = 0; $p < count($parameter_values_array); $p++) {
|
|
$parameter_name = getTableFieldValue('checkup_parameter_value', 'parameter_value_name', 'parameter_value_id', $parameter_values_array[$p]);
|
|
echo "<option value='" . $parameter_values_array[$p] . "'>" . $parameter_name . "</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
add_multi_value(<?= $data[$counter]['column_name'] ?>);
|
|
});
|
|
</script>
|
|
<?php
|
|
}
|
|
} else {
|
|
$input_type = $data[$counter]['input_type'];
|
|
$readonly_field = $data[$counter]['readonly_field'];
|
|
if ($input_type == 'number') {
|
|
if ($readonly_field == 'N') {
|
|
?>
|
|
<td>
|
|
<input type="hidden" id="read_<?= $data[$counter]['column_name'] ?>"
|
|
name="read_<?= $data[$counter]['column_name'] ?>"
|
|
value="<?= $data[$counter]['checkup_parameter_id'] ?>" />
|
|
<input id="<?= $data[$counter]['column_name'] ?>" class="
|
|
form-control" readonly name="<?= $data[$counter]['column_name'] ?>" type="number"
|
|
min="<?php echo $data[$counter]['starting_range']; ?>"
|
|
max="<?php echo $data[$counter]['ending_range']; ?>"
|
|
placeholder="<?= $data[$counter]['place_holder_name'] ?>"
|
|
onchange="calculateBMI();checkRange(this.value,this.min,this.max,this.id);">
|
|
</td>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<td>
|
|
|
|
<input id="<?= $data[$counter]['column_name'] ?>" class="
|
|
form-control" name="<?= $data[$counter]['column_name'] ?>" type="number"
|
|
min="<?php echo $data[$counter]['starting_range']; ?>"
|
|
max="<?php echo $data[$counter]['ending_range']; ?>"
|
|
placeholder="<?= $data[$counter]['place_holder_name'] ?>"
|
|
onchange="calculateBMI();checkRange(this.value,this.min,this.max,this.id);">
|
|
</td>
|
|
<?php
|
|
}
|
|
} else {
|
|
if ($input_type == 'textarea') {
|
|
?>
|
|
<td><textarea id="<?= $data[$counter]['column_name'] ?>" rows="4"
|
|
class="form-control" name="<?= $data[$counter]['column_name'] ?>"
|
|
placeholder="<?= $data[$counter]['place_holder_name'] ?>"> </textarea>
|
|
</td>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<td><input id="<?= $data[$counter]['column_name'] ?>" class="form-control"
|
|
name="<?= $data[$counter]['column_name'] ?>"
|
|
value="<?= $data[$counter]['checkup_form_value'] ?>" type="text"
|
|
placeholder="<?= $data[$counter]['place_holder_name'] ?>"
|
|
onchange="calculateBMI();">
|
|
</td>
|
|
<?php
|
|
}
|
|
}
|
|
}
|
|
$counter++;
|
|
if ($counter == count($data)) {
|
|
// $flag1=1;
|
|
break;
|
|
}
|
|
}
|
|
$h++;
|
|
?>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div> <?php
|
|
if ($flag == 1)
|
|
break;
|
|
}
|
|
?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php if ($row_checkup_parameter_section['section_desc'] == "general_physical_examination") { ?>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" id="panel-heading1">
|
|
<h5 class="panel-title" id="panel-title1">
|
|
<a role="button" data-toggle="collapse" href="#collapsethree<?php echo $i1; ?>"
|
|
aria-expanded="true" aria-controls="collapseOne"> Charts </a>
|
|
</h5>
|
|
</div>
|
|
<div id="collapsethree<?php echo $i1; ?>" class="panel-collapse collapse">
|
|
<div class="panel-body">
|
|
<div class="row">
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
<div class="widget-box transparent">
|
|
<h4 class="widget-title lighter">
|
|
<i class="ace-icon fa fa-star orange"></i> Blood Pressure
|
|
Tracker
|
|
</h4>
|
|
<div class="widget-body">
|
|
<div class="widget-main no-padding">
|
|
<div id="canvas-holder1" style="width: 100%;">
|
|
<div class="chartjs-size-monitor">
|
|
<div class="chartjs-size-monitor-expand">
|
|
<div class=""></div>
|
|
</div>
|
|
<div class="chartjs-size-monitor-shrink">
|
|
<div class=""></div>
|
|
</div>
|
|
</div>
|
|
<canvas id="chartBP"
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
width="1013" height="506"
|
|
class="chartjs-render-monitor"></canvas>
|
|
<div id="chartjs-tooltip" class="center"
|
|
style="opacity: 0; left: 527.674px; top: 88.722px; font-family: & amp; amp; amp; quot; Helvetica Neue&amp; amp; amp; quot; , Helvetica , Arial, sans-serif; font-size: 12px; font-style: normal; padding: 6px;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>April</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="chartjs-tooltip-key"
|
|
style="background: rgb(255, 61, 103); border-color: rgb(255, 61, 103); border-width: 2px"></span>My
|
|
First dataset: 93</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="chartjs-tooltip-key"
|
|
style="background: rgb(5, 155, 255); border-color: rgb(5, 155, 255); border-width: 2px"></span>My
|
|
Second dataset: 2</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.widget-main -->
|
|
</div>
|
|
<!-- /.widget-body -->
|
|
</div>
|
|
<!-- /.widget-box -->
|
|
</div>
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
<div class="widget-box transparent">
|
|
<h4 class="widget-title lighter">
|
|
<i class="ace-icon fa fa-star orange"></i> Employee Weight
|
|
Tracker
|
|
</h4>
|
|
<div class="widget-body">
|
|
<div class="widget-main no-padding">
|
|
<div id="canvas-holder2" style="width: 100%;">
|
|
<div class="chartjs-size-monitor">
|
|
<div class="chartjs-size-monitor-expand">
|
|
<div class=""></div>
|
|
</div>
|
|
<div class="chartjs-size-monitor-shrink">
|
|
<div class=""></div>
|
|
</div>
|
|
</div>
|
|
<canvas id="chartWeight"
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
width="1013" height="506"
|
|
class="chartjs-render-monitor"></canvas>
|
|
</div>
|
|
<!-- /.widget-main -->
|
|
</div>
|
|
<!-- /.widget-body -->
|
|
</div>
|
|
<!-- /.widget-box -->
|
|
</div>
|
|
</div>
|
|
<!-- PAGE CONTENT ENDS -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if ($row_checkup_parameter_section['section_desc'] == "vision_tests") { ?>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" id="panel-heading1">
|
|
<h5 class="panel-title" id="panel-title1">
|
|
<a role="button" data-toggle="collapse" href="#collapsethree<?php echo $i1; ?>"
|
|
aria-expanded="true" aria-controls="collapseOne"> Charts </a>
|
|
</h5>
|
|
</div>
|
|
<div id="collapsethree<?php echo $i1; ?>" class="panel-collapse collapse">
|
|
<div class="panel-body">
|
|
<div class="row">
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
<div class="widget-box transparent">
|
|
<h4 class="widget-title lighter">
|
|
<i class="ace-icon fa fa-star orange"></i> Vision Tracker
|
|
</h4>
|
|
<div class="widget-body">
|
|
<div class="widget-main no-padding">
|
|
<div id="canvas-holder3" style="width: 100%;">
|
|
<div class="chartjs-size-monitor">
|
|
<div class="chartjs-size-monitor-expand">
|
|
<div class=""></div>
|
|
</div>
|
|
<div class="chartjs-size-monitor-shrink">
|
|
<div class=""></div>
|
|
</div>
|
|
</div>
|
|
<canvas id="chartVision"
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
width="1013" height="506"
|
|
class="chartjs-render-monitor"></canvas>
|
|
</div>
|
|
<!-- /.widget-main -->
|
|
</div>
|
|
<!-- /.widget-body -->
|
|
</div>
|
|
<!-- /.widget-box -->
|
|
</div>
|
|
</div>
|
|
<!-- PAGE CONTENT ENDS -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
<!-- <div class="panel-footer">
|
|
<button type="submit" onclick="validation_checkup_form();" class="btn btn-xs btn-primary">
|
|
<span class="glyphicon glyphicon-floppy-save">Save</span>
|
|
</button>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
$i1++;
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php include 'support_checkup_document.php' ?>
|
|
<?php include 'image_popup_checkup.php' ?>
|
|
<style>
|
|
.row {
|
|
margin-right: 0px;
|
|
}
|
|
|
|
.ace-icon {
|
|
margin-right: unset;
|
|
}
|
|
|
|
.widget-toolbar>.widget-menu>a[data-action]>.ace-icon,
|
|
.widget-toolbar>a[data-action]>.ace-icon {
|
|
margin-right: 12px;
|
|
}
|
|
</style>
|
|
<script>
|
|
// $("#new_category0").select2({
|
|
// tags: true
|
|
// });
|
|
function add_paramter() {
|
|
//$("#aligment-model").model("show");
|
|
$("#parameter_id").val("");
|
|
$("#parameter_name").val("");
|
|
$("#parameter_description").val("");
|
|
$("#parameter_code").val("");
|
|
|
|
$('#modal-add-parameter').modal({
|
|
show: 'true'
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function addTest_rows() {
|
|
|
|
$('#addTest_rows0').show();
|
|
|
|
|
|
|
|
// <input type="checkbox" id="<?php echo $row_section['section_desc']; ?>" name="<?php echo $row_section['section_id']; ?>" onclick="showHeaderSection('<?php echo $row_section['section_desc']; ?>')"
|
|
// if (mysqli_num_rows($resultl) > 0) {
|
|
// foreach ($param_present as $x => $val) {
|
|
// if ($val == $row_section['section_id']) {
|
|
// echo 'checked';
|
|
// array_push($enabledSections, $row_section['section_desc']);
|
|
// }
|
|
// }}
|
|
|
|
|
|
}
|
|
|
|
|
|
jQuery(function($) {
|
|
|
|
console.log("rolecode:<?= $_SESSION['RoleCode'] ?>");
|
|
|
|
<?php
|
|
if ($_SESSION['RoleCode'] == $__ROLE_LAB || $_SESSION['RoleCode'] == $__ROLE_MEDICALROOM) { ?>
|
|
$("#forwardButton").on("click", function() {
|
|
|
|
BootstrapDialog.show({
|
|
// type: BootstrapDialog.TYPE_DEFAULT,
|
|
title: 'Save & Forward',
|
|
|
|
message: '<select class="form-control" id="forward_status" style="width:90%" >' +
|
|
// '<option value="<?= $__STATUS_MEDICAL_PENDING ?>">Save & Forward To Medical Room</option>' +
|
|
// '<option value="<?= $__STATUS_LAB_PENDING ?>">Save & Forward To Lab Room</option>' +
|
|
'<option value="<?= $__STATUS_LAB_ATTENDED ?>">Save</option>' +
|
|
|
|
|
|
'</select>',
|
|
|
|
buttons: [{
|
|
label: 'Save & Submit',
|
|
icon: 'fa fa-save',
|
|
cssClass: 'btn-info',
|
|
action: function() {
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
|
|
|
|
// validate($("#forward_status").val());
|
|
validation_checkup_form();
|
|
$(".close").click();
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
<?php } else { ?>
|
|
validate($("#forward_status").val())
|
|
<?php } ?>
|
|
});
|
|
|
|
|
|
var checkup_section_name = [];
|
|
|
|
function get_section_id() {
|
|
<?php
|
|
$sql_section = "select * from checkup_form_section where Status='Active' and section_id in ($checkup_type_section_ids) order by section_id asc";
|
|
error_log("sql_section" . $sql_section);
|
|
$result_section = mysqli_query($conn, $sql_section);
|
|
$i = 0;
|
|
while ($row_section = mysqli_fetch_assoc($result_section)) {
|
|
?>
|
|
if (document.getElementById('<?php echo $row_section['section_desc'] ?>').checked) {
|
|
checkup_section_name.push(document.getElementById('<?php echo $row_section['section_desc'] ?>').name);
|
|
}
|
|
<?php
|
|
error_log("row_section loop $i" . $row_section['section_description']);
|
|
$i++;
|
|
} ?>
|
|
$("#checkup_section_ids").val(checkup_section_name);
|
|
//alert(checkup_section_name);
|
|
/* checkup_section_name.push(section_name);
|
|
$("#checkup_section_ids").val(checkup_section_name);
|
|
alert(checkup_section_name); */
|
|
}
|
|
|
|
function calculateBMI() {
|
|
|
|
|
|
|
|
var height = $("#height").val();
|
|
|
|
var weight = $("#weight").val();
|
|
|
|
|
|
|
|
if (height != null && height != '' && weight != null && weight != '') {
|
|
|
|
height = parseFloat(height);
|
|
|
|
weight = parseFloat(weight);
|
|
|
|
if (height != 0.0) {
|
|
|
|
var bmi = (weight / (height * height)) * 100 * 100;
|
|
}
|
|
|
|
|
|
$("#bmi").val(bmi.toFixed(1));
|
|
let read_id = $("#read_bmi").val();
|
|
rule_gen(read_id);
|
|
}
|
|
}
|
|
|
|
$("input").dblclick(function() {
|
|
dblClickcolorValidation(this);
|
|
// alert("hello there!"+this.name);
|
|
|
|
});
|
|
$("select").dblclick(function() {
|
|
dblClickcolorValidation(this);
|
|
// alert("hello there!"+this.name);
|
|
|
|
});
|
|
$("textarea").dblclick(function() {
|
|
dblClickcolorValidation(this);
|
|
// alert("hello there!"+this.name);
|
|
|
|
});
|
|
|
|
|
|
// creat new array to store values
|
|
ids_value = new Array();
|
|
hiddenHighlighter = document.getElementById('hiddenHighlighter');
|
|
|
|
// double click color validaton array
|
|
function dblClickcolorValidation(id) {
|
|
ids = id;
|
|
ids_value = hiddenHighlighter.value.split(",");
|
|
console.log("stored values:" + ids_value);
|
|
// get the hidden color validation input tag
|
|
hiddenHighlighter = document.getElementById('hiddenHighlighter');
|
|
if (ids.style.borderColor == 'tomato' || ids.style.color == 'tomato') {
|
|
ids.style.borderColor = 'lightgrey';
|
|
ids.style.color = 'black';
|
|
removeItemOnce(ids_value, ids.name);
|
|
hiddenHighlighter.value = ids_value.join();
|
|
console.log(hiddenHighlighter.value);
|
|
|
|
|
|
} else {
|
|
ids.style.borderColor = 'tomato';
|
|
ids.style.color = 'tomato';
|
|
ids_value.push(ids.name);
|
|
console.log(ids_value);
|
|
hiddenHighlighter.value = ids_value.join();
|
|
console.log(hiddenHighlighter.value);
|
|
}
|
|
console.log(ids_value);
|
|
}
|
|
|
|
function checkRange(parameter_val, minv, maxv, id) {
|
|
let pv = Number.parseFloat(parameter_val);
|
|
let min_val = Number.parseFloat(minv);
|
|
let max_val = Number.parseFloat(maxv);
|
|
|
|
let ids = document.getElementById(id);
|
|
|
|
if (min_val <= pv && pv <= max_val) {
|
|
let index = ids_value.indexOf(ids.name);
|
|
if (index > -1) {
|
|
dblClickcolorValidation(ids);
|
|
}
|
|
}
|
|
|
|
if (pv < min_val && min_val != 0) {
|
|
let index = ids_value.indexOf(ids.name);
|
|
if (index == -1) {
|
|
dblClickcolorValidation(ids);
|
|
}
|
|
}
|
|
|
|
if (pv > max_val && max_val != 0) {
|
|
let index = ids_value.indexOf(ids.name);
|
|
if (index == -1) {
|
|
dblClickcolorValidation(ids);
|
|
}
|
|
}
|
|
}
|
|
|
|
function removeItemOnce(arr, value) {
|
|
var index = arr.indexOf(value);
|
|
if (index > -1) {
|
|
arr.splice(index, 1);
|
|
}
|
|
return arr;
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|
|
//option A
|
|
$("#checkup_form_employee").submit(function(e) {
|
|
e.preventDefault();
|
|
});
|
|
});
|
|
|
|
function validation_checkup_form() {
|
|
save();
|
|
}
|
|
|
|
|
|
jQuery(function($) {
|
|
if (!ace.vars['old_ie']) $('#checkdown_date').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
defaultDate: new Date(),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
});
|
|
|
|
function goto_employee_questionnaire(empId) {
|
|
// window.location = 'edit_employee_details.php?emp_id='+empId+'&page="checkup"';
|
|
window.open('edit_employee_details.php?emp_id=' + empId + '&page="checkup"', '_blank');
|
|
}
|
|
</script>
|
|
<?php
|
|
$sql = "select health_risk_id form checkdown_form";
|
|
$result = mysqli_query($conn, $sql);
|
|
$rw = mysqli_fetch_array($result);
|
|
|
|
?>
|
|
<!-- <script type="text/javascript">
|
|
var js_array_enabledSections = [<?php echo '"' . implode('","', $enabledSections) . '"' ?>];
|
|
js_array_enabledSections.forEach(showHeaderSection);
|
|
|
|
$(':checkbox').attr('checked', true);
|
|
|
|
setTimeout(() => {
|
|
var js_array_checkedSections = [<?php echo '"' . implode('","', $allSectionids) . '"' ?>];
|
|
for (let i = 0; i < js_array_checkedSections.length; i++) {
|
|
// alert(js_array_checkedSections[i]);
|
|
showHeaderSection(js_array_checkedSections[i]);
|
|
}
|
|
}, 1000);
|
|
</script> -->
|
|
|
|
|
|
<script>
|
|
function rule_gen(checkup_type_id) {
|
|
console.log("checkup type id " + checkup_type_id);
|
|
$("#SpinnerContainerAbnormality").show();
|
|
document.getElementById("generateButton").style.visibility = 'hidden';
|
|
document.getElementById("forwardButton").style.visibility = "hidden";
|
|
<?php if ($_SESSION['RoleCode'] == $__ROLE_LAB) {
|
|
?>
|
|
BootstrapDialog.alert(
|
|
"Please Wait We are doing the calculations !! Click OK and wait for SAVE button to show up");
|
|
<?php } else { ?>
|
|
BootstrapDialog.alert(
|
|
"Please Wait We are fetching the related abnormalities !! Click OK and wait for SAVE button to show up"
|
|
);
|
|
<?php } ?>
|
|
|
|
$("#rule_param_id_onc").val(checkup_type_id);
|
|
$.ajax({
|
|
url: 'rule_eval.php',
|
|
type: "POST",
|
|
data: $("#checkup_form_employee").serialize(),
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
// alert(data);
|
|
// var abnormality_data_array_1 = data['data'];
|
|
var abnormalities_data_array_2 = data['result'];
|
|
|
|
abnormalities_data_array = data['data'];
|
|
console.log(" data array " + abnormalities_data_array);
|
|
for (var key in abnormalities_data_array_2) {
|
|
$("#" + key).val(abnormalities_data_array_2[key]);
|
|
// alert(abnormalities_data_array_2[key]);
|
|
}
|
|
document.getElementById("forwardButton").style.visibility = "visible";
|
|
document.getElementById("generateButton").style.visibility = 'visible';
|
|
|
|
},
|
|
error: function(data) {
|
|
|
|
BootstrapDialog.alert("Something Went wrong!!");
|
|
$("#SpinnerContainerAbnormality").hide();
|
|
document.getElementById("forwardButton").style.visibility = "visible";
|
|
document.getElementById("generateButton").style.visibility = 'visible';
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<?php error_log("end of checkup_form"); ?>
|