261 lines
11 KiB
PHP
261 lines
11 KiB
PHP
|
<?php include ('log_entry.php'); ?>
|
||
|
|
||
|
<div class="panel panel-primary" >
|
||
|
<div class="panel-heading">
|
||
|
<h3 class="panel-title">HISTORY PAST AND PRESENT ILLNESS [ if YES check checkbox if NO uncheck checkbox ]</h3>
|
||
|
<span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span>
|
||
|
</div>
|
||
|
|
||
|
<div class="panel-body" style="display:none">
|
||
|
|
||
|
<table class="table table-bordered" >
|
||
|
<tr>
|
||
|
|
||
|
<?php
|
||
|
$new_sqll = "SELECT past_present_illness FROM MEDICAL_EXAMINATION WHERE medical_exam_id = '".$medcial_exam_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[0]));
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
$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_parameter" value="<?php echo $row_section['param_id']; ?>"
|
||
|
|
||
|
<?php
|
||
|
if($param_present!=null && !empty($param_present)){
|
||
|
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 class="box-body">
|
||
|
<div class="row">
|
||
|
<div class="col-sm-12">
|
||
|
<!-- <tr>
|
||
|
<td><input type="checkbox" name="asthma" id="asthma" /><b> ASTHMA</b></td>
|
||
|
<td><input type="checkbox" name="diabetes" id=diabetes /><b> DIABETES</b></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><input type="checkbox" name="tb" id="tb"/><b> T.B</b></td>
|
||
|
<td><input type="checkbox" name="high_blood_pressure" id="high_blood_pressure"/><b> HIGH BLOOD PRESSURE</b></td>
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><input type="checkbox" name="epilepsy" id="epilepsy" /><b> EPILEPSY</b> </td>
|
||
|
<td><input type="checkbox" name="jaundice" id="jaundice" /> <b>JAUNDICE</b></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><input type="checkbox" name="psychiatric_illness" id="psychiatric_illness" /> <b>PSYCHIATRIC ILLNESS</b> </td>
|
||
|
<td><input type="checkbox" name="hernia_hydrocele" id="hernia_hydrocele" /> <b>HERNIA/ HYDROCELE</b></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><input type="checkbox" name="heart_disease" id="heart_disease" /><b> HEART DISEASE</b></td>
|
||
|
<td><input type="checkbox" name="piles_fistula" id="piles_fistula" /> <b>Piles/ Fistula</b></td>
|
||
|
</tr>-->
|
||
|
|
||
|
<?php $new_sql = "select a.org_name,a.trade_designation,a.period_services,a.past_occu_illness, b.*,c.smoking,c.tobacco,c.alcohol from past_occupational_history a left join patient_personal_information b on a.medical_exam_id=b.medical_exam_id left join medical_examination c on b.medical_exam_id = c.medical_exam_id where a.medical_exam_id = '".$_REQUEST['medical_exam_id']."' ";
|
||
|
|
||
|
error_log("new###".$new_sql);
|
||
|
|
||
|
|
||
|
|
||
|
$result = mysqli_query($conn,$new_sql);
|
||
|
if(mysqli_num_rows($result) > 0) { ?>
|
||
|
<table class="table table-bordered">
|
||
|
<tr>
|
||
|
<td colspan="4" align="center"><b style="vertical-align: top;font-weight:800"> PAST OCCUPATIONAL HISTORY</b>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><b style="vertical-align: top;font-weight:800"> Name of Organization </b>
|
||
|
<td><b style="vertical-align: top;font-weight:800"> Trade/Designation </b>
|
||
|
<td><b style="vertical-align: top;font-weight:800">Period of Service- in Years</b>
|
||
|
<td><b style="vertical-align: top;font-weight:800"> Past Occupational Illness </b>
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
<?php while ($row = @mysqli_fetch_array($result)) {
|
||
|
$marital_status = $row['marital_status'];
|
||
|
$no_of_child = $row['no_of_child'];
|
||
|
$date_of_exam = $row['date_of_exam'];
|
||
|
$identi_mark = $row['identi_mark'];
|
||
|
$adopting_family_planning = $row['adopting_family_planning'];
|
||
|
?>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td><textarea rows="4" cols="30" name="org_name0" id="org_name0" value="<?php echo $row['org_name']; ?>" maxlength="100" ><?php echo $row['org_name']; ?></textarea></td>
|
||
|
<td><input type="text" name="trade_designation0" id="trade_designation0" value="<?php echo $row['trade_designation']; ?>"></td>
|
||
|
<td><input type="number" name="period_services0" id="period_services0" value="<?php echo $row['period_services']; ?>"></input></td>
|
||
|
<td><textarea rows="4" cols="30" name="past_occu_illness0" id="past_occu_illness0" maxlength="100" ><?php echo $row['past_occu_illness']; ?></textarea></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
<?php error_log("married:".$row['marital_status']); ?>
|
||
|
|
||
|
<?php }
|
||
|
} ?>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<table class="table table-bordered">
|
||
|
<tr>
|
||
|
<td colspan="4" align="center"><b style="vertical-align: top;font-weight:800"> PERSONAL INFORMATION</b>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="40%"><b>Identification Mark</b></td>
|
||
|
<td width="60%"><textarea rows="3" cols="80" name="identi_mark" id="identi_mark" maxlength="100" ><?php echo $identi_mark; ?></textarea></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width="40%"><b>Date of Examination</b></td>
|
||
|
<td width="60%"> <div class="input-group date">
|
||
|
<div class="input-group-addon">
|
||
|
<i class="fa fa-calendar"></i>
|
||
|
</div>
|
||
|
<input style="width:120px" class="form-control" value="<?php echo $date_of_exam; ?>" name="date_of_exam" id="date_of_exam" type="text" data-date-format="dd/mm/yyyy" />
|
||
|
</div></td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width="40%"><b>Marital Status</b></td>
|
||
|
<td width="60%"><div class="col-sm-4" style="vertical-align: top">
|
||
|
|
||
|
<label class="inline"> <input name="marital_status" id="marital_status"
|
||
|
type="radio" class="ace" value="MARRIED" <?php if($marital_status == 'MARRIED'){ echo 'checked'; } ?> > <span
|
||
|
class="lbl middle"> MARRIED</span></label>
|
||
|
|
||
|
<?php error_log("married:".$row['marital_status']); ?>
|
||
|
|
||
|
<label class="inline"> <input
|
||
|
name="marital_status" id="marital_status" value="UNMARRIED" <?php if($marital_status == 'UNMARRIED'){ echo 'checked'; } ?> type="radio"
|
||
|
class="ace"> <span class="lbl middle"> UNMARRIED</span></label>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width="40%"><b> No. of children </b></td>
|
||
|
<td width="60%"><input type="number" name="no_of_child" id="no_of_child"
|
||
|
value = "<?php echo $no_of_child; ?>" ></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width="40%"><b> Whether adopting any method of family planning </b></td>
|
||
|
<td width="60%">
|
||
|
<div class="col-sm-9" style="vertical-align: top">
|
||
|
|
||
|
<label class="inline"> <input name="adopting_family_planning" id="adopting_family_planning"
|
||
|
type="radio" class="ace" value="YES" readonly <?php if($adopting_family_planning == 'YES'){ echo 'checked'; } ?>> <span
|
||
|
class="lbl middle">YES </span>
|
||
|
|
||
|
</label> <label class="inline"> <input
|
||
|
name="adopting_family_planning" id="adopting_family_planning" value="NO" type="radio" <?php if($adopting_family_planning == 'NO'){ echo 'checked'; } ?>
|
||
|
class="ace"> <span class="lbl middle" readonly> NO </span> </label></div>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width="40%"><b> Addiction </b></td>
|
||
|
<td width="60%"><div class="col-sm-9" style="vertical-align: top">
|
||
|
|
||
|
</label> <label class="inline"> <input
|
||
|
name="addiction[]" id="addiction" value="SMOKING" type="checkbox"
|
||
|
class="ace"> <span class="lbl middle"> SMOKING</span>
|
||
|
</label>
|
||
|
<label class="inline"> <input
|
||
|
name="addiction[]" id="addiction" value="TOBACCO" type="checkbox"
|
||
|
class="ace"> <span class="lbl middle"> TOBACCO</span>
|
||
|
</label> <label class="inline"> <input
|
||
|
name="addiction[]" id="addiction" value="ALCOHOL" type="checkbox"
|
||
|
class="ace"> <span class="lbl middle"> ALCOHOL</span>
|
||
|
</label>
|
||
|
<label>
|
||
|
<input
|
||
|
name="addiction[]" id="addiction" value="NONE" type="checkbox"
|
||
|
class="ace"> <span class="lbl middle"> NONE</span>
|
||
|
</label>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- <input type="hidden" id="task" name="task" value="<?php echo $_REQUEST['task']?>" >
|
||
|
<input type="hidden" name="history_parameter" id="history_parameter">
|
||
|
<input type="hidden" name="medical_exam_id" id="medical_exam_id" >
|
||
|
<input type="hidden" name="medical_examination_status" id="medical_examination_status" value="N">
|
||
|
<input type="hidden" name="patient_id" id="patient_id" value="<?php echo $_REQUEST['flex_patient_id']; ?>">
|
||
|
-->
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<script>
|
||
|
$(document).on('click', '.panel-heading span.clickable', function(e){
|
||
|
var $this = $(this);
|
||
|
if(!$this.hasClass('panel-collapsed')) {
|
||
|
$this.parents('.panel').find('.panel-body').slideUp();
|
||
|
$this.addClass('panel-collapsed');
|
||
|
$this.find('i').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
||
|
} else {
|
||
|
$this.parents('.panel').find('.panel-body').slideDown();
|
||
|
$this.removeClass('panel-collapsed');
|
||
|
$this.find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
||
|
}
|
||
|
}) </script>
|