ESH/patient_details_form_ame_greater_than_40.php
2024-10-23 18:28:06 +05:30

2003 lines
68 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">Medical 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>
<div>
<label class="control-label" for="medical_entry_date"><strong
style="font-size: 11px">Date of Examination:</strong></label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input style="width: 120px; margin-left: 0px;"
class="form-control date-picker"
value="<?=$row_patient_physical_parameters['medical_entry_date']?>"
name="medical_entry_date" id="medical_entry_date" type="text"
data-date-format="dd/mm/yyyy" />
</div>
</div>
<input type="hidden" id="hiddenHighlighter"
name="hiddenHighlighter">
<div class="row" style="display: flex;">
<div class="col-sm-12">
<center>
<b style="font-weight: 800">Clinical Examination</b>
</center>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><b style="font-weight: 800">Height:</b></td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
type="number" name="height" id="height"
value="<?php echo $height ?>" onchange="calculateBMI()" ;/>
<b style="font-weight: 800">cm</b></td>
</tr>
<tr>
<td><b style="font-weight: 800">Weight:</b></td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
type="number" name="weight" id="weight"
value="<?php echo $weight ?>" onchange="calculateBMI()" ;/>
<b style="font-weight: 800">kg</b></td>
</tr>
<tr>
<td><b style="font-weight: 800">BMI:</b></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 ?>" onchange="calHealthIndex()" />
</td>
</tr>
<tr>
<td><b style="font-weight: 800">Build & Nutrition:</td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 75%"
type="text" name="bn_findings" id="bn_findings"
value="<?php echo $bn_findings ?>" /></td>
</tr>
<tr>
<td><b style="font-weight: 800">Blood Pressure:</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 70%"
type="text" name="bp" id="bp" value="<?php echo $bp ?>"
onchange="calHealthIndex()" /> <b style="font-weight: 800">mmHg</b>
</td>
</tr>
<tr>
<td><b style="font-weight: 800">Pulse:</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 75%"
type="number" name="pulse" id="pulse"
value="<?php echo $pulse ?>" /> <b
style="font-weight: 800">/m</b></td>
</tr>
</table>
</div>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td colspan="2"><center>
<b style="font-weight: 800">General Inspection</b>
</center></td>
</tr>
<tr>
<td><b style="font-weight: 800">A:</b></td>
<td><input
style="margin-top: 18.5px; margin-bottom: 18.5px; margin-left: 15px; width: 80%"
type="text" name="a" id="a" value="<?php echo $a ?>" /></td>
</tr>
<tr>
<td><b style="font-weight: 800">cy:</b></td>
<td><input
style="margin-top: 18.5px; margin-bottom: 18.5px; margin-left: 15px; width: 80%"
type="text" name="cy" id="cy" value="<?php echo $cy ?>"
onchange="calculateBMI()" ;/></td>
</tr>
<tr>
<td><b style="font-weight: 800">I:</b></td>
<td><input
style="margin-top: 18.5px; margin-bottom: 18.5px; margin-left: 15px; width: 80%"
type="text" name="i" id="i" value="<?php echo $i ?>" /></td>
</tr>
<tr>
<td><b style="font-weight: 800">C<span
style="text-transform: lowercase;">l</span></b></td>
<td><input
style="margin-top: 18.5px; margin-bottom: 18.5px; margin-left: 15px; width: 80%"
type="text" name="cl" id="cl" value="<?php echo $cl ?>" ; />
</td>
</tr>
<tr>
<td><b style="font-weight: 800">e:</td>
<td><input
style="margin-top: 18.5px; margin-bottom: 18.5px; margin-left: 15px; width: 80%"
type="text" name="e" id="e" value="<?php echo $e ?>" ; />
<input type="hidden" name="health_index" id="health_index"
value="<?php echo $health_index?>"></td>
</tr>
</table>
</div>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><b style="font-weight: 800">Chest:</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
type="text" name="chest" id="chest"
value="<?php echo $chest ?>" /></td>
</tr>
<tr>
<td><b style="font-weight: 800">Chest Inspiration:</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 70%"
type="number" name="chest_in" id="chest_in"
value="<?php echo $chest_in ?>" /> <b
style="font-weight: 800">cm</b></td>
</tr>
<tr>
<td><b style="font-weight: 800">Chest Expiration:</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 70%"
type="number" name="chest_exp" id="chest_exp"
value="<?php echo $chest_exp ?>" /> <b
style="font-weight: 800">cm</b></td>
</tr>
<tr>
<td><b style="font-weight: 800">Skin:</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 80%"
type="text" name="skin" id="skin"
value="<?php echo $skin ?>" /></td>
</tr>
<tr>
<td><b style="font-weight: 800">Muscular Skeletal:</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 class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Deformities:
Cogenital/Acquired:
</center></td>
</tr>
<tr>
<td><input
style="margin-top: 18px; margin-bottom: 18px; margin-left: 15px; width: 90%"
type="text" name="deformities" id="deformities"
value="<?php echo $deformities?>"></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row" style="display: flex;">
<div class="col-sm-12">
<b style="margin-left: -960px; font-weight: 800">Blood Routine
Examination</b>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Haemoglobin
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 10px; width: 60%"
type="text" name="hb" id="hb" value="<?php echo $hb?>"
datamax="6" /> <b style="font-weight: 800">%gm/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Total Leucocyte Count
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 10px; width: 60%"
type="text" name="tlc" id="tlc" value="<?php echo $tlc?>"
datamax="6" /> <b style="font-weight: 800">cu./mm</b></td>
</tr>
<tr>
<td colspan="2"><center>
<b style="font-weight: 800">Differential Leucocyte Count
</center></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Neutrophils:
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 80%"
type="text" name="dlc_n" id="dlc_n"
value="<?php echo $dlc_n?>" datamax="6" /> <b
style="font-weight: 800">%</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Lymphocytes:
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 80%"
type="text" name="dlc_l" id="dlc_l"
value="<?php echo $dlc_l?>" datamax="6" /> <b
style="font-weight: 800">%</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Monocytes:
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 80%"
type="text" name="dlc_m" id="dlc_m"
value="<?php echo $dlc_m?>" datamax="6" /> <b
style="font-weight: 800">%</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Eosinophil:
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 80%"
type="text" name="dlc_e" id="dlc_e"
value="<?php echo $dlc_e?>" datamax="6" /> <b
style="font-weight: 800">%</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Basophilis:
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 80%"
type="text" name="dlc_b" id="dlc_b"
value="<?php echo $dlc_b?>" datamax="6" /> <b
style="font-weight: 800">%</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">esr:
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; width: 80%"
type="text" name="esr" id="esr" value="<?php echo $esr?>"
datamax="6" /> <b style="font-weight: 800">%</b></td>
</tr>
</table>
</div>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">FBS:
</center></td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 70%"
type="text" name="blood_sugar_fbs" id="blood_sugar_fbs"
value="<?php echo $blood_sugar_fbs?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">rBS:
</center></td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 70%"
type="text" name="blood_sugar_rbs" id="blood_sugar_fbs"
value="<?php echo $blood_sugar_rbs?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">ppBS:
</center></td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 70%"
type="text" name="blood_sugar_ppbs" id="blood_sugar_ppbs"
value="<?php echo $blood_sugar_ppbs?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">HIV:
</center></td>
<td><select
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 90%"
name="hiv" id="hiv">
<option disabled selected>Please select option</option>
<option value="REACTIVE"
<?php if(strcmp($hiv,'REACTIVE') == 0){ echo "selected";}?>>Reactive</option>
<option value="NON-REACTIVE"
<?php if(strcmp($hiv,'NON-REACTIVE') == 0){ echo "selected";} ?>>Non-Reactive</option>
<option value="NOT APPLICABLE"
<?php if(strcmp($hiv,'NOT APPLICABLE') == 0){ echo "selected";} ?>>Not
Applicable</option>
</select></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">HCV:
</center></td>
<td><select
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 90%"
name="hcv" id="hcv">
<option disabled selected>Please select option</option>
<option value="REACTIVE"
<?php if(strcmp($hcv,'REACTIVE') == 0){ echo "selected";}?>>Reactive</option>
<option value="NON-REACTIVE"
<?php if(strcmp($hcv,'NON-REACTIVE') == 0){ echo "selected";} ?>>Non-Reactive</option>
<option value="NOT APPLICABLE"
<?php if(strcmp($hcv,'NOT APPLICABLE') == 0){ echo "selected";} ?>>Not
Applicable</option>
</select></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">H<span
style="text-transform: lowercase;">bs</span>A<span
style="text-transform: lowercase;">g</span>:
</center></td>
<td><select
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 90%"
name="hbsag" id="hbsag">
<option disabled selected>Please select option</option>
<option value="REACTIVE"
<?php if(strcmp($hbsag,'REACTIVE') == 0){ echo "selected";}?>>Reactive</option>
<option value="NON-REACTIVE"
<?php if(strcmp($hbsag,'NON-REACTIVE') == 0){ echo "selected";} ?>>Non-Reactive</option>
<option value="NOT APPLICABLE"
<?php if(strcmp($hbsag,'NOT APPLICABLE') == 0){ echo "selected";} ?>>Not
Applicable</option>
</select></td>
</tr>
</table>
</div>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td colspan="2"><center>
<b style="font-weight: 800">renal function test
</center></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Uric Acid:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 65%"
type="text" name="uric_acid" id="uric_acid"
value="<?php echo $uric_acid?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Urea:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 65%"
type="text" name="s_urea" id="s_urea"
value="<?php echo $s_urea?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Creatinine:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 65%"
type="text" name="s_creatinine" id="s_creatinine"
value="<?php echo $s_creatinine?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
</table>
<br>
<table width="100%" class="table-bordered">
<tr>
<td colspan="2"><center>
<b style="font-weight: 800">Lipid Profile
</center></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Total Cholestrol:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 65%"
type="text" name="total_cholestrol" id="total_cholestrol"
value="<?php echo $total_cholestrol?>" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">(LDL) cholesterol:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 65%"
type="text" name="ldl" id="ldl" value="<?php echo $ldl ?>" /><b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">(VLDL) cholesterol:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 65%"
type="text" name="vldl" id="vldl" value="<?php echo $vldl?>" /><b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">(HDL) cholesterol:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 65%"
type="text" name="hdl" id="hdl" value="<?php echo $hdl?>" /><b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Triglycerides:
</center></td>
<td><input
style="margin-top:8px; margin-bottom:8px; margin-left: 15px; width: 65%"
type="text" name="triglycerides" id="triglycerides"
value="<?php echo $triglycerides?>" /><b
style="font-weight: 800">mg/dl</b></td>
</tr>
</table>
</div>
<div class="col-sm-3"
style="flex: 30%; padding: 5px; width: 25%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td colspan="2"><center>
<b style="font-weight: 800">liver function test
</center></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">total bilirubin:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 60%"
type="text" name="total_bilirubin" id="total_bilirubin"
value="<?php echo $total_bilirubin?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">conj:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 60%"
type="text" name="conj" id="conj"
value="<?php echo $conj?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">unconj:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 60%"
type="text" name="uniconj" id="uniconj"
value="<?php echo $uniconj?>" datamax="6" /> <b
style="font-weight: 800">mg/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">sgot:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 75%"
type="text" name="sgop" id="sgop"
value="<?php echo $sgop?>" datamax="6" /> <b
style="font-weight: 800">u/l</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">sgpt:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 75%"
type="text" name="sgpt" id="sgpt"
value="<?php echo $sgpt?>" datamax="6" /> <b
style="font-weight: 800">u/l</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">alkaline Phosphatase:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 75%"
type="text" name="alk_phosphatase" id="alk_phosphatase"
value="<?php echo $alk_phosphatase?>" datamax="6" /> <b
style="font-weight: 800">u/l</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">total protein:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 70%"
type="text" name="total_protein" id="total_protein"
value="<?php echo $total_protein?>" datamax="6" /> <b
style="font-weight: 800">g/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">albumin
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 70%"
type="text" name="albumin" id="albumin"
value="<?php echo $albumin?>" datamax="6" /> <b
style="font-weight: 800">g/dl</b></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">globulin:
</center></td>
<td><input
style="margin-top: 8px; margin-bottom: 8px; margin-left: 15px; width: 70%"
type="text" name="globulin" id="globulin"
value="<?php echo $globulin?>" datamax="6" /> <b
style="font-weight: 800">g/dl</b></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- clinical examination ends -->
<div class="box-body" style="display: none;"
id="medical_examination_form_two">
<div class="row">
<div class="col-sm-12">
<b style="margin-left: -950px; font-weight: 800">CNS</b> <b
style="margin-left: 390px; font-weight: 800">ENT</b> <b
style="margin-left: 290px; font-weight: 800">CVS</b>
<div class="col-sm-4" style="flex: 30%; padding: 5px; width: 40%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">speech:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="speech" id="speech"
value="<?php echo $speech?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Higher Function:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="higher_function" id="higher_function"
value="<?php echo $higher_function?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Motor Function:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="motor_function" id="motor_function"
value="<?php echo $motor_function?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Vertigo:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="vertigo" id="vertigo"
value="<?php echo $vertigo?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Reflexes (Superficial & Deep):
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="reflexes" id="reflexes"
value="<?php echo $reflexes?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Straight line walking:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="cns_phosphate" id="cns_phosphate"
value="<?php echo $cns_phosphate?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Vibration syndrome:
</center></td>
<td><input
style="margin-top: 11px; margin-bottom: 11px; margin-left: 15px; width: 75%"
type="text" name="vibration_syndrome" id="vibration_syndrome"
value="<?php echo $vibration_syndrome?>" datamax="6" /></td>
</tr>
</table>
</div>
<div class="col-sm-4" style="flex: 40%; padding: 5px; width: 30%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Conversational Hearing:
</center></td>
<td><select
style="margin-top: 21.5px; margin-bottom: 21.5px; width: 90%; margin-left: 10px;"
name="conversational_hearing" id="conversational_hearing"><option
disabled selected>Please select option</option>
<option value="GOOD"
<?php if(strcmp($conversational_hearing,'GOOD') == 0){ echo "selected";}?>>Good</option>
<option value="AFFECTED"
<?php if(strcmp($conversational_hearing,'AFFECTED') == 0){ echo "selected";} ?>>Affected</option>
</select></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">EAC:
</center></td>
<td><select
style="margin-top: 21.5px; margin-bottom: 21.5px; width: 90%; margin-left: 10px;"
name="eac" id="eac"><option disabled selected>Please select
option</option>
<option value="CLEAR"
<?php if(strcmp($eac,'CLEAR') == 0){ echo "selected";}?>>Clear</option>
<option value="WAX"
<?php if(strcmp($eac,'WAX') == 0){ echo "selected";} ?>>Wax</option>
<option value="OTHER DISCHARGE"
<?php if(strcmp($eac,'OTHER DISCHARGE') == 0){ echo "selected";} ?>>Other
discharge</option>
</select></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Nose:
</center></td>
<td><input
style="margin-top: 21.5px; margin-bottom: 21.5px; margin-left: 10px; width: 90%"
type="text" name="nose" id="nose" value="<?php echo $nose?>"
datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Throat:
</center></td>
<td><input
style="margin-top: 21.5px; margin-bottom: 21.5px; margin-left: 10px; width: 90%"
type="text" name="throat" id="throat"
value="<?php echo $throat?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Audiometry:
</center></td>
<td><input
style="margin-top: 21.5px; margin-bottom: 21.5px; margin-left: 10px; width: 90%"
type="text" name="audio_findings" id="audio_findings"
value="<?php echo $audio_findings?>" datamax="6" /></td>
</tr>
</table>
</div>
<div class="col-sm-4" style="flex: 40%; padding: 5px; width: 30%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">S1 & S2:
</center></td>
<td><input
style="margin-top: 15px; margin-bottom: 15px; margin-left: 10px; width: 90%"
type="text" name="s1" id="s1" value="<?php echo $s1?>"
datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">any other sound:
</center></td>
<td><input
style="margin-top: 15px; margin-bottom: 15px; margin-left: 10px; width: 90%"
type="text" name="any_other_sound" id="any_other_sound"
value="<?php echo $any_other_sound?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">ECG Finding:
</center></td>
<td><input
style="margin-top: 15px; margin-bottom: 15px; margin-left: 10px; width: 90%"
type="text" name="ecg_findings" id="ecg_findings"
value="<?php echo $ecg_findings?>" datamax="6" /></td>
</tr>
</table>
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Teeth & Gum:
</center></td>
</tr>
<tr>
<td><input
style="margin-top: 15px; margin-bottom: 15px; margin-left: 10px; width: 90%"
type="text" name="teeth_gum" id="teeth_gum"
value="<?php echo $teeth_gum?>" /></td>
</tr>
</table>
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Spirometry Findings:
</center></td>
</tr>
<tr>
<td><input
style="margin-top: 15px; margin-bottom: 15px; margin-left: 10px; width: 90%"
type="text" name="spiro_remarks" id="spiro_remarks"
value="<?php echo $spirometry_remarks?>" /></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<b style="margin-left: -300px; font-weight: 800">Abdomen</b>
<div class="col-sm-4" style="flex: 40%; padding: 5px; width: 50%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Liver:
</center></td>
<td>
<center>
<select
style="margin-top: 20px; margin-bottom: 20px; width: 90%"
name="liver" id="liver"><option disabled selected>Please
select option</option>
<option value="ENLARGED"
<?php if(strcmp($liver,'ENLARGED') == 0){ echo "selected";}?>>Enlarged</option>
<option value="NOT ENLARGED"
<?php if(strcmp($liver,'NOT ENLARGED') == 0){ echo "selected";} ?>>Not
Enlarged</option>
</select>
</center>
</td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Spleen:
</center></td>
<td>
<center>
<select
style="margin-top: 20px; margin-bottom: 20px; width: 90%"
name="speen" id="speen"><option disabled selected>Please
select option</option>
<option value="ENLARGED"
<?php if(strcmp($speen,'ENLARGED') == 0){ echo "selected";}?>>Enlarged</option>
<option value="NOT ENLARGED"
<?php if(strcmp($speen,'NOT ENLARGED') == 0){ echo "selected";} ?>>Not
Enlarged</option>
</select>
</center>
</td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Tenderness:
</center></td>
<td><input
style="margin-top: 21.5px; margin-bottom: 21.5px; margin-left: 15px; width: 90%"
type="text" name="tenderness" id="tenderness"
value="<?php echo $tenderness?>" datamax="6" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Any Other Abnormality:
</center></td>
<td><input
style="margin-top: 21.5px; margin-bottom: 21.5px; margin-left: 15px; width: 90%"
type="text" name="any_other_abnormality"
id="any_other_abnormality"
value="<?php echo $any_other_abnormality ?>" /></td>
</tr>
</table>
</div>
<!-- <div class="col-sm-4" style="flex: 40%; padding: 5px; width: 33%">
<br>
<table width="100%" class="table-bordered">
<tr>
<td><center>
<b style="font-weight: 800">Hernia:
</center></td>
<td><input
style="margin-top: 13.5px; margin-bottom: 13.5px; margin-left: 15px; width: 90%"
type="text" name="hernia_details" id="hernia_details"
value="<?php echo $hernia_details?>" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Hydrocele:
</center></td>
<td><input
style="margin-top: 13.5px; margin-bottom: 13.5px; margin-left: 15px; width: 90%"
type="text" name="hydrocele" id="hydrocele"
value="<?php echo $hydrocele ?>" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Phimosis:
</center></td>
<td><input
style="margin-top: 13.5px; margin-bottom: 13.5px; margin-left: 15px; width: 90%"
type="text" name="phimosis" id="phimosis"
value="<?php echo $phimosis?>" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Piles:
</center></td>
<td><input
style="margin-top: 13.5px; margin-bottom: 13.5px; margin-left: 15px; width: 90%"
type="text" name="piles_details" id="piles_details"
value="<?php echo $piles_details?>" /></td>
</tr>
<tr>
<td><center>
<b style="font-weight: 800">Fistula:
</center></td>
<td><input
style="margin-top: 13px; margin-bottom: 13px; margin-left: 15px; width: 90%"
type="text" name="fistula" id="fistula"
value="<?php echo $fistula?>" /></td>
</tr>
</table>
</div> -->
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="table-responsive">
<center>
<b style="font-weight: 800">Chest X-Ray (PA view):</b>
</center>
<table style="width: 100%" class="table-bordered">
<tr>
<td>
<center>
<b style="font-weight: 800">Findings</b>
</center>
</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 95%"
type="text" name="xray_findings" id="xray_findings"
value="<?php echo $xray_findings ?>" /></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="table-responsive">
<center>
<b style="font-weight: 800">Any Other Findings:</b>
</center>
<table style="width: 100%" class="table-bordered">
<tr>
<td>
<center>
<b style="font-weight: 800">Findings</b>
</center>
</td>
<td><input
style="margin-top: 20px; margin-bottom: 20px; margin-left: 15px; width: 95%"
type="text" name="other_relevant_findings"
id="other_relevant_findings"
value="<?php echo $other_relevant_findings ?>" /></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<table style="width: 100%" class="table-bordered">
<?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)">
</center>
</td>
</tr>
<?php }?>
</table>
</div>
</div>
<?php if('DOC' == $_SESSION['RoleCode']){?>
<div class="row">
<div class="col-sm-12">
<div class="table-responsive">
<table style="width: 100%" class="table-bordered">
<tr>
<td width="30%"><b style="font-weight: 800">Opinion of the MO</b>
<td colspan="2"><?php
if ($physical_status != null && $physical_status != "") {
?>
<input style="margin-left: 5px"
<?php if($physical_status=='FIT') echo "checked";?>
type="radio" name="physical_status" id="physical_status"
value="FIT" />&nbsp;&nbsp;FIT&nbsp;&nbsp; <input
style="margin-left: 80px"
<?php if($physical_status=='UNFIT') echo "checked";?>
type="radio" name="physical_status" id="physical_status"
value="UNFIT" />&nbsp;&nbsp;<label>UNFIT</label>&nbsp;&nbsp;
<?php }else{?>
<input style="margin-left: 5px" type="radio" checked
name="physical_status" id="physical_status" value="FIT" />&nbsp;&nbsp;FIT&nbsp;&nbsp;<input
style="margin-left: 80px" type="radio" name="physical_status"
id="physical_status" value="UNFIT" />&nbsp;&nbsp;<label>UNFIT</label>&nbsp;&nbsp;
<?php
}
?></td>
</tr>
<br>
<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>
</div>
</div>
</div>
<?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 $hazardous_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>
<tr>
<td><center>
<b style="font-weight: 800">remarks</b>
</center></td>
<td><input
style="margin-top: 10px; margin-bottom: 10px; width: 95%"
type="text" name="remarks" id="remarks"
value="<?php echo $remarks?>"></td>
</tr>
</table>
</div>
</div>
</div>
<input type="hidden" name="history_parameter"
id="history_parameter"> <br>
<?php include 'support_medical_document.php';?>
</div>
</div>
</div>
</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; display: block;">
<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>
</form>
</div>
</div>
</div>
</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() > 100 || !$.isNumeric($(this).val())){
// BootstrapDialog.alert("Enter Valid Left eye Detail");
// $(this).val('');
// }
// });
// $('#dis_without_right_eye').change(function(){
// if (0 > $(this).val() || $(this).val() > 100 || !$.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 , #past_illness_form").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(),approval_date:$("#approval_date").val()},
success:function(data){
<?php if('DOC' == $_SESSION['RoleCode']){?>
if($("#forward_status").val()=='A'){
location.href="medical_examination_list.php";
}
<?php }else{?>
if($("#forward_status").val()=='D'){
location.href="home_medical.php";
}
<?php }?>
BootstrapDialog.alert("Status Updated 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);
}
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 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;
if(bp1>140 && bp2>90){
bp_score = 0;
}
else if(bp1>120 && bp1<140 && bp2>80 && bp2<90){
bp_score=2;
}
else{
bp_score=4;
}
if(sugar > 200){
sugar_score=0;
}
else if(sugar > 139 && sugar< 200){
sugar_score=2;
}
else{
sugar_score=4;
}
if(bmi > 30){
bmi_score=0;
}
else if(bmi > 25 && bmi < 30){
bmi_score=2;
}
else{
bmi_score=4;
}
if(cholestrol > 240){
cholestrol_score=0;
}
else if(cholestrol > 200 && cholestrol < 240){
cholestrol_score=2;
}
else{
cholestrol_score=4;
}
total_score = bp_score+bmi_score+sugar_score+cholestrol_score;
return total_score;
}
function calHealthIndex(){
var bp = $('#bp').val();
var bps = bp.split("/");
var bp1 = parseInt(bps[0]);
var bp2 = parseInt(bps[1]);
var bmi = parseInt($('#bmi').val());
var sugar = parseInt($('#blood_sugar_rbs').val());
var cholestrol = parseInt($('#total_cholestrol').val());
var health_index_score= getHealthIndex(bp1,bp2,bmi,sugar,cholestrol);
$('#health_index').val(health_index_score);
}
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(){
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();
});
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><option value="D" >Save Draft</option></select>',
<?php }else{?>
message: '<select class="form-control" id="forward_status" style="margin-left:100px;width:60%"><option value="M" >Save Draft</option><option value="D" >Forward To Doctor</option></select>',
<?php }?>
buttons: [{
label: 'OK',
action: function() {
$.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");
save_forward_status();
},
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";
}
});
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_risks')){
var risks= new Array();
getRisks();
function getRisks(){
$.ajax({
url : 'select_health_risk.php',
type : "GET",
success : function(data) {
risks = $.parseJSON(data);
},
error : function(data) {
BootstrapDialog.alert('Error pulling risks');
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);
}
switchConduction();
function switchConduction(){
var cond = $("#conduction_type").val();
if(cond === 'AIR CONDUCTION'){
$("#air").show();
$("#bone").hide();
} else if(cond === 'BONE CONDUCTION'){
$("#bone").show();
$("#air").hide();
}
else if(cond ==='BOTH'){
$("#air").show();
$("#bone").show();
}
}
</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();
});
$('.date-picker').datepicker({
autoclose:true,
format:'dd/mm/yyyy'
}).next().on(ace.click_event,function(){
$(this).prev().focus();
});
<?php if(isset($row['approval_date'])){?>
$('#approval_date').datepicker({
format: 'dd/mm/yyyy',
endDate: "+1d"
}).datepicker("setDate", new Date("<?php echo $row['approval_date']?>"));
<?php }else{?>
$('#approval_date').datepicker({
format: 'dd/mm/yyyy',
endDate: "+1d"
}).datepicker("setDate", new Date());
<?php }?>
<?php if(isset($row_patient_physical_parameters['medical_entry_date'])){?>
$('#medical_entry_date').datepicker({
format: 'DD/MM/YYYY h:mm A',
endDate: "+1d"
}).datepicker("setDate", new Date("<?=$row_patient_physical_parameters['medical_entry_date']?>"));
<?php }else{?>
$('#medical_entry_date').datepicker({
format: 'DD/MM/YYYY h:mm A',
endDate: "+1d"
}).datepicker("setDate", new Date());
<?php }?>
</script>