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

67 lines
2.6 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="#historyPanel" aria-expanded="true"
aria-controls="collapseOne">
Past and Present Ailment</a></h5>
</div>
<div id="historyPanel" class="panel panel-collapse" aria-expanded="false">
<div class="panel-body">
<table class="table table-hover" >
<tr>
<?php
$new_sqll = "SELECT past_present_illness,regular_medication,medical_exam_id FROM MEDICAL_EXAMINATION WHERE patient_id = '".(isset($patient_id)?$patient_id:$_REQUEST['flex_patient_id'])."' AND medical_exam_id IN (SELECT MAX(medical_exam_id) FROM MEDICAL_EXAMINATION WHERE patient_id = '".(isset($patient_id)?$patient_id:$_REQUEST['flex_patient_id'])."' ) ";
//echo $new_sqll;
$resultl = mysqli_query($conn,$new_sqll);
if(mysqli_num_rows($resultl) > 0) {
$rowl = @mysqli_fetch_array($resultl);
$param_present = (explode(', ',$rowl['past_present_illness']));
$regular_medication = $rowl['regular_medication'];
$medical_exam_id = $rowl['medical_exam_id'];
}
$sql_section = "select * from history_parameter where param_id not in (11) order by param_id asc";
$count=1;
$result_section = mysqli_query($conn,$sql_section);
while ($row_section = mysqli_fetch_assoc($result_section)) {
if($count%2!=0){
?>
<tr><?php
}?>
<td>
<input type="checkbox" id="<?php echo $row_section['param_name']; ?>" name="history_param" value="<?php echo $row_section['param_id']; ?>"
<?php
if(mysqli_num_rows($resultl) > 0) {
foreach($param_present as $x => $val) {
if($val == $row_section['param_id']){
echo 'checked';
}
}
}
?>
>
<b> <?php echo $row_section['param_name'];
?></b>
</td>
<?php if($count%2==0){
?></tr><?php
}
$count++;
}
?>
</table>
</div>
</div>
</div>