3502 lines
130 KiB
PHP
3502 lines
130 KiB
PHP
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>
|
||
|
|
|
||
|
|
|
||
|
|
<style>
|
||
|
|
/* #checkup_section_header {
|
||
|
|
display: none;
|
||
|
|
} */
|
||
|
|
.button span {
|
||
|
|
font-size: 10px !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
.upbutton {
|
||
|
|
text-decoration: none !important;
|
||
|
|
font-size: 10px;
|
||
|
|
font-weight: 500;
|
||
|
|
padding: 15px;
|
||
|
|
align-items: right !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);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
.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);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
#profile_link {
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tags .tag {
|
||
|
|
white-space: normal !important;
|
||
|
|
font-size: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
#settings {
|
||
|
|
display: block;
|
||
|
|
text-align: center
|
||
|
|
}
|
||
|
|
|
||
|
|
#paint {
|
||
|
|
border: 1px solid black;
|
||
|
|
background: #fff;
|
||
|
|
margin-left: auto;
|
||
|
|
margin-right: auto;
|
||
|
|
display: block;
|
||
|
|
}
|
||
|
|
|
||
|
|
#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: 20px;
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
|
||
|
|
input {
|
||
|
|
width: 100px;
|
||
|
|
}
|
||
|
|
|
||
|
|
table {
|
||
|
|
box-shadow: 1px 1px lightblue;
|
||
|
|
transition: box-shadow 1s;
|
||
|
|
}
|
||
|
|
|
||
|
|
table:hover {
|
||
|
|
box-shadow: 10px 10px lightblue;
|
||
|
|
}
|
||
|
|
|
||
|
|
th {
|
||
|
|
font-size: 11px;
|
||
|
|
font-weight: 600;
|
||
|
|
/* background-color:#fff;
|
||
|
|
color: #fff; */
|
||
|
|
}
|
||
|
|
|
||
|
|
/* @media (min-width : 768px){
|
||
|
|
width103%;
|
||
|
|
} */
|
||
|
|
|
||
|
|
input,
|
||
|
|
input::-webkit-input-placeholder {
|
||
|
|
font-size: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
select {
|
||
|
|
padding: unset;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script type="text/javascript">
|
||
|
|
try {
|
||
|
|
ace.settings.loadState('main-container')
|
||
|
|
} catch (e) {}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
|
||
|
|
<script>
|
||
|
|
function load_checkup_header(checkup_type_id) {
|
||
|
|
document.checkup_form_employee.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
function showHeaderSection(section_id) {
|
||
|
|
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>
|
||
|
|
|
||
|
|
<script src="assets/js/select2.min.js"></script>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<form name="checkup_form_employee" id="checkup_form_employee" method="POST" action="checkup_from_before.php">
|
||
|
|
|
||
|
|
<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">
|
||
|
|
|
||
|
|
<h5 class="widget-title" style="display: block; font-size: 15px; 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(<?= $row['id'] ?>)"></i> </h5>
|
||
|
|
<div align='right'>
|
||
|
|
<!-- <input style="margin-left: 5px;margin-right: 10px;height: 32px; border: 1px solid #8AAFCE;color: #5C97CB;border-radius: 3px;background-color: #fff;" type="button" value="Print Questionnaire" id="questionnairePrint" onclick="createPDF(<?php echo $tbl_count ?>)" /> -->
|
||
|
|
<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>
|
||
|
|
<?php
|
||
|
|
$checkupTypeId = getFieldFromTable('checkup_type_id', 'checkup_form', 'checkup_id', $_REQUEST['flex_checkup_id']);
|
||
|
|
?>
|
||
|
|
<?php if ($_SESSION['RoleCode'] != $__ROLE_DOCTOR && $_SESSION['RoleCode'] != $__ROLE_LAB) { ?>
|
||
|
|
<a class="button" id="generateButton" tabindex="0" aria-controls="dynamic-table" onclick="rule_gen(<?= $checkupTypeId ?>);" title="Generate Abnormality">
|
||
|
|
<span><i class="ace-icon fa fa-print"></i>
|
||
|
|
Add Abnormality
|
||
|
|
</span>
|
||
|
|
</a>
|
||
|
|
<?php } else if ($_SESSION['RoleCode'] == $__ROLE_DOCTOR || $_SESSION['RoleCode'] == $__ROLE_LAB) { ?>
|
||
|
|
<script>
|
||
|
|
document.getElementById("forwardButton").style.visibility = "visible";
|
||
|
|
</script>
|
||
|
|
<?php } ?>
|
||
|
|
|
||
|
|
<input type="hidden" name="attendedStatus" id="attendedStatus" />
|
||
|
|
<input type="hidden" name="approve_date" id="approve_date" value='' />
|
||
|
|
<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['flex_opd_id'] != '' ? $_REQUEST['flex_opd_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'";
|
||
|
|
|
||
|
|
$checkup_result = mysqli_query($conn, $sql_checkup);
|
||
|
|
|
||
|
|
$row_checkup = mysqli_fetch_assoc($checkup_result);
|
||
|
|
$tbl_count = 0;
|
||
|
|
$tbl_names = array();
|
||
|
|
$checkup_type_id = $row_checkup['checkup_type_id'];
|
||
|
|
$sql21 = "select * from checkup_type where checkup_type_id='$checkup_type_id'";
|
||
|
|
error_log("sql type" . $sql21);
|
||
|
|
$checktype21 = mysqli_query($conn, $sql21);
|
||
|
|
|
||
|
|
$row21 = mysqli_fetch_assoc($checktype21);
|
||
|
|
$checkup_section_ids = $row21['checkup_form_section_ids'];
|
||
|
|
error_log("checkup_section_ids" . $checkup_section_ids);
|
||
|
|
while ($row_employee = mysqli_fetch_assoc($result)) {
|
||
|
|
|
||
|
|
error_log("checkup_type_id" . $checkup_type_id);
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<input type="hidden" id="checkup_emp_id" name="checkup_emp_id" value="<?php echo ($_REQUEST['flex_opd_id'] != '' && $_REQUEST['flex_opd_id'] != null) ? $_POST['flex_opd_id'] : $_REQUEST['emp_id_history']; ?>">
|
||
|
|
<input type="hidden" name="checkup_type_id" id="checkup_type_id" value="<?php echo $checkup_type_id = $row_checkup['checkup_type_id']; ?>">
|
||
|
|
|
||
|
|
<input type="hidden" name="checkup_form_type_code" id="checkup_form_type_code" value="<?= trim($row21['checkup_type_code']); ?>">
|
||
|
|
|
||
|
|
<input type="hidden" style="height: 30px;" class="col-xs-4" id="hiddenHighlighter" name="hiddenHighlighter">
|
||
|
|
<input type="hidden" id="health_index" name="health_index" value="<?php echo $row_checkup['health_index'] ?>">
|
||
|
|
<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
|
||
|
|
$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 $row_checkup['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> <?php echo ($row_employee['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>
|
||
|
|
|
||
|
|
<form id="emp_id_form" name="emp_id_form" target="_blank" action="#" method="POST">
|
||
|
|
<input type="hidden" name="emp_id" id="emp_id" value="<?= $row_employee['id'] ?>" />
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
|
||
|
|
<?php if ($_SESSION['RoleCode'] == $__ROLE_RECEPTIONIST) { ?>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
|
||
|
|
<div style="margin-left: 10px;">
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th>Remarks</th>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<td><textarea class="form-control" rows="2" name="remarks" id="remarks"><?php echo $row_employee['remarks']; ?></textarea></td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php } ?>
|
||
|
|
|
||
|
|
<?php if ($_SESSION['RoleCode'] == $__ROLE_LAB) { ?>
|
||
|
|
<div class="col-sm-12">
|
||
|
|
|
||
|
|
<div style="margin-left: 10px;">
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th>Remarks</th>
|
||
|
|
<th>Checkup Date</th>
|
||
|
|
<th>Referred By</th>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<td><textarea class="form-control" rows="2" name="remarks" id="remarks"><?php echo $row_checkup['remarks']; ?></textarea></td>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<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="glyphicon glyphicon-calendar"></i>
|
||
|
|
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
<?php $ref_field_visible = getFieldFromTable('type_state', 'checkup_type', 'checkup_type_id', $checkup_type_id);
|
||
|
|
if (!strcmp($ref_field_visible, "Yes")) {
|
||
|
|
?>
|
||
|
|
<td><select name="ref_by_doc" id="ref_by_doc" class="form-control chosen-select">
|
||
|
|
<option value="">Select Doc Name</option>
|
||
|
|
<?= generate_options("SELECT doctor_id,trim(concat(ifnull(doctor_name,''),' ',ifnull(doctor_desc,''))) doc_name FROM doctors_master", $row_checkup['referred_by'], 'doctor_id', 'doc_name', '', ''); ?>
|
||
|
|
|
||
|
|
</select></td>
|
||
|
|
<?php } ?>
|
||
|
|
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php } ?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
if ($_SESSION['RoleCode'] == $__ROLE_MEDICALROOM || $_SESSION['RoleCode'] == $__ROLE_DOCTOR) {
|
||
|
|
$risk = '';
|
||
|
|
$advice = '';
|
||
|
|
// $emp_id = $_REQUEST['flex_opd_id'] != '' ? $_REQUEST['flex_opd_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'";
|
||
|
|
error_log("sql_checkup" . $sql_checkup);
|
||
|
|
$checkup_result = mysqli_query($conn, $sql_checkup);
|
||
|
|
|
||
|
|
$row_checkup = mysqli_fetch_assoc($checkup_result);
|
||
|
|
|
||
|
|
$tbl_count = 0;
|
||
|
|
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>Health Risk</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td style="font-size: 10px;">
|
||
|
|
<div id="SpinnerContainerRisk">
|
||
|
|
<img src="images/load.gif" id="SpinnerImage" title="loading..." class="loader" />
|
||
|
|
</div>
|
||
|
|
<div class="input-group">
|
||
|
|
<input type="text" class="form-control" id="health_risk_name" name="health_risk_name" placeholder="Health Risks" />
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-6">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>Health Advice</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td style="font-size:10px;">
|
||
|
|
<div id="SpinnerContainerAdvice">
|
||
|
|
<img src="images/load.gif" id="SpinnerImage" title="loading..." class="loader" />
|
||
|
|
</div>
|
||
|
|
<div class="input-group">
|
||
|
|
<input type="text" class="form-control" id="health_advice_name" name="health_advice_name" placeholder="Health Advices" />
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-sm-2">
|
||
|
|
|
||
|
|
<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="glyphicon glyphicon-calendar"></i>
|
||
|
|
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php if ($_SESSION['RoleCode'] == $__ROLE_DOCTOR) {
|
||
|
|
?>
|
||
|
|
<div class="col-sm-2">
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>
|
||
|
|
Fit Status
|
||
|
|
</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<select name="fit_state" id="fit_state" class="form-control">
|
||
|
|
<option value="">select status</option>
|
||
|
|
<?php
|
||
|
|
if (isset($row_checkup['fit_unfit_status'])) {
|
||
|
|
if ($row_checkup['fit_unfit_status'] == 'fit') {
|
||
|
|
$fit = "FIT";
|
||
|
|
} else if ($row_checkup['fit_unfit_status'] == 'pfit') {
|
||
|
|
$fit = "PROVISIONAL FIT";
|
||
|
|
} else if ($row_checkup['fit_unfit_status'] == 'tfit') {
|
||
|
|
$fit = "TEMPORARY UNFIT";
|
||
|
|
} else if ($row_checkup['fit_unfit_status'] == 'ufit') {
|
||
|
|
$fit = "UNFIT";
|
||
|
|
} else {
|
||
|
|
$fit = "select status";
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
<option value="<?= $row_checkup['fit_unfit_status'] ?>" selected><?= $fit ?>
|
||
|
|
</option>
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
<option value="fit">FIT</option>
|
||
|
|
<option value="pfit">PROVISIONAL FIT</option>
|
||
|
|
<option value="tfit">TEMPORARY UNFIT</option>
|
||
|
|
<option value="ufit">UNFIT</option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>
|
||
|
|
Nominate Patient For Wellness Program
|
||
|
|
</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<select class="chosen-select form-control" id="program_id" name="program_id" data-placeholder="Select Program Name">
|
||
|
|
<option value=""></option>
|
||
|
|
<?php $query = "select * from training_schedule ";
|
||
|
|
$result = @mysqli_query($conn, $query);
|
||
|
|
while ($rows_schedule = mysqli_fetch_assoc($result)) {
|
||
|
|
$training_name = getTableFieldValue('training_master', 'training_name', 'training_master_id', $rows_schedule['training_id']);
|
||
|
|
|
||
|
|
if ($row_checkup['program_id'] == $rows_schedule['schedule_id']) {
|
||
|
|
?>
|
||
|
|
<option selected value="<?php echo $rows_schedule['schedule_id'] ?>">
|
||
|
|
<?php echo $training_name . '(' . $rows_schedule['trainer_name'] . ',' . date_format(date_create($rows_schedule['from_date']), "d-M-Y") . ' ' . date_format(date_create($rows_schedule['to_date']), "d-M-Y") . ')' ?>
|
||
|
|
</option>
|
||
|
|
<?php
|
||
|
|
} else {
|
||
|
|
?> <option value="<?php echo $rows_schedule['schedule_id'] ?>">
|
||
|
|
<?php echo $training_name . '(' . $rows_schedule['trainer_name'] . ',' . date_format(date_create($rows_schedule['from_date']), "d-M-Y") . ' ' . date_format(date_create($rows_schedule['to_date']), "d-M-Y") . ')' ?>
|
||
|
|
</option>
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>Program Status</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<input type="radio" name="program_status" id="program_status" value="Y" <?php echo ($row_checkup['program_status'] == 'Y') ? "checked" : ""; ?>>
|
||
|
|
<label for="program_status">Complete</label>
|
||
|
|
<input type="radio" name="program_status" id="program_status" value="N" <?php echo ($row_checkup['program_status'] == 'N') ? "checked" : ""; ?>>
|
||
|
|
<label for="program_status">incomplete</label>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>
|
||
|
|
Past Present Illness
|
||
|
|
</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td style="font-size: 10px;">
|
||
|
|
<div id="SpinnerContainerIll">
|
||
|
|
<img src="images/load.gif" id="SpinnerImage" title="loading..." class="loader" />
|
||
|
|
</div>
|
||
|
|
<div class="input-group">
|
||
|
|
|
||
|
|
<input type="text" class="form-control" id="past_present_illness_data" name="past_present_illness_data" placeholder="Select Past present Illness" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>
|
||
|
|
Abnormalities
|
||
|
|
</th>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td style="font-size: 10px;">
|
||
|
|
<div id="SpinnerContainerAbnormality">
|
||
|
|
<img src="images/load.gif" id="SpinnerImage" title="loading..." class="loader" />
|
||
|
|
</div>
|
||
|
|
<div class="input-group">
|
||
|
|
<input type="text" class="form-control" id="abnormalities_data" name="abnormalities_data" placeholder="Select Abnormalities " />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-sm-2">
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<th>
|
||
|
|
Valid Upto
|
||
|
|
</th>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<div class="input-group">
|
||
|
|
<?php
|
||
|
|
$valid_duration = getFieldFromTable('valid_upto', 'checkup_type', 'checkup_type_id', $row_checkup['checkup_type_id']);
|
||
|
|
$duration = "+" . $valid_duration . " month";
|
||
|
|
error_log("duration " . $duration);
|
||
|
|
if ($row_checkup['checkup_date'] != null || $row_checkup['checkup_date'] != '0000-00-00 00:00:00') {
|
||
|
|
$date = new DateTime($row_checkup['checkup_date']);
|
||
|
|
} else {
|
||
|
|
$date = new DateTime('now');
|
||
|
|
}
|
||
|
|
$date->modify($duration);
|
||
|
|
$date_new = $date->format('Y-m-d');
|
||
|
|
error_log("due date " . $date_new);
|
||
|
|
error_log(" row checkup date " . $row_checkup['valid_upto']);
|
||
|
|
if ($row_checkup['valid_upto'] != null && $row_checkup['valid_upto'] != '0000-00-00' && $row_checkup['valid_upto'] != '') {
|
||
|
|
$valid_duration_date = $row_checkup['valid_upto'];
|
||
|
|
} else {
|
||
|
|
$valid_duration_date = $date_new;
|
||
|
|
}
|
||
|
|
error_log("after date " . $valid_duration_date);
|
||
|
|
?>
|
||
|
|
<input id="valid_upto_date" name="valid_upto_date" class="form-control date-picker" style="height: 30px" value="<?php echo date_format(date_create($valid_duration_date), "d/m/Y") ?>" type="text" data-date-format="dd/mm/yyyy" /> <span class="input-group-addon"> <i style="height: 5px" class="glyphicon glyphicon-calendar"></i>
|
||
|
|
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-5">
|
||
|
|
|
||
|
|
<div style="margin-left: 10px;">
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th>Critical Findings</th>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<td>
|
||
|
|
|
||
|
|
<textarea <?php if ($_SESSION['RoleCode'] == $__ROLE_DOCTOR) echo 'readonly'; ?> class="form-control" rows="2" name="findings" id="findings" style="width: 100%;" value=''><?php echo $row_checkup['findings']; ?></textarea>
|
||
|
|
|
||
|
|
|
||
|
|
</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-5">
|
||
|
|
|
||
|
|
<div style="margin-left: 10px;">
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th>Lab Technician Comments</th>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<td>
|
||
|
|
|
||
|
|
<textarea <?php if ($_SESSION['RoleCode'] == $__ROLE_DOCTOR) echo 'readonly'; ?> class="form-control" rows="2" name="comments" id="comments" style="width:100%;" value=""><?php echo $row_checkup['comments']; ?></textarea>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php if ($_SESSION['RoleCode'] == $__ROLE_DOCTOR) {
|
||
|
|
|
||
|
|
?>
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
|
||
|
|
<div style="margin-left: 10px;">
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th> Doctor Critical Findings</th>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<td>
|
||
|
|
|
||
|
|
<textarea class="form-control" rows="2" name="doc_findings" id="doc_findings" style="width: 100%;" value=''><?php echo $row_checkup['doc_findings']; ?></textarea>
|
||
|
|
|
||
|
|
|
||
|
|
</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-6">
|
||
|
|
|
||
|
|
<div style="margin-left: 10px;">
|
||
|
|
|
||
|
|
<table class="table table-bordered">
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th>Doctor Comments</th>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<td>
|
||
|
|
|
||
|
|
<textarea class="form-control" rows="2" name="doc_comments" id="doc_comments" style="width:100%;" value=""><?php echo $row_checkup['doc_comments']; ?></textarea>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</td>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php } ?>
|
||
|
|
|
||
|
|
<?php } ?>
|
||
|
|
|
||
|
|
<?php } ?>
|
||
|
|
</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
|
||
|
|
//yogi changes
|
||
|
|
$sql_section = "select * from checkup_form_section where Status='Active' and section_id in ($checkup_section_ids) order by display_order asc";
|
||
|
|
error_log("sql_section" . $sql_section);
|
||
|
|
// echo $sql_section;
|
||
|
|
|
||
|
|
$count = 1;
|
||
|
|
|
||
|
|
$i = 0;
|
||
|
|
|
||
|
|
$checkup_section_header = [];
|
||
|
|
|
||
|
|
$checkup_section_headers = $row_checkup['checkup_section_ids'];
|
||
|
|
|
||
|
|
$check_section_ids = array();
|
||
|
|
|
||
|
|
$check_section_headers = array();
|
||
|
|
|
||
|
|
$result_section = mysqli_query($conn, $sql_section);
|
||
|
|
|
||
|
|
while ($row_section = mysqli_fetch_assoc($result_section)) {
|
||
|
|
|
||
|
|
array_push($check_section_ids, $row_section['section_id']);
|
||
|
|
|
||
|
|
array_push($check_section_headers, $row_section['section_desc']);
|
||
|
|
|
||
|
|
if ($count == 4) {
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<tr><?php
|
||
|
|
}
|
||
|
|
|
||
|
|
array_push($checkup_section_header, intval($checkup_section_headers[$i]));
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<td>
|
||
|
|
|
||
|
|
<div id="section_header_div">
|
||
|
|
|
||
|
|
<input type="checkbox" id="<?php echo $row_section['section_desc']; ?>" name="<?php echo $row_section['section_id']; ?>" value="<?php echo $row_section['section_id']; ?>" onclick="showHeaderSection('<?php echo $row_section['section_desc']; ?>')">
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
echo $row_section['section_name'];
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</td>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
if ($count % 3 == 0) {
|
||
|
|
|
||
|
|
?></tr><?php
|
||
|
|
}
|
||
|
|
|
||
|
|
$count++;
|
||
|
|
|
||
|
|
$i = $i + 2;
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div class="panel-footer">
|
||
|
|
<button type="submit" onclick="validation_checkup_form();" class="button">
|
||
|
|
|
||
|
|
<i class="ace-icon fa fa-save"></i>Save
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
$sql_checkup_parameter_range = "select * from checkup_parameter where enabled ='Y' and checkup_form_section_id in ($checkup_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 order by section_id asc";
|
||
|
|
//yogi changes
|
||
|
|
$sql_checkup_parameter_section = "select * from checkup_form_section where Status='Active' and section_id in ($checkup_section_ids) order by display_order asc";
|
||
|
|
|
||
|
|
// echo $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)) {
|
||
|
|
|
||
|
|
// if ($_SESSION['RoleId'] != 6) {
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<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">
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
<a role="button" data-toggle="collapse" href="#collapseOne<?php echo $i1; ?>" aria-expanded="true" aria-controls="collapseOne" style="font-size: 15px;">
|
||
|
|
<?php echo $row_checkup_parameter_section['section_name'] ?>
|
||
|
|
</a>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</h5>
|
||
|
|
<div align='right'>
|
||
|
|
<a class="upbutton" id="uploadButton" tabindex="0" onclick="upload_section_doc('<?php echo $row_checkup_parameter_section['section_id'] ?>','<?php echo $row_checkup_parameter_section['section_name'] ?>')" aria-controls="dynamic-table" data-original-title="Upload Doc" title="Upload " align='right' style="width: 80px;"><span style="font-size:10px;"><i class="ace-icon fa fa-upload"></i> </span></a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</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";
|
||
|
|
|
||
|
|
// 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'";
|
||
|
|
|
||
|
|
// echo $sql_questionnaire;
|
||
|
|
|
||
|
|
$result_questionnaire = @mysqli_query($conn, $sql_questionnaire);
|
||
|
|
|
||
|
|
$no_of__question_rows = mysqli_num_rows($result_questionnaire);
|
||
|
|
|
||
|
|
$srNo = 0;
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<!-- ///UPLOADED DOC SEC WISE -->
|
||
|
|
<tr>
|
||
|
|
<td colspan="4">
|
||
|
|
<!-- <div class="panel panel-primary">
|
||
|
|
<div class="panel-heading">
|
||
|
|
<h3 class="panel-title">Supporting Documents</h3>
|
||
|
|
<span class="pull-right clickable"><i
|
||
|
|
class="glyphicon glyphicon-chevron-up"></i></span>
|
||
|
|
</div>-->
|
||
|
|
|
||
|
|
<div class="panel-heading" id="panel-heading1">
|
||
|
|
<h5 class="panel-title" id="panel-title1">
|
||
|
|
<a role="button" data-toggle="collapse" href="#supportDoc<?php echo $section_desc; ?>" aria-expanded="true" aria-controls="supportDoc">
|
||
|
|
Supporting Documents</a>
|
||
|
|
</h5>
|
||
|
|
</div>
|
||
|
|
<div id="supportDoc<?php echo $section_desc; ?>" class="panel-collapse collapse">
|
||
|
|
|
||
|
|
|
||
|
|
<table class="table table-bordered" id="medical_doc_id" style="width: 50%">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
|
||
|
|
<th>Document Name</th>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<th>Download</th>
|
||
|
|
<?php
|
||
|
|
$hasExecuteAccess = isAccessible($_SESSION['RoleId'], $menu_key, 'E'); ?>
|
||
|
|
<?php if ($hasExecuteAccess) { ?>
|
||
|
|
<th>Delete</th>
|
||
|
|
<?php } ?>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// echo $checkup_section_id;
|
||
|
|
|
||
|
|
$emp_id = $_REQUEST['patient_id'] != '' ? $_REQUEST['patient_id'] : $_REQUEST['emp_id_history'];
|
||
|
|
|
||
|
|
$sql_medical_doc = "select * from checkup_section_medical_document where emp_id='" . $emp_id . "' and section_id='" . $row_checkup_parameter_section['section_id'] . "' ";
|
||
|
|
$checkup_id = $_REQUEST['flex_checkup_id'];
|
||
|
|
error_log("idddd" . $sql_medical_doc);
|
||
|
|
// echo $emp_id;
|
||
|
|
|
||
|
|
|
||
|
|
$result_medical_doc = @mysqli_query($conn, $sql_medical_doc);
|
||
|
|
while ($row_medical_doc = @mysqli_fetch_array($result_medical_doc)) { ?>
|
||
|
|
<tr id="medical_doc_<?php echo $row_medical_doc['id'] ?>">
|
||
|
|
<td><?php echo $row_medical_doc['medical_doc_desc']; ?></td>
|
||
|
|
|
||
|
|
<?php if ($row_medical_doc['medical_doc_type'] == 'application/pdf') { ?>
|
||
|
|
<td><a href='#'><img src='images/pdf.png' width='35' height='35' onclick='$("#med_doc_<?php echo $row_medical_doc['id'] ?>").click()'></a>
|
||
|
|
<img id="med_doc_<?php echo $row_medical_doc['id'] ?>" style='display:none' <?php
|
||
|
|
echo ' src = "data:' . $row_medical_doc['medical_doc_type'] . ';base64,' . base64_encode($row_medical_doc['medical_doc']) . '"' ?> alt="pdf" onclick="getMedicalDocument_checkup_section('<?php echo $row_medical_doc['id'] ?>')" />
|
||
|
|
</td>
|
||
|
|
<?php } else { ?>
|
||
|
|
<td><img width="50" height="50" <?php
|
||
|
|
echo ' src = "data:' . $row_medical_doc['medical_doc_type'] . ';base64,' . base64_encode($row_medical_doc['medical_doc']) . '"' ?> alt="new image" onclick="image(this,'<?php echo $row_medical_doc['medical_doc_desc'] ?>')" />
|
||
|
|
</td>
|
||
|
|
<?php } ?>
|
||
|
|
<?php $hasReadAccess = isAccessible($_SESSION['RoleId'], $menu_key, 'R');
|
||
|
|
$hasWriteAccess = isAccessible($_SESSION['RoleId'], $menu_key, 'W');
|
||
|
|
$hasExecuteAccess = isAccessible($_SESSION['RoleId'], $menu_key, 'E'); ?>
|
||
|
|
<?php if ($hasExecuteAccess) { ?>
|
||
|
|
<td align="center" style="width: 20%">
|
||
|
|
<a href="#" class="btn-lg" data-toggle="tooltip" id="deletebtn" onclick="delete_checkup_section_document('<?php echo $row_medical_doc['id'] ?>')" title="Delete"><span class="glyphicon glyphicon-trash"></span></a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</td>
|
||
|
|
<?php } ?>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<?php $count++;
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
<!-- </div> -->
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<!-- UPLOADED DOC -->
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<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) {
|
||
|
|
array_push($tbl_names, $section_desc);
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
<table border="1" id="tab<?php echo ++$tbl_count ?>" class="table table-condensed table-bordered" width="100%" border=1 id="familyMembersTable" class="table-hover">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<tbody>
|
||
|
|
|
||
|
|
<tr bgcolor="#d3d3d3">
|
||
|
|
|
||
|
|
<th width="60px">Sr</th>
|
||
|
|
|
||
|
|
<th>Question</th>
|
||
|
|
|
||
|
|
<th width="20%">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>
|
||
|
|
|
||
|
|
<input style="margin-left: 5px" type="button" value="PDF" id="btPrint" onclick="createIndividualPDF(<?php echo $tbl_count ?>)" />
|
||
|
|
|
||
|
|
|
||
|
|
</center>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php $countSection++;
|
||
|
|
} ?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
//Manoj Enabling health surveylance - for edit.. enabling everythying for now.
|
||
|
|
//$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";
|
||
|
|
|
||
|
|
|
||
|
|
$sql_group_by = "SELECT count(*) as total FROM checkup_parameter WHERE checkup_form_section_id = '" . $row_checkup_parameter_section['section_id'] . "' 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 checkup_parameter 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'] . "' and a.enabled='Y' 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;
|
||
|
|
|
||
|
|
$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">
|
||
|
|
|
||
|
|
<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'] ?>" value="<?= $data[$counter]['checkup_form_value'] ?>" onchange="calculateBMI();checkRange(this.value,this.min,this.max,this.id);calHealthIndex();" />
|
||
|
|
</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'] ?>" value="<?= $data[$counter]['checkup_form_value'] ?>" onchange="calculateBMI();checkRange(this.value,this.min,this.max,this.id);calHealthIndex();" />
|
||
|
|
</td>
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
if ($input_type == 'textarea') {
|
||
|
|
?>
|
||
|
|
|
||
|
|
<td><textarea id="<?= $data[$counter]['column_name'] ?>" rows="4" class="form-control" name="<?= $data[$counter]['column_name'] ?>" onchange="calHealthIndex();" placeholder="<?= $data[$counter]['place_holder_name'] ?>"> <?= $data[$counter]['checkup_form_value'] ?></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();calHealthIndex();"></td>
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
$counter++;
|
||
|
|
|
||
|
|
if ($counter == count($data)) {
|
||
|
|
|
||
|
|
// $flag1=1;
|
||
|
|
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
$h++;
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</table>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div> <?php
|
||
|
|
|
||
|
|
if ($flag == 1)
|
||
|
|
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|
||
|
|
</div>
|
||
|
|
<?php } ?>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div class="panel-footer">
|
||
|
|
<button type="submit" onclick="validation_checkup_form();" class="button">
|
||
|
|
|
||
|
|
<span class="glyphicon glyphicon-floppy-save">Save</span>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
|
||
|
|
$i1++;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</form>
|
||
|
|
|
||
|
|
|
||
|
|
<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>
|
||
|
|
var risk = '<?= $risk ?>';
|
||
|
|
var advice = '<?= $advice ?>';
|
||
|
|
|
||
|
|
setChosenUpdatedMultiple("health_advice_name", advice);
|
||
|
|
setChosenUpdatedMultiple("health_risk_name", risk);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
jQuery(function($) {
|
||
|
|
|
||
|
|
console.log("rolecode:<?= $_SESSION['RoleCode'] ?>");
|
||
|
|
|
||
|
|
<?php
|
||
|
|
if ($_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="margin:4%;width:90%" >' +
|
||
|
|
'<option value="<?= $__STATUS_MEDICAL_ATTENDED ?>">Save Draft</option>' +
|
||
|
|
'<option value="<?= $__STATUS_DOCTOR_PENDING ?>">Save & Forward To Doctor</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();
|
||
|
|
loadPage();
|
||
|
|
// $(".close").click();
|
||
|
|
}
|
||
|
|
}]
|
||
|
|
});
|
||
|
|
});
|
||
|
|
<?php } else { ?>
|
||
|
|
// validate($("#forward_status").val())
|
||
|
|
<?php } ?>
|
||
|
|
<?php
|
||
|
|
if ($_SESSION['RoleCode'] == $__ROLE_DOCTOR) { ?>
|
||
|
|
$("#forwardButton").on("click", function() {
|
||
|
|
|
||
|
|
BootstrapDialog.show({
|
||
|
|
// type: BootstrapDialog.TYPE_DEFAULT,
|
||
|
|
title: 'Save & Forward',
|
||
|
|
|
||
|
|
message: '<select class="form-control" id="forward_status" style="margin:4%;width:90%" >' +
|
||
|
|
'<option value="<?= $__STATUS_DOCTOR_APPROVED ?>">Approve</option>' +
|
||
|
|
'<option value="<?= $__STATUS_DOCTOR_ATTENDED ?>">Save Draft</option>' +
|
||
|
|
|
||
|
|
'<option value="<?= $__STATUS_MEDICAL_PENDING ?>">Forward to Medical Room/Lab</option>' +
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
'</select>',
|
||
|
|
|
||
|
|
buttons: [{
|
||
|
|
label: 'Save & Submit',
|
||
|
|
icon: 'fa fa-save',
|
||
|
|
cssClass: 'btn-info',
|
||
|
|
action: function() {
|
||
|
|
$("#attendedStatus").val($("#forward_status").val());
|
||
|
|
|
||
|
|
$('#approve_date').datetimepicker({
|
||
|
|
format: 'DD/MM/YYYY h:mm A',
|
||
|
|
defaultDate: new Date()
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
// validate($("#forward_status").val());
|
||
|
|
validation_checkup_form();
|
||
|
|
loadPage();
|
||
|
|
|
||
|
|
// $(".close").click();
|
||
|
|
}
|
||
|
|
}]
|
||
|
|
});
|
||
|
|
});
|
||
|
|
<?php } else { ?>
|
||
|
|
// validate($("#forward_status").val())
|
||
|
|
<?php } ?>
|
||
|
|
<?php
|
||
|
|
if ($_SESSION['RoleCode'] == $__ROLE_RECEPTIONIST) { ?>
|
||
|
|
$("#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_RECEPTIONIST_ATTENDED ?>">Save Draft</option>' +
|
||
|
|
'<option value="<?= $__STATUS_MEDICAL_PENDING ?>">Save & Forward To Medical Room</option>' +
|
||
|
|
'<option value="<?= $__STATUS_DOCTOR_PENDING ?>">Save & Forward To Doctor </option>' +
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
'</select>',
|
||
|
|
|
||
|
|
buttons: [{
|
||
|
|
label: 'Save & Submit',
|
||
|
|
icon: 'fa fa-save',
|
||
|
|
cssClass: 'btn-info',
|
||
|
|
action: function() {
|
||
|
|
$("#attendedStatus").val($("#forward_status").val());
|
||
|
|
|
||
|
|
$('#approve_date').datetimepicker({
|
||
|
|
format: 'DD/MM/YYYY h:mm A',
|
||
|
|
defaultDate: new Date()
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
// validate($("#forward_status").val());
|
||
|
|
validation_checkup_form();
|
||
|
|
loadPage();
|
||
|
|
|
||
|
|
// $(".close").click();
|
||
|
|
}
|
||
|
|
}]
|
||
|
|
});
|
||
|
|
});
|
||
|
|
<?php } else if ($_SESSION['RoleCode'] == $__ROLE_LAB) { ?>
|
||
|
|
$("#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_LAB_ATTENDED ?>">Save</option>' +
|
||
|
|
'<option value="<?= $__STATUS_DOCTOR_PENDING ?>">Save & Forward To Doctor </option>' +
|
||
|
|
|
||
|
|
'</select>',
|
||
|
|
|
||
|
|
buttons: [{
|
||
|
|
label: 'Save & Submit',
|
||
|
|
icon: 'fa fa-save',
|
||
|
|
cssClass: 'btn-info',
|
||
|
|
action: function() {
|
||
|
|
$("#attendedStatus").val($("#forward_status").val());
|
||
|
|
|
||
|
|
$('#approve_date').datetimepicker({
|
||
|
|
format: 'DD/MM/YYYY h:mm A',
|
||
|
|
defaultDate: new Date()
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
// validate($("#forward_status").val());
|
||
|
|
validation_checkup_form();
|
||
|
|
loadPage();
|
||
|
|
|
||
|
|
// $(".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_section_ids) order by display_order asc";
|
||
|
|
error_log("yogi check 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);
|
||
|
|
|
||
|
|
//alert(checkup_section_name);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
<?php $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 load_checkup_header(checkup_type_id) {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
document.checkup_form_employee.submit();
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
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();
|
||
|
|
// alert(read_id);
|
||
|
|
// rule_gen(read_id);
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
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');
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$("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);
|
||
|
|
} else if (ids.style.borderColor == 'tomato' || ids.style.color == 'tomato') {
|
||
|
|
dblClickcolorValidation(ids);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
if (pv < min_val && min_val != 0) {
|
||
|
|
let index = ids_value.indexOf(ids.name);
|
||
|
|
if (index == -1 && ids.style.borderColor != 'tomato' && ids.style.color != 'tomato') {
|
||
|
|
dblClickcolorValidation(ids);
|
||
|
|
}
|
||
|
|
append_less_risk_suggestions(ids.name);
|
||
|
|
append_less_advice_suggestions(ids.name);
|
||
|
|
}
|
||
|
|
|
||
|
|
if (pv > max_val && max_val != 0) {
|
||
|
|
let index = ids_value.indexOf(ids.name);
|
||
|
|
if (index == -1 && ids.style.borderColor != 'tomato' && ids.style.color != 'tomato') {
|
||
|
|
dblClickcolorValidation(ids);
|
||
|
|
}
|
||
|
|
append_more_risk_suggestions(ids.name);
|
||
|
|
append_more_advice_suggestions(ids.name);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function removeItemOnce(arr, value) {
|
||
|
|
var index = arr.indexOf(value);
|
||
|
|
if (index > -1) {
|
||
|
|
arr.splice(index, 1);
|
||
|
|
}
|
||
|
|
return arr;
|
||
|
|
}
|
||
|
|
|
||
|
|
$(document).ready(function() {
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
/*handling health risk dynamically */
|
||
|
|
|
||
|
|
var existinghealth_risk_nameArr = [];
|
||
|
|
var existinghealth_risk_name =
|
||
|
|
"<?php echo getCommaSeperatedValuesForInClause("select health_risk_name from health_risk", 'health_risk_id', $row_checkup['health_risk_id']) ?>"
|
||
|
|
if (existinghealth_risk_name != undefined && existinghealth_risk_name != null && existinghealth_risk_name != '') {
|
||
|
|
existinghealth_risk_nameArr = existinghealth_risk_name.split(",");
|
||
|
|
}
|
||
|
|
|
||
|
|
var health_risk_name = new Array();
|
||
|
|
|
||
|
|
if ($('#health_risk_name')) {
|
||
|
|
gethealth_risk_name();
|
||
|
|
|
||
|
|
function gethealth_risk_name() {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_health_risk_name.php',
|
||
|
|
type: "GET",
|
||
|
|
success: function(data) {
|
||
|
|
health_risk_name = $.parseJSON(data);
|
||
|
|
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error pulling health_risk_name!!');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
if ($('#health_risk_name')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_health_risk_name = $('#health_risk_name');
|
||
|
|
try {
|
||
|
|
tag_input_health_risk_name.tag({
|
||
|
|
placeholder: tag_input_health_risk_name.attr('placeholder'),
|
||
|
|
|
||
|
|
source: health_risk_name
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#health_risk_name').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existinghealth_risk_name = "<?php echo getCommaSeperatedValuesForInClause("select health_risk_name from health_risk", 'health_risk_id', $row_checkup['health_risk_id']) ?>"
|
||
|
|
// if (existinghealth_risk_name != undefined && existinghealth_risk_name != null && existinghealth_risk_name != '') {
|
||
|
|
// var existinghealth_risk_nameArr = existinghealth_risk_name.split(",");
|
||
|
|
jQuery.each(existinghealth_risk_nameArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_health_risk_name.after('<textarea id="' + tag_input_health_risk_name.attr('id') +
|
||
|
|
'" name="' + tag_input_health_risk_name.attr('name') + '" rows="3">' +
|
||
|
|
tag_input_health_risk_name.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#health_risk_name').parents("td").width();
|
||
|
|
// $('#health_risk_name').siblings().css('width', y - 20);
|
||
|
|
// var f = $('#health_risk_name').parents("td").css("fontSize");
|
||
|
|
// $('#health_risk_name').siblings().css('fontSize', f);
|
||
|
|
$("#SpinnerContainerRisk").hide();
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
|
||
|
|
function append_less_risk_suggestions(id) {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_risk_name.php',
|
||
|
|
type: 'POST',
|
||
|
|
data: {
|
||
|
|
id: id
|
||
|
|
},
|
||
|
|
success: function(data) {
|
||
|
|
less_risk_array = JSON.parse(data);
|
||
|
|
// alert(risk_array);
|
||
|
|
for (let x of less_risk_array) {
|
||
|
|
if (x != "") {
|
||
|
|
existinghealth_risk_nameArr.push(x);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ($('#health_risk_name')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_health_risk_name = $('#health_risk_name');
|
||
|
|
try {
|
||
|
|
tag_input_health_risk_name.tag({
|
||
|
|
placeholder: tag_input_health_risk_name.attr('placeholder'),
|
||
|
|
|
||
|
|
source: health_risk_name
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#health_risk_name').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existinghealth_risk_name = "<?php echo getCommaSeperatedValuesForInClause("select health_risk_name from health_risk", 'health_risk_id', $row_checkup['health_risk_id']) ?>"
|
||
|
|
// if (existinghealth_risk_name != undefined && existinghealth_risk_name != null && existinghealth_risk_name != '') {
|
||
|
|
// var existinghealth_risk_nameArr = existinghealth_risk_name.split(",");
|
||
|
|
jQuery.each(existinghealth_risk_nameArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_health_risk_name.after('<textarea id="' +
|
||
|
|
tag_input_health_risk_name.attr('id') + '" name="' +
|
||
|
|
tag_input_health_risk_name.attr('name') + '" rows="3">' +
|
||
|
|
tag_input_health_risk_name.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#health_risk_name').parents("td").width();
|
||
|
|
// $('#health_risk_name').siblings().css('width', y - 20);
|
||
|
|
// var f = $('#health_risk_name').parents("td").css("fontSize");
|
||
|
|
// $('#health_risk_name').siblings().css('fontSize', f);
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert("Error Pulling Data");
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
function append_more_risk_suggestions(id) {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_more_risk_name.php',
|
||
|
|
type: 'POST',
|
||
|
|
data: {
|
||
|
|
id: id
|
||
|
|
},
|
||
|
|
success: function(data) {
|
||
|
|
more_risk_array = JSON.parse(data);
|
||
|
|
// alert(risk_array);
|
||
|
|
for (let x of more_risk_array) {
|
||
|
|
if (x != "") {
|
||
|
|
existinghealth_risk_nameArr.push(x);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ($('#health_risk_name')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_health_risk_name = $('#health_risk_name');
|
||
|
|
try {
|
||
|
|
tag_input_health_risk_name.tag({
|
||
|
|
placeholder: tag_input_health_risk_name.attr('placeholder'),
|
||
|
|
|
||
|
|
source: health_risk_name
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#health_risk_name').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existinghealth_risk_name = "<?php echo getCommaSeperatedValuesForInClause("select health_risk_name from health_risk", 'health_risk_id', $row_checkup['health_risk_id']) ?>"
|
||
|
|
// if (existinghealth_risk_name != undefined && existinghealth_risk_name != null && existinghealth_risk_name != '') {
|
||
|
|
// var existinghealth_risk_nameArr = existinghealth_risk_name.split(",");
|
||
|
|
jQuery.each(existinghealth_risk_nameArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_health_risk_name.after('<textarea id="' +
|
||
|
|
tag_input_health_risk_name.attr('id') + '" name="' +
|
||
|
|
tag_input_health_risk_name.attr('name') + '" rows="3">' +
|
||
|
|
tag_input_health_risk_name.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#health_risk_name').parents("td").width();
|
||
|
|
// $('#health_risk_name').siblings().css('width', y - 20);
|
||
|
|
// var f = $('#health_risk_name').parents("td").css("fontSize");
|
||
|
|
// $('#health_risk_name').siblings().css('fontSize', f);
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert("Error Pulling Data");
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
/*ends here risk handling*/
|
||
|
|
$(document).ready(function() {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
//option A
|
||
|
|
|
||
|
|
$("#checkup_form_employee").submit(function(e) {
|
||
|
|
|
||
|
|
e.preventDefault();
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
/*
|
||
|
|
for handling the advices dynamically
|
||
|
|
*/
|
||
|
|
|
||
|
|
var existinghealth_advice_nameArr = [];
|
||
|
|
var existinghealth_advice_name =
|
||
|
|
"<?php echo getCommaSeperatedValuesForInClause("select health_advice_name from health_advice", 'health_advice_id', $row_checkup['health_advice_id']) ?>"
|
||
|
|
if (existinghealth_advice_name != undefined && existinghealth_advice_name != null && existinghealth_advice_name != '') {
|
||
|
|
existinghealth_advice_nameArr = existinghealth_advice_name.split(",");
|
||
|
|
}
|
||
|
|
|
||
|
|
var health_advice_name = new Array();
|
||
|
|
|
||
|
|
if ($('#health_advice_name')) {
|
||
|
|
gethealth_advice_name();
|
||
|
|
|
||
|
|
function gethealth_advice_name() {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_health_advice_name.php',
|
||
|
|
type: "GET",
|
||
|
|
success: function(data) {
|
||
|
|
health_advice_name = $.parseJSON(data);
|
||
|
|
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error pulling health_advice_name!!');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
if ($('#health_advice_name')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_health_advice_name = $('#health_advice_name');
|
||
|
|
try {
|
||
|
|
tag_input_health_advice_name.tag({
|
||
|
|
placeholder: tag_input_health_advice_name.attr('placeholder'),
|
||
|
|
|
||
|
|
source: health_advice_name
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#health_advice_name').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existinghealth_advice_name = "<?php echo getCommaSeperatedValuesForInClause("select health_advice_name from health_advice", 'health_advice_id', $row_checkup['health_advice_id']) ?>"
|
||
|
|
// if (existinghealth_advice_name != undefined && existinghealth_advice_name != null && existinghealth_advice_name != '') {
|
||
|
|
// var existinghealth_advice_nameArr = existinghealth_advice_name.split(",");
|
||
|
|
jQuery.each(existinghealth_advice_nameArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_health_advice_name.after('<textarea id="' + tag_input_health_advice_name.attr('id') +
|
||
|
|
'" name="' + tag_input_health_advice_name.attr('name') + '" rows="3">' +
|
||
|
|
tag_input_health_advice_name.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#health_advice_name').parents("td").width();
|
||
|
|
// $('#health_advice_name').siblings().css('width', y - 20);
|
||
|
|
//$("#health_advice_name").siblings().css('word-break', 'break-all');
|
||
|
|
// var f = $('#health_advice_name').parents("td").css("fontSize");
|
||
|
|
// $('#health_advice_name').siblings().css('fontSize', f);
|
||
|
|
$("#SpinnerContainerAdvice").hide();
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
|
||
|
|
function append_less_advice_suggestions(id) {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_less_advice_name.php',
|
||
|
|
type: 'POST',
|
||
|
|
data: {
|
||
|
|
id: id
|
||
|
|
},
|
||
|
|
success: function(data) {
|
||
|
|
less_advice_array = JSON.parse(data);
|
||
|
|
// alert(risk_array);
|
||
|
|
for (let x of less_advice_array) {
|
||
|
|
if (x != "") {
|
||
|
|
existinghealth_advice_nameArr.push(x);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ($('#health_advice_name')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_health_advice_name = $('#health_advice_name');
|
||
|
|
try {
|
||
|
|
tag_input_health_advice_name.tag({
|
||
|
|
placeholder: tag_input_health_advice_name.attr('placeholder'),
|
||
|
|
|
||
|
|
source: health_advice_name
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#health_advice_name').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existinghealth_advice_name = "<?php echo getCommaSeperatedValuesForInClause("select health_advice_name from health_risk", 'health_risk_id', $row_checkup['health_risk_id']) ?>"
|
||
|
|
// if (existinghealth_advice_name != undefined && existinghealth_advice_name != null && existinghealth_advice_name != '') {
|
||
|
|
// var existinghealth_advice_nameArr = existinghealth_advice_name.split(",");
|
||
|
|
jQuery.each(existinghealth_advice_nameArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_health_advice_name.after('<textarea id="' +
|
||
|
|
tag_input_health_advice_name.attr('id') + '" name="' +
|
||
|
|
tag_input_health_advice_name.attr('name') + '" rows="3">' +
|
||
|
|
tag_input_health_advice_name.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#health_advice_name').parents("td").width();
|
||
|
|
// $('#health_advice_name').siblings().css('width', y - 20);
|
||
|
|
// var f = $('#health_advice_name').parents("td").css("fontSize");
|
||
|
|
// $('#health_advice_name').siblings().css('fontSize', f);
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert("Error Pulling Data");
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
function append_more_advice_suggestions(id) {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_more_advice_name.php',
|
||
|
|
type: 'POST',
|
||
|
|
data: {
|
||
|
|
id: id
|
||
|
|
},
|
||
|
|
success: function(data) {
|
||
|
|
more_advice_array = JSON.parse(data);
|
||
|
|
// alert(risk_array);
|
||
|
|
for (let x of more_advice_array) {
|
||
|
|
if (x != "") {
|
||
|
|
existinghealth_advice_nameArr.push(x);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ($('#health_advice_name')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_health_advice_name = $('#health_advice_name');
|
||
|
|
try {
|
||
|
|
tag_input_health_advice_name.tag({
|
||
|
|
placeholder: tag_input_health_advice_name.attr('placeholder'),
|
||
|
|
|
||
|
|
source: health_advice_name
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#health_advice_name').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existinghealth_advice_name = "<?php echo getCommaSeperatedValuesForInClause("select health_advice_name from health_risk", 'health_risk_id', $row_checkup['health_risk_id']) ?>"
|
||
|
|
// if (existinghealth_advice_name != undefined && existinghealth_advice_name != null && existinghealth_advice_name != '') {
|
||
|
|
// var existinghealth_advice_nameArr = existinghealth_advice_name.split(",");
|
||
|
|
jQuery.each(existinghealth_advice_nameArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_health_advice_name.after('<textarea id="' +
|
||
|
|
tag_input_health_advice_name.attr('id') + '" name="' +
|
||
|
|
tag_input_health_advice_name.attr('name') + '" rows="3">' +
|
||
|
|
tag_input_health_advice_name.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#health_advice_name').parents("td").width();
|
||
|
|
// $('#health_advice_name').siblings().css('width', y - 20);
|
||
|
|
// var f = $('#health_advice_name').parents("td").css("fontSize");
|
||
|
|
// $('#health_advice_name').siblings().css('fontSize', f);
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert("Error Pulling Data");
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/*end here advice*/
|
||
|
|
|
||
|
|
/*past present illness tag fiels start*/
|
||
|
|
if ($('#past_present_illness_data')) {
|
||
|
|
|
||
|
|
var past_present_illness_data = new Array();
|
||
|
|
getpast_present_illness_data();
|
||
|
|
|
||
|
|
function getpast_present_illness_data() {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_past_present_illness_data.php',
|
||
|
|
type: "GET",
|
||
|
|
success: function(data) {
|
||
|
|
past_present_illness_data = $.parseJSON(data);
|
||
|
|
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error pulling past_present_illness_data!!');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
if ($('#past_present_illness_data')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_to = $('#past_present_illness_data');
|
||
|
|
try {
|
||
|
|
tag_input_to.tag({
|
||
|
|
placeholder: tag_input_to.attr('placeholder'),
|
||
|
|
|
||
|
|
source: past_present_illness_data
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#past_present_illness_data').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
var existingpast_present_illness_data =
|
||
|
|
"<?php echo getCommaSeperatedValuesForInClause('select param_name from history_parameter', 'param_id', $row_checkup['past_present_illness']) ?>"
|
||
|
|
if (existingpast_present_illness_data != undefined && existingpast_present_illness_data != null &&
|
||
|
|
existingpast_present_illness_data != '') {
|
||
|
|
var existingpast_present_illness_dataArr = existingpast_present_illness_data.split(",");
|
||
|
|
jQuery.each(existingpast_present_illness_dataArr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
}
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_to.after('<textarea id="' + tag_input_to.attr('id') + '" name="' + tag_input_to.attr(
|
||
|
|
'name') + '" rows="3">' + tag_input_to.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#past_present_illness_data').parents("td").width();
|
||
|
|
// $('#past_present_illness_data').siblings().css('width', y - 4);
|
||
|
|
// var f = $('#past_present_illness_data').parents("td").css("fontSize");
|
||
|
|
// $('#past_present_illness_data').siblings().css('fontSize', f);
|
||
|
|
$("#SpinnerContainerIll").hide();
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
/*past present illness tag fiels end*/
|
||
|
|
|
||
|
|
|
||
|
|
/*abnormality tag fiels start*/
|
||
|
|
var existingabnormalities_data_Arr = [];
|
||
|
|
var existingabnormalities_data =
|
||
|
|
"<?php echo getCommaSeperatedValuesForInClause("select abnormality_name from abnormality", 'abnormality_id', $row_checkup['abnormality_ids']) ?>"
|
||
|
|
if (existingabnormalities_data != undefined && existingabnormalities_data != null && existingabnormalities_data != '') {
|
||
|
|
existingabnormalities_data_Arr = existingabnormalities_data.split(",");
|
||
|
|
}
|
||
|
|
|
||
|
|
var abnormalities_data = new Array();
|
||
|
|
|
||
|
|
if ($('#abnormalities_data')) {
|
||
|
|
|
||
|
|
var abnormalities_data = new Array();
|
||
|
|
getabnormalities_data();
|
||
|
|
|
||
|
|
function getabnormalities_data() {
|
||
|
|
$.ajax({
|
||
|
|
async: 'false',
|
||
|
|
url: 'select_abnormalities_data.php',
|
||
|
|
type: "GET",
|
||
|
|
success: function(data) {
|
||
|
|
abnormalities_data = $.parseJSON(data);
|
||
|
|
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error pulling abnormalities_data!!');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
if ($('#abnormalities_data')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_to = $('#abnormalities_data');
|
||
|
|
try {
|
||
|
|
tag_input_to.tag({
|
||
|
|
placeholder: tag_input_to.attr('placeholder'),
|
||
|
|
|
||
|
|
source: abnormalities_data
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#abnormalities_data').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existingabnormalities_data = "<?php echo getCommaSeperatedValuesForInClause('select param_name from history_parameter', 'param_id', $row_checkup['past_present_illness']) ?>"
|
||
|
|
// if (existingabnormalities_data != undefined && existingabnormalities_data != null && existingabnormalities_data != '') {
|
||
|
|
// var existingabnormalities_dataArr = existingabnormalities_data.split(",");
|
||
|
|
jQuery.each(existingabnormalities_data_Arr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_to.after('<textarea id="' + tag_input_to.attr('id') + '" name="' + tag_input_to.attr(
|
||
|
|
'name') + '" rows="3">' + tag_input_to.val() + '</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#abnormalities_data').parents("td").width();
|
||
|
|
// $('#abnormalities_data').siblings().css('width', y - 3);
|
||
|
|
// var f = $('#abnormalities_data').parents("td").css("fontSize");
|
||
|
|
// $('#abnormalities_data').siblings().css('fontSize', f);
|
||
|
|
$("#SpinnerContainerAbnormality").hide();
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
function rule_gen(checkup_type_id) {
|
||
|
|
$("#SpinnerContainerAbnormality").show();
|
||
|
|
document.getElementById("generateButton").style.visibility = 'hidden';
|
||
|
|
document.getElementById("forwardButton").style.visibility = "hidden";
|
||
|
|
BootstrapDialog.alert(
|
||
|
|
"Please Wait We are fetching the related abnormalities !! Click OK and wait for SAVE button to show up");
|
||
|
|
|
||
|
|
$("#rule_param_id_onc").val(checkup_type_id);
|
||
|
|
$.ajax({
|
||
|
|
url: 'rule_eval.php',
|
||
|
|
type: "POST",
|
||
|
|
data: $("#checkup_form_employee").serialize(),
|
||
|
|
success: function(data) {
|
||
|
|
// alert(data);
|
||
|
|
abnormalities_data_array = JSON.parse(data);
|
||
|
|
// alert(abnormalities_data_array);
|
||
|
|
for (let x of abnormalities_data_array) {
|
||
|
|
// alert(x);
|
||
|
|
if (x != "") {
|
||
|
|
existingabnormalities_data_Arr.push(x);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
if ($('#abnormalities_data')) {
|
||
|
|
setTimeout(function() {
|
||
|
|
|
||
|
|
var tag_input_to = $('#abnormalities_data');
|
||
|
|
try {
|
||
|
|
tag_input_to.tag({
|
||
|
|
placeholder: tag_input_to.attr('placeholder'),
|
||
|
|
|
||
|
|
source: abnormalities_data
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
//programmatically add/remove a tag
|
||
|
|
var $tag_obj = $('#abnormalities_data').data('tag');
|
||
|
|
//$tag_obj.add('Programmatically Added');
|
||
|
|
// var existingabnormalities_data = "<?php echo getCommaSeperatedValuesForInClause('select param_name from history_parameter', 'param_id', $row_checkup['past_present_illness']) ?>"
|
||
|
|
// if (existingabnormalities_data != undefined && existingabnormalities_data != null && existingabnormalities_data != '') {
|
||
|
|
// var existingabnormalities_dataArr = existingabnormalities_data.split(",");
|
||
|
|
jQuery.each(existingabnormalities_data_Arr, function(i, val) {
|
||
|
|
$tag_obj.add(val.toUpperCase());
|
||
|
|
});
|
||
|
|
// }
|
||
|
|
//var index = $tag_obj.inValues('some tag');
|
||
|
|
// $tag_obj.remove(index);
|
||
|
|
} catch (e) {
|
||
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
||
|
|
tag_input_to.after('<textarea id="' + tag_input_to.attr('id') + '" name="' +
|
||
|
|
tag_input_to.attr('name') + '" rows="3">' + tag_input_to.val() +
|
||
|
|
'</textarea>').remove();
|
||
|
|
//autosize($('#form-field-tags'));
|
||
|
|
}
|
||
|
|
// var y = $('#abnormalities_data').parents("td").width();
|
||
|
|
// $('#abnormalities_data').siblings().css('width', y - 3);
|
||
|
|
|
||
|
|
document.getElementById("forwardButton").style.visibility = "visible";
|
||
|
|
document.getElementById("generateButton").style.visibility = 'visible';
|
||
|
|
$("#SpinnerContainerAbnormality").hide();
|
||
|
|
|
||
|
|
}, 6000);
|
||
|
|
}
|
||
|
|
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
|
||
|
|
BootstrapDialog.alert("Something Went wrong!!");
|
||
|
|
$("#SpinnerContainerAbnormality").hide();
|
||
|
|
document.getElementById("forwardButton").style.visibility = "visible";
|
||
|
|
document.getElementById("generateButton").style.visibility = 'visible';
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
/*abnormalities tag fiels end*/
|
||
|
|
|
||
|
|
function getHealthIndex(bp1, bp2, bmi, sugar, cholestrol) {
|
||
|
|
var bp_score = 0;
|
||
|
|
var bmi_score = 0;
|
||
|
|
var sugar_score = 0;
|
||
|
|
var cholestrol_score = 0;
|
||
|
|
var total_score = 0;
|
||
|
|
// alert(bp1+" "+bp2+" "+bmi+" "+sugar+" "+cholestrol);
|
||
|
|
if (bp1 > 140 && bp2 > 90) {
|
||
|
|
bp_score = 4;
|
||
|
|
} else if (bp1 > 120 && bp1 < 140 && bp2 > 80 && bp2 < 90) {
|
||
|
|
bp_score = 2;
|
||
|
|
} else {
|
||
|
|
bp_score = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
if (sugar > 200) {
|
||
|
|
sugar_score = 4;
|
||
|
|
} else if (sugar > 139 && sugar < 200) {
|
||
|
|
sugar_score = 2;
|
||
|
|
} else {
|
||
|
|
sugar_score = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
if (bmi > 30) {
|
||
|
|
bmi_score = 4;
|
||
|
|
} else if (bmi > 25 && bmi < 30) {
|
||
|
|
bmi_score = 2;
|
||
|
|
} else {
|
||
|
|
bmi_score = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
if (cholestrol > 240) {
|
||
|
|
cholestrol_score = 4;
|
||
|
|
} else if (cholestrol > 200 && cholestrol < 240) {
|
||
|
|
cholestrol_score = 2;
|
||
|
|
} else {
|
||
|
|
cholestrol_score = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
total_score = bp_score + bmi_score + sugar_score + cholestrol_score;
|
||
|
|
|
||
|
|
return total_score;
|
||
|
|
}
|
||
|
|
|
||
|
|
function calHealthIndex() {
|
||
|
|
var bp = $('#bps').val();
|
||
|
|
// alert(bp);
|
||
|
|
if (bp != "" || bp != null || bp != undefined) {
|
||
|
|
|
||
|
|
var bps = bp.split("/");
|
||
|
|
var bp1 = parseInt(bps[0]);
|
||
|
|
var bp2 = parseInt(bps[1]);
|
||
|
|
var bmi = parseInt($('#bmi').val());
|
||
|
|
var sugar = parseInt($('#rbs').val());
|
||
|
|
var cholestrol = parseInt($('#total_cholesterol').val());
|
||
|
|
|
||
|
|
var health_index_score = getHealthIndex(bp1, bp2, bmi, sugar, cholestrol);
|
||
|
|
|
||
|
|
$('#health_index').val(health_index_score);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function validation_checkup_form()
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
// if(!$('#attendedStatus').val()) {
|
||
|
|
// console.log('<?php echo $_SESSION["RoleCode"] ?>');
|
||
|
|
// if('<?php echo $_SESSION["RoleCode"] ?>'=='LAB') {
|
||
|
|
// $('#attendedStatus').attr('value','MDA');
|
||
|
|
// }elseif('<?php echo $_SESSION["RoleCode"] ?>'=='DOC') {
|
||
|
|
// $('#attendedStatus').attr('value','DRA');
|
||
|
|
// }elseif('<?php echo $_SESSION["RoleCode"] ?>'=='RCP') {
|
||
|
|
// $('#attendedStatus').attr('value','RCA');
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// $('#attendedStatus').attr('value','MDP');
|
||
|
|
// console.log($('#attendedStatus').val());
|
||
|
|
if ('<?php echo $_SESSION["RoleCode"] ?>' == 'LAB') {
|
||
|
|
if (!$('#attendedStatus').val()) {
|
||
|
|
$('#attendedStatus').attr('value', 'MDA');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ('<?php echo $_SESSION["RoleCode"] ?>' == 'ELAB') {
|
||
|
|
if (!$('#attendedStatus').val()) {
|
||
|
|
$('#attendedStatus').attr('value', 'MRA');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ('<?php echo $_SESSION["RoleCode"] ?>' == 'DOC') {
|
||
|
|
if (!$('#attendedStatus').val()) {
|
||
|
|
$('#attendedStatus').attr('value', 'DRA');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if ('<?php echo $_SESSION["RoleCode"] ?>' == 'RCP') {
|
||
|
|
if (!$('#attendedStatus').val()) {
|
||
|
|
$('#attendedStatus').attr('value', 'RCA');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
save();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
jQuery(function($) {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
var checkup_id = "<?php echo $checkup_id ?>"
|
||
|
|
|
||
|
|
if (checkup_id != '')
|
||
|
|
|
||
|
|
if (!ace.vars['old_ie']) $('#checkdown_date').datetimepicker({
|
||
|
|
|
||
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
||
|
|
|
||
|
|
defaultDate: new Date("<?= $row_checkup['checkup_date'] ?>"),
|
||
|
|
|
||
|
|
maxDate: new Date(),
|
||
|
|
|
||
|
|
//minDate: new Date()-10,
|
||
|
|
|
||
|
|
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();
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
$('.date-picker').datepicker({
|
||
|
|
autoclose: true,
|
||
|
|
format: 'dd/mm/yyyy'
|
||
|
|
}).next().on(ace.click_event, function() {
|
||
|
|
$(this).prev().focus();
|
||
|
|
});
|
||
|
|
|
||
|
|
checkup_id = <?php echo $row_checkup['checkup_id'] ?>;
|
||
|
|
|
||
|
|
get_checkup_sections_id();
|
||
|
|
|
||
|
|
function get_checkup_sections_id() {
|
||
|
|
|
||
|
|
var check_section_ids = <?php echo json_encode($check_section_ids); ?>
|
||
|
|
|
||
|
|
var check_section_headers = <?php echo json_encode($check_section_headers); ?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
|
||
|
|
url: 'get_checkup_section_ids.php',
|
||
|
|
|
||
|
|
type: "POST",
|
||
|
|
|
||
|
|
data: {
|
||
|
|
checkup_id: checkup_id
|
||
|
|
},
|
||
|
|
|
||
|
|
dataType: 'json',
|
||
|
|
|
||
|
|
success: function(data) {
|
||
|
|
|
||
|
|
var checkup_section_ids = data.checkup_section_ids;
|
||
|
|
|
||
|
|
var checkup_section_ids_array = checkup_section_ids.split(",");
|
||
|
|
|
||
|
|
for (var j = 0; j < checkup_section_ids_array.length; j++) {
|
||
|
|
|
||
|
|
for (var i = 0; i < check_section_ids.length; i++) {
|
||
|
|
|
||
|
|
if (check_section_ids[i] == checkup_section_ids_array[j]) {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$("#" + check_section_headers[i]).prop("checked", true);
|
||
|
|
|
||
|
|
$("#pannel_" + check_section_headers[i]).show();
|
||
|
|
|
||
|
|
break;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
error: function(data) {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
return;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
$('.close').click();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function open_excel_pop_audiometry() {
|
||
|
|
|
||
|
|
$('#modal-add-excel-audimetry').modal("show");
|
||
|
|
}
|
||
|
|
|
||
|
|
function open_excel_pop_pft() {
|
||
|
|
//$("#modal-add-excel-pft").show();
|
||
|
|
$('#modal-add-excel-pft').modal("show");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function open_document_pop_pft() {
|
||
|
|
$('#modal-add-document-pft').modal("show");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function open_document_pop_audiometry() {
|
||
|
|
$('#modal-add-document-audiometry').modal("show");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/*$('#frmExcelImportPft').on('click', function(){
|
||
|
|
/* event.preventDefault(); */
|
||
|
|
function frmExcelImportPft() {
|
||
|
|
$.ajax({
|
||
|
|
url: "upload_excel_pft_script.php",
|
||
|
|
method: "POST",
|
||
|
|
data: new FormData(document.getElementById("pft_form")),
|
||
|
|
contentType: false,
|
||
|
|
processData: false,
|
||
|
|
success: function(data) {
|
||
|
|
BootstrapDialog.alert('Upload Excel Saved Successfully ');
|
||
|
|
getPftData();
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error In Saving Upload Excel');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
$('#modal-add-excel-pft').modal("hide");
|
||
|
|
}
|
||
|
|
|
||
|
|
function getPftData() {
|
||
|
|
$.ajax({
|
||
|
|
url: "getPftData.php",
|
||
|
|
method: "POST",
|
||
|
|
data: {
|
||
|
|
checkup_id: $('#checkup_id').val()
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
async: false,
|
||
|
|
|
||
|
|
success: function(data) {
|
||
|
|
if (data != null) {
|
||
|
|
for (var i = 0; i < data.length; i++) {
|
||
|
|
$("#" + data[i].checkup_form_key).val(data[i].checkup_form_value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(data) {}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function getAudiometryDocument() {
|
||
|
|
$.ajax({
|
||
|
|
url: "getAudiometryDocument.php",
|
||
|
|
method: "POST",
|
||
|
|
data: {
|
||
|
|
checkup_id: $('#checkup_id').val()
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
async: false,
|
||
|
|
|
||
|
|
success: function(data) {
|
||
|
|
var content = "";
|
||
|
|
content = "<tr><td>" + data.medical_doc_desc + "</td><td>"
|
||
|
|
content += "<img width=\"50\" height=\"50\" src = \"data:image/jpeg;base64," + data
|
||
|
|
.medical_doc + "\" alt = \"new image\" onclick=\"image(this)\" /></td></tr>"
|
||
|
|
$("#audiometry tbody").append(content);
|
||
|
|
},
|
||
|
|
error: function(data) {}
|
||
|
|
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
function getAudiometryData() {
|
||
|
|
$.ajax({
|
||
|
|
url: "getAudiometryData.php",
|
||
|
|
method: "POST",
|
||
|
|
data: {
|
||
|
|
checkup_id: $('#checkup_id').val()
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
async: false,
|
||
|
|
|
||
|
|
success: function(data) {
|
||
|
|
if (data != null) {
|
||
|
|
for (var i = 0; i < data.length; i++) {
|
||
|
|
$("#" + data[i].checkup_form_key).val(data[i].checkup_form_value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(data) {}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function getPftDocument() {
|
||
|
|
$.ajax({
|
||
|
|
url: "getPftDocument.php",
|
||
|
|
method: "POST",
|
||
|
|
data: {
|
||
|
|
checkup_id: $('#checkup_id').val()
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
async: false,
|
||
|
|
|
||
|
|
success: function(data) {
|
||
|
|
var content = "";
|
||
|
|
content = "<tr><td>" + data.medical_doc_desc + "</td><td>"
|
||
|
|
content += "<img width=\"50\" height=\"50\" src = \"data:image/jpeg;base64," + data
|
||
|
|
.medical_doc + "\" alt = \"new image\" onclick=\"image(this)\" /></td></tr>"
|
||
|
|
$("#pft tbody").append(content);
|
||
|
|
},
|
||
|
|
error: function(data) {}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/*$('#frmExcelImportAudiometry').on('submit', function(event){
|
||
|
|
event.preventDefault(); */
|
||
|
|
function frmExcelImportAudiometry() {
|
||
|
|
$.ajax({
|
||
|
|
url: "upload_excel_audiometry_script.php",
|
||
|
|
method: "POST",
|
||
|
|
data: new FormData(document.getElementById("audiometry_form")),
|
||
|
|
contentType: false,
|
||
|
|
processData: false,
|
||
|
|
success: function(data) {
|
||
|
|
BootstrapDialog.alert('Upload Excel Saved Successfully ');
|
||
|
|
getAudiometryData();
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error In Saving Upload Excel');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
$('#modal-add-excel-audimetry').modal("hide");
|
||
|
|
}
|
||
|
|
|
||
|
|
function save_pft_doc() {
|
||
|
|
$.ajax({
|
||
|
|
url: "save_medical_doc.php",
|
||
|
|
method: "POST",
|
||
|
|
data: new FormData(document.getElementById("document_pft_form")),
|
||
|
|
contentType: false,
|
||
|
|
processData: false,
|
||
|
|
success: function(data) {
|
||
|
|
BootstrapDialog.alert('Upload Excel Saved Successfully ');
|
||
|
|
getPftData();
|
||
|
|
getPftDocument();
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error In Saving Upload Excel');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
function save_audiometry_doc() {
|
||
|
|
$.ajax({
|
||
|
|
url: "save_medical_audiometry_doc.php",
|
||
|
|
method: "POST",
|
||
|
|
data: new FormData(document.getElementById("document_audiometry_form")),
|
||
|
|
contentType: false,
|
||
|
|
processData: false,
|
||
|
|
success: function(data) {
|
||
|
|
BootstrapDialog.alert('Upload Excel Saved Successfully ');
|
||
|
|
getAudiometryData();
|
||
|
|
getAudiometryDocument();
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error In Saving Upload Excel');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<!--
|
||
|
|
<script src="sign_script.js"></script> -->
|
||
|
|
|
||
|
|
<style>
|
||
|
|
#modal-add-excel-pft {
|
||
|
|
overflow-y: scroll;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<div class="modal fade" id="modal-add-excel-pft" name="modal-add-excel-pft" role="dialog" aria-hidden="true">
|
||
|
|
<form role="form" id="pft_form" name="pft_form" action="#" method="post">
|
||
|
|
<div class="modal-dialog">
|
||
|
|
<div class="modal-content">
|
||
|
|
<div class="widget-header">
|
||
|
|
<h5 class="widget-title">Upload Excel For PFT Parameter</h5>
|
||
|
|
<div class="widget-toolbar">
|
||
|
|
<div class="widget-menu">
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="modal-body">
|
||
|
|
<form action="" method="post" name="frmExcelImport" id="frmExcelImport" enctype="multipart/form-data">
|
||
|
|
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<div class="col-xs-3">
|
||
|
|
</div>
|
||
|
|
<div class="col-xs-6">
|
||
|
|
<input type="file" id="id-input-file-2" name="file" accept=".xls,.xlsx" />
|
||
|
|
</div>
|
||
|
|
<input type="hidden" name="checkup_id_pft" id="checkup_id_pft" value="<?php echo $checkup_id; ?>">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="widget-toolbox padding-8 clearfix">
|
||
|
|
<button type="button" onclick="frmExcelImportPft()" class="btn btn-info btn-sm save_button"><i class="ace-icon fa fa-floppy-o bigger-110"></i>Upload </button>
|
||
|
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="ace-icon fa fa-times bigger-110"></i>Cancel</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<style>
|
||
|
|
#modal-add-excel-audimetry {
|
||
|
|
overflow-y: scroll;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<div class="modal fade" id="modal-add-excel-audimetry" name="modal-add-excel-audimetry" role="dialog" aria-hidden="true">
|
||
|
|
<form role="form" id="audiometry_form" name="audiometry_form" action="#" method="post">
|
||
|
|
<div class="modal-dialog">
|
||
|
|
<div class="modal-content">
|
||
|
|
<div class="widget-header">
|
||
|
|
<h5 class="widget-title">Upload Excel For Audiometry Parameter</h5>
|
||
|
|
<div class="widget-toolbar">
|
||
|
|
<div class="widget-menu">
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="modal-body">
|
||
|
|
<form action="" method="post" name="frmExcelImport_audio" id="frmExcelImport_audio" enctype="multipart/form-data">
|
||
|
|
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<div class="col-xs-3">
|
||
|
|
</div>
|
||
|
|
<div class="col-xs-6">
|
||
|
|
<input type="file" id="id-input-file-2" name="file" />
|
||
|
|
</div>
|
||
|
|
<input type="hidden" name="checkup_id_audiometry" id="checkup_id_audiometry" value="<?php echo $checkup_id; ?>">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="widget-toolbox padding-8 clearfix">
|
||
|
|
<button type="button" onclick="frmExcelImportAudiometry()" class="btn btn-info btn-sm save_button"><i class="ace-icon fa fa-floppy-o bigger-110"></i>Upload
|
||
|
|
</button>
|
||
|
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="ace-icon fa fa-times bigger-110"></i>Cancel</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
<style>
|
||
|
|
#modal-add-document-pft {
|
||
|
|
overflow-y: scroll;
|
||
|
|
}
|
||
|
|
|
||
|
|
img {
|
||
|
|
max-width: 100%;
|
||
|
|
height: auto;
|
||
|
|
width: auto\9;
|
||
|
|
/* ie8 */
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<div class="modal fade" id="modal-add-document-pft" name="modal-add-document-pft" role="dialog" aria-hidden="true">
|
||
|
|
<form role="form" id="document_pft_form" name="document_pft_form" enctype="multipart/form-data" action="#" method="post">
|
||
|
|
<div class="modal-dialog">
|
||
|
|
<div class="modal-content">
|
||
|
|
<div class="widget-header">
|
||
|
|
<h5 class="widget-title">Upload Document For PFT Parameter</h5>
|
||
|
|
<div class="widget-toolbar">
|
||
|
|
<div class="widget-menu">
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="modal-body">
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-xs-3">
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-xs-6">
|
||
|
|
<input type="text" style="width:100%" placeholder="Enter Document Name" id="document_name_pft" name="document_name_pft" />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="row" style="margin-top: 10px">
|
||
|
|
<div class="form-group">
|
||
|
|
<div class="col-xs-3">
|
||
|
|
</div>
|
||
|
|
<div class="col-xs-6">
|
||
|
|
<input type="file" id="id-input-file-2" name="file_pft_doc" />
|
||
|
|
</div>
|
||
|
|
<input type="hidden" name="checkup_id_pft_doc" id="checkup_id_pft_doc" value="<?php echo $checkup_id; ?>">
|
||
|
|
<input type="hidden" name="pft_header_id" id="pft_header_id" value="<?php echo $checkup_id; ?>">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="widget-toolbox padding-8 clearfix">
|
||
|
|
<button type="button" onclick="save_pft_doc()" class="btn btn-info btn-sm save_button"><i class="ace-icon fa fa-floppy-o bigger-110"></i>Upload </button>
|
||
|
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="ace-icon fa fa-times bigger-110"></i>Cancel</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
<style>
|
||
|
|
#modal-add-document-audiometry {
|
||
|
|
overflow-y: scroll;
|
||
|
|
}
|
||
|
|
|
||
|
|
img {
|
||
|
|
max-width: 100%;
|
||
|
|
height: auto;
|
||
|
|
width: auto\9;
|
||
|
|
/* ie8 */
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<div class="modal fade" id="modal-add-document-audiometry" name="modal-add-document-audiometry" role="dialog" aria-hidden="true">
|
||
|
|
<form role="form" id="document_audiometry_form" name="document_audiometry_form" enctype="multipart/form-data" action="#" method="post">
|
||
|
|
<div class="modal-dialog">
|
||
|
|
<div class="modal-content">
|
||
|
|
<div class="widget-header">
|
||
|
|
<h5 class="widget-title">Upload Document For audiometry Parameter</h5>
|
||
|
|
<div class="widget-toolbar">
|
||
|
|
<div class="widget-menu">
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="modal-body">
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-xs-3">
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-xs-6">
|
||
|
|
<input type="text" style="width:100%" placeholder="Enter Document Name" id="document_name_audiometry" name="document_name_audiometry" />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="row" style="margin-top: 10px">
|
||
|
|
<div class="form-group">
|
||
|
|
<div class="col-xs-3">
|
||
|
|
</div>
|
||
|
|
<div class="col-xs-6">
|
||
|
|
<div class="form-group">
|
||
|
|
<input type="file" id="id-input-file-2" name="file_audiometry_doc" />
|
||
|
|
</div>
|
||
|
|
<input type="hidden" name="checkup_id_audiometry_doc" id="checkup_id_audiometry_doc" value="<?php echo $checkup_id; ?>">
|
||
|
|
<input type="hidden" name="audiometry_header_id" id="audiometry_header_id" value="<?php echo $checkup_id; ?>">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="widget-toolbox padding-8 clearfix">
|
||
|
|
<button type="button" onclick="save_audiometry_doc()" class="btn btn-info btn-sm save_button"><i class="ace-icon fa fa-floppy-o bigger-110"></i>Upload </button>
|
||
|
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="ace-icon fa fa-times bigger-110"></i>Cancel</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php include 'support_checkup_document.php' ?>
|
||
|
|
<?php include 'image_popup_checkup.php' ?>
|
||
|
|
<?php include 'form/upload_checkup_sec_doc.php' ?>
|
||
|
|
<script>
|
||
|
|
//body > table > tbody > tr:nth-child(1) {width: 50px}
|
||
|
|
//body > table > tbody > tr:nth-child(3) {width: 0px}
|
||
|
|
//body > table > tbody > tr:nth-child(1) > th:nth-child(1)
|
||
|
|
|
||
|
|
function createPDF(n) {
|
||
|
|
var no_tbls = <?php echo json_encode($tbl_count, JSON_HEX_TAG); ?>;
|
||
|
|
var tbl_names = <?php echo json_encode($tbl_names, JSON_HEX_TAG); ?>;
|
||
|
|
// console.log(tbl_names);
|
||
|
|
var style = "<style>h2 {text-align: center}";
|
||
|
|
style = style + "table {width: 100%;font: 17px Calibri;height: 100%}";
|
||
|
|
style = style + "table, th, td {border: solid 1px #DDD; border-collapse: collapse;";
|
||
|
|
style = style + "padding: 2px 3px;text-align: center;}";
|
||
|
|
style = style + "th, td{min-width:10%}";
|
||
|
|
style = style + "th, td{min-width:10%;text-align:left}";
|
||
|
|
style = style + "</style>";
|
||
|
|
var win = window.open('', '', 'height=700,width=1200');
|
||
|
|
win.document.write('<html><head>');
|
||
|
|
win.document.write('<title>Profile</title>');
|
||
|
|
|
||
|
|
win.document.write(style);
|
||
|
|
win.document.write('</head>');
|
||
|
|
win.document.write('<body>');
|
||
|
|
for (var i = 1; i <= no_tbls; i++) {
|
||
|
|
// console.log("for : "+i);
|
||
|
|
// var sTable = "<table>"+document.getElementById('tab'+i).innerHTML+"</table><br>";
|
||
|
|
|
||
|
|
// CREATE A WINDOW OBJECT.
|
||
|
|
|
||
|
|
|
||
|
|
// <title> FOR PDF HEADER.
|
||
|
|
// ADD STYLE INSIDE THE HEAD TAG.
|
||
|
|
|
||
|
|
// win.document.write(sTable); // THE TABLE CONTENTS INSIDE THE BODY TAG.
|
||
|
|
|
||
|
|
var sTable = "<h2>" + tbl_names[i - 1].replaceAll("_", " ").toUpperCase() + "</h2><br>";
|
||
|
|
// console.log(tbl_names[i-1]);
|
||
|
|
sTable += "<table>" + document.getElementById('tab' + i).innerHTML + "</table><br>";
|
||
|
|
win.document.write(sTable);
|
||
|
|
}
|
||
|
|
win.document.write('</body></html>');
|
||
|
|
|
||
|
|
win.document.close(); // CLOSE THE CURRENT WINDOW.
|
||
|
|
win.print(); // PRINT THE CONTENTS.
|
||
|
|
win.document.close();
|
||
|
|
}
|
||
|
|
|
||
|
|
function createIndividualPDF(n) {
|
||
|
|
var no_tbls = <?php echo json_encode($tbl_count, JSON_HEX_TAG); ?>;
|
||
|
|
var tbl_names = <?php echo json_encode($tbl_names, JSON_HEX_TAG); ?>;
|
||
|
|
// console.log(tbl_names);
|
||
|
|
var style = "<style>h2 {text-align: center}";
|
||
|
|
style = style + "table {width: 100%;font: 17px Calibri;height: 100%}";
|
||
|
|
style = style + "table, th, td {border: solid 1px #DDD; border-collapse: collapse;";
|
||
|
|
style = style + "padding: 2px 3px;text-align: center;}";
|
||
|
|
style = style + "th, td{min-width:10%}";
|
||
|
|
style = style + "th, td{min-width:10%;text-align:left}";
|
||
|
|
style = style + "</style>";
|
||
|
|
var win = window.open('', '', 'height=700,width=1200');
|
||
|
|
win.document.write('<html><head>');
|
||
|
|
win.document.write('<title>Profile</title>');
|
||
|
|
|
||
|
|
win.document.write(style);
|
||
|
|
win.document.write('</head>');
|
||
|
|
win.document.write('<body>');
|
||
|
|
|
||
|
|
var sTable = "<h2>" + tbl_names[n - 1].replaceAll("_", " ").toUpperCase() + "</h2><br>";
|
||
|
|
sTable += "<table>" + document.getElementById('tab' + n).innerHTML + "</table><br>";
|
||
|
|
win.document.write(sTable);
|
||
|
|
win.document.write('</body></html>');
|
||
|
|
|
||
|
|
win.document.close(); // CLOSE THE CURRENT WINDOW.
|
||
|
|
win.print(); // PRINT THE CONTENTS.
|
||
|
|
win.document.close();
|
||
|
|
}
|
||
|
|
|
||
|
|
function upload_section_doc(secId, secName) {
|
||
|
|
// alert(secName);
|
||
|
|
$('#up_sec_id').val(secId);
|
||
|
|
$('#up_sec_name').val(secName);
|
||
|
|
$('#modal-add-section-document').modal("show");
|
||
|
|
}
|
||
|
|
</script>
|