495 lines
24 KiB
PHP
Executable File
495 lines
24 KiB
PHP
Executable File
<style type="text/css">
|
|
.border-05-lavender{border:0.5px solid lavender;}
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<form role="form" action="<?php echo base_url(); ?>CaregiversDashboard/ProfileUpdate" method="post" enctype="multipart/form-data" class="needs-validation caregiverExpTabForm" onsubmit="return validate_exp()">
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
|
|
<input type="hidden" name="form_tab_status" value="2">
|
|
<input type="hidden" id="ExpTabVerificStatus" value="<?php echo $nurse->verification_status?>">
|
|
<input type="hidden" name="id" id="caregiver_id" value="<?php if (!empty($nurse->caregiver_table_id)) echo $nurse->caregiver_table_id; ?>">
|
|
<input type="hidden" name="form_status" value="2">
|
|
<input type="hidden" name="form_mode" value="<?php if($nurse->form_status>1) echo 'Edit'; else echo 'Add'; ?>">
|
|
|
|
<div class="row">
|
|
<div class="form-group col-md-4">
|
|
<label class="inner-heading"><?php echo lang('Qualification Type : ');?>
|
|
<?php
|
|
foreach ($skills as $skill){
|
|
if (!empty($nurse->qualification_type)){
|
|
if($nurse->qualification_type==$skill->id){
|
|
echo $skill->name;
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</label>
|
|
<div class="col-md-12" style="display: none;">
|
|
<div class="row">
|
|
<?php foreach ($skills as $skill)
|
|
{
|
|
?>
|
|
<div class="form-check width-80">
|
|
<input class="form-check-input caregiver-type" type="radio" id="<?php echo $skill->name; ?>" onclick="getSkill(this.value);" name="qualification_type" value="<?php echo $skill->id; ?>"
|
|
<?php
|
|
if (!empty($nurse->qualification_type)) {
|
|
if($nurse->qualification_type==$skill->id)
|
|
echo 'checked';
|
|
}
|
|
?> disabled>
|
|
<label class="form-check-label" for="<?php echo $skill->name; ?>">
|
|
<?php echo $skill->name; ?>
|
|
</label>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<div class="row">
|
|
<label class="required-field inner-heading col-9"><?php echo lang('Total Years of Experience :');?></label>
|
|
<select class="form-control col-3" id="years_of_exp" onchange="getExperienceDetails();" name="years_of_exp" required>
|
|
<option value="">-</option>
|
|
<?php
|
|
for($i=0; $i<=40; $i++){
|
|
if($nurse->years_of_exp==$i){
|
|
$exp_select="selected";
|
|
}else{
|
|
$exp_select="";
|
|
}
|
|
?>
|
|
<option value="<?php echo $i;?>" <?=$exp_select?>>
|
|
<?php echo $i;?>
|
|
</option>
|
|
<?php
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-md-12">
|
|
<div class="col-md-12" style="background-color:lavender; padding: 10px;">
|
|
<label><b><u> Note</u></b> :
|
|
<I>
|
|
<p style="margin-bottom: 0px;">1 - Please use grid to complete your experience areas below.</p>
|
|
<p style="margin-bottom: 0px;">2 - Users must complete all <span class="text-danger">*</span> Required sections.</p>
|
|
<p style="margin-bottom: 0px;">3 - Make at least 3 selections in each required sections.</p>
|
|
<p style="margin-bottom: 0px;">4 - Additional sections is optional.</p>
|
|
</I>
|
|
</label>
|
|
<br>
|
|
<label class="inner-heading">Experience Grid</label>
|
|
<!-- <p style="margin-bottom: 0px;">0 - No Experience</p> -->
|
|
<p style="margin-bottom: 0px;">1 - Limited competency, requires supervision (Less than 6 Months)</p>
|
|
<p style="margin-bottom: 0px;">2 - Experienced (Performs independently) (1-3 Years)</p>
|
|
<p style="margin-bottom: 0px;">3 - Proficient/Expert/Highly skilled (4yrs +)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
foreach($cargiverService as $ser){
|
|
$service_arr[]=$ser->service_id;
|
|
//echo '<pre>'; print_r($service_arr); echo '</pre>'; exit;
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
foreach($experience as $exp){
|
|
$exp_arr['experience_value'][$exp->experience_id]=$exp->experience_value;
|
|
$group[] = $exp->group_id;
|
|
}
|
|
?>
|
|
|
|
<div class="ExpDtl">
|
|
<label class="inner-heading" style="padding-bottom: 20px;">
|
|
<h5><strong>Experience By Speciality</strong></h5>
|
|
</label>
|
|
<div class="row experienceLabel" id="experience_details">
|
|
<div class="col-md-8 col-sm-8 border-05-lavender">
|
|
<h5 class="required-field">
|
|
<strong>Test1</strong>
|
|
<label class="pull-right show-hide pointer" for="">
|
|
<i class="la la-angle-down"></i>
|
|
</label>
|
|
</h5>
|
|
<div class="col-md-12 col-sm-12 have-not-exp-label">
|
|
<div class="row mb-0">
|
|
<div class="col-md-8 col-sm-12">
|
|
<span>sub-test1</span>
|
|
</div>
|
|
<div class="col-md-4 col-sm-12">
|
|
<label class="pull-right">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a1" id="x1" value="option1">
|
|
<label class="form-check-label" for="x1">1</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a1" id="x2" value="option2">
|
|
<label class="form-check-label" for="x2">2</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a1" id="x3" value="option3" disabled>
|
|
<label class="form-check-label" for="x3">3</label>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-0">
|
|
<div class="col-md-8 col-sm-12">
|
|
<span>sub-test2</span>
|
|
</div>
|
|
<div class="col-md-4 col-sm-12">
|
|
<label class="pull-right">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a2" id="x4" value="option1">
|
|
<label class="form-check-label" for="x4">1</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a2" id="x5" value="option2">
|
|
<label class="form-check-label" for="x5">2</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a2" id="x6" value="option3" disabled>
|
|
<label class="form-check-label" for="x6">3</label>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-8 col-sm-8 border-05-lavender">
|
|
<h5 class="required-field">
|
|
<strong>Test2</strong>
|
|
<label class="pull-right show-hide pointer" for="">
|
|
<i class="la la-angle-down"></i>
|
|
</label>
|
|
</h5>
|
|
<div class="col-md-12 col-sm-12">
|
|
<div class="row mb-0">
|
|
<div class="col-md-8 col-sm-12">
|
|
<span>sub-test1</span>
|
|
</div>
|
|
<div class="col-md-4 col-sm-12">
|
|
<label class="pull-right">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a3" id="x7" value="option1">
|
|
<label class="form-check-label" for="x7">1</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a3" id="x8" value="option2">
|
|
<label class="form-check-label" for="x8">2</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a3" id="x9" value="option3" disabled>
|
|
<label class="form-check-label" for="x9">3</label>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-0">
|
|
<div class="col-md-8 col-sm-12">
|
|
<span>sub-test2</span>
|
|
</div>
|
|
<div class="col-md-4 col-sm-12">
|
|
<label class="pull-right">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a4" id="x10" value="option1">
|
|
<label class="form-check-label" for="x10">1</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a4" id="x11" value="option2">
|
|
<label class="form-check-label" for="x11">2</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input exp-radio" type="radio" name="a4" id="x12" value="option3" disabled>
|
|
<label class="form-check-label" for="x12">3</label>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12" >
|
|
<hr>
|
|
</div>
|
|
<div class="col-md-8 skill-row border-05-lavender">
|
|
<label class="inner-heading">
|
|
<h5><strong>Demographics</strong></h5>
|
|
</label>
|
|
<h5 class="required-field">
|
|
<strong> Experience By Demographics</strong>
|
|
<label class="pull-right open_close_btn expdemo" for="demographics_none">
|
|
<i class="la la-angle-down"></i>
|
|
</label>
|
|
</h5>
|
|
<div class="chkTxt">
|
|
<?php $demographics_exp=json_decode($nurse->demographics_exp);?>
|
|
<div class="form-group col-md-12">
|
|
<input id="demographics_none" style="display:none;" name="none_demographic" type="checkbox" onclick="checkNoneDemographics();"
|
|
<?php if($nurse->demographics_exp==""){ ?> checked <?php } ?> value="none">
|
|
</div>
|
|
<?php
|
|
foreach($exp_by_demographics as $demographics) {
|
|
?>
|
|
<div class="form-group col-md-12 demographics" <?php if($nurse->demographics_exp==""){ ?> style="display:none;" <?php }?>>
|
|
<label for="experience_id_<?= $demographics->id ?>"><?php echo lang($demographics->experience_label); ?></label>
|
|
<div class="pull-right">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input demographics_check toggle_check1" type="radio" name="demo_exp_label[<?= $demographics->id ?>]" id="demo_exp_label_<?= $demographics->id ?>_1" value="1"
|
|
<?php
|
|
foreach($demographics_exp as $key=>$val){
|
|
if($key==$demographics->id && $val==1){
|
|
echo "checked";
|
|
}
|
|
}
|
|
?>>
|
|
<label class="form-check-label" for="demo_exp_label_<?= $demographics->id ?>_1">1</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input demographics_check toggle_check1" type="radio" name="demo_exp_label[<?= $demographics->id ?>]" id="demo_exp_label_<?= $demographics->id ?>_2" value="2"
|
|
<?php
|
|
foreach($demographics_exp as $key=>$val){
|
|
if($key == $demographics->id && $val == 2){
|
|
echo "checked";
|
|
}
|
|
}
|
|
?>>
|
|
<label class="form-check-label" for="demo_exp_label_<?= $demographics->id ?>_2">2</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input demographics_check 3rdLevel toggle_check1" type="radio" name="demo_exp_label[<?= $demographics->id ?>]" id="demo_exp_label_<?= $demographics->id ?>_3" value="3"
|
|
<?php
|
|
foreach($demographics_exp as $key=>$val){
|
|
if($key == $demographics->id && $val == 3){
|
|
echo "checked";
|
|
}
|
|
}
|
|
?>>
|
|
<label class="form-check-label" for="demo_exp_label_<?= $demographics->id ?>_3">3</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
<label class="pull-right open_close_btn close_btn demographics" id="lastpic" for="demographics_none" style="display:none;">
|
|
<?php echo lang('Close');?>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
function checkNoneDemographics(){
|
|
if($("#demographics_none").is(":checked")){
|
|
$(".demographics").slideUp();
|
|
}else{
|
|
$(".demographics").slideDown();
|
|
}
|
|
}
|
|
$(function(){
|
|
$(".expdemo").click(function(){
|
|
setTimeout(
|
|
function()
|
|
{
|
|
var elmnt = document.getElementById("lastpic");
|
|
elmnt.scrollIntoView();
|
|
}, 200);
|
|
});
|
|
$('.toggle_check1').click(function(){
|
|
var radio = $(this);
|
|
// console.log(this.name);
|
|
if (radio.data('waschecked') == true)
|
|
{
|
|
radio.prop('checked', false);
|
|
radio.data('waschecked', false);
|
|
}
|
|
else
|
|
radio.data('waschecked', true);
|
|
radio.siblings('input[name=this.name]').data('waschecked', false);
|
|
})
|
|
});
|
|
</script>
|
|
<div class="row " >
|
|
<div class="form-group col-md-12" style="padding: 20px;">
|
|
<button type="submit" name="submit" id="ExpTab_submit_btn" class="btn btn-info"><?php echo lang('submit'); ?></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
// function validate_exp(){
|
|
// var emp_type=<?php echo $nurse->qualification_type; ?>;
|
|
// var pulmonary_check_count=$('.PULMONARY:checked').length;
|
|
// var wound_check_count=$('.WOUND:checked').length;
|
|
// var ivtherapy_check_count=$('.IVTHERAPY:checked').length;
|
|
// var gastrointestinal_check_count=$('.GASTROINTESTINAL:checked').length;
|
|
// var HOMEHEALTHCARE_check_count=$('.HOMEHEALTHCARE:checked').length;
|
|
// var Hospice_check_count=$('.Hospice:checked').length;
|
|
// var Pediatrics_check_count=$('.Pediatrics:checked').length;
|
|
// var Medications_check_count=$('.Medications:checked').length;
|
|
// var demographics_check_count=$('.demographics_check:checked').length;
|
|
// var CARDIOVASCULAR_check_count=$('.CARDIOVASCULAR:checked').length;
|
|
// var exp_year=$("#years_of_exp").val();
|
|
// // alert('emp_type:'+emp_type);
|
|
// // alert('pulmonary_check_count:'+pulmonary_check_count);
|
|
// // alert('wound_check_count:'+wound_check_count);
|
|
// // alert('ivtherapy_check_count:'+ivtherapy_check_count);
|
|
// // alert('gastrointestinal_check_count:'+gastrointestinal_check_count);
|
|
// // alert('HOMEHEALTHCARE_check_count:'+HOMEHEALTHCARE_check_count);
|
|
// // alert('Hospice_check_count:'+Hospice_check_count);
|
|
// // alert('Pediatrics_check_count:'+Pediatrics_check_count);
|
|
// // alert('Medications_check_count:'+Medications_check_count);
|
|
// // alert('CARDIOVASCULAR_check_count:'+CARDIOVASCULAR_check_count);
|
|
// // alert(pulmonary_check_count);
|
|
// // alert(emp_type);
|
|
|
|
// if(emp_type==4 /*&& pulmonary_check_count>4*/ && wound_check_count>2 && ivtherapy_check_count>2 /*&& gastrointestinal_check_count>4*/ && HOMEHEALTHCARE_check_count>2 && Hospice_check_count>2 && Pediatrics_check_count>2 && Medications_check_count>2 && CARDIOVASCULAR_check_count>2 && demographics_check_count>2 && pulmonary_check_count>2){
|
|
// return Confirmation();
|
|
// }else if((emp_type==5 || emp_type==6 || emp_type==7) && demographics_check_count>2 && HOMEHEALTHCARE_check_count>2){
|
|
// return Confirmation();
|
|
// }else if(exp_year==0){
|
|
// return Confirmation();
|
|
// }else{
|
|
// Swal.fire({
|
|
// position: 'center',
|
|
// icon: 'error',
|
|
// title: 'Make at least 3 selections in each required sections.',
|
|
// showConfirmButton: false,
|
|
// timer: 2500
|
|
// });
|
|
// }
|
|
// return false;
|
|
// }
|
|
|
|
function Confirmation()
|
|
{
|
|
|
|
// if (confirm('Do you want to save the data')) {
|
|
// // Save it!
|
|
// return true;
|
|
// } else {
|
|
// // Do nothing!
|
|
// return false;
|
|
// }
|
|
}
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
// $(window).on( "load", function() {
|
|
// var caregiverView = $('#ExpTabVerificStatus').val();
|
|
// if(caregiverView == 'verified'){
|
|
// $(".caregiverExpTabForm :input").prop("disabled", true);
|
|
// $("#ExpTab_submit_btn").hide();
|
|
// $( ".clear_check").hide();
|
|
// }else{
|
|
// // $(".caregiverExpTabForm :input").prop("disabled", false);
|
|
// $("#ExpTab_submit_btn").show();
|
|
// $( ".clear_check").show();
|
|
// }
|
|
// });
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(document).on('click','.show-hide',function(){
|
|
var target=$(this).parent().siblings("div");
|
|
target.toggle("slow");
|
|
});
|
|
$(document).on('click','.show-hide-div',function(){
|
|
var target=$(this).children("div");
|
|
target.toggle("slow");
|
|
});
|
|
$(document).on('click','.exp-radio',function(){
|
|
var previousValue = $(this).attr('previousValue');
|
|
// var name=$(this).attr('name');
|
|
var id=$(this).attr('id');
|
|
|
|
if(previousValue=='checked'){
|
|
// alert("1");
|
|
$(this).prop('checked',false);
|
|
$(this).attr('previousValue', false);
|
|
}else{
|
|
// alert("0");
|
|
// $("input[name="+name+"]:radio").attr('previousValue', false);
|
|
$("#"+id+"").attr('previousValue', false);
|
|
$(this).attr('previousValue','checked');
|
|
}
|
|
// if($(this).is(":checked")){
|
|
// // alert("add");
|
|
// var question_id=$(this).attr('name').substring(11);
|
|
// var question_val=$(this).val();
|
|
// var existed_data=$("#exp_label").val();
|
|
// }else{
|
|
// // alert("delete");
|
|
// var question_id=$(this).attr('name').substring(11);
|
|
// var question_val=$(this).val();
|
|
|
|
// }
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
function validate_exp(){
|
|
var exp_years=$("#years_of_exp").val();
|
|
if(exp_years>0){
|
|
var text=$("#req_classess").val();
|
|
const reqArray=text.split(",");
|
|
const len=reqArray.length;
|
|
var a="";
|
|
for(i=0;i<len;i++){
|
|
item=reqArray[i];
|
|
const idArray=item.split("_");
|
|
id=idArray[2];
|
|
var cls=$("."+item+":checked");
|
|
var checked=cls.length;
|
|
var req_no=$(".no-of-require-"+id).val();
|
|
var head_name=$(".service-head-name-"+id).html();
|
|
|
|
// var target=cls.parent().parent().parent().parent().parent();
|
|
// var req_no=target.siblings("input").val();
|
|
// var head_name=target.siblings("h5").children("strong").html();
|
|
|
|
if(checked<req_no){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Make at least '+req_no+' selections in '+head_name+' section.',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//for demographics
|
|
var demo_checked=$(".demographics_check:checked").length;
|
|
if(demo_checked<3){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Make at least 3 selection in Demographics section.',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
return false;
|
|
}
|
|
//for demographics
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|