504 lines
17 KiB
PHP
504 lines
17 KiB
PHP
|
|
<form id="opd_form<?php echo $row_history['appointment_id']?>" method="post">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-6">
|
|
<div class="widget-box">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div>
|
|
<label for="appointment_date">Injury Date & Time</label>
|
|
|
|
<div class="input-group">
|
|
<input id="emp_id<?php echo $row_history['appointment_id']?>" name="emp_id" type="hidden" value="<?php echo $_REQUEST['opd_id']?>"/>
|
|
<input id="appointment_id<?php echo $row_history['appointment_id']?>" name="appointment_id" type="hidden" value="<?php echo $row_history['appointment_id']?>"/>
|
|
<input id="appointment_type<?php echo $row_history['appointment_id']?>" name="appointment_type" type="hidden" value="I"/>
|
|
<input id="appointment_date<?php echo $row_history['appointment_id']?>" type="text" class="form-control" name="appointment_date"/>
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-clock-o bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="form-field-9">Injury Location</label>
|
|
|
|
<table class=" table table-bordered">
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td class="col-sm-3">
|
|
<select class="chosen-select form-control" id="injury_firm<?php echo $row_history['appointment_id']?>" name="injury_firm" data-placeholder="Business Unit" style="display: none;">
|
|
<option value=""> </option>
|
|
<?php echo generateOption('tbl_firms','firm_name','firm_id',$row['bu_id'],'',''); ?>
|
|
</select>
|
|
</td>
|
|
<td class="col-sm-3">
|
|
<select class="chosen-select form-control" id="injury_sbu<?php echo $row_history['appointment_id']?>" name="injury_sbu" data-placeholder="Department" style="display: none;">
|
|
<option value=""> </option>
|
|
<?php echo generateOption('sub_business_unit','sbu_name','sbu_id',$row['sbu_id'],'',''); ?>
|
|
</select>
|
|
</td>
|
|
<td class="col-sm-3">
|
|
<select class="chosen-select form-control" id="injury_section<?php echo $row_history['appointment_id']?>" name="injury_section" data-placeholder="Section" style="display: none;">
|
|
<option value=""> </option>
|
|
<?php echo generateOption('section','section_name','section_id',$row['section_id'],'',''); ?>
|
|
</select>
|
|
</td>
|
|
<td class="col-sm-3">
|
|
<select class="chosen-select form-control" id="injury_sub_section<?php echo $row_history['appointment_id']?>" name="injury_sub_section" data-placeholder="Sub-Section" style="display: none;">
|
|
<option value=""> </option>
|
|
<?php echo generateOption('sub_section','sub_section_name','sub_section_id',$row['sub_section_id'],''); ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
<div class="space space-8"></div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-8 col-sm-11">
|
|
<label>Absence from Work Dates</label>
|
|
<div class="input-daterange input-group">
|
|
<input type="text" class="input-sm form-control" id="absence_start<?php echo $row_history['appointment_id']?>" name="absence_start" value="<?php echo date_format(date_create($row_history['absence_start']),"d/m/Y")?>"/>
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-exchange"></i>
|
|
</span>
|
|
|
|
<input type="text" class="input-sm form-control"id="absence_end<?php echo $row_history['appointment_id']?>" name="absence_end" value="<?php echo date_format(date_create($row_history['absence_end']),"d/m/Y")?>" />
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<label for="form-field-8">Injury Description</label>
|
|
|
|
<textarea class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 52px;"name="complaints" id="complaints<?php echo $row_history['appointment_id']?>" placeholder="Injury Description" maxlength="500"><?php echo $row_history['complaints']?></textarea>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<label for="form-field-8">On Examination Findings</label>
|
|
|
|
<textarea class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 52px;"id="examination_remarks<?php echo $row_history['appointment_id']?>" name="examination_remarks" placeholder="Findings" maxlength="500"><?php echo $row_history['examination_remarks']?></textarea>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<span class="bigger-110">Injury Type</span>
|
|
</div><!-- /.span -->
|
|
</div>
|
|
|
|
<div class="space-2"></div>
|
|
|
|
<select multiple="" class="chosen-select form-control" id="injury_type<?php echo $row_history['appointment_id']?>" name="injury_type[]" data-placeholder="Injury Type" style="display: none;">
|
|
<?php echo generateOption('injury_type','injury_type_name','injury_type_id',''); ?>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<span class="bigger-110">Injury Part</span>
|
|
</div><!-- /.span -->
|
|
</div>
|
|
|
|
<div class="space-2"></div>
|
|
|
|
<select multiple="" class="chosen-select form-control" id="injury_part<?php echo $row_history['appointment_id']?>" name="injury_part[]" data-placeholder="Injury Part.." style="display: none;">
|
|
<?php echo generateOption('injury_part','inj_name','inj_id','',''); ?>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<span class="bigger-110">Injury Classification</span>
|
|
</div><!-- /.span -->
|
|
</div>
|
|
|
|
<div class="space-2"></div>
|
|
|
|
<select multiple="" class="chosen-select form-control" id="injury_class<?php echo $row_history['appointment_id']?>" name="injury_class[]" data-placeholder="Injury Classification.." style="display: none;">
|
|
<?php echo generateOption('injury_class','inj_class_name','inj_class_id','',''); ?>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><!-- /.span -->
|
|
|
|
|
|
<div class="col-xs-12 col-sm-6">
|
|
<div class="widget-box">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
|
|
|
|
<div>
|
|
<label for="form-field-9">Treatments</label>
|
|
<?php include('treatment_update_embed.php'); ?>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="injury_form">Injury Information Form</label>
|
|
<input type="text"class="form-control" id="injury_form<?php echo $row_history['appointment_id']?>" name="injury_form" value="<?php echo $row_history['injury_form']?>" placeholder="Injury Information Form">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="referral">Referral</label>
|
|
<textarea name="referral" id="referral<?php echo $row_history['appointment_id']?>" placeholder="Referral" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 52px;"><?php echo $row_history['referral']?></textarea>
|
|
</div>
|
|
<div>
|
|
<label for="followup">Findings & Treatment in Hospital</label>
|
|
<textarea id="hospital_treatment<?php echo $row_history['appointment_id']?>" name="hospital_treatment" placeholder="Findings & Treatment in Hospital.." class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 52px;"><?php echo $row_history['hospital_treatment']?></textarea>
|
|
</div>
|
|
<div>
|
|
<label for="followup">Follow Up</label>
|
|
<textarea id="followup<?php echo $row_history['appointment_id']?>" name="followup" placeholder="Follow Up" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 52px;"><?php echo $row_history['followup']?></textarea>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<label for="remarks">Remarks</label>
|
|
<textarea name="remarks" id="remarks<?php echo $row_history['appointment_id']?>" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 52px;"><?php echo $row_history['remarks']?></textarea>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
var injuries = "<?php echo $row_history['injury_types']?>";
|
|
dataarray=injuries.split(",");
|
|
$("#injury_type<?php echo $row_history['appointment_id']?>").val(dataarray);
|
|
|
|
|
|
var injury_parts = "<?php echo $row_history['injury_parts']?>";
|
|
dataarray=injury_parts.split(",");
|
|
$("#injury_part<?php echo $row_history['appointment_id']?>").val(dataarray);
|
|
|
|
|
|
var injury_classes = "<?php echo $row_history['injury_classes']?>";
|
|
dataarray=injury_classes.split(",");
|
|
$("#injury_class<?php echo $row_history['appointment_id']?>").val(dataarray);
|
|
|
|
|
|
$('#appointment_date<?php echo $row_history['appointment_id']?>').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A',//use this option to display seconds
|
|
defaultDate: new Date("<?php echo $row_history['appointment_date']?>"),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function(){
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
|
|
jQuery(function($) {
|
|
$('#id-disable-check').on('click', function() {
|
|
var inp = $('#form-input-readonly').get(0);
|
|
if(inp.hasAttribute('disabled')) {
|
|
inp.setAttribute('readonly' , 'true');
|
|
inp.removeAttribute('disabled');
|
|
inp.value="This text field is readonly!";
|
|
}
|
|
else {
|
|
inp.setAttribute('disabled' , 'disabled');
|
|
inp.removeAttribute('readonly');
|
|
inp.value="This text field is disabled!";
|
|
}
|
|
});
|
|
|
|
|
|
if(!ace.vars['touch']) {
|
|
$('.chosen-select').chosen({allow_single_deselect:true});
|
|
//resize the chosen on window resize
|
|
|
|
$(window)
|
|
.off('resize.chosen')
|
|
.on('resize.chosen', function() {
|
|
$('.chosen-select').each(function() {
|
|
var $this = $(this);
|
|
$this.next().css({'width': $this.parent().width()});
|
|
})
|
|
}).trigger('resize.chosen');
|
|
//resize chosen on sidebar collapse/expand
|
|
$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
|
|
if(event_name != 'sidebar_collapsed') return;
|
|
$('.chosen-select').each(function() {
|
|
var $this = $(this);
|
|
$this.next().css({'width': $this.parent().width()});
|
|
})
|
|
});
|
|
|
|
|
|
$('#chosen-multiple-style .btn').on('click', function(e){
|
|
var target = $(this).find('input[type=radio]');
|
|
var which = parseInt(target.val());
|
|
if(which == 2) $('#form-field-select-4').addClass('tag-input-style');
|
|
else $('#form-field-select-4').removeClass('tag-input-style');
|
|
});
|
|
}
|
|
|
|
|
|
$('[data-rel=tooltip]').tooltip({container:'body'});
|
|
$('[data-rel=popover]').popover({container:'body'});
|
|
|
|
autosize($('textarea[class*=autosize]'));
|
|
|
|
$('textarea.limited').inputlimiter({
|
|
remText: '%n character%s remaining...',
|
|
limitText: 'max allowed : %n.'
|
|
});
|
|
|
|
|
|
|
|
$( "#input-size-slider" ).css('width','200px').slider({
|
|
value:1,
|
|
range: "min",
|
|
min: 1,
|
|
max: 8,
|
|
step: 1,
|
|
slide: function( event, ui ) {
|
|
var sizing = ['', 'input-sm', 'input-lg', 'input-mini', 'input-small', 'input-medium', 'input-large', 'input-xlarge', 'input-xxlarge'];
|
|
var val = parseInt(ui.value);
|
|
$('#form-field-4').attr('class', sizing[val]).attr('placeholder', '.'+sizing[val]);
|
|
}
|
|
});
|
|
|
|
$( "#input-span-slider" ).slider({
|
|
value:1,
|
|
range: "min",
|
|
min: 1,
|
|
max: 12,
|
|
step: 1,
|
|
slide: function( event, ui ) {
|
|
var val = parseInt(ui.value);
|
|
$('#form-field-5').attr('class', 'col-xs-'+val).val('.col-xs-'+val);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
//"jQuery UI Slider"
|
|
//range slider tooltip example
|
|
$( "#slider-range" ).css('height','200px').slider({
|
|
orientation: "vertical",
|
|
range: true,
|
|
min: 0,
|
|
max: 100,
|
|
values: [ 17, 67 ],
|
|
slide: function( event, ui ) {
|
|
var val = ui.values[$(ui.handle).index()-1] + "";
|
|
|
|
if( !ui.handle.firstChild ) {
|
|
$("<div class='tooltip right in' style='display:none;left:16px;top:-6px;'><div class='tooltip-arrow'></div><div class='tooltip-inner'></div></div>")
|
|
.prependTo(ui.handle);
|
|
}
|
|
$(ui.handle.firstChild).show().children().eq(1).text(val);
|
|
}
|
|
}).find('span.ui-slider-handle').on('blur', function(){
|
|
$(this.firstChild).hide();
|
|
});
|
|
|
|
|
|
$( "#slider-range-max" ).slider({
|
|
range: "max",
|
|
min: 1,
|
|
max: 10,
|
|
value: 2
|
|
});
|
|
|
|
$( "#slider-eq > span" ).css({width:'90%', 'float':'left', margin:'15px'}).each(function() {
|
|
// read initial values from markup and remove that
|
|
var value = parseInt( $( this ).text(), 10 );
|
|
$( this ).empty().slider({
|
|
value: value,
|
|
range: "min",
|
|
animate: true
|
|
|
|
});
|
|
});
|
|
|
|
$("#slider-eq > span.ui-slider-purple").slider('disable');//disable third item
|
|
|
|
|
|
$('#id-input-file-1 , #id-input-file-2').ace_file_input({
|
|
no_file:'No File ...',
|
|
btn_choose:'Choose',
|
|
btn_change:'Change',
|
|
droppable:false,
|
|
onchange:null,
|
|
thumbnail:false //| true | large
|
|
//whitelist:'gif|png|jpg|jpeg'
|
|
//blacklist:'exe|php'
|
|
//onchange:''
|
|
//
|
|
});
|
|
//pre-show a file name, for example a previously selected file
|
|
//$('#id-input-file-1').ace_file_input('show_file_list', ['myfile.txt'])
|
|
|
|
|
|
$('#id-input-file-3').ace_file_input({
|
|
style: 'well',
|
|
btn_choose: 'Drop files here or click to choose',
|
|
btn_change: null,
|
|
no_icon: 'ace-icon fa fa-cloud-upload',
|
|
droppable: true,
|
|
thumbnail: 'small'//large | fit
|
|
//,icon_remove:null//set null, to hide remove/reset button
|
|
/**,before_change:function(files, dropped) {
|
|
//Check an example below
|
|
//or examples/file-upload.html
|
|
return true;
|
|
}*/
|
|
/**,before_remove : function() {
|
|
return true;
|
|
}*/
|
|
,
|
|
preview_error : function(filename, error_code) {
|
|
//name of the file that failed
|
|
//error_code values
|
|
//1 = 'FILE_LOAD_FAILED',
|
|
//2 = 'IMAGE_LOAD_FAILED',
|
|
//3 = 'THUMBNAIL_FAILED'
|
|
//alert(error_code);
|
|
}
|
|
|
|
}).on('change', function(){
|
|
//console.log($(this).data('ace_input_files'));
|
|
//console.log($(this).data('ace_input_method'));
|
|
});
|
|
|
|
|
|
//$('#id-input-file-3')
|
|
//.ace_file_input('show_file_list', [
|
|
//{type: 'image', name: 'name of image', path: 'http://path/to/image/for/preview'},
|
|
//{type: 'file', name: 'hello.txt'}
|
|
//]);
|
|
|
|
|
|
|
|
|
|
//dynamically change allowed formats by changing allowExt && allowMime function
|
|
$('#id-file-format').removeAttr('checked').on('change', function() {
|
|
var whitelist_ext, whitelist_mime;
|
|
var btn_choose
|
|
var no_icon
|
|
if(this.checked) {
|
|
btn_choose = "Drop images here or click to choose";
|
|
no_icon = "ace-icon fa fa-picture-o";
|
|
|
|
whitelist_ext = ["jpeg", "jpg", "png", "gif" , "bmp"];
|
|
whitelist_mime = ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/bmp"];
|
|
}
|
|
else {
|
|
btn_choose = "Drop files here or click to choose";
|
|
no_icon = "ace-icon fa fa-cloud-upload";
|
|
|
|
whitelist_ext = null;//all extensions are acceptable
|
|
whitelist_mime = null;//all mimes are acceptable
|
|
}
|
|
var file_input = $('#id-input-file-3');
|
|
file_input
|
|
.ace_file_input('update_settings',
|
|
{
|
|
'btn_choose': btn_choose,
|
|
'no_icon': no_icon,
|
|
'allowExt': whitelist_ext,
|
|
'allowMime': whitelist_mime
|
|
})
|
|
file_input.ace_file_input('reset_input');
|
|
|
|
file_input
|
|
.off('file.error.ace')
|
|
.on('file.error.ace', function(e, info) {
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$('#spinner1').ace_spinner({value:0,min:0,max:200,step:10, btn_up_class:'btn-info' , btn_down_class:'btn-info'})
|
|
.closest('.ace-spinner')
|
|
.on('changed.fu.spinbox', function(){
|
|
//console.log($('#spinner1').val())
|
|
});
|
|
$('#spinner2').ace_spinner({value:0,min:0,max:10000,step:100, touch_spinner: true, icon_up:'ace-icon fa fa-caret-up bigger-110', icon_down:'ace-icon fa fa-caret-down bigger-110'});
|
|
$('#spinner3').ace_spinner({value:0,min:-100,max:100,step:10, on_sides: true, icon_up:'ace-icon fa fa-plus bigger-110', icon_down:'ace-icon fa fa-minus bigger-110', btn_up_class:'btn-success' , btn_down_class:'btn-danger'});
|
|
$('#spinner4').ace_spinner({value:0,min:-100,max:100,step:10, on_sides: true, icon_up:'ace-icon fa fa-plus', icon_down:'ace-icon fa fa-minus', btn_up_class:'btn-purple' , btn_down_class:'btn-purple'});
|
|
|
|
//$('#spinner1').ace_spinner('disable').ace_spinner('value', 11);
|
|
//or
|
|
//$('#spinner1').closest('.ace-spinner').spinner('disable').spinner('enable').spinner('value', 11);//disable, enable or change value
|
|
//$('#spinner1').closest('.ace-spinner').spinner('value', 0);//reset to 0
|
|
|
|
|
|
//datepicker plugin
|
|
//link
|
|
$('.date-picker').datepicker({
|
|
autoclose: true,
|
|
todayHighlight: true
|
|
})
|
|
//show datepicker when clicking on the icon
|
|
.next().on(ace.click_event, function(){
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
//or change it into a date range picker
|
|
$('.input-daterange').datepicker({
|
|
autoclose:true, format: 'dd/mm/yyyy', startDate: '1d', defaultDate: new Date()
|
|
});
|
|
|
|
|
|
//to translate the daterange picker, please copy the "examples/daterange-fr.js" contents here before initialization
|
|
$('input[name=date-range-picker]').daterangepicker({
|
|
'applyClass' : 'btn-sm btn-success',
|
|
'cancelClass' : 'btn-sm btn-default',
|
|
locale: {
|
|
applyLabel: 'Apply',
|
|
cancelLabel: 'Cancel',
|
|
}
|
|
})
|
|
.prev().on(ace.click_event, function(){
|
|
$(this).next().focus();
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
<style>
|
|
#modal-add-ailment{
|
|
overflow-y:scroll;
|
|
}
|
|
</style>
|