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

859 lines
40 KiB
PHP

<?php include('techsyn_header.php'); ?>
<!-- Main Content Container for side bar and body-->
<style>
input{
margin-left: 20px;
}
input[type="radio"]:checked + label {
color: #ff4c30;
}
</style>
<div class="main-container ace-save-state" id="main-container">
<script type="text/javascript">
try{ace.settings.loadState('main-container')}catch(e){}
</script>
<?php include('techsyn_sidebar.php'); ?>
<div class="main-content">
<div class="main-content-inner">
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
<li><i class="ace-icon fa fa-home home-icon"></i> <a href="#">Home</a>
</li>
<li class="#">Patient Visit</li>
<li class="active">Health Surveillance</li>
</ul>
<?php $sql_patient_physical_parameters="select * from medical_examination where medical_exam_id='".$_REQUEST['medical_exam_id']."'";
$result_patient_physical_parameters= mysqli_query($conn,$sql_patient_physical_parameters);
$row_patient_physical_parameters= mysqli_fetch_assoc($result_patient_physical_parameters);
@extract($row_patient_physical_parameters);
?>
</div>
<div class="page-content">
<div class="box box-primary"
style="padding: 10px; margin: 2px 0px 50px 5px; width: 99.5%;">
<div class="box-header with-border">
<h3 class="box-title">Initial Medical Examination Card (Long Term)</h3>
</div>
<div id="user-profile-2">
<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">
<table class="table table-bordered">
<tr>
<input type="hidden" style="height: 30px;" class="col-xs-4"
id="hiddenHighlighter" name="hiddenHighlighter" >
<td><b> Height(cms)</b><input class="ml-5" type="number" name="height" id="height" onchange="calculateBMI()" value="<?php echo $height ?>"/></td>
<td><b> Waist(cms)</b><input class="ml-5" type="number" name="waist" id="waist" value="<?php echo $waist ?>"/></td>
<td colspan="2"><b class="align-middle" >CLINICAL EXAMINATION</</b></td>
</tr>
<tr>
<td><b> Weight(kgs)</b><input style="margin-left:20px;" type="number" name="weight" id="weight" onchange="calculateBMI()" value="<?php echo $weight ?>" /></td>
<td><b> Hip(cms)</b><input style="margin-left:35px" type="number" name="hip" id="hip" value="<?php echo $hip ?>" /></td>
<td colspan="2"><b > NAILS</b> <input style="margin-left: 134px" class="form-check-input" checked type="radio" name="nails" id="nails" value="pink" />&nbsp;&nbsp;Pink&nbsp;&nbsp; <input type="radio" value="Pale" class="form-check-input" style="margin-left:75px" name="nails" id="nails" />&nbsp;&nbsp;<label>Pale</label>&nbsp;&nbsp; <input type="radio" class="form-check-input" value="Clubbing" style="margin-left:75px" name="nails" id="nails" />&nbsp;&nbsp;<label>Clubbing</label></td>
</tr>
<tr>
<td><b> BMI(cms)</b><input style="margin-left:40px" readonly type="number" name="bmi" id="bmi" value="<?php echo $bmi ?>" /></td>
<td></td>
<td colspan="2"><b >PULSE</b><input style="margin-left:134px;width:46%" type="text" name="pulse" id="pulse" value="<?php echo $pulse ?>" /></td>
</tr>
<tr>
<td colspan="2"><b style="margin-left: 188px ">Vision</b></td>
<td colspan="2"><b >BP</b><input style="margin-left:154px;width:46%" type="text" name="bp" id="bp" value="<?php echo $bp ?>" />&nbsp;&nbsp;mm of Hg</td>
</tr>
<tr>
<td ></td>
<td ><b style="margin-left:100px">RT.EYE</b><b style="margin-left:134px">LT.EYE</b></td>
<td colspan="2" rowspan="4"><b style="font-weight:800">ABDOMEN</b>
<div style="padding-top: 18px;">
<b>Liver</b>
<select style="margin-left: 137px;width:46%" name="liver" id="liver" >
<option disabled selected >Please Select Option</option>
<option value="ENLARGED" <?php if($liver=='ENLARGED') echo "selected";?>>Enlarged</option>
<option value="NOT_ENLARGED" <?php if($liver=='NOT_ENLARGED') echo "selected";?>>Not Enlarged</option>
</select>
</div>
<div style="padding-top: 18px;">
<b>Speen</b>
<select style="margin-left: 133px;width:46%" name="speen" id="speen" >
<option disabled selected >Please Select Option</option>
<option value="ENLARGED" <?php if($speen=='ENLARGED') echo "selected";?> >Enlarged</option>
<option value="NOT_ENLARGED" <?php if($speen=='NOT_ENLARGED') echo "selected";?>>Not Enlarged</option>
</select>
</div>
<div style="padding-top: 18px;">
<b >Tenderness</b>
<input style="margin-left: 99px;width: 46%" type="text" name="tenderness" id="tenderness" value="<?php echo $tenderness?>"/>
</div>
<div style="padding-top: 18px;">
<b >Any other abnormality</b>
<input style="margin-left:31px;width: 46%" type="text" name="any_other_abnormality" id="any_other_abnormality" value="<?php echo $any_other_abnormality?>" />
</div>
</td>
</tr>
<tr>
<td > <b>Distant Vision</b> <b style="margin-left:134px">Without Glasses</b></td>
<td ><b>6/</b><input style="margin-left:3px" type="text" name="dis_without_right_eye" id="dis_without_right_eye" value="<?php echo $dis_without_right_eye ?>" /><b style="margin-left:20px;">6/</b><input style="margin-left:5px" type="text" name="dis_without_left_eye" id="dis_without_left_eye" value="<?php echo $dis_without_left_eye ?>" /></td>
</tr>
<tr>
<td align="right"><b >With Glasses</b></td>
<td ><b>6/</b><input style="margin-left:3px" type="text" name="dis_with_right_eye" id="dis_with_right_eye" value="<?php echo $dis_with_right_eye ?>" /><b style="margin-left:20px;">6/</b><input style="margin-left:5px" type="text" name="dis_with_left_eye" id="dis_with_left_eye" value="<?php echo $dis_with_left_eye ?>" /></td>
</tr>
<tr>
<td > <b>Near Vision</b> <b style="margin-left:134px">Without Glasses</b></td>
<td ><b>N/</b><input style="margin-left:3px" type="text" name="near_without_right_eye" id="near_without_right_eye" value="<?php echo $near_without_right_eye ?>" /><b style="margin-left:20px;">N/</b><input style="margin-left:3px" type="text" name="near_without_left_eye" id="near_without_left_eye" value="<?php echo $near_without_left_eye ?>" /></td>
</tr>
<tr>
<td align="right"><b >With Glasses</b></td>
<td ><b>N/</b><input style="margin-left:3px" type="text" name="near_with_right_eye" id="near_with_right_eye" value="<?php echo $near_with_right_eye ?>" /><b style="margin-left:20px;">N/</b><input style="margin-left:3px" type="text" name="near_with_left_eye" id="near_with_left_eye" value="<?php echo $near_with_left_eye ?>" /></td>
<td colspan="2" > <b>RS</b><input style="margin-left: 155px;width: 46%;" type="text" name="rs" id="rs" value="<?php echo $rs?>" /></td>
</tr>
<tr>
<td colspan="2" ><b >Any other eye disease</b>
<input style="margin-left: 161px;" type="text" name="any_other_eye_disease" id="any_other_eye_disease" value="<?php echo $any_other_eye_disease?>"/>
</td>
<td colspan="2"><b>Skin</b><input style="margin-left: 145px;width: 46%;" type="text" name="skin" id="skin" value="<?php echo $skin?>" /></td>
</tr>
<tr>
<td colspan="2" ><b >IDENTIFICATION OF INDIVIDUAL COLOURS</b>
<?php
if($ident_of_individual_colors!=null && $ident_of_individual_colors!=""){
?>
<input style="margin-left: 80px" type="radio" checked name="ident_of_individual_colors" id="ident_of_individual_colors" <?php if($ident_of_individual_colors=='NORMAL') echo "checked"; ?> value="NORMAL" />&nbsp;&nbsp;Normal&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="ident_of_individual_colors" id="ident_of_individual_colors" <?php if($ident_of_individual_colors=='DEFECTIVE') echo "checked"; ?> value="DEFECTIVE" />&nbsp;&nbsp;<label>DEFECTIVE</label>&nbsp;&nbsp;
<?php }else{?>
<input style="margin-left: 80px" type="radio" checked name="ident_of_individual_colors" id="ident_of_individual_colors" value="NORMAL" />&nbsp;&nbsp;Normal&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="ident_of_individual_colors" id="ident_of_individual_colors" value="DEFECTIVE" />&nbsp;&nbsp;<label>DEFECTIVE</label>&nbsp;&nbsp;
<?php }
?>
</td>
<td colspan="2" ><b>MUSCULO SKELETAL</b><input style="margin-left:65px;width:46%" type="text" name="musculo_skeletal" id="musculo_skeletal" value="<?php echo $musculo_skeletal?>" /></td>
</tr>
<tr>
</tr>
<tr>
<td colspan="2" rowspan="" ><b >COLOR VISION</b>
<?php
if($color_vision!=null && $color_vision!=""){
?>
<input style="margin-left: 214px" type="radio" name="color_vision" id="color_vision" <?php if($color_vision=='NORMAL') echo "checked"; ?> value="NORMAL" />&nbsp;&nbsp;Normal&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="color_vision" id="color_vision" <?php if($color_vision=='DEFECTIVE') echo "checked"; ?> value="DEFECTIVE" />&nbsp;&nbsp;<label>DEFECTIVE</label>&nbsp;&nbsp;
<?php }else{?>
<input style="margin-left: 214px" type="radio" name="color_vision" id="color_vision" checked value="NORMAL" />&nbsp;&nbsp;Normal&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="color_vision" id="color_vision" value="DEFECTIVE" />&nbsp;&nbsp;<label>DEFECTIVE</label>&nbsp;&nbsp;
<?php }
?> </td>
<td colspan="2"><b>ANY OTHER RELEVANT FINDING</b><input style="margin-left: 14px;width: 46%;" type="text" name="any_other" id="any_other" value="<?php echo $any_other?>" /></td>
</tr>
<tr>
<td colspan="2" rowspan="" ><b >CVS</b><b style="margin-left:134px">S1</b><input style="" type="text" name="s1" id="s1" value="<?php echo $s1?>" />
<b style="margin-left:134px">S2</b><input style="" type="text" name="s2" id="s2" value="<?php echo $s2?>" /><br>
<div style="padding-top: 10px;padding-left: 69px"><b >Any other Sound</b><input style="" type="text" name="any_other_sound" id="any_other_sound" value="<?php echo $any_other_sound?>" />
<b style="margin-left: 24px;">ECG (12 Lead) findings</b><input style="" type="text" name="ecg_findings" id="ecg_findings" value="<?php echo $ecg_findings?>" /></div>
<!-- <select style="margin-left: 169px;width:212px" name="cvs" id="cvs" >
<option value="">Please Select Option</option>
<?php
$param_values=$data[0]['parameter_value'];
$parameter_values_array = explode(",", $param_values);
for ($p = 0; $p < count($parameter_values_array); $p ++) {?>
<option value="<?php echo $parameter_values_array[$p]; ?>"><?php echo getTableFieldValue('medical_parameter_value', 'med_param_value', 'med_param_val_id',$parameter_values_array[$p])?></option>
<?php }
?>
</select> -->
</td>
<td colspan="2"><b style="font-weight:800;">ENT</b>
<div style="padding-top: 18px;">
<b>Conversational Hearing</b>
<select style="margin-left: 28px;width:46%" name="conversational_hearing" id="conversational_hearing" >
<option disabled selected >Please Select Option</option>
<option value="GOOD" <?php if($conversational_hearing=='GOOD') echo "selected";?> >Good</option>
<option value="AFFECTED" <?php if($conversational_hearing=='AFFECTED') echo "selected";?> >Affected</option>
</select>
</div>
<div style="padding-top: 18px;">
<b>Auroscopy</b>
<input style="margin-left:106px;width: 46%" type="text" name="auroscopy" id="auroscopy" value="<?php echo $auroscopy?>" />
</div>
<div style="padding-top: 18px;">
<b>EAR</b>
<select style="margin-left: 150px;width:46%" name="eac" id="eac" >
<option disabled selected >Please Select Option</option>
<option value="CLEAR" <?php if($eac=='CLEAR') echo "selected";?> >Clear</option>
<option value="WAX" <?php if($eac=='WAX') echo "selected";?> >Wax</option>
<option value="OTHER_DISCHARGE" <?php if($eac=='OTHER_DISCHARGE') echo "selected";?> >Other Discharge</option>
</select>
</div>
<div style="padding-top: 18px;">
<b>Nose</b>
<input style="margin-left: 143px;width: 46%" type="text" name="nose" id="nose" value="<?php echo $nose?>" />
</div>
<div style="padding-top: 18px;">
<b>Throat</b>
<input style="margin-left:131px;width: 46%" type="text" name="throat" id="throat" value="<?php echo $throat?>" />
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="box-body" style="display:none;" id="medical_examination_form_two">
<div class="row">
<div class="col-sm-12">
<table class="table table-bordered">
<tr>
<td colspan="2" rowspan="" ><b style="font-weight:800;" >CNS</b><b style="margin-left:100px">Speech</b><input style="" type="text" name="speech" id="speech" value="<?php echo $speech?>" />
<b style="margin-left:41px">Higher Function</b><input style="" type="text" name="higher_function" id="higher_function" value="<?php echo $higher_function?>" /><br>
<div style="padding-top: 10px;padding-left: 69px"><b > Motor Function</b><input style="" type="text" name="motor_function" id="motor_function" value="<?php echo $motor_function?>" />
<b style="margin-left: 90px;">Vertigo</b><input style="" type="text" name="vertigo" id="vertigo" value="<?php echo $vertigo?>" />
</div>
<div style="padding-top: 10px;padding-left: 69px">
<b style="margin-left:-75px;"> Reflexes(superficial & deep)</b><input style="" type="text" name="reflexes" id="reflexes" value="<?php echo $vertigo?>"/>
<b style="margin-left:20px;">Vibration Syndrome</b><input style="" type="text" name="vibration_syndrome" id="vibration_syndrome" value="<?php echo $vibration_syndrome?>"/>
</div>
</td>
<td colspan="2"><b style="font-weight:800;">GENITO-URINARY</b>
<div style="padding-top: 18px;">
<b>Hernia</b>
<input style="margin-left: 71px;width:65%" type="text" name="hernia" id="hernia" value="<?php echo $hernia?>" />
</div>
<div style="padding-top: 18px;">
<b>Hydrocele</b>
<input style="margin-left:46px;width: 65%" type="text" name="hydrocele" id="hydrocele" value="<?php echo $hydrocele?>" />
</div>
<div style="padding-top: 18px;">
<b>Phimosis</b>
<input style="margin-left: 60px;width:65%" id="phimosis" type="text" name="phimosis" value="<?php echo $phimosis?>" />
</div>
<div style="padding-top: 18px;">
<b>Piles</b>
<input style="margin-left: 80px;width: 65%" type="text" name="piles" id="piles" value="<?php echo $piles?>" />
</div>
<div style="padding-top: 18px;">
<b>Fistula</b>
<input style="margin-left:66px;width: 65%" type="text" name="fistula" id="fistula" value="<?php echo $fistula?>" />
</div>
</td>
</tr>
<tr>
<td colspan="4" align="center"><b style="font-weight: 800">ILO CLASSIFICATION OF CHEST RADIOGRAPH (Enclosed Chest Radiograph)</b></td>
</tr>
<tr>
<td><b>Profusion of Pneumoconiotic opacities</b></td>
<td ><b >Grades</b></td>
<td><b>Types</b></td>
</tr>
<tr>
<td rowspan="3">
<?php
if($profusion_opacities!=null && $profusion_opacities!=""){
?>
<input style="margin-left: 80px" type="radio" name="profusion_opacities" id=" profusion_opacities" <?php if($profusion_opacities=='PRESENT') echo "checked"; ?> value="PRESENT"/>&nbsp;&nbsp;PRESENT&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="profusion_opacities" id="profusion_opacities" <?php if($profusion_opacities=='ABSENT') echo "checked"; ?> value="ABSENT"/>&nbsp;&nbsp;ABSENT&nbsp;&nbsp;
<?php }else{?>
<input style="margin-left: 80px" type="radio" name="profusion_opacities" id="profusion_opacities" checked value="PRESENT"/>&nbsp;&nbsp;PRESENT&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="profusion_opacities" id="profusion_opacities" value="ABSENT"/>&nbsp;&nbsp;ABSENT&nbsp;&nbsp;
<?php }
?>
</td>
<td rowspan="3">
<input type="text" style="width:87%;" name="grade" id="grade" value="<?php echo $grade?>" />
</td>
<td rowspan="3">
<input type="text" style="width:90%;" name="type" id="type" value="<?php echo $type?>" />
</td>
</tr>
</table>
<table class="table table-bordered">
<tr>
<td colspan="4" align="center"><b style="font-weight: 800">RESULT OF SPIROMETRY Findings</b></td>
</tr>
<tr>
<td><b>Parameters</b></td>
<td><b>Performed Value</b></td>
<td><b>Predicted Value</b></td>
<td><b>% of Predicted</b></td>
</tr>
<tr>
<td><b>Forced Vital Capacity (FVC)</b></td>
<td><input style="" type="text" name="fvc_pre" id="fvc_pre" value="<?php echo $fvc_pre?>" /></td>
<td><input style="" type="text" name="fvc_post" id="fvc_post" value="<?php echo $fvc_post?>" /></td>
<td><input style="" type="text" name="fvc" id="fvc" value="<?php echo $fvc?>" /></td>
</tr>
<tr>
<td><b>Forced Expiratory Volume in 1 sec (FEV1)</b></td>
<td><input style="" type="text" name="fev1_pre" id="fev1_pre" value="<?php echo $fev1_pre?>" /></td>
<td><input style="" type="text" name="fev1_post" id="fev1_post" value="<?php echo $fev1_post?>" /></td>
<td><input style="" type="text" name="fev1" id="fev1" value="<?php echo $fev1?>" /></td>
</tr>
<tr>
<td><b>FEV1/FVC</b></td>
<td><input style="" type="text" name="fev1_fvc_pre" id="fev1_fvc_pre" value="<?php echo $fev1_fvc_pre?>"/></td>
<td><input style="" type="text" name="fev1_fvc_post" id="fev1_fvc_post" value="<?php echo $fev1_fvc_post?>"/></td>
<td><input style="" type="text" name="fev1_fvc" id="fev1_fvc" value="<?php echo $fev1_fvc?>" /></td>
</tr>
<tr>
<td><b>Peak Expiratory Flow</b></td>
<td><input style="" type="text" name="peak_expiratory_flow_pre" id="peak_expiratory_flow_pre" value="<?php echo $peak_expiratory_flow_pre?>"/></td>
<td><input style="" type="text" name="peak_expiratory_flow_post" id="peak_expiratory_flow_post" value="<?php echo $peak_expiratory_flow_post?>"/></td>
<td><input style="" type="text" name="peak_expiratory_flow" id="peak_expiratory_flow" value="<?php echo $peak_expiratory_flow?>" /></td>
</tr>
<table class="table table-bordered">
<tr>
<td colspan="3" align="center"><b style="font-weight: 800">RESULT OF AUDIOMETRY FINDINGS</b></td>
</tr>
<tr>
<td><b>Conduction Type </b></td>
<td align="center"><b >Left Ear</b></td>
<td align="center"><b>Right Ear</b></td>
</tr>
<tr>
<td><b>Air Conduction</b></td>
<?php
if($air_cond_left!=null && $air_cond_left!=""){
?>
<td> <input style="margin-left: 114px" type="radio" name="air_cond_left" id="air_cond_left" value="NORMAL" <?php if($air_cond_left=='NORMAL') echo "checked";?> />&nbsp;&nbsp;Normal&nbsp;&nbsp;<input type="radio" style="margin-left:75px" name="air_cond_left" id="air_cond_left" value="ABNORMAL" <?php if($air_cond_left=='ABNORMAL') echo "checked";?>/>&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }else{?>
<td> <input style="margin-left: 114px" type="radio" name="air_cond_left" id="air_cond_left" checked value="NORMAL" />&nbsp;&nbsp;NORMAL&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="air_cond_left" id="air_cond_left" value="ABNORMAL" />&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }
?>
<?php
if($air_cond_right!=null && $air_cond_right!=""){
?>
<td> <input style="margin-left: 114px" type="radio" name="air_cond_right" id="air_cond_right" value="NORMAL" <?php if($air_cond_right=='NORMAL') echo "checked";?> />&nbsp;&nbsp;NORMAL&nbsp;&nbsp;<input type="radio" style="margin-left:75px" name="air_cond_right" id="air_cond_right" value="ABNORMAL" <?php if($air_cond_right=='ABNORMAL') echo "checked";?>/>&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }else{?>
<td> <input style="margin-left: 114px" type="radio" name="air_cond_right" id="air_cond_right" checked value="NORMAL" />&nbsp;&nbsp;NORMAL&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="air_cond_right" id="air_cond_right" value="ABNORMAL" />&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }
?>
</tr>
<tr>
<td><b>Bone Conduction</b></td>
<?php
if($bone_cond_left!=null && $bone_cond_left!=""){
?>
<td> <input style="margin-left: 114px" type="radio" name="bone_cond_left" id="bone_cond_left" value="NORMAL" <?php if($bone_cond_left=='NORMAL') echo "checked";?> />&nbsp;&nbsp;Normal&nbsp;&nbsp;<input type="radio" style="margin-left:75px" name="bone_cond_left" id="bone_cond_left" value="abnormal" <?php if($bone_cond_left=='ABNORMAL') echo "checked";?>/>&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }else{?>
<td> <input style="margin-left: 114px" type="radio" name="bone_cond_left" id="bone_cond_left" checked value="NORMAL" />&nbsp;&nbsp;NORMAL&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="bone_cond_left" id="bone_cond_left" value="ABNORMAL" />&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }
?>
<?php
if($bone_cond_right!=null && $bone_cond_right!=""){
?>
<td> <input style="margin-left: 114px" type="radio" name="bone_cond_right" id="bone_cond_right" value="NORMAL" <?php if($bone_cond_right=='NORMAL') echo "checked";?> />&nbsp;&nbsp;Normal&nbsp;&nbsp;<input type="radio" style="margin-left:75px" name="bone_cond_right" id="bone_cond_right" value="ABNORMAL" <?php if($bone_cond_right=='ABNORMAL') echo "checked";?>/>&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }else{?>
<td> <input style="margin-left: 114px" type="radio" name="bone_cond_right" id="bone_cond_right" checked value="NORMAL" />&nbsp;&nbsp;NORMAL&nbsp;&nbsp; <input type="radio" style="margin-left:75px" name="bone_cond_right" id="bone_cond_right" value="ABNORMAL" />&nbsp;&nbsp;ABNORMAL&nbsp;&nbsp;</td>
<?php }
?>
</tr>
<tr>
<td colspan="3" align="center"><b style="font-weight: 800">INVESTIGATIONS</b></td>
</tr>
<tr>
<td colspan="3" align="center"><b style="">Blood Group</b>&nbsp;&nbsp;<select style="width:20%" name="blood_group" id="blood_group"><?php echo generateOption("blood_group", "type","id",$blood_group); ?></select></td>
</tr>
<tr>
<td><b> Hb </b><input style="margin-left:44px" type="text" name="hb" id="hb" value="<?php echo $hb?>" /></td>
<td><b> TLC</b><input style="margin-left:71px" type="text" name="tlc" id="tlc" value="<?php echo $tlc?>" />
<b style="margin-left:16px"> DLC-N</b><input style="margin-left:107px" type="text" name="dlc_n" id="dlc_n" value="<?php echo $dlc_n?>" />
</br><b style="margin-left: 265px;margin-top: 39px;">DLC-L</b><input style="margin-left:108px;margin-top: 10px;" type="text" name="dlc_l" id="dlc_l" value="<?php echo $dlc_l?>" />
</br><b style="margin-left: 265px;margin-top: 39px;">DLC-M</b><input style="margin-left:106px;margin-top: 10px;" type="text" name="dlc_m" id="dlc_m" value="<?php echo $dlc_m?>" />
</br><b style="margin-left: 265px;margin-top: 39px;">DLC-E</b><input style="margin-left:108px;margin-top: 10px;" type="text" name="dlc_e" id="dlc_e" value="<?php echo $dlc_e?>" />
</td>
<td><b> VDRL</b><input style="margin-left:58px" type="text" name="vdrl" id="vdrl" value="<?php echo $vdrl?>" /></td>
</tr>
<tr>
<td><b>S. Urea</b><input style="margin-left:20px;" type="text" name="s_urea" id="s_urea" value="<?php echo $s_urea?>"/></td>
<td><b> S.Creatinine</b><input style="margin-left:20px;" type="text" name="s_creatinine" id="s_creatinine" value="<?php echo $s_creatinine?>" />
<b style="margin-left:20px;"> Blood Sugar</b><input style="margin-left:50px" type="text" name="blood_sugar" id="blood_sugar" value="<?php echo $blood_sugar?>" /></td>
<td><b> ESR</b><input style="margin-left:65px" type="text" name="esr" id="esr" value="<?php echo $esr?>" /></td>
</tr>
<tr>
<td><b>HbsAg</b><input style="margin-left:25px" type="text" name="hbsag" id="hbsag" value="<?php echo $hbsag?>" /></td>
<td><b>HIV </b><input style="margin-left:71px" type="text" name="hiv" id="hiv"value="<?php echo $hiv?>" />
<b style="margin-left:20px;">Lipid Profile</b><input style="margin-left:54px" type="text" name="dlc" id="dlc" value="<?php echo $dlc?>" /></td>
<td></td>
</tr>
<tr>
<td colspan="3" align="left"><b style="font-weight: 800">Urine RE/ME</b></td>
</tr>
<tr>
<td><b>Appearance</b><input style="margin-left:20px;" type="text" name="appearance" id="appearance" value="<?php echo $appearance?>" /></td>
<td><b>Pus cells</b><input style="margin-left:33px" type="text" name="pus_cells" id="pus_cells"value="<?php echo $pus_cells?>" />
<b style="margin-left:20px;">RBCs</b><input style="margin-left:99px" type="text" name="rbcs" id="rbcs" value="<?php echo $rbcs?>" /></td>
<td><b>Epithelial cells</b><input style="margin-left:29px" type="text" name="epithelial_cells" id="epithelial_cells" value="<?php echo $epithelial_cells?>" /></td>
</tr>
<tr>
<td><b>Albumin</b><input style="margin-left:44px" type="text" name="albumin" id="albumin" value="<?php echo $albumin?>" /></td>
<td><b> Other Relevant findings </b><input style="margin-left:35px;width:318px" type="text" name="other_relevant_findings" id="other_relevant_findings" value="<?php echo $other_relevant_findings?>" /></td>
<td colspan="2"> <b style="margin-left:20px;">Sugar </b><input style="margin-left:64px" type="text" name="sugar" id="sugar" value="<?php echo $sugar?>" /></td>
</tr>
<tr>
<td colspan="2"><b >Stool RE/ME</b><textarea style="margin-left:97px" class="" rows="3" cols="70" name="stool_re_me" id="stool_re_me" ><?php echo $stool_re_me?></textarea></td>
<td colspan="" align="left">
</td>
</tr>
<tr>
<td><b>Opinion/ Remarks (By Medical Assistant)</b></td>
<td colspan="2"><textarea style="" rows="3" cols="100" name="opinion_remarks_medical_assistant" id="opinion_remarks_medical_assistant" ><?php echo $opinion_remarks_medical_assistant?></textarea></td>
</tr>
<?php include 'support_medical_document.php'?>
<?php
$query = "select * from employee_signature where emp_id='" . $_SESSION['logged_user_empid'] . "' ";
//R echo $query;
if (! $result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
}else{
$row = @mysqli_fetch_array($result);
@extract($row);
}
?>
<?php if(isset($row['emp_sign']) && $row['emp_sign']!=null){?>
<tr>
<td><b>Signature Of Medical Assistant</b></br><input type="radio" name="signature_medical_assistant" id="signature_medical_assistant" value="add" />Add <input style="margin-left:40px" type="radio" name="signature_medical_assistant" id="signature_medical_assistant" value="remove" />Remove</td>
<td colspan="2">
<span class="profile-picture" style="margin-left:170px;display:none" >
<img class="editable img-responsive" id="avatar"
src="data:<?php echo $row['image_type']?>;base64,<?php echo base64_encode( $row['emp_sign'] )?>"
style="display: block; width: 180px; height: 50px;" />
</span>
</td>
</tr>
<?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-primary" type="button" id="update_button" style="display:none"
onclick="save_medical_examination()">
<i class="ace-icon fa fa-floppy"></i> Update
</button>
<button class="btn btn-warning" id="back_button" type="button" style="display: none;" onclick="changeOtherMedicalForm()" >
<i class="ace-icon fa fa-backward"></i> Back
</button>
<button class="btn btn-warning" id="reset_button" type="reset" >
<i class="ace-icon fa fa-undo"></i> Reset
</button>
<button class="btn btn-success" type="button" id="next_button" onclick='changeOtherMedicalForm()'>
<i class="ace-icon fa fa-forward"></i> Next
</button>
<button class="btn btn-success" type="button" id="forward_button" style="display: none" onclick="save_medical_examination(this.id)">
<i class="ace-icon fa fa-save"></i>Save & Forward
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include 'image_popup.php'?>
<?php include('techsyn_footer.php'); ?>
<script>
$("input:radio[name=signature_medical_assistant]"). click(function(){
var signatue=$('input:radio[name=signature_medical_assistant]:checked').val();
if(signatue=='add'){
$(".profile-picture").show();
}else{
$(".profile-picture").hide();
}
});
$("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 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));
}
}
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();
});
}
/*$("#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="D" > Doctor </option></select>',
buttons: [{
label: 'OK',
action: function() {
save_forward_status();
$(".close").click();
}
}]
});
});*/
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 ");
}
});
}
function save_medical_examination(id){
$.ajax({
url:'save_medical_examination.php',
type:'POST',
data:$("#medical_examination_form").serialize(),
success:function(data){
BootstrapDialog.show({
title: 'Information',
message: 'Medical Examination Form Saved Successfully',
buttons: [{
label: 'OK',
action: function() {
$(".close").click();
if(id=='forward_button'){
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="D" > Doctor </option></select>',
buttons: [{
label: 'OK',
action: function() {
save_forward_status();
$(".close").click();
}
}]
});
}
}
}]
});
},
error:function(data){
BootstrapDialog.alert(" Error In Saving Medical Examination Form");
}
});
}
var highlightedFields="<?php echo getFieldFromTable("highlighted_fields", "medical_examination_highlighted", "medical_exam_id", $_REQUEST['medical_exam_id'])?>"
console.log(highlightedFields);
$(document).ready(function(){
calculateBMI();
$("#hiddenHighlighter").val(highlightedFields);
highlightedFields = highlightedFields.split(",")
console.log(highlightedFields);
// console.log("length"+highlighted_fieldslds.length);
for(var i = 1; i<highlightedFields.length; i++){
console.log("values:"+highlightedFields[i]);
ids = $("[name='"+highlightedFields[i]+"']");
ids.css("borderColor","tomato");
ids.css("color","red");
}
});
</script>