1103 lines
36 KiB
PHP
1103 lines
36 KiB
PHP
<div class="panel panel-default">
|
|
<div class="panel-heading panel-heading1" id="panel-heading-profile">
|
|
|
|
<h5 class="panel-title panel-title1" id="panel-title1"
|
|
style="display: block; font-size: 12px; color: #337ab7; height: 17px; text-decoration: none; font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
|
|
<a role="button" data-toggle="collapse" href="#examinationPanel"
|
|
aria-expanded="true" aria-controls="collapseOne">Clinical
|
|
Examination</a>
|
|
</h5>
|
|
</div>
|
|
|
|
<div id="examinationPanel" class="panel-collapse">
|
|
<div class="panel-body">
|
|
|
|
<form class="form-horizontal" id="medical_examination_form"
|
|
name="medical_examination_form" enctype="multipart/form-data"
|
|
action="#" method="post">
|
|
<div class="box-body" id="medical_examination_form_one">
|
|
<div class="row">
|
|
<div class="col-sm-12" style="margin-top: -5rem">
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="appointment_id"><strong
|
|
style="font-size: 11px">POHC No:</strong></label>
|
|
<?php
|
|
if($_SESSION['RoleCode'] == 'LAB'){
|
|
$pohc_no= creatingPOHCNo();}
|
|
else {
|
|
$pohc_no = $row_patient_physical_parameters['pohc_no'];
|
|
}
|
|
|
|
?>
|
|
<input id="pohc_no" type="hidden" name="pohc_no"
|
|
value="<?php echo $pohc_no;?>" />
|
|
|
|
<div class="input-group">
|
|
<b><?php echo $pohc_no;?></b>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<input type="hidden" id="hiddenHighlighter"
|
|
name="hiddenHighlighter">
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
<center>
|
|
<b style="font-weight: 800">general inspection</b>
|
|
</center>
|
|
<table style="width: 100%" class="table-bordered">
|
|
<th ><center>
|
|
A
|
|
|
|
</center></th>
|
|
<th ><center>
|
|
CY
|
|
|
|
</center></th>
|
|
|
|
<th ><center>I</center></th>
|
|
<th ><center>CL</center></th>
|
|
<th ><center>e</center></th>
|
|
|
|
|
|
<tr>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="a" id="a"
|
|
value="<?php echo $a ?>" /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="cy" id="cy"
|
|
value="<?php echo $cy ?>" onchange="calculateBMI()" ;/></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="i" id="i" value="<?php echo $i ?>" ; /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="cl" id="cl" value="<?php echo $cl ?>" ; /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="e" id="e" value="<?php echo $e ?>" ; /></td>
|
|
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- VITALS START -->
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
<center>
|
|
<b style="font-weight: 800">general examination</b>
|
|
</center>
|
|
<table style="width: 100%" class="table-bordered">
|
|
|
|
<th height="30px"><center>
|
|
Height
|
|
<p>(in CMS)</p>
|
|
</center></th>
|
|
<th height="30px"><center>
|
|
Weight
|
|
<p>(in KGS)</p>
|
|
</center></th>
|
|
<th height="30px"><center>BMI</center></th>
|
|
<!-- <th height="30px"><center>Pulse</center></th>
|
|
<th height="30px"><center>Blood Pressure</center></th>
|
|
<th height="30px"><center>SpO2</center></th> -->
|
|
|
|
|
|
|
|
<tr>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="number" name="height" id="height"
|
|
onchange="calculateBMI()" value="<?php echo $height ?>" /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="number" name="weight" id="weight"
|
|
onchange="calculateBMI()" value="<?php echo $weight ?>" /></td>
|
|
<td><input readonly
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="number" name="bmi" id="bmi" value="<?php echo $bmi ?>" /></td>
|
|
<!-- <td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="number" name="pulse" id="pulse" value="<?php echo $pulse ?>"
|
|
/>
|
|
</td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="bp" id="bp" value="<?php echo $bp ?>"
|
|
onchange="colorBpValidation(this.id, this.value, 82, 122)"
|
|
; maxlength="8" /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="number" name="SpO2" id="SpO2" value="<?php echo $SpO2?>" /></td> -->
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- VITALS END -->
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
|
|
<table style="width: 100%" class="table-bordered">
|
|
|
|
<th height="30px"><center>cns</center></th>
|
|
<th height="30px"><center>pulse (per min)</center></th>
|
|
<th height="30px"><center>bp (mm hg)</center></th>
|
|
<th height="30px"><center>cvs</center></th>
|
|
<th height="30px"><center>rs</center></th>
|
|
<th height="30px"><center>musculo skeletal</center></th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="cns" id="cns" value="<?php echo $cns ?>"
|
|
/>
|
|
</td>
|
|
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="pulse" id="pulse" value="<?php echo $pulse ?>" />
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="bp" id="bp" value="<?php echo $bp ?>" /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="cvs" id="cvs" value="<?php echo $cvs ?>" /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="rs" id="rs" value="<?php echo $rs ?>" /></td>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="musculo_skeletal" id="musculo_skeletal"
|
|
value="<?php echo $musculo_skeletal ?>" /></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- clinical examination starts -->
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
|
|
<table style="width: 100%" class="table-bordered">
|
|
|
|
<th height="30px"><center>ent</center></th>
|
|
<th height="30px"><center>abdomen</center></th>
|
|
<th height="30px"><center>ANY OTHER REL. FINDING</center></th>
|
|
<th height="30px"><center>BLOOD SUGAR(mg/dl)</center></th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="ent" id="ent" value="<?php echo $ent ?>" /></td>
|
|
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="abdomen" id="abdomen"
|
|
value="<?php echo $abdomen ?>" /></td>
|
|
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
|
|
type="text" name="other_relevant_findings"
|
|
id="other_relevant_findings"
|
|
value="<?php echo $other_relevant_findings ?>" /></td>
|
|
<td width="50%">
|
|
<label><b style="font-weight: 600;margin-left: 35px;">HB1AC:</b></label>
|
|
<input
|
|
style="margin-top: 20px; margin-bottom: 20px; width: 10%"
|
|
type="number" name="blood_sugar_hb1ac" id="blood_sugar_hb1ac"
|
|
value="<?php echo $blood_sugar_hb1ac?>" placeholder="HB1AC" />
|
|
|
|
<label><b style="font-weight: 600;margin-left: 20px;">FBS:</b></label>
|
|
|
|
<input
|
|
style="margin-top: 20px; margin-bottom: 20px; width: 10%"
|
|
type="number" name="blood_sugar_fbs" id="blood_sugar_fbs"
|
|
value="<?php echo $blood_sugar_fbs?>" placeholder="FBS" />
|
|
|
|
<label><b style="font-weight: 600;margin-left: 25px;">PPBS:</b></label>
|
|
<input
|
|
style="margin-top: 20px; margin-bottom: 20px; width: 10%"
|
|
type="number" name="blood_sugar_ppbs" id="blood_sugar_ppbs"
|
|
value="<?php echo $blood_sugar_ppbs?>" placeholder="PPBS" />
|
|
|
|
<label><b style="font-weight: 600;margin-left: 20px;">RBS:</b></label>
|
|
<input
|
|
style="margin-top: 20px; margin-bottom: 20px; width: 10%"
|
|
type="number" name="blood_sugar_rbs" id="blood_sugar_rbs"
|
|
value="<?php echo $blood_sugar_rbs?>" placeholder="RBS" /></td>
|
|
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<table style="width: 100%" class="table-bordered">
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td><b style="font-weight: 800"><center>valid till</center></b></td>
|
|
|
|
<td><input
|
|
style="margin-top: 20px; margin-bottom: 20px; width: 50%"
|
|
class=" col-sm-2 date-picker" id="due_date"
|
|
style="z-index: 0" name="due_date" type="text"
|
|
data-date-format="dd/mm/yyyy"
|
|
placeholder="Due Date(dd/mm/yyyy)"
|
|
value="<?php echo date("d/m/Y", strtotime('+1 years')); ?>">
|
|
<!-- <span
|
|
class="input-group-addon"> <i
|
|
class="ace-icon fa fa-calendar"></i>
|
|
</span> --></td>
|
|
|
|
</tr>
|
|
|
|
<?php if($_SESSION['RoleCode'] == 'DOC'){ ?>
|
|
|
|
<tr>
|
|
|
|
<td><b style="font-weight: 800"><center>approval date</center></b></td>
|
|
|
|
<td>
|
|
|
|
<center>
|
|
<input
|
|
style="margin-top: 20px; margin-bottom: 20px; width: 50%"
|
|
class=" col-sm-2 date-picker" id="approval_date"
|
|
style="z-index: 0" name="approval_date" type="text"
|
|
data-date-format="dd/mm/yyyy"
|
|
placeholder="approval Date(dd/mm/yyyy)" value="">
|
|
</center>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php }?>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<input type="hidden" name="history_parameter"
|
|
id="history_parameter"> <br>
|
|
|
|
|
|
|
|
|
|
<?php if('DOC' == $_SESSION['RoleCode']){?>
|
|
|
|
<table style="width: 100%" class="table-bordered">
|
|
<tr>
|
|
<td><b>Opinion/ Remarks (By Doctor)</b></td>
|
|
<td colspan="2"><textarea style="" rows="3" cols="100"
|
|
name="opinion_remarks" id="opinion_remarks"><?php echo $opinion_remarks?></textarea></td>
|
|
</tr>
|
|
|
|
</table>
|
|
<?php } ?>
|
|
|
|
<!-- <div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
|
|
<table style="width: 100%" class="table-bordered">
|
|
<tr>
|
|
<td><center><b style="font-weight: 800">Hazardous Process</b></center></td>
|
|
<td>
|
|
<input style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 90%" type="text" name="hazard_process" id="hazard_process" value="<?php // echo $hazard_process?>">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><center><b style="font-weight: 800">Dangerous Operation</b></center></td>
|
|
<td>
|
|
<input style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 90%" type="text" name="dangerous_operation" id="dangerous_operation" value="<?php // echo $dangerous_operation?>">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>-->
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
<center><b style="font-weight: 800">ADVICES AND RECOMMENDATIONS</b></center>
|
|
<table style="width: 100%" class="table-bordered">
|
|
<tr>
|
|
<td><center><b style="font-weight: 800">health advices</b></center></td>
|
|
<td>
|
|
<input style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%" type="text" name="health_advices" id="health_advices" value="<?php echo $health_advices?>">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><center><b style="font-weight: 800">health risks</b></center></td>
|
|
<td>
|
|
<input style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%" type="text" name="health_risks" id="health_risks" value="<?php echo $health_risks?>">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<?php include 'support_medical_document.php'?>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="hidden" name="medical_exam_id" id="medical_exam_id"
|
|
value="<?php echo $_REQUEST['medical_exam_id']; ?>">
|
|
<div class="box-footer" style="text-align: center">
|
|
|
|
<button class="btn btn-primary" type="button" id="save_button"
|
|
onclick="save_medical_examination()">
|
|
|
|
<i class="ace-icon fa fa-save"></i> Save
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-warning" id="back_button"
|
|
style="display: none;" onclick="changeOtherMedicalForm()">
|
|
|
|
<i class="ace-icon fa fa-backward"></i> Back
|
|
|
|
</button>
|
|
|
|
|
|
<!-- <button class="btn btn-success" id="next_button"
|
|
onclick='changeOtherMedicalForm()'>
|
|
|
|
<i class="ace-icon fa fa-forward"></i> Next
|
|
|
|
</button> -->
|
|
<button class="btn btn-success" id="forward_button"
|
|
onclick="save_medical_examination(this.id)">
|
|
|
|
<i class="ace-icon fa fa-save"></i>Save & Forward
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-success" id="generate_pdf">
|
|
|
|
<i class="ace-icon fa fa-print"></i> Print Pdf
|
|
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<form id="medical_exam_form" target="_blank" action="#" method="POST">
|
|
<input type="hidden" name="medical_exam_id" id="medical_exam_id"
|
|
value="<?php echo $_REQUEST['medical_exam_id'] ?>" />
|
|
</form>
|
|
<?php include 'image_popup.php'?>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
<script>
|
|
// $('#height').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 350){
|
|
// BootstrapDialog.alert("Enter Valid Height Detail");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#weight').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 400){
|
|
// BootstrapDialog.alert("Enter Valid Weight Detail");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#pulse').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 250){
|
|
// BootstrapDialog.alert("Enter Valid Pulse Detail");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dis_without_left_eye').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 6 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid Left eye Detail");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dis_without_right_eye').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 6 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid Right Eye Detail");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#SpO2').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 110 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid SPO2 value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#tlc').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid tlc value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dlc_l').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid dlc-l value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dlc_n').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid dlc-n value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dlc_m').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid dlc-m value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dlc_b').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid dlc-b value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#dlc_e').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid dlc-e value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#hb').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid hb value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#vdrl').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid vdrl value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#blood_gluose').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid blood glucose value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#s_urea').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid s-urea value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#s_creatinine').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid s-creatinine value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
|
|
// $('#s_cholestrol').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid s-cholestrol value");
|
|
// $(this).val('');
|
|
// }
|
|
// });$('#pus_cells').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid pus cells value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#rbcs').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid rbcs value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#epithelial_cells').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 100 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid epithelial cells value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#albumin').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid albumin level value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
// $('#blood_sugar').change(function(){
|
|
// if (0 > $(this).val() || $(this).val() > 999 || !$.isNumeric($(this).val())){
|
|
// BootstrapDialog.alert("Enter Valid blood sugar value");
|
|
// $(this).val('');
|
|
// }
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
/*$("#forward_button").on("click", function(){
|
|
$("#save_button").hide();
|
|
BootstrapDialog.show({
|
|
title: 'Forward',
|
|
message: '<select class="form-control" id="forward_status" style="margin-left:100px;width:60%"><option value="" >Please Select Forward Option</option><option value="R" > Receptionist </option></option><option value="M" > Medical Room </option><option value="A" >Approve</option></select>',
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
save_forward_status();
|
|
$(".close").click();
|
|
}
|
|
}]
|
|
});
|
|
$("#medical_examination_form").submit(function(e){
|
|
e.preventDefault();
|
|
});
|
|
|
|
});*/
|
|
|
|
$('#health_risks').trigger('chosen:updated');
|
|
$('#health_advices').trigger('chosen:updated');
|
|
|
|
function save_illnesss(){
|
|
var history_array=[];
|
|
$("input:checkbox[name='history_param']:checked").each(function(){
|
|
history_array.push($(this).val());
|
|
$("input[name=history_parameter]").val(history_array.join(', '));
|
|
});
|
|
$.ajax({
|
|
url:'save_medical_examination.php',
|
|
type:'POST',
|
|
data:$("#medical_examination_form_2").serialize(),
|
|
dataType:'json',
|
|
success:function(data){
|
|
BootstrapDialog.alert("Past And Present Illness Saved Successfully");
|
|
if(data.medical_exam_id!=null && data.medical_exam_id!=""){
|
|
$("#medical_exam_id").val(data.medical_exam_id);
|
|
}
|
|
// location.href='pending_medical_examination_list.php';
|
|
},
|
|
error:function(data){
|
|
BootstrapDialog.alert(" Error In Saving Past And Present Illness");
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
function save_forward_status(){
|
|
|
|
$.ajax({
|
|
url:'save_medical_examination.php',
|
|
type:'POST',
|
|
data:{forward_status:$("#forward_status").val(),medical_exam_id:$("#medical_exam_id").val()},
|
|
success:function(data){
|
|
BootstrapDialog.alert("Foward Status Saved Successfully");
|
|
},
|
|
error:function(data){
|
|
BootstrapDialog.alert(" Error In Saving Foward Status ");
|
|
}
|
|
});
|
|
$("#medical_examination_form").submit(function(e){
|
|
e.preventDefault();
|
|
});
|
|
|
|
}
|
|
|
|
function colorValidation(id, val, min, max){
|
|
// ids = document.getElementById(id);
|
|
// if (val<=min || val >=max){
|
|
// ids.style.borderColor='tomato';
|
|
// ids.style.color='tomato';
|
|
// }else if(val<=max){
|
|
// ids.style.borderColor='lightgrey';
|
|
// ids.style.color='Black';
|
|
// }if(val=='') {
|
|
// ids.style.backgroundColor='white';
|
|
// }
|
|
}
|
|
|
|
function colorBpValidation(id, value, min, max){
|
|
ids = document.getElementById(id);
|
|
regex = /\//;
|
|
values = value.split(regex);
|
|
if (values[0]>min || values[1]>max){
|
|
ids.style.borderColor = 'tomato';
|
|
ids.style.color='tomato';
|
|
} else if (values[0]<60 || values[1]<90){
|
|
ids.style.borderColor = 'tomato';
|
|
ids.style.color='tomato';
|
|
} else{
|
|
ids.style.borderColor='lightgrey';
|
|
ids.style.color='Black';
|
|
}
|
|
}
|
|
|
|
function colorTextValidation(id, val, min, max){
|
|
ids = document.getElementById(id);
|
|
if (val == min || val == max){
|
|
ids.style.borderColor='tomato';
|
|
ids.style.color='tomato';
|
|
}else{
|
|
ids.style.borderColor='lightgrey';
|
|
ids.style.color='Black';
|
|
}
|
|
}
|
|
|
|
|
|
// color validation function invoke on double click event
|
|
$("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);
|
|
}
|
|
|
|
|
|
if($('#health_advices')){
|
|
var advices= new Array();
|
|
getAdvices();
|
|
function getAdvices(){
|
|
$.ajax({
|
|
url : 'select_health_advices.php',
|
|
type : "GET",
|
|
success : function(data) {
|
|
advices = $.parseJSON(data);
|
|
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error pulling advices');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
if($('#health_advices')){
|
|
setTimeout(function () {
|
|
var tag_input_advices = $('#health_advices');
|
|
try{
|
|
tag_input_advices.tag(
|
|
{
|
|
placeholder:tag_input_advices.attr('placeholder'),
|
|
|
|
source:advices
|
|
|
|
}
|
|
)
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj = $('#health_advices').data('tag');
|
|
|
|
var existingAdvices = "<?php echo getCommaSeperatedValuesForInClause('select health_advice_name from health_advice','health_advice_id',$health_advices)?>"
|
|
if(existingAdvices!=undefined && existingAdvices!=null && existingAdvices!=''){
|
|
var existingAdvicesArr =existingAdvices.split(",");
|
|
jQuery.each( existingAdvicesArr, 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_advices.after('<textarea id="'+tag_input_advices.attr('id')+'" name="'+tag_input_advices.attr('name')+'" rows="3">'+tag_input_advices.val()+'</textarea>').remove();
|
|
//autosize($('#form-field-tags'));
|
|
}
|
|
},500);
|
|
}
|
|
|
|
|
|
if($('#health_risks')){
|
|
setTimeout(function () {
|
|
var tag_input_risks = $('#health_risks');
|
|
try{
|
|
tag_input_risks.tag(
|
|
{
|
|
placeholder:tag_input_risks.attr('placeholder'),
|
|
|
|
source:risks
|
|
|
|
}
|
|
)
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj = $('#health_risks').data('tag');
|
|
|
|
var existingRisks = "<?php echo getCommaSeperatedValuesForInClause('select health_risk_name from health_risk','health_risk_id',$health_risks)?>"
|
|
if(existingRisks!=undefined && existingRisks!=null && existingRisks!=''){
|
|
var existingRisksArr =existingRisks.split(",");
|
|
jQuery.each( existingRisksArr, 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_risks.after('<textarea id="'+tag_input_risks.attr('id')+'" name="'+tag_input_risks.attr('name')+'" rows="3">'+tag_input_risks.val()+'</textarea>').remove();
|
|
//autosize($('#form-field-tags'));
|
|
}
|
|
},500);
|
|
}
|
|
|
|
function removeItemOnce(arr, value) {
|
|
var index = arr.indexOf(value);
|
|
if (index > -1) {
|
|
arr.splice(index, 1);
|
|
}
|
|
return arr;
|
|
}
|
|
|
|
|
|
function getBMI(height, weight){
|
|
|
|
//var height=$("#"+heightField).val();
|
|
//var weight=$("#"+WeightField).val();
|
|
|
|
if(height!=null && height!='' && weight!=null && weight!=''){
|
|
height=parseFloat(height);
|
|
weight=parseFloat(weight);
|
|
if(height!=0.0)
|
|
var bmi=(weight/(height/100*height/100));
|
|
|
|
return bmi.toFixed(1);
|
|
}
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
function calculateBMI(){
|
|
|
|
var height=$("#height").val();
|
|
var weight=$("#weight").val();
|
|
$("#bmi").val(getBMI(height,weight));
|
|
}
|
|
function changeOtherMedicalForm(){
|
|
if ( $("#medical_examination_form_two").css('display') == 'none' || $("#medical_examination_form_two").css("visibility") == "hidden"){
|
|
$("#medical_examination_form_two").show();
|
|
$("#reset_button").hide();
|
|
$("#back_button").show();
|
|
$("#forward_button").show();
|
|
$("#next_button").hide();
|
|
|
|
}else{
|
|
$("#medical_examination_form_two").hide();
|
|
$("#reset_button").show();
|
|
$("#back_button").hide();
|
|
$("#forward_button").hide();
|
|
$("#next_button").show();
|
|
}
|
|
if($("#medical_examination_form_one").css('display') == 'block' || $("#medical_examination_form_one").css("visibility") == "show"){
|
|
$("#medical_examination_form_one").hide();
|
|
$("#reset_button").hide();
|
|
$("#back_button").show();
|
|
$("#forward_button").show();
|
|
//$("#next_button").show();
|
|
}else{
|
|
$("#medical_examination_form_one").show();
|
|
$("#reset_button").show();
|
|
$("#back_button").hide();
|
|
$("#forward_button").hide();
|
|
//$("#next_button").hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
$("#medical_examination_form").submit(function(e){
|
|
e.preventDefault();
|
|
});
|
|
|
|
}
|
|
|
|
function save_medical_examination(id){
|
|
var history_array=[];
|
|
$("input:checkbox[name='history_param']:checked").each(function(){
|
|
history_array.push($(this).val());
|
|
$("input[name=history_parameter]").val(history_array.join(', '));
|
|
});
|
|
$("#medical_examination_form").submit(function(e){
|
|
e.preventDefault();
|
|
});
|
|
|
|
$.ajax({
|
|
url:'save_medical_examination.php',
|
|
type:'POST',
|
|
data:$("#medical_examination_form , #past_illness_form").serialize(),
|
|
success:function(data){
|
|
BootstrapDialog.alert("Medical Examination Form Saved Successfully");
|
|
if(id=='forward_button'){
|
|
BootstrapDialog.show({
|
|
title: 'Forward',
|
|
<?php if('DOC' == $_SESSION['RoleCode']){?>
|
|
message: '<select class="form-control" id="forward_status" style="margin-left:100px;width:60%"><option value="A" >Approve</option></select>',
|
|
<?php }else{?>
|
|
message: '<select class="form-control" id="forward_status" style="margin-left:100px;width:60%"><option value="D" >Forward To Doctor</option></select>',
|
|
<?php }?>
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
save_forward_status();
|
|
<?php if('DOC' == $_SESSION['RoleCode']){?>
|
|
|
|
location.href="medical_examination_list.php";
|
|
<?php }else{?>
|
|
|
|
location.href="home_medical.php";
|
|
<?php }?>
|
|
}
|
|
|
|
}]
|
|
});
|
|
|
|
}
|
|
},
|
|
error:function(data){
|
|
BootstrapDialog.alert(" Error In Saving Medical Examination Form");
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
$("input:radio[name=signature]"). click(function(){
|
|
var signatue=$('input:radio[name=signature]:checked').val();
|
|
if(signatue=='add'){
|
|
$(".profile-picture").show();
|
|
}else{
|
|
$(".profile-picture").hide();
|
|
}
|
|
|
|
});
|
|
|
|
|
|
var highlightedFields="<?php echo getFieldFromTable("highlighted_fields", "medical_examination_highlighted", "medical_exam_id", $_REQUEST['medical_exam_id'])?>"
|
|
|
|
|
|
console.log(highlightedFields);
|
|
$(document).ready(function(){
|
|
$("#hiddenHighlighter").val(highlightedFields);
|
|
highlightedFields = highlightedFields.split(",")
|
|
console.log(highlightedFields);
|
|
// console.log("length"+highlighted_fieldslds.length);
|
|
for(var i = 1; i<highlightedFields.length; i++){
|
|
ids = document.getElementById(highlightedFields[i]);
|
|
ids.style.borderColor ="tomato";
|
|
ids.style.color = "tomato";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
<link rel="stylesheet"
|
|
href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
|
|
|
|
<!-- page specific plugin styles -->
|
|
<link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
|
|
<link rel="stylesheet" href="assets/css/chosen.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
|
|
<link rel="stylesheet"
|
|
href="assets/css/bootstrap-datetimepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />
|
|
<script type="text/javascript" src="js/typeahead.bundle.js"></script>
|
|
<script src="assets/js/jquery-ui.custom.min.js"></script>
|
|
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
|
<script src="assets/js/chosen.jquery.min.js"></script>
|
|
<script src="assets/js/spinbox.min.js"></script>
|
|
<script src="assets/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-timepicker.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
|
|
<script src="assets/js/dataTables.buttons.min.js"></script>
|
|
<script src="assets/js/buttons.flash.min.js"></script>
|
|
<script src="assets/js/buttons.html5.min.js"></script>
|
|
<script src="assets/js/buttons.print.min.js"></script>
|
|
<script src="assets/js/buttons.colVis.min.js"></script>
|
|
<script src="assets/js/dataTables.select.min.js"></script>
|
|
|
|
|
|
<script src="assets/js/moment.min.js"></script>
|
|
<script src="assets/js/daterangepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
|
|
<script src="assets/js/jquery.knob.min.js"></script>
|
|
<script src="assets/js/autosize.min.js"></script>
|
|
<script src="assets/js/jquery.inputlimiter.min.js"></script>
|
|
<script src="assets/js/jquery.maskedinput.min.js"></script>
|
|
<script src="assets/js/bootstrap-tag.min.js"></script>
|
|
<script src="assets/js/ace-elements.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
$('#due_date').datepicker({
|
|
|
|
autoclose:true,
|
|
|
|
format: 'dd/mm/yyyy',
|
|
|
|
//startDate: '1d/1m/1970y',
|
|
|
|
|
|
}).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();
|
|
});
|
|
<?php if(isset($row_patient_physical_parameters['approval_date'])){?>
|
|
$('#approval_date').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: "+1d"
|
|
|
|
}).datepicker("setDate", new Date("<?php echo $row_patient_physical_parameters['approval_date']?>"));
|
|
<?php }else{?>
|
|
$('#approval_date').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: "+1d"
|
|
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
|
|
</script>
|
|
|