263 lines
8.8 KiB
PHP
263 lines
8.8 KiB
PHP
|
<?php include ('log_entry.php'); ?>
|
||
|
<form class="form-horizontal" id="past_illness_form" name="past_illness_form" enctype="multipart/form-data" action="#" method="post">
|
||
|
<div class="panel panel-default">
|
||
|
<div class="panel-heading panel-heading1" id="panel-heading-history">
|
||
|
<h5 class="panel-title panel-title1" id="panel-history" 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 ILLNESS </a></h5>
|
||
|
</div>
|
||
|
|
||
|
<div id="historyPanel" class="panel-collapse collapse" aria-expanded="false" style="height: 0px;">
|
||
|
<div class="panel-body">
|
||
|
<table class="table table-bordered" >
|
||
|
<tr>
|
||
|
<?php
|
||
|
|
||
|
$new_sqll = "SELECT past_present_illness FROM MEDICAL_EXAMINATION WHERE medical_exam_id = '".$_POST['medical_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_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>
|
||
|
|
||
|
|
||
|
|
||
|
<?php
|
||
|
|
||
|
$new_sql = "select * from past_occupational_history p where medical_exam_id
|
||
|
in(select medical_exam_id from medical_examination where patient_id='".$patient_id."') order by last_modified desc limit 2";
|
||
|
|
||
|
//echo $new_sql;
|
||
|
|
||
|
//echo $patient_id;
|
||
|
|
||
|
|
||
|
$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
|
||
|
$i=0;
|
||
|
|
||
|
while ($row = @mysqli_fetch_array($result)) {
|
||
|
?>
|
||
|
<tr>
|
||
|
<td><b style="vertical-align: top">1.</b><textarea rows="4" cols="30" name="org_name<?php echo $i;?>" id="org_name<?php echo $i;?>" value="<?php echo $row['org_name']; ?>" maxlength="100" ><?php echo $row['org_name']; ?></textarea></td>
|
||
|
<td><textarea rows="4" cols="30" name="trade_designation<?php echo $i;?>" id="trade_designation<?php echo $i;?>" maxlength="100" ><?php echo $row['trade_designation']; ?></textarea></td>
|
||
|
<td><input type="number" name="period_services<?php echo $i;?>" id="period_services<?php echo $i;?>" value="<?php echo $row['period_services']; ?>"></input></td>
|
||
|
<td><textarea rows="4" cols="30" name="past_occu_illness<?php echo $i;?>" id="past_occu_illness<?php echo $i;?>" maxlength="100" ><?php echo $row['past_occu_illness']; ?></textarea></td>
|
||
|
|
||
|
</tr>
|
||
|
<input type="hidden" name="patient_id" id="patient_id" value="<?php echo $patient_id; ?>">
|
||
|
<?php
|
||
|
$i++;
|
||
|
}
|
||
|
} ?>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<?php
|
||
|
$new_sql = "select p.* from patient_personal_information p where medical_exam_id
|
||
|
in(select medical_exam_id from medical_examination where patient_id='".$patient_id."') order by last_modified desc limit 1";
|
||
|
//echo $new_sql;
|
||
|
$result = mysqli_query($conn,$new_sql);
|
||
|
if(mysqli_num_rows($result) > 0) {
|
||
|
|
||
|
$row = @mysqli_fetch_array($result);
|
||
|
$marital_status = $row['marital_status'];
|
||
|
$no_of_child = $row['no_of_child'];
|
||
|
$date_of_exam = date("d/m/Y", strtotime($row['date_of_exam']));
|
||
|
$identi_mark = $row['identi_mark'];
|
||
|
$adopting_family_planning = $row['adopting_family_planning'];
|
||
|
$addiction = $row['addiction'];
|
||
|
$addictions = (explode(',',$addiction));
|
||
|
|
||
|
|
||
|
|
||
|
?>
|
||
|
|
||
|
|
||
|
|
||
|
<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'; } ?> readonly> <span
|
||
|
class="lbl middle"> MARRIED</span></label>
|
||
|
|
||
|
<label class="inline"> <input
|
||
|
name="marital_status" id="marital_status" value="UNMARRIED" <?php if($marital_status == 'UNMARRIED'){ echo 'checked'; } ?> readonly 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" <?php
|
||
|
foreach($addictions as $x => $val) {
|
||
|
if($val == 'SMOKING'){
|
||
|
echo 'checked';
|
||
|
}
|
||
|
}
|
||
|
?>> <span class="lbl middle"> SMOKING</span>
|
||
|
</label>
|
||
|
<label class="inline"> <input
|
||
|
name="addiction[]" id="addiction" value="TOBACCO" type="checkbox"
|
||
|
class="ace" <?php
|
||
|
foreach($addictions as $x => $val) {
|
||
|
if($val == 'TOBACCO'){
|
||
|
echo 'checked';
|
||
|
}
|
||
|
}
|
||
|
?>> <span class="lbl middle"> TOBACCO</span>
|
||
|
</label> <label class="inline"> <input
|
||
|
name="addiction[]" id="addiction" value="ALCOHOL" type="checkbox"
|
||
|
class="ace" <?php
|
||
|
foreach($addictions as $x => $val) {
|
||
|
if($val == 'ALCOHOL'){
|
||
|
echo 'checked';
|
||
|
}
|
||
|
}
|
||
|
?>> <span class="lbl middle"> ALCOHOL</span>
|
||
|
</label>
|
||
|
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
<?php } ?>
|
||
|
</div><!--end of panel body-->
|
||
|
</div><!--end of historypanel1-->
|
||
|
</div>
|
||
|
|
||
|
<!-- Patient history panel ends -->
|
||
|
</form>
|
||
|
<script>
|
||
|
$('#date_of_exam').datepicker({
|
||
|
autoclose:true,
|
||
|
format: 'dd/mm/yyyy',
|
||
|
//startDate: '1d/1m/2000y',
|
||
|
endDate: 'current',
|
||
|
todayHighlight: true,
|
||
|
}).next().on(ace.click_event, function(){
|
||
|
$(this).prev().focus();
|
||
|
});
|
||
|
$('#dob').datepicker({
|
||
|
autoclose:true,
|
||
|
format: 'dd/mm/yyyy',
|
||
|
//startDate: '1d/1m/1970y',
|
||
|
}).next().on(ace.click_event, function(){
|
||
|
$(this).prev().focus();
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
|
||
|
|