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

441 lines
17 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 (Short Term)</h3>
</div>
<div class="mainPanel">
<div class="panel-group" id="accordion">
<?php include('patient_profile_panel.php'); ?>
<?php include('patient_past_history_panel_doctor.php'); ?>
<?php include('patient_details_form_ime_short_term.php'); ?>
</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">
<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></td>
<td><input style="margin-left:20px" type="number" name="height" id="height" value="<?php echo $height ?>"/></td>
<td colspan="2"><b style="margin-left: 188px ">CLINICAL EXAMINATION</</b></td>
</tr>
<tr>
<td><b> Weight(kgs)</b></td>
<td><input style="margin-left:20px" type="number" name="weight" id="weight" value="<?php echo $weight ?>" /></td>
<td colspan="2"><b > PALLOR</b> <input style="margin-left:171px;width:46%" type="text" name="pallor" id="pallor" value="<?php echo $pallor ?>" /></td>
</tr>
<tr>
<td colspan="2"><b style="margin-left: 330px ">Vision</b></td>
<td colspan="2"><b >PULSE</b><input style="margin-left:181px;width:46%" type="number" name="pulse" id="pulse" value="<?php echo $pulse ?>" /></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"><b >BP</b><input style="margin-left:202px;width:151px" type="text" name="bp" id="bp" value="<?php echo $bp ?>" />&nbsp;&nbsp;mm of Hg</td>
</tr>
<tr>
<td > <b>Distant Vision</b> <b style="margin-left:124px">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:2px" type="text" name="dis_without_left_eye" id="dis_without_left_eye" value="<?php echo $dis_without_left_eye ?>" /></td>
<td colspan="2" > <b>CVS</b><input style="margin-left: 200px;width: 46%;" type="text" name="cvs" id="cvs" value="<?php echo $cvs ?>" /></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:2px" type="text" name="dis_with_left_eye" id="dis_with_left_eye" value="<?php echo $dis_with_left_eye ?>" /></td>
<td colspan="2" > <b>RS</b><input style="margin-left: 205px;width: 46%;" type="text" name="rs" id="rs" value="<?php echo $rs ?>" /></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>
<td colspan="2" ><b>MUSCULO SKELETAL</b><input style="margin-left:115px;width:46%" type="text" name="musculo_skeletal" id="musculo_skeletal" value="<?php echo $musculo_skeletal ?>" /></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" rowspan="2"><b>ANY OTHER RELEVANT FINDING</b><br><br><textarea rows="3" cols="80" name="other_relevant_findings" id="other_relevant_findings" ><?php echo $other_relevant_findings?></textarea></td>
</tr>
<tr>
<td colspan="2" ><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>
</tr>
<tr>
<td colspan="2" rowspan="2" ><b >IDENTIFICATION OF INDIVIDUAL COLOURS</b>
<?php
if($color_vision!=null && $color_vision!=""){
?>
<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" >
</td>
</tr>
<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></br><input type="radio" name="signature_medical_assistant" id="signature_medical_assistant" value="add" />&nbsp;&nbsp;Add <input style="margin-left:40px" type="radio" name="signature_medical_assistant" id="signature_medical_assistant" value="remove" />&nbsp;&nbsp;Remove</td>
<td colspan="2">
<span class="profile-picture" style="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="reset_button" type="reset" >
<i class="ace-icon fa fa-undo"></i> Reset
</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>
</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();
}
});
/* $("#forward_button").on("click", function(){
$("#medical_examination_form").submit(function(e){
e.preventDefault();
});
$("#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 value="D" > Doctor </option></select>',
buttons: [{
label: 'OK',
action: function() {
save_forward_status();
$(".close").click();
}
}]
});
});*/
$("input").dblclick(function() {
dblClickcolorValidation(this);
// alert("hello there!"+this.name);
});
$("textarea").dblclick(function() {
dblClickcolorValidation(this);
// alert("hello there!"+this.name);
});
$("select").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 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){
$("#medical_examination_form").submit(function(e){
e.preventDefault();
});
$.ajax({
url:'save_medical_examination_form.php',
type:'POST',
data:$("#medical_examination_form").serialize(),
success:function(data){
//BootstrapDialog.alert("Medical Examination Form Saved Successfully");
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 SavingMedical 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(){
$("#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";
}
});
</script>
-->