2642 lines
130 KiB
PHP
Executable File
2642 lines
130 KiB
PHP
Executable File
|
|
<?php
|
|
$documentsarr=array();
|
|
$documentsrem=array();
|
|
$documentsid=array();
|
|
$documentsno=array();
|
|
$documentdate=array();
|
|
foreach($documents as $document)
|
|
{
|
|
$documentsarr[$document->documents_type][]=$document->path.$document->file_name;
|
|
$documentsrem[$document->documents_type][]=$document->remarks;
|
|
$documentsid[$document->documents_type][]=$document->id;
|
|
$documentsno[$document->documents_type][]=$document->documents_no;
|
|
$documentdate[$document->documents_type][]=$document->date_completed;
|
|
}
|
|
|
|
# modified on 07-10-2021
|
|
if(in_array(_DOC_TRAININGCODE_,$documentsarr)){
|
|
$traing_doc_count=count($documentsarr[_DOC_TRAININGCODE_]);
|
|
}else{$traing_doc_count=0;}
|
|
if(in_array(_DOC_OTHERCODE_,$documentsarr)){
|
|
$other_doc_count=count($documentsarr[_DOC_OTHERCODE_]);
|
|
}else{$other_doc_count=0;}
|
|
if(in_array(_ADDL_CERTIFICATE_,$documentsarr)){
|
|
$additional_certificate_count=count($documentsarr[_ADDL_CERTIFICATE_]);
|
|
}else{$additional_certificate_count=0;}
|
|
if($nurse->educationBackground!=""){
|
|
$educationBackground = json_decode($nurse->educationBackground);
|
|
$school_certificate_count=count($educationBackground);
|
|
}else{$school_certificate_count=0;}
|
|
# modification ending here
|
|
|
|
foreach($licenses as $data){
|
|
$lic[]=$data;
|
|
}
|
|
|
|
$licensevalue=json_encode($lic,true);
|
|
$licenseData=json_decode($licensevalue);
|
|
$licenseDataCount=count($licenses);
|
|
|
|
?>
|
|
|
|
<?php
|
|
$get_csrf_token_name = $this->security->get_csrf_token_name();
|
|
$get_csrf_token_value = $this->security->get_csrf_hash();
|
|
$progress = json_decode($nurse->from_tab_status_pctg);
|
|
$progressData = $progress->form1+$progress->form2+$progress->form3+$progress->form4+$progress->form5+$progress->form6+$progress->form7+$progress->form8+$progress->form9+$progress->form10+$progress->form11;
|
|
$emp_health_assesment=json_decode($nurse->emp_health_assesment);
|
|
$docdata['documentsarr']=$documentsarr;
|
|
$docdata['documentsrem'] = $documentsrem;
|
|
$docdata['documentsid'] = $documentsid;
|
|
$docdata['documentsno'] = $documentsno;
|
|
$docdata['documentdate'] = $documentdate;
|
|
|
|
?>
|
|
|
|
|
|
<!--sidebar end-->
|
|
<!--main content start-->
|
|
<!-- =============================================================== -->
|
|
<style type="text/css">
|
|
.check-left-level{margin-left: 30px;}
|
|
.check-left-input{margin-left: 10px;}
|
|
.required-field:before {content: "*";color: red;}
|
|
.row.experienceLabel.hide {display: none;}
|
|
/* .skill-row{ border: thin solid #000;} */
|
|
.skill-row label{ margin-bottom: 0px !important;}
|
|
|
|
/*.form-control.multiselect-class{
|
|
height: 100px !important;
|
|
}*/
|
|
.form-control.multiselect-class {
|
|
height: 300px !important;
|
|
}
|
|
.app-content .wizard > .steps > ul > li.active .step {
|
|
background-color: #666EE8;
|
|
border-color: #666EE8;
|
|
color: #fff;
|
|
}
|
|
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="password"], .has-error input[type="date"], .has-error select[multiple], .has-error select {
|
|
border: 1px solid #a94442;
|
|
}
|
|
.help-block.with-errors {
|
|
color: #a94442;
|
|
}
|
|
.full-height-view{
|
|
height: 500px !important;
|
|
}
|
|
.Exp-heading{
|
|
border-bottom: thin solid #babfc7;
|
|
}
|
|
h5.Exp-heading {
|
|
color: #1e9ff2;
|
|
}
|
|
label.inner-heading {
|
|
font-weight: bold;
|
|
}
|
|
.img-icon{
|
|
margin-left: 40px;
|
|
}
|
|
div.ExpDtl {
|
|
height: 300px !important;
|
|
/*overflow-y: scroll;*/
|
|
}
|
|
/* div.ExpDtl::-webkit-scrollbar{
|
|
width: 5px;
|
|
}
|
|
div.ExpDtl::-webkit-scrollbar-thumb{
|
|
background:gray;
|
|
border-radius: 5px;
|
|
}*/
|
|
label.open_close_btn {
|
|
color: #1e9ff2;
|
|
}
|
|
.close_btn{
|
|
padding-bottom: 20px;
|
|
}
|
|
.sticky {
|
|
position: fixed;
|
|
top: 70px;
|
|
background-color: #fff;
|
|
z-index: 999;
|
|
width: 100%;
|
|
}
|
|
.sticky + .myTabContent {
|
|
padding-top: 60px;
|
|
}
|
|
@media (min-width: 992px) and (max-width: 1299px) {
|
|
.menu-expanded .sticky {
|
|
width: 75%;
|
|
}
|
|
}
|
|
|
|
/*.form-control.multiselect-class{height: 100px !important;}*/
|
|
.form-control.multiselect-class{height: 300px !important;}
|
|
.app-content .wizard > .steps > ul > li.active .step {background-color: #666EE8;border-color: #666EE8;color: #fff;}
|
|
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="password"], .has-error input[type="date"], .has-error select[multiple], .has-error select{border: 1px solid #a94442;}
|
|
.help-block.with-errors{color: #a94442;}
|
|
.full-height-view{height: 500px !important;}
|
|
.Exp-heading{border-bottom: thin solid #babfc7;}
|
|
h5.Exp-heading{color: #1e9ff2;}
|
|
label.inner-heading{font-weight: bold;}
|
|
.img-icon{margin-left: 40px;}
|
|
div.ExpDtl{height: 300px !important;overflow: scroll;}
|
|
label.open_close_btn{color: #1e9ff2;}
|
|
.close_btn{padding-bottom: 20px;}
|
|
</style>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
|
<!-- <meta name='viewport' content='width=device-width, initial-scale=1'>
|
|
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script> -->
|
|
<!-- =============================================================== -->
|
|
<!-- <div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="content-body">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
jhgjhg
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div> -->
|
|
<input type="hidden" class="base-url" value="<?=base_url()?>">
|
|
|
|
<div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="content-body">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header card-header-title-part card_mrgn">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<header class="panel-heading font-weight-bold vStatus">
|
|
<h3 class="mar_cus">
|
|
<?php
|
|
if($nurse->progress<100)
|
|
{
|
|
echo lang('Add Caregiver Information');
|
|
}
|
|
else
|
|
{
|
|
echo lang('Edit Caregiver Information');
|
|
}
|
|
?>
|
|
</h3>
|
|
</header>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="mt-0 mb-0"/>
|
|
<section id="main-content">
|
|
<section class="wrapper site-min-height mt-20">
|
|
<!-- page start-->
|
|
<?php
|
|
if($nurse->submited_for_verification=='no')
|
|
{
|
|
?>
|
|
<div class="col-md-12 panel-body">
|
|
<label class="progres_bar">
|
|
<?php echo lang("Profile Completion Percentage");?>
|
|
(<span id="progress_lbl">0</span>%)
|
|
</label>
|
|
<div class="progress">
|
|
<div class="progress-bar" id="progress_bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
|
0%
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
else if($nurse->verification_status=='unverified')
|
|
{
|
|
?>
|
|
<div class="col-md-12 panel-body">
|
|
<label class="progres_bar">
|
|
<?php echo lang("Waiting for Verification");?>
|
|
</label>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
<section class="row col-md-12">
|
|
<div class="panel-body col-md-12">
|
|
<?php
|
|
if($this->session->flashdata('feedback_error'))
|
|
{
|
|
?>
|
|
<script>
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: '<?php echo $this->session->flashdata('feedback_error'); ?>',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
})
|
|
</script>
|
|
<?php
|
|
unset($_SESSION['feedback_error']);
|
|
}
|
|
?>
|
|
<?php
|
|
if($this->session->flashdata('feedback_success'))
|
|
{
|
|
?>
|
|
<script>
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: '<?php echo $this->session->flashdata('feedback_success'); ?>',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
})
|
|
</script>
|
|
<?php
|
|
unset($_SESSION['feedback_success']);
|
|
}
|
|
?>
|
|
<!-- <div class="col-lg-3"></div>
|
|
<div class="col-lg-6"> -->
|
|
<?php echo validation_errors(); ?>
|
|
<?php //echo $this->session->flashdata('feedback'); ?>
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<?php
|
|
if(!empty($nurse->caregiver_table_id))
|
|
{
|
|
?>
|
|
<a href="<?php echo base_url(); ?>caregivers/ChangePassword/<?php echo base64_enc($nurse->caregiver_table_id); ?>" class=" float-right">
|
|
<?php echo lang('Change Password of this Caregiver');?>
|
|
</a>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<ul class="nav nav-tabs nav-linetriangle no-hover-bg" id="myTab" role="tablist" style="border-bottom-color: #1e9ef1;; margin-bottom: 20px; border-radius: 0px;">
|
|
<li class="nav-item <?php if(isset($tab) && $tab===''){echo "active";}?>">
|
|
<a class="nav-link head-tab <?php if(isset($tab) && $tab===''){echo "active";}?>" data-toggle="tab" href="#tab1" role="tab" aria-selected="true">
|
|
<?php
|
|
/* if($tabstatus['basic']==0)
|
|
{
|
|
?>
|
|
<i class="la la-expeditedssl" style="color: gray;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['basic']==1)
|
|
{
|
|
?>
|
|
<i class="la la-exclamation-circle" style="color: orange;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['basic']==2)
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
*/
|
|
?>
|
|
<i class="la la-expeditedssl basic-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle basic-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check basic-2" style="color: green; display:none;"></i>
|
|
<?php echo lang("Basic Info"); ?>
|
|
</a>
|
|
</li>
|
|
<?php //if($tabstatus['exp']==0){ $exp_tab_disable="disabled"; }else{ $exp_tab_disable=""; } ?>
|
|
<!-- <li class="nav-item <?php if($tab == 1) {?> active <?php } ?> <?=$exp_tab_disable?>" > -->
|
|
<li class="nav-item nav-exp <?php if($tab==1){echo "active";}?>">
|
|
<a class="nav-link head-tab <?php if($tab==1){echo "active";}?>" data-toggle="tab" href="#tab2" role="tab"
|
|
aria-selected="false">
|
|
<?php
|
|
/* if($tabstatus['exp']==0)
|
|
{
|
|
?>
|
|
<i class="la la-expeditedssl" style="color: gray;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['exp']==1)
|
|
{
|
|
?>
|
|
<i class="la la-exclamation-circle" style="color: orange;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['exp']==2)
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
*/
|
|
?>
|
|
<i class="la la-expeditedssl exp-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle exp-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check exp-2" style="color: green; display:none;"></i>
|
|
<?php echo lang("Experience & Skills");?>
|
|
</a>
|
|
</li>
|
|
<?php //if($tabstatus['emp']==0){ $emp_tab_disable="disabled"; }else{ $emp_tab_disable=""; } ?>
|
|
<!-- <li class="nav-item <?php if($tab == 3) {?> active <?php } ?> <?=$emp_tab_disable?>" > -->
|
|
<li class="nav-item nav-exp <?php if($tab==3){echo "active";}?>">
|
|
<a class="nav-link head-tab<?php if($tab==3){echo "active";}?>" data-toggle="tab" href="#tab4" role="tab" aria-selected="false">
|
|
<?php
|
|
/* if($tabstatus['emp']==0)
|
|
{
|
|
?>
|
|
<i class="la la-expeditedssl" style="color: gray;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['emp']==1)
|
|
{
|
|
?>
|
|
<i class="la la-exclamation-circle" style="color: orange;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['emp']==2)
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
*/
|
|
?>
|
|
<i class="la la-expeditedssl emp-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle emp-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check emp-2" style="color: green; display:none;"></i>
|
|
<?php echo lang("Employment & Education");?>
|
|
</a>
|
|
</li>
|
|
<?php //if($tabstatus['phy']==0){ $phy_tab_disable="disabled"; }else{ $phy_tab_disable=""; } ?>
|
|
<!-- <li class="nav-item <?php if($tab == 4) {?> active <?php } ?> <?=$phy_tab_disable?>" > -->
|
|
<li class="nav-item nav-phy <?php if($tab==4){echo "active";}?>">
|
|
<a class="nav-link head-tab<?php if($tab==4){echo "active";}?>" data-toggle="tab" href="#tab5" role="tab" aria-selected="false">
|
|
<?php
|
|
/* if($tabstatus['phy']==0)
|
|
{
|
|
?>
|
|
<i class="la la-expeditedssl" style="color: gray;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['phy']==1)
|
|
{
|
|
?>
|
|
<i class="la la-exclamation-circle" style="color: orange;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['phy']==2)
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
*/
|
|
?>
|
|
<i class="la la-expeditedssl phy-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle phy-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check phy-2" style="color: green; display:none;"></i>
|
|
<?php echo lang("Health & Physical Assessment"); ?>
|
|
</a>
|
|
</li>
|
|
<?php //if($tabstatus['doc']==0){ $doc_tab_disable="disabled"; }else{ $doc_tab_disable=""; } ?>
|
|
<!-- <li class="nav-item <?php if($tab == 10) {?> active <?php } ?> <?=$doc_tab_disable?>"> -->
|
|
<li class="nav-item nav-doc <?php if($tab==10){echo "active";}?>">
|
|
<a class="nav-link head-tab<?php if($tab == 10){echo "active";}?>" data-toggle="tab" href="#tab11" role="tab" aria-selected="false">
|
|
<?php
|
|
/* if($tabstatus['doc']==0)
|
|
{
|
|
?>
|
|
<i class="la la-expeditedssl" style="color: gray;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['doc']==1)
|
|
{
|
|
?>
|
|
<i class="la la-exclamation-circle" style="color: orange;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['doc']==2)
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
*/
|
|
?>
|
|
<i class="la la-expeditedssl doc-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle doc-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check doc-2" style="color: green; display:none;"></i>
|
|
<?php echo lang("Documents Upload"); ?>
|
|
</a>
|
|
</li>
|
|
<?php //if($tabstatus['dis']==0){ $dis_tab_disable="disabled"; }else{ $dis_tab_disable=""; } ?>
|
|
<!-- <li class="nav-item <?php if ($tab ==11) echo 'active'; ?> first current <?=$dis_tab_disable?>" > -->
|
|
<li class="nav-item nav-dis <?php if($tab==11){echo 'active';}?> first current">
|
|
<a class="nav-link head-tab<?php if ($tab ==11) echo 'active'; ?>" id="disclosures-tab" data-toggle="tab" href="#tab12" role="tab" aria-selected="false">
|
|
<?php
|
|
/* if($tabstatus['dis']==0)
|
|
{
|
|
?>
|
|
<i class="la la-expeditedssl" style="color: gray;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['dis']==1)
|
|
{
|
|
?>
|
|
<i class="la la-exclamation-circle" style="color: orange;"></i>
|
|
<?php
|
|
}
|
|
else if($tabstatus['dis']==2)
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
*/
|
|
?>
|
|
<?php
|
|
if($nurse->verification_status == 'verified')
|
|
{
|
|
?>
|
|
<i class="la la-check" style="color: green;"></i>
|
|
<?php
|
|
}
|
|
else
|
|
{ ?>
|
|
<i class="la la-expeditedssl dis-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle dis-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check dis-2" style="color: green; display:none;"></i>
|
|
<?php
|
|
}
|
|
?>
|
|
<!-- <i class="la la-expeditedssl dis-0" style="color: gray; display:none;"></i>
|
|
<i class="la la-exclamation-circle dis-1" style="color: orange; display:none;"></i>
|
|
<i class="la la-check dis-2" style="color: green; display:none;"></i> -->
|
|
<?php echo lang("Disclosures & Signatures"); ?>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content" id="myTabContent">
|
|
<!-- Basic Info-->
|
|
<div class="tab-pane tab-content fade <?php if(isset($tab) && $tab === '') {?> active in show <?php } ?>" id="tab1" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('saveCaregiverBasicTab'); ?>
|
|
</div>
|
|
<!-- Basic Info-->
|
|
|
|
<!-- Exp. Skills-->
|
|
<div class="tab-pane tab-content fade <?php if($tab == 1) {?> active in show <?php } ?>" id="tab2" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('saveCaregiverExpTab'); ?>
|
|
</div>
|
|
<!-- Exp. Skills-->
|
|
|
|
<!-- Employee History-->
|
|
<div class="tab-pane tab-content fade <?php if($tab == 3) {?> active in show <?php } ?>" id="tab4" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('saveCaregiverEmpEduTab'); ?>
|
|
</div>
|
|
<!-- Employee History-->
|
|
|
|
<!-- Physical Info-->
|
|
<div class="tab-pane tab-content fade <?php if($tab == 4) {?> active in show <?php } ?>" id="tab5" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('saveCaregiverPhyTab'); ?>
|
|
</div>
|
|
<!-- Physical Info-->
|
|
|
|
<!-- Documents Upload-->
|
|
<div class="tab-pane tab-content fade <?php if($tab == 10) {?> active in show <?php } ?>" id="tab11" role="tabpanel" aria-labelledby="contact-tab" style="padding: 5px 15px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('saveCaregiverDocTab',$docdata); ?>
|
|
</div>
|
|
<!-- Documents Upload-->
|
|
|
|
<!-- Disclosure-->
|
|
<div class="tab-pane tab-content fade <?php if($tab == 11) {?> active in show <?php } ?>" id="tab12" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php if($nurse->qualification_type==6 || $nurse->qualification_type==7){ ?>
|
|
<div class="row">
|
|
</div>
|
|
<?php } ?>
|
|
<div class="Complete-Submit">
|
|
<form role="form" action="<?php echo base_url(); ?>CaregiversDashboard/send_approval" method="post" enctype="multipart/form-data" class="needs-validation" >
|
|
<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="12">
|
|
<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="6">
|
|
<div class="row">
|
|
<input type="hidden" name="ion_id" value="<?php echo $nurse->ion_user_id; ?>">
|
|
|
|
<?php $this->view('saveCaregiverDisClose',$data); ?>
|
|
<div class="form-check col-md-12">
|
|
<!-- <a target="_blank" class="btn btn-success btn_clr" href="<?php echo base_url(); ?>CaregiversDashboard/formPrint/<?= $nurse->id ?>">Print Submitted Form</a> -->
|
|
<!-- <a target="_blank" class="btn btn-success btn_clr" href="<?php echo base_url(); ?>forms_pdf/disclouser/<?= $nurse->id ?>">Print Submitted Form</a> -->
|
|
<button type="submit" id="agreeSubmit" class="btn btn-success btn_clr float-right agreeSubmit_btn">Submit For Approval</button>
|
|
</div>
|
|
<div class="form-check col-md-12" style="text-align: center;">
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<form role="form" action="<?php echo base_url(); ?>CaregiversDashboard/final_pdf"
|
|
method="post" enctype="multipart/form-data" class="needs-validation">
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash();?>"/>
|
|
<input type="hidden" name="id" id="caregiver_id"
|
|
value="<?php if (!empty($nurse->id)) echo $nurse->id; ?>">
|
|
<input type="hidden" name="cg_type" value="" readonly>
|
|
<div class="row">
|
|
<div class="form-check col-md-12">
|
|
<button type="submit" name="submit" id="next_" class="btn btn-info"
|
|
formtarget="_blank">
|
|
<?php echo lang('Print Submitted Form');?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="submit-due">
|
|
<span class="text-danger"><?php echo lang("Summary"); ?></span>
|
|
<div class="row">
|
|
<?php
|
|
$per_status=json_decode($nurse->from_tab_status_pctg);
|
|
?>
|
|
<ul>
|
|
<li><?php echo lang("Basic info"); ?>: <?php if($per_status->form1!=0){ ?><span class="text-success">Submitted</span><?php }else{ ?><span class="text-danger">Pending</span><?php } ?></li>
|
|
<li><?php echo lang("Experience & Skils"); ?>: <?php if($per_status->form2!=0){ ?><span class="text-success">Submitted</span><?php }else{ ?><span class="text-danger">Pending</span><?php } ?></li>
|
|
<li><?php echo lang("Employment History"); ?>: <?php if($per_status->form4!=0){ ?><span class="text-success">Submitted</span><?php }else{ ?><span class="text-danger">Pending</span><?php } ?></li>
|
|
<li><?php echo lang("Physical Info"); ?>: <?php if($per_status->form5!=0){ ?><span class="text-success">Submitted</span><?php }else{ ?><span class="text-danger">Pending</span><?php } ?></li>
|
|
<li><?php echo lang("Documents Upload"); ?>:
|
|
<?php
|
|
/*if($nurse->qualification_type==4){ ?>
|
|
<?php if($per_status->form11!=0 && $per_status->form11>16){ ?><span class="text-success">Submitted</span><?php }else{ ?><span class="text-danger">Pending</span><?php } ?></li>
|
|
<?php }else{ ?>
|
|
<?php if($per_status->form11!=0 && $per_status->form11>15){ ?><span class="text-success">Submitted</span><?php }else{ ?><span class="text-danger">Pending</span><?php } ?></li>
|
|
<?php } */
|
|
?>
|
|
<ul>
|
|
<li><?php echo lang("Photo"); ?> : <span class="text-success PHO-UP" style="display:none;">Submitted</span><span class="text-danger PHO-DOWN" style="display:none;">Pending</span></li>
|
|
<li><?php echo lang("Citizen Documentation"); ?>: <span class="text-success CTZ-UP" style="display:none;">Submitted</span><span class="text-danger CTZ-DOWN" style="display:none;">Pending</span></li>
|
|
<li><?php echo lang("Social Security Card"); ?>: <span class="text-success SSC-UP" style="display:none;">Submitted</span><span class="text-danger SSC-DOWN" style="display:none;">Pending</span></li>
|
|
<li><?php echo lang("Resume"); ?>: <span class="text-success RSM-UP" style="display:none;">Submitted</span><span class="text-danger RSM-DOWN" style="display:none;">Pending</span></li>
|
|
<?php if($nurse->qualification_type==6 || $nurse->qualification_type==7){ ?>
|
|
<li>DOH CHRC 102 Form: <span class="text-success 102-UP" style="display:none;">Submitted</span><span class="text-danger 102-DOWN" style="display:none;">Pending</span></li>
|
|
<li>DOH CHRC 103 Form: <span class="text-success 103-UP" style="display:none;">Submitted</span><span class="text-danger 103-DOWN" style="display:none;">Pending</span></li>
|
|
<li><?php echo lang("HOME CARE REGISTRY RELEASE Form"); ?>: <span class="text-success RRF-UP" style="display:none;">Submitted</span><span class="text-danger RRF-DOWN" style="display:none;">Pending</span></li>
|
|
<?php } ?>
|
|
<!-- <li>State or Federal Issued ID: <span class="text-success SFI-UP" style="display:none;">Submitted</span><span class="text-danger SFI-DOWN" style="display:none;">Pending</span></li> -->
|
|
<li><?php echo lang("Diphtheria status"); ?>: <span class="text-success DIP-UP" style="display:none;">Submitted</span><span class="text-danger DIP-DOWN" style="display:none;">Pending</span></li>
|
|
<li><?php echo lang("Tetanus"); ?>: <span class="text-success TNS-UP" style="display:none;">Submitted</span><span class="text-danger TNS-DOWN" style="display:none;">Pending</span></li>
|
|
<li><?php echo lang("Mumps"); ?>: <span class="text-success MUM-UP" style="display:none;">Submitted</span><span class="text-danger MUM-DOWN" style="display:none;">Pending</span></li>
|
|
<li>Var: <span class="text-success VAR-UP" style="display:none;">Submitted</span><span class="text-danger VAR-DOWN" style="display:none;">Pending</span></li>
|
|
<?php if($nurse->qualification_type==4 || $nurse->qualification_type==5){ ?>
|
|
<!-- <li>Malpractice Insurance Policy: <span class="text-success MIC-UP" style="display:none;">Submitted</span><span class="text-danger MIC-DOWN" style="display:none;">Pending</span></li> -->
|
|
<li><?php echo lang("NPI Document"); ?> : <span class="text-success NPI-UP" style="display:none;">Submitted</span><span class="text-danger NPI-DOWN" style="display:none;">Pending</span></li>
|
|
<?php }else if($nurse->qualification_type==6 || $nurse->qualification_type==7){ ?>
|
|
<li><?php echo lang("PCA Document"); ?> : <span class="text-success PCA-UP" style="display:none;">Submitted</span><span class="text-danger PCA-DOWN" style="display:none;">Pending</span></li>
|
|
<?php } ?>
|
|
<!-- <li>References : <span class="text-success REF-UP" style="display:none;">Submitted</span><span class="text-danger REF-DOWN" style="display:none;">Pending</span></li> -->
|
|
<li>Annual Physical Examination : <span class="text-success EHA-UP" style="display:none;">Submitted</span><span class="text-danger EHA-DOWN" style="display:none;">Pending</span></li>
|
|
<li>Hapatitis B Vaccine Acceptence : <span class="text-success HBV-UP" style="display:none;">Submitted</span><span class="text-danger HBV-DOWN" style="display:none;">Pending</span></li>
|
|
<li>PPD / Quantiferonon : <span class="text-success PPD-UP" style="display:none;">Submitted</span><span class="text-danger PPD-DOWN" style="display:none;">Pending</span></li>
|
|
<li>Drug Screen : <span class="text-success DSC-UP" style="display:none;">Submitted</span><span class="text-danger DSC-DOWN" style="display:none;">Pending</span></li>
|
|
<li>Flu Vaccine : <span class="text-success FLV-UP" style="display:none;">Submitted</span><span class="text-danger FLV-DOWN" style="display:none;">Pending</span></li>
|
|
<li>Covid Report : <span class="text-success CVD-UP" style="display:none;">Submitted</span><span class="text-danger CVD-DOWN" style="display:none;">Pending</span></li>
|
|
|
|
<?php if($nurse->qualification_type==4){ ?>
|
|
<li>CPR Report : <span class="text-success CPR-UP" style="display:none;">Submitted</span><span class="text-danger CPR-DOWN" style="display:none;">Pending</span></li>
|
|
<?php } ?>
|
|
|
|
<li>Licenses or Certification : <span class="text-success ADC-UP" style="display:none;">Submitted</span><span class="text-danger ADC-DOWN" style="display:none;">Pending</span></li>
|
|
<li>Other Documents : <span class="text-success OTR-UP" style="display:none;">Submitted</span><span class="text-danger OTR-DOWN" style="display:none;">Pending</span></li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Disclosure-->
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<!-- page end-->
|
|
</section>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<?php $this->view('saveCaregiverModalOther'); ?>
|
|
|
|
<?php
|
|
/*
|
|
<!--- FLU vaccine waver modal form --->
|
|
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog modal-lg modal-dialog-centered" style="width: 100%" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="exampleModalLongTitle">Employee Hepatitis B Vaccine Waiver</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<p class="text-center">OSHA Guidelines Advocate that Health Care Workers to Take Hepatitis B Vaccination.</p>
|
|
<p class="text-center">This form is required only if you do not wish to obtain the vaccination series.</p>
|
|
<br>
|
|
<p class="text-justify">I, <?=$nurse->fname?> <?=$nurse->mid_name?> <?=$nurse->lname?>, have received information
|
|
regarding the transmission of Hepatitis B and understand the occupational risks and
|
|
OSHA guidelines as outlined. </p>
|
|
<br>
|
|
<p class="text-justify">I do however, decline the Hepatitis B vaccination at this time for the following reasons: </p>
|
|
<p class="text-center text-danger">(PLEASE INDICATE BY PLACING A CHECKMARK BEFORE THE APPROPRIATE STATEMENT)</p>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-check">
|
|
<input type="checkbox" class="form-check-input" id="completed_the_vaccination_series">
|
|
<label class="form-check-label" for="completed_the_vaccination_series">I have completed the vaccination series (See Physical Exam) </label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-check">
|
|
<input type="checkbox" class="form-check-input" id="submitted_titer_reports">
|
|
<label class="form-check-label" for="submitted_titer_reports">I have submitted titer reports, which document immunity (See Physical Exam) </label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-check">
|
|
<input type="checkbox" class="form-check-input" id="physician_not_to_receive_vaccination">
|
|
<label class="form-check-label" for="physician_not_to_receive_vaccination">I have been advised by my physician not to receive vaccination for the following reason(s)</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-check">
|
|
<label class="form-check-label" for="physician_not_to_receive_vaccination">Explain</label>
|
|
<input type="text" class="form-check-input">
|
|
<br>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-check">
|
|
<input type="checkbox" class="form-check-input" id="chosen_to_decline_receiving">
|
|
<label class="form-check-label" for="chosen_to_decline_receiving">I have chosen to decline receiving the vaccine at this time. I understand that by declining this vaccine, I continue to be at risk of acquiring Hepatitis B.</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
|
|
</div>
|
|
<div class="col-md-6">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--- FLU vaccine waver modal form --->
|
|
*/
|
|
?>
|
|
|
|
<?php
|
|
/*
|
|
$this->view('saveCaregiverScript');
|
|
*/
|
|
?>
|
|
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
|
|
|
<script>
|
|
function isFutureDate(data){
|
|
var year = new Date().getFullYear();
|
|
if(data > year)
|
|
{
|
|
$(".yearError").html("<div class='alert alert-danger'> Please enter a valid year.</div>");
|
|
$('.educationSubmitBtn').attr("disabled", true);
|
|
}else{
|
|
$(".yearError").html("");
|
|
$('.educationSubmitBtn').attr("disabled", false);
|
|
}
|
|
}
|
|
$('#listOfService').select2();
|
|
$('#primary_langualge').select2();
|
|
$('#boros').select2();
|
|
$('#availability').select2();
|
|
$( document ).ready(function() {
|
|
$(".activate_depending").click(function(){
|
|
var target_val = $(this).val();
|
|
var open_value = $(this).attr("open_value");
|
|
var change_required_to = $(this).attr("change_required_to");
|
|
var required_field = $(this).attr("required_field");
|
|
//alert(change_required_to);
|
|
if (target_val == open_value)
|
|
{
|
|
$("#"+change_required_to).show();
|
|
$("#"+required_field).attr("required","required");
|
|
}
|
|
else
|
|
{
|
|
$("#"+change_required_to).hide();
|
|
$("#"+required_field).removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
$('.criminal_convictions').click(function(){
|
|
var inputValue = $(this).attr("value");
|
|
if(inputValue == true)
|
|
{
|
|
$("#criminal_convictions_details").show();
|
|
$("#criminal_convictions_details_field").attr("required","required");
|
|
}
|
|
else{
|
|
$("#criminal_convictions_details").hide();
|
|
$("#criminal_convictions_details_field").removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
//$("#injuryDetails").hide();
|
|
$('.injury').click(function(){
|
|
var inputValue = $(this).attr("value");
|
|
if(inputValue == true)
|
|
{
|
|
$("#injuryDetails").show();
|
|
$("#injuryDetailsField").attr("required","required");
|
|
}
|
|
else{
|
|
$("#injuryDetails").hide();
|
|
$("#injuryDetailsField").removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
//$("#physicaldefectsDetails").hide();
|
|
$('.physicaldefects').click(function(){
|
|
var inputValue = $(this).attr("value");
|
|
if(inputValue == true)
|
|
{
|
|
$("#physicaldefectsDetails").show();
|
|
$("#physicaldefectsDetailsField").attr("required","required");
|
|
}
|
|
else{
|
|
$("#physicaldefectsDetails").hide();
|
|
$("#physicaldefectsDetailsField").removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
//$("#hearingdefectsDetails").hide();
|
|
$('.hearingdefects').click(function(){
|
|
var inputValue = $(this).attr("value");
|
|
if(inputValue == true)
|
|
{
|
|
$("#hearingdefectsDetails").show();
|
|
$("#hearingdefectsDetailsField").attr("required","required");
|
|
}
|
|
else{
|
|
$("#hearingdefectsDetails").hide();
|
|
$("#hearingdefectsDetailsField").removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
//$("#visiondefectsDetails").hide();
|
|
$('.visiondefects').click(function(){
|
|
var inputValue = $(this).attr("value");
|
|
if(inputValue == true)
|
|
{
|
|
$("#visiondefectsDetails").show();
|
|
$("#visiondefectsDetailsField").attr("required","required");
|
|
}
|
|
else{
|
|
$("#visiondefectsDetails").hide();
|
|
$("#visiondefectsDetailsField").removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
//$("#speechdefectsDetails").hide();
|
|
$('.speechdefects').click(function(){
|
|
var inputValue = $(this).attr("value");
|
|
if(inputValue == true)
|
|
{
|
|
$("#speechdefectsDetails").show();
|
|
$("#speechdefectsDetailsField").attr("required","required");
|
|
}
|
|
else{
|
|
$("#speechdefectsDetails").hide();
|
|
$("#speechdefectsDetailsField").removeAttr("required");
|
|
}
|
|
checkBasicCheckList();
|
|
});
|
|
checkBasicCheckList();
|
|
getExperienceDetails();
|
|
});
|
|
function checkBasicCheckList(){
|
|
var citizen=$('input[name=citizen]:checked').val();
|
|
var remain_permanently=$('input[name=remain_permanently]:checked').val();
|
|
var authorization_to_work=$('input[name=authorization_to_work]:checked').val();
|
|
|
|
if((citizen==true) || (remain_permanently==true) || (authorization_to_work==true)){
|
|
$("#basic_submit_btn").removeAttr('disabled');
|
|
}else{
|
|
$('#basic_submit_btn').prop("disabled", true);
|
|
}
|
|
|
|
}
|
|
$("#other_reg_number").keyup(function(){
|
|
var raw_text = $(this).val();
|
|
var return_text = raw_text.replace(/[^a-zA-Z0-9 _]/g,'');
|
|
$(this).val(return_text);
|
|
});
|
|
$("#driving_lic_no").keyup(function(){
|
|
var raw_text = $(this).val();
|
|
var return_text = raw_text.replace(/[^a-zA-Z0-9 _]/g,'');
|
|
$(this).val(return_text);
|
|
});
|
|
$("#uscis").keyup(function(){
|
|
var raw_text = $(this).val();
|
|
var return_text = raw_text.replace(/[^a-zA-Z0-9 _]/g,'');
|
|
$(this).val(return_text);
|
|
});
|
|
//$('#years_of_exp').on('change', function() {
|
|
function getExperienceDetails() {
|
|
var YearExperience = $('#years_of_exp').val();
|
|
var caregiver_type=$("input[name=qualification_type]:checked").val();
|
|
var CargiverId='<?php echo $nurse->caregiver_table_id; ?>';
|
|
// alert(caregiver_type);
|
|
// alert(CargiverId);
|
|
|
|
if(YearExperience>3){
|
|
$('.3rdLevel').removeAttr('disabled');
|
|
}else{
|
|
$('.3rdLevel').attr('disabled','disabled');
|
|
}
|
|
|
|
if(caregiver_type>0 && YearExperience>0){
|
|
$(".experienceLabel").removeClass("hide");
|
|
|
|
$.ajax({
|
|
url:"<?php echo base_url(); ?>CaregiversDashboard/getExperienceDetails2",
|
|
type:"GET",
|
|
data:{caregiver_type:caregiver_type,CargiverId:CargiverId,YearExperience:YearExperience},
|
|
dataType: "html",
|
|
success:function(data){
|
|
$("#experience_details").html(data);
|
|
// $( ".clear_check").unbind( "click" );
|
|
// $( ".clear_check").css("border","0");
|
|
// $( ".clear_check").css("font-size","11px");
|
|
// $( ".clear_check").css("color","blue");
|
|
// $('.clear_check').click(function(){
|
|
// $(this).parent().closest("div").find('input[type="radio"]').prop('checked', false);
|
|
// //var forval=$(this).attr('for');
|
|
// //var foundobj=$('input[name=\"'+forval+'\"]').attr('checked', false);
|
|
// //console.log(foundobj);
|
|
// });
|
|
$(".have-exp-label").show();
|
|
$(".have-not-exp-label").hide();
|
|
}
|
|
});
|
|
$('.ExpDtl').show();
|
|
}else{
|
|
$(".experienceLabel").addClass("hide");
|
|
$('.ExpDtl').hide();
|
|
}
|
|
}
|
|
//});
|
|
$("#same_emergency").click(function(){
|
|
|
|
if($(this).is(":checked")){
|
|
var address1=$("#address1").val();
|
|
var state1=$("#state1").val();
|
|
var apt1=$("#apt1").val();
|
|
var county1=$("#county1").val();
|
|
var city1=$("#city1").val();
|
|
var zipcode1=$("#zipcode1").val();
|
|
var check_p_address=$("#check_p_address").val();
|
|
if(address1!="" && check_p_address=='checked'){
|
|
$("#address2").val(address1);
|
|
$("#state2").val(state1);
|
|
$("#apt2").val(apt1);
|
|
$("#county2").val(county1);
|
|
$("#city2").val(city1);
|
|
$("#zipcode2").val(zipcode1);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Please check parmanent address.',
|
|
showConfirmButton: false,
|
|
timer: 1500
|
|
});
|
|
$(this).prop('checked', false);
|
|
}
|
|
}
|
|
else{
|
|
$("#address2").val("");
|
|
$("#state2").val("");
|
|
$("#county2").val("");
|
|
$("#city2").val("");
|
|
$("#zipcode2").val("");
|
|
$("#apt2").val("");
|
|
}
|
|
});
|
|
$("#same_emergency2").click(function(){
|
|
if($(this).is(":checked")){
|
|
var address1=$("#address1").val();
|
|
var state1=$("#state1").val();
|
|
var county1=$("#county1").val();
|
|
var city1=$("#city1").val();
|
|
var zipcode1=$("#zipcode1").val();
|
|
var check_p_address=$("#check_p_address").val();
|
|
if(address1!="" && check_p_address=='checked'){
|
|
$("#Emergency_Contact_Address1").val(address1);
|
|
$("#Emergency_Contact_County1").val(county1);
|
|
$("#Emergency_Contact_State1").val(state1);
|
|
$("#Emergency_Contact_City1").val(city1);
|
|
$("#Emergency_Contact_zipcode1").val(zipcode1);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Please check parmanent address.',
|
|
showConfirmButton: false,
|
|
timer: 1500
|
|
});
|
|
$(this).prop('checked', false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$("#Emergency_Contact_Address1").val("");
|
|
$("#Emergency_Contact_County1").val("");
|
|
$("#Emergency_Contact_State1").val("");
|
|
$("#Emergency_Contact_City1").val("");
|
|
$("#Emergency_Contact_zipcode1").val("");
|
|
}
|
|
});
|
|
|
|
|
|
|
|
$("#same_emergency1").click(function(){
|
|
if($(this).is(":checked")){
|
|
//alert("hii");
|
|
var address1=$("#address1").val();
|
|
var state1=$("#state1").val();
|
|
var county1=$("#county1").val();
|
|
var city1=$("#city1").val();
|
|
var zipcode1=$("#zipcode1").val();
|
|
var check_p_address=$("#check_p_address").val();
|
|
if(address1!="" && check_p_address=='checked'){
|
|
$("#Emergency_Contact_Address").val(address1);
|
|
$("#Emergency_Contact_County").val(county1);
|
|
$("#Emergency_Contact_State").val(state1);
|
|
$("#Emergency_Contact_City").val(city1);
|
|
$("#Emergency_Contact_zipcode").val(zipcode1);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Please check parmanent address.',
|
|
showConfirmButton: false,
|
|
timer: 1500
|
|
});
|
|
$(this).prop('checked', false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$("#Emergency_Contact_Address").val("");
|
|
$("#Emergency_Contact_County").val("");
|
|
$("#Emergency_Contact_State").val("");
|
|
$("#Emergency_Contact_City").val("");
|
|
$("#Emergency_Contact_zipcode").val("");
|
|
}
|
|
|
|
});
|
|
|
|
$( document ).ready(function() {
|
|
checkNone();
|
|
getExperienceDetails();
|
|
|
|
});
|
|
function showTabIcon(){
|
|
$.ajax({
|
|
url:"<?php echo base_url(); ?>caregivers/getTabStatus/<?php echo $nurse->id; ?>",
|
|
type :'GET',
|
|
success:function(data){
|
|
var obj=JSON.parse(data);
|
|
// console.log(obj);
|
|
//Basic Tab
|
|
if(obj.basic==0){
|
|
$('.basic-0').show();
|
|
$('.basic-1').hide();
|
|
$('.basic-2').hide();
|
|
}else if(obj.basic==1){
|
|
$('.basic-0').hide();
|
|
$('.basic-1').show();
|
|
$('.basic-2').hide();
|
|
}else if(obj.basic==2){
|
|
$('.basic-0').hide();
|
|
$('.basic-1').hide();
|
|
$('.basic-2').show();
|
|
}
|
|
//Exp Tab
|
|
if(obj.exp==0){
|
|
$('.nav-exp').addClass('disabled');
|
|
$('.exp-0').show();
|
|
$('.exp-1').hide();
|
|
$('.exp-2').hide();
|
|
}else if(obj.exp==1){
|
|
$('.nav-exp').removeClass('disabled');
|
|
$('.exp-0').hide();
|
|
$('.exp-1').show();
|
|
$('.exp-2').hide();
|
|
}else if(obj.exp==2){
|
|
$('.nav-exp').removeClass('disabled');
|
|
$('.exp-0').hide();
|
|
$('.exp-1').hide();
|
|
$('.exp-2').show();
|
|
}
|
|
//EMP Tab
|
|
if(obj.emp==0){
|
|
$('.nav-emp').addClass('disabled');
|
|
$('.emp-0').show();
|
|
$('.emp-1').hide();
|
|
$('.emp-2').hide();
|
|
}else if(obj.emp==1){
|
|
$('.nav-emp').removeClass('disabled');
|
|
$('.emp-0').hide();
|
|
$('.emp-1').show();
|
|
$('.emp-2').hide();
|
|
}else if(obj.emp==2){
|
|
$('.nav-emp').removeClass('disabled');
|
|
$('.emp-0').hide();
|
|
$('.emp-1').hide();
|
|
$('.emp-2').show();
|
|
}
|
|
//Phy Tab
|
|
if(obj.phy==0){
|
|
$('.nav-phy').addClass('disabled');
|
|
$('.phy-0').show();
|
|
$('.phy-1').hide();
|
|
$('.phy-2').hide();
|
|
}else if(obj.phy==1){
|
|
$('.nav-phy').removeClass('disabled');
|
|
$('.phy-0').hide();
|
|
$('.phy-1').show();
|
|
$('.phy-2').hide();
|
|
}else if(obj.phy==2){
|
|
$('.nav-phy').removeClass('disabled');
|
|
$('.phy-0').hide();
|
|
$('.phy-1').hide();
|
|
$('.phy-2').show();
|
|
}
|
|
//Doc Tab
|
|
if(obj.doc==0){
|
|
$('.nav-doc').addClass('disabled');
|
|
$('.doc-0').show();
|
|
$('.doc-1').hide();
|
|
$('.doc-2').hide();
|
|
}else if(obj.doc==1){
|
|
$('.nav-doc').removeClass('disabled');
|
|
$('.doc-0').hide();
|
|
$('.doc-1').show();
|
|
$('.doc-2').hide();
|
|
}else if(obj.doc==2){
|
|
$('.nav-doc').removeClass('disabled');
|
|
$('.doc-0').hide();
|
|
$('.doc-1').hide();
|
|
$('.doc-2').show();
|
|
}
|
|
//Dis Tab
|
|
if(obj.dis==0){
|
|
$('.nav-dis').addClass('disabled');
|
|
$('.dis-0').show();
|
|
$('.dis-1').hide();
|
|
$('.dis-2').hide();
|
|
}else if(obj.dis==1){
|
|
$('.nav-dis').removeClass('disabled');
|
|
$('.dis-0').hide();
|
|
$('.dis-1').show();
|
|
$('.dis-2').hide();
|
|
}else if(obj.dis==2){
|
|
$('.nav-dis').removeClass('disabled');
|
|
$('.dis-0').hide();
|
|
$('.dis-1').hide();
|
|
$('.dis-2').show();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function checkNone(headId){
|
|
if($("#NoneExp_"+headId).is(":checked")){
|
|
$(".NoneExp_"+headId).slideUp();
|
|
}else{
|
|
$(".nonExp_All").slideUp();
|
|
$(".NoneExp_"+headId).slideDown();
|
|
}
|
|
}
|
|
|
|
|
|
function validateExp(id) {
|
|
//alert(id);
|
|
if($('#experience_id_'+id).prop('checked')){
|
|
$('#exp_label_'+id+'_0').prop('required',true);
|
|
// if(type == 'None'){
|
|
// $('#exp_label_'+id+'_0').prop('checked', true);
|
|
// }
|
|
}else{
|
|
$('#exp_label_'+id+'_0').removeAttr('required');
|
|
$('#exp_label_'+id+'_0').prop('checked', false);
|
|
$('#exp_label_'+id+'_1').prop('checked', false);
|
|
$('#exp_label_'+id+'_2').prop('checked', false);
|
|
$('#exp_label_'+id+'_3').prop('checked', false);
|
|
}
|
|
}
|
|
|
|
function validateForm() {
|
|
var address1 = document.forms["caregiverBasicForm"]["address1"].value;
|
|
var state1 = document.forms["caregiverBasicForm"]["state1"].value;
|
|
var county1 = document.forms["caregiverBasicForm"]["county1"].value;
|
|
var city1 = document.forms["caregiverBasicForm"]["city1"].value;
|
|
var zipcode1 = document.forms["caregiverBasicForm"]["zipcode1"].value;
|
|
var address2 = document.forms["caregiverBasicForm"]["address2"].value;
|
|
var zipcode2 = document.forms["caregiverBasicForm"]["zipcode2"].value;
|
|
var county2 = document.forms["caregiverBasicForm"]["county2"].value;
|
|
var state2 = document.forms["caregiverBasicForm"]["state2"].value;
|
|
var city2 = document.forms["caregiverBasicForm"]["city2"].value;
|
|
|
|
var Emergency_Contact_Address = document.forms["caregiverBasicForm"]["Emergency_Contact_Address"].value;
|
|
var Emergency_Contact_Country = document.forms["caregiverBasicForm"]["Emergency_Contact_Country"].value;
|
|
var Emergency_Contact_State = document.forms["caregiverBasicForm"]["Emergency_Contact_State"].value;
|
|
var Emergency_Contact_City = document.forms["caregiverBasicForm"]["Emergency_Contact_City"].value;
|
|
var Emergency_Contact_zipcode = document.forms["caregiverBasicForm"]["Emergency_Contact_zipcode"].value;
|
|
|
|
if(zipcode1 != ""){
|
|
if ((county1 == "") || (state1 == "") || (city1== "")) {
|
|
$(".zipcode1Error").html("<div class='alert alert-danger' role='alert'> Please enter a valid Zipcode.</div>");
|
|
return false;
|
|
}else{
|
|
$("#zipcode1Error").hide();
|
|
}
|
|
|
|
}
|
|
if (zipcode2 != "") {
|
|
if (address2 == "") {
|
|
$(".address2Error").html("<div class='alert alert-danger' role='alert'> Please enter a House Number.</div>");
|
|
return false;
|
|
}
|
|
else if ((county2 == "") || (state2 == "") || (city2=="")){
|
|
$(".zipcode2Error").html("<div class='alert alert-danger' role='alert'> Please enter a valid Zipcode.</div>");
|
|
return false;
|
|
}
|
|
else{
|
|
$("#address2Error").hide();
|
|
$("#zipcode2Error").hide();
|
|
}
|
|
|
|
}
|
|
if (Emergency_Contact_zipcode != "") {
|
|
if (Emergency_Contact_zipcode == "") {
|
|
$(".address3Error").html("<div class='alert alert-danger' role='alert'> Please enter a House Number.</div>");
|
|
return false;
|
|
}
|
|
else if ((Emergency_Contact_Country == "") || (Emergency_Contact_State == "") || (Emergency_Contact_City=="")) {
|
|
$(".zipcode3Error").html("<div class='alert alert-danger' role='alert'> Please enter a valid Zipcode.</div>");
|
|
return false;
|
|
}
|
|
else{
|
|
$("#address3Error").hide();
|
|
$("#zipcode3Error").hide();
|
|
}
|
|
|
|
}
|
|
//alert('validateForm');
|
|
return true;
|
|
}
|
|
|
|
function add_license_documents(data){
|
|
var appenddata = $("div[use=licenseUploadFormContainer]").find("div[use='licensePart']").clone();
|
|
if(data!=null)
|
|
{
|
|
$.each($(appenddata).find("input,select"),function(){
|
|
//console.log($(this).attr("mname"));
|
|
var val = data[$(this).attr("mname")];
|
|
$(this).val(val);
|
|
});
|
|
}
|
|
$('#more_license_documents').append(appenddata);
|
|
$('#more_license_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_license_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_license_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_license_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_license_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
|
|
function less_license_documents(obj){
|
|
var part = $(obj).parent().closest("div[use='licensePart']");
|
|
//console.log(part);
|
|
var id = ($(obj).parent().closest("div[use='licensePart']").find("input[id='licenseid']")).val();
|
|
swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "You won't be able to revert this!",
|
|
type: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes, delete it!'
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
$.ajax({
|
|
url:'../CaregiversDashboard/deleteLicenseData?id='+id+'',
|
|
//data : 'id:id',
|
|
type :'GET',
|
|
success:function(data){
|
|
$(part).remove();
|
|
$('#more_license_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_license_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_license_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_license_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_license_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
swal.fire("Your file is safe!");
|
|
}
|
|
});
|
|
}
|
|
function add_education_documents(data){
|
|
var appenddata = $("div[use=educationUploadFormContainer]").find("div[use='educationPart']").clone();
|
|
if(data!=null)
|
|
{
|
|
$.each($(appenddata).find("input,select"),function(){
|
|
//console.log($(this).attr("mname"));
|
|
var val = data[$(this).attr("mname")];
|
|
$(this).val(val);
|
|
});
|
|
}
|
|
$('#more_education_documents').append(appenddata);
|
|
$('#more_education_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_education_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_education_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_education_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_education_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
function less_education_documents(obj,id){
|
|
var part = $(obj).parent().closest("div[use='educationPart']");
|
|
//console.log(part);
|
|
|
|
swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "You won't be able to revert this!",
|
|
type: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes, delete it!'
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
$.ajax({
|
|
url:'../CaregiversDashboard/deleteDocument?id='+id+'',
|
|
//data : 'id:id',
|
|
type :'GET',
|
|
success:function(data){
|
|
$(part).remove();
|
|
$('#more_education_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_education_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_education_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_education_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_education_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
swal.fire("Your file is safe!");
|
|
}
|
|
});
|
|
}
|
|
function add_additional_certificates(data){
|
|
var appenddata = $("div[use=moreAdditionalCertificateFormContainer]").find("form[use=docUploadForm]").clone();
|
|
|
|
// alert(data.ADC);
|
|
if(data!=null)
|
|
{
|
|
$.each($(appenddata).find("input"),function(){
|
|
var val = data[$(this).attr("name")];
|
|
if($(this).attr("type") != 'file')
|
|
{
|
|
$(this).val(val);
|
|
}else{
|
|
$(this).removeAttr('required');
|
|
$(this).parent().closest('div').find('label').removeClass('required-field');
|
|
|
|
}
|
|
});
|
|
|
|
if(data.ADC!='')
|
|
{
|
|
file ="<?php echo base_url(); ?>"+data.ADC;
|
|
var img_data='<a target="_blank" href="'+file+'">'
|
|
+'<img src="<?php echo base_url(); ?>uploads/attachment.png" class="img-thumbnail" style="height: 30px;">'
|
|
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 50px;">'
|
|
+'</a>';
|
|
$(appenddata).find("span[use=uploadContainer]").append(img_data);
|
|
}else{
|
|
var img_data='<img src="<?php echo base_url(); ?>uploads/attachment.png" class="img-thumbnail" style="height: 30px;">';
|
|
$(appenddata).find("span[use=uploadContainer]").append(img_data);
|
|
}
|
|
}
|
|
// alert('2');
|
|
// console.log('Additional Certificate');
|
|
// console.log(appenddata);
|
|
// $(appenddata).append('<h1>TEST APPEND DATA</h1>');
|
|
$(appenddata).on("submit",function(e){
|
|
// e.preventDefault();
|
|
// alert('submit addl certificate');
|
|
submit_upload_form(e,this);
|
|
});
|
|
|
|
$('#more_additional_certifications').append(appenddata);
|
|
$('#more_additional_certifications').find("i[use=plusbutt]").hide();
|
|
$('#more_additional_certifications').find("i[use=plusbutt]").last().show();
|
|
$('#more_additional_certifications').find("i[use=minusbutt]").last().show();
|
|
if($('#more_additional_certifications').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_additional_certifications').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
function less_additional_certificates(obj,id){
|
|
var form = $(obj).parent().closest("form");
|
|
swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "You won't be able to revert this!",
|
|
type: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes, delete it!'
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
$.ajax({
|
|
url:'../CaregiversDashboard/deleteDocument?id='+id+'',
|
|
//data : 'id:id',
|
|
type :'GET',
|
|
success:function(data){
|
|
$(form).remove();
|
|
$('#more_additional_certifications').find("i[use=plusbutt]").hide();
|
|
$('#more_additional_certifications').find("i[use=plusbutt]").last().show();
|
|
$('#more_additional_certifications').find("i[use=minusbutt]").last().show();
|
|
if($('#more_additional_certifications').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_additional_certifications').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
swal.fire("Your file is safe!");
|
|
}
|
|
});
|
|
|
|
}
|
|
function add_other_documents(data){
|
|
var appenddata = $("div[use=otherUploadFormContainer]").find("form[use=otherUploadForm]").clone();
|
|
|
|
if(data!=null)
|
|
{
|
|
$.each($(appenddata).find("input"),function(){
|
|
var val = data[$(this).attr("name")];
|
|
if($(this).attr("type") != 'file')
|
|
{
|
|
$(this).val(val);
|
|
}else{
|
|
$(this).removeAttr('required');
|
|
$(this).parent().closest('div').find('label').removeClass('required-field');
|
|
|
|
}
|
|
});
|
|
|
|
if(data.OTR!='')
|
|
{
|
|
file ="<?php echo base_url(); ?>"+data.OTR;
|
|
var img_data='<a target="_blank" href="'+file+'">'
|
|
+'<img src="<?php echo base_url(); ?>uploads/attachment.png" class="img-thumbnail" style="height: 30px;">'
|
|
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 50px;">'
|
|
+'</a>';
|
|
$(appenddata).find("span[use=uploadContainer]").append(img_data);
|
|
}else{
|
|
var img_data='<img src="<?php echo base_url(); ?>uploads/attachment.png" class="img-thumbnail" style="height: 30px;">';
|
|
$(appenddata).find("span[use=uploadContainer]").append(img_data);
|
|
}
|
|
}
|
|
|
|
$(appenddata).on("submit",function(e){
|
|
submit_upload_form(e,this);
|
|
});
|
|
|
|
$('#more_other_documents').append(appenddata);
|
|
$('#more_other_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_other_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_other_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_other_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_other_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
function less_other_documents(obj,id){
|
|
var form = $(obj).parent().closest("form");
|
|
swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "You won't be able to revert this!",
|
|
type: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes, delete it!'
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
$.ajax({
|
|
url:'../CaregiversDashboard/deleteDocument?id='+id+'',
|
|
//data : 'id:id',
|
|
type :'GET',
|
|
success:function(data){
|
|
$(form).remove();
|
|
$('#more_other_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_other_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_other_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_other_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_other_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
swal.fire("Your file is safe!");
|
|
}
|
|
});
|
|
|
|
}
|
|
function add_training_documents(data){
|
|
var appenddata = $("div[use=trainingUploadFormContainer]").find("form[use=trainingUploadForm]").clone();
|
|
|
|
if(data!=null)
|
|
{
|
|
$.each($(appenddata).find("input"),function(){
|
|
var val = data[$(this).attr("name")];
|
|
if($(this).attr("type") != 'file')
|
|
{
|
|
$(this).val(val);
|
|
}else{
|
|
$(this).removeAttr('required');
|
|
$(this).parent().closest('div').find('label').removeClass('required-field');
|
|
|
|
}
|
|
});
|
|
|
|
if(data.TRN!='')
|
|
{
|
|
file ="<?php echo base_url(); ?>"+data.TRN;
|
|
var img_data='<a target="_blank" href="'+file+'">'
|
|
+'<img src="<?php echo base_url(); ?>uploads/attachment.png" class="img-thumbnail" style="height: 50px;">'
|
|
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 50px;">'
|
|
+'</a>';
|
|
$(appenddata).find("span[use=uploadContainer]").append(img_data);
|
|
}else{
|
|
var img_data='<img src="<?php echo base_url(); ?>uploads/attachment.png" class="img-thumbnail" style="height: 50px;">';
|
|
$(appenddata).find("span[use=uploadContainer]").append(img_data);
|
|
}
|
|
}
|
|
|
|
$(appenddata).on("submit",function(e){
|
|
submit_upload_form(e,this);
|
|
});
|
|
//console.log(appenddata);
|
|
$('#more_training_documents').append(appenddata);
|
|
$('#more_training_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_training_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_training_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_training_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_training_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
function less_training_documents(obj,id){
|
|
var form = $(obj).parent().closest("form");
|
|
swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "You won't be able to revert this!",
|
|
type: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes, delete it!'
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
$.ajax({
|
|
url:'../CaregiversDashboard/deleteDocument?id='+id+'',
|
|
//data : 'id:id',
|
|
type :'GET',
|
|
success:function(data){
|
|
$(form).remove();
|
|
$('#more_training_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_training_documents').find("i[use=plusbutt]").last().show();
|
|
$('#more_training_documents').find("i[use=minusbutt]").last().show();
|
|
if($('#more_training_documents').find("i[use=minusbutt]").length<=1)
|
|
{
|
|
$('#more_training_documents').find("i[use=minusbutt]").first().hide();
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
swal.fire("Your file is safe!");
|
|
}
|
|
});
|
|
|
|
}
|
|
function openTab()
|
|
{
|
|
$.ajax({
|
|
url:'<?php echo base_url(); ?>CaregiversDashboard/load_progress?id=<?php echo $nurse->ion_user_id; ?>',
|
|
type :'GET',
|
|
success:function(data){
|
|
var obj=JSON.parse(data);
|
|
//console.log(obj.upload);
|
|
var progress='';
|
|
if(obj.progress>=100){
|
|
$("#document_upload_ancore").html(
|
|
'<i class="la la-check" style="color: green;"></i> Documents Upload'
|
|
);
|
|
$("#disclouser_sign_ancore").html(
|
|
'<i class="la la-exclamation-circle" style="color: orange;"></i> '+'Disclosures & Signatures'
|
|
);
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function load_progress(){
|
|
//alert();
|
|
$.ajax({
|
|
url:'<?php echo base_url(); ?>CaregiversDashboard/load_progress?id=<?php echo $nurse->ion_user_id; ?>',
|
|
type :'GET',
|
|
success:function(data){
|
|
var obj=JSON.parse(data);
|
|
// console.log(obj.doc_status.basic_doc);
|
|
var progress='';
|
|
if(obj.progress>99){
|
|
progress=100;
|
|
$('.Complete-Submit').show();
|
|
$('.submit-due').hide();
|
|
}else{
|
|
progress=obj.progress;
|
|
$('.Complete-Submit').hide();
|
|
$('.submit-due').show();
|
|
}
|
|
$('#progress_lbl').html(progress);
|
|
$('#progress_bar').html(progress+'%');
|
|
$('#progress_bar').attr('aria-valuenow',progress);
|
|
$('#progress_bar').attr('style','width: '+progress+'%;');
|
|
//console.log(obj.upload);
|
|
// rn = 22
|
|
checkDocStatus(obj.upload);
|
|
|
|
// for document status icon
|
|
if(obj.doc_status.basic_doc=="true"){
|
|
var basic_doc_status_icon='<i class="la la-check basic-2 text-success"></i>';
|
|
}else{
|
|
var basic_doc_status_icon='<i class="la la-exclamation-circle text-warning"></i>';
|
|
}if(obj.doc_status.med_doc=="true"){
|
|
var medic_doc_status_icon='<i class="la la-check basic-2 text-success"></i>';
|
|
}else{
|
|
var medic_doc_status_icon='<i class="la la-exclamation-circle text-warning"></i>';
|
|
}if(obj.doc_status.lic_doc=="true"){
|
|
var lic_doc_status_icon='<i class="la la-check basic-2 text-success"></i>';
|
|
}else{
|
|
var lic_doc_status_icon='<i class="la la-exclamation-circle text-warning"></i>';
|
|
}if(obj.doc_status.oth_doc=="true"){
|
|
var oth_doc_status_icon='<i class="la la-check basic-2 text-success"></i>';
|
|
}else{
|
|
var oth_doc_status_icon='<i class="la la-exclamation-circle text-warning"></i>';
|
|
}
|
|
|
|
$(".basic_doc_status").html(basic_doc_status_icon);
|
|
$(".medic_doc_status").html(medic_doc_status_icon);
|
|
$(".lic_doc_status").html(lic_doc_status_icon);
|
|
$(".other_doc_status").html(oth_doc_status_icon);
|
|
// for document status icon
|
|
}
|
|
});
|
|
}
|
|
function checkDocStatus(docArr){
|
|
// console.log(docArr);
|
|
//Photo
|
|
if( $.inArray("PHO", docArr) !== -1 ) {
|
|
$('.PHO-UP').show();
|
|
$('.PHO-DOWN').hide();
|
|
}else{
|
|
$('.PHO-UP').hide();
|
|
$('.PHO-DOWN').show();
|
|
}
|
|
//Citizen Documentation
|
|
if( $.inArray("CTZ", docArr) !== -1 ) {
|
|
$('.CTZ-UP').show();
|
|
$('.CTZ-DOWN').hide();
|
|
}else{
|
|
$('.CTZ-UP').hide();
|
|
$('.CTZ-DOWN').show();
|
|
}
|
|
//Social Security Card
|
|
if( $.inArray("SSC", docArr) !== -1 ) {
|
|
$('.SSC-UP').show();
|
|
$('.SSC-DOWN').hide();
|
|
}else{
|
|
$('.SSC-UP').hide();
|
|
$('.SSC-DOWN').show();
|
|
}
|
|
//Resume
|
|
if( $.inArray("RSM", docArr) !== -1 ) {
|
|
$('.RSM-UP').show();
|
|
$('.RSM-DOWN').hide();
|
|
}else{
|
|
$('.RSM-UP').hide();
|
|
$('.RSM-DOWN').show();
|
|
}
|
|
//State or Federal Issued ID
|
|
// if( $.inArray("SFI", docArr) !== -1 ) {
|
|
// $('.SFI-UP').show();
|
|
// $('.SFI-DOWN').hide();
|
|
// }else{
|
|
// $('.SFI-UP').hide();
|
|
// $('.SFI-DOWN').show();
|
|
// }
|
|
// Diphtheria
|
|
if( $.inArray("SFI", docArr) !== -1 ) {
|
|
$('.SFI-UP').show();
|
|
$('.SFI-DOWN').hide();
|
|
}else{
|
|
$('.SFI-UP').hide();
|
|
$('.SFI-DOWN').show();
|
|
}
|
|
// Tetanus
|
|
if( $.inArray("TNS", docArr) !== -1 ) {
|
|
$('.TNS-UP').show();
|
|
$('.TNS-DOWN').hide();
|
|
}else{
|
|
$('.TNS-UP').hide();
|
|
$('.TNS-DOWN').show();
|
|
}
|
|
// Mumps
|
|
if( $.inArray("MUM", docArr) !== -1 ) {
|
|
$('.MUM-UP').show();
|
|
$('.MUM-DOWN').hide();
|
|
}else{
|
|
$('.MUM-UP').hide();
|
|
$('.MUM-DOWN').show();
|
|
}
|
|
// VAR
|
|
if( $.inArray("VAR", docArr) !== -1 ) {
|
|
$('.VAR-UP').show();
|
|
$('.VAR-DOWN').hide();
|
|
}else{
|
|
$('.VAR-UP').hide();
|
|
$('.VAR-DOWN').show();
|
|
}
|
|
//Malpractice Insurance Policy
|
|
if( $.inArray("MIC", docArr) !== -1 ) {
|
|
$('.DIP-UP').show();
|
|
$('.DIP-DOWN').hide();
|
|
}else{
|
|
$('.DIP-UP').hide();
|
|
$('.DIP-DOWN').show();
|
|
}
|
|
//NPI Document
|
|
if( $.inArray("NPI", docArr) !== -1 ) {
|
|
$('.NPI-UP').show();
|
|
$('.NPI-DOWN').hide();
|
|
}else{
|
|
$('.NPI-UP').hide();
|
|
$('.NPI-DOWN').show();
|
|
}
|
|
//PCA Document
|
|
if( $.inArray("PCA", docArr) !== -1 ) {
|
|
$('.PCA-UP').show();
|
|
$('.PCA-DOWN').hide();
|
|
}else{
|
|
$('.PCA-UP').hide();
|
|
$('.PCA-DOWN').show();
|
|
}
|
|
//References
|
|
if( $.inArray("REF", docArr) !== -1 ) {
|
|
$('.REF-UP').show();
|
|
$('.REF-DOWN').hide();
|
|
}else{
|
|
$('.REF-UP').hide();
|
|
$('.REF-DOWN').show();
|
|
}
|
|
//Annual Physical Examination
|
|
if( $.inArray("EHA", docArr) !== -1 ) {
|
|
$('.EHA-UP').show();
|
|
$('.EHA-DOWN').hide();
|
|
}else{
|
|
$('.EHA-UP').hide();
|
|
$('.EHA-DOWN').show();
|
|
}
|
|
//Hapatitis B Vaccine Acceptence
|
|
if( $.inArray("HBV", docArr) !== -1 ) {
|
|
$('.HBV-UP').show();
|
|
$('.HBV-DOWN').hide();
|
|
}else{
|
|
$('.HBV-UP').hide();
|
|
$('.HBV-DOWN').show();
|
|
}
|
|
//PPD / Quantiferonon
|
|
if( $.inArray("PPD", docArr) !== -1 ) {
|
|
$('.PPD-UP').show();
|
|
$('.PPD-DOWN').hide();
|
|
}else{
|
|
$('.PPD-UP').hide();
|
|
$('.PPD-DOWN').show();
|
|
}
|
|
//Drug Screen
|
|
if( $.inArray("DSC", docArr) !== -1 ) {
|
|
$('.DSC-UP').show();
|
|
$('.DSC-DOWN').hide();
|
|
}else{
|
|
$('.DSC-UP').hide();
|
|
$('.DSC-DOWN').show();
|
|
}
|
|
//Flu Vaccine :
|
|
if( $.inArray("FLV", docArr) !== -1 ) {
|
|
$('.FLV-UP').show();
|
|
$('.FLV-DOWN').hide();
|
|
}else{
|
|
$('.FLV-UP').hide();
|
|
$('.FLV-DOWN').show();
|
|
}
|
|
//Covid Report :
|
|
if( $.inArray("CVD", docArr) !== -1 ) {
|
|
$('.CVD-UP').show();
|
|
$('.CVD-DOWN').hide();
|
|
}else{
|
|
$('.CVD-UP').hide();
|
|
$('.CVD-DOWN').show();
|
|
}
|
|
//Covid Report :
|
|
if( $.inArray("CPR", docArr) !== -1 ) {
|
|
$('.CPR-UP').show();
|
|
$('.CPR-DOWN').hide();
|
|
}else{
|
|
$('.CPR-UP').hide();
|
|
$('.CPR-DOWN').show();
|
|
}
|
|
//Licenses or Certification :
|
|
if( $.inArray("ADC", docArr) !== -1 ) {
|
|
$('.ADC-UP').show();
|
|
$('.ADC-DOWN').hide();
|
|
}else{
|
|
$('.ADC-UP').hide();
|
|
$('.ADC-DOWN').show();
|
|
}
|
|
//Other Documents
|
|
if( $.inArray("OTR", docArr) !== -1 ) {
|
|
$('.OTR-UP').show();
|
|
$('.OTR-DOWN').hide();
|
|
}else{
|
|
$('.OTR-UP').hide();
|
|
$('.OTR-DOWN').show();
|
|
}
|
|
//CHRC 102
|
|
if( $.inArray("102", docArr) !== -1 ) {
|
|
$('.102-UP').show();
|
|
$('.102-DOWN').hide();
|
|
}else{
|
|
$('.102-UP').hide();
|
|
$('.102-DOWN').show();
|
|
}
|
|
//CHRC 103
|
|
if( $.inArray("103", docArr) !== -1 ) {
|
|
$('.103-UP').show();
|
|
$('.103-DOWN').hide();
|
|
}else{
|
|
$('.103-UP').hide();
|
|
$('.103-DOWN').show();
|
|
}
|
|
//RRF
|
|
if( $.inArray("RRF", docArr) !== -1 ) {
|
|
$('.RRF-UP').show();
|
|
$('.RRF-DOWN').hide();
|
|
}else{
|
|
$('.RRF-UP').hide();
|
|
$('.RRF-DOWN').show();
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
|
|
setInterval(function(){
|
|
load_progress();
|
|
showTabIcon();
|
|
}, 1000);
|
|
var today = new Date();
|
|
var dd = today.getDate();
|
|
var mm = today.getMonth()+1; //January is 0!
|
|
var yyyy = today.getFullYear();
|
|
var yyyy1 = today.getFullYear()-18;
|
|
if(dd<10){
|
|
dd='0'+dd
|
|
}
|
|
if(mm<10){
|
|
mm='0'+mm
|
|
}
|
|
|
|
today = yyyy+'-'+mm+'-'+dd;
|
|
today1 = yyyy1+'-'+mm+'-'+dd;
|
|
document.getElementById("dob").setAttribute("max", today1);
|
|
|
|
$(".exeDate").attr("min", today);
|
|
|
|
var PPD_Quantiferonon_max_date = new Date();
|
|
PPD_Quantiferonon_max_date.setMonth(PPD_Quantiferonon_max_date.getMonth() + 12);
|
|
var dd1 = PPD_Quantiferonon_max_date.getDate();
|
|
var mm1 = PPD_Quantiferonon_max_date.getMonth()+1; //January is 0!
|
|
var yyyy1 = PPD_Quantiferonon_max_date.getFullYear();
|
|
if(dd1<10){
|
|
dd1='0'+dd1
|
|
}
|
|
if(mm1<10){
|
|
mm1='0'+mm1
|
|
}
|
|
PPD_Quantiferonon_max_date = yyyy1+'-'+mm1+'-'+dd1;
|
|
document.getElementById("PPD_Quantiferonon_date").setAttribute("max", PPD_Quantiferonon_max_date);
|
|
|
|
<?php if($traing_doc_count>0){ ?>
|
|
<?php for($i=0;$i<$traing_doc_count;$i++){?>
|
|
var trainingUploadData = {};
|
|
trainingUploadData['Ion_id'] = "<?php if (!empty($nurse->ion_user_id)) echo $nurse->ion_user_id; ?>";
|
|
trainingUploadData['id'] = "<?php if (!empty($nurse->caregiver_table_id)) echo $nurse->caregiver_table_id; ?>";
|
|
trainingUploadData['doc_type'] = "<?php echo _DOC_TRAININGCODE_ ; ?>";
|
|
trainingUploadData['<?php echo _DOC_TRAININGCODE_ ; ?>_remarks'] = "<?php echo $documentsrem[_DOC_TRAININGCODE_][$i]; ?>";
|
|
trainingUploadData['<?php echo _DOC_TRAININGCODE_ ; ?>_documents_no'] = "<?php echo $documentsno[_DOC_TRAININGCODE_][$i]; ?>";
|
|
trainingUploadData['<?php echo _DOC_TRAININGCODE_ ; ?>'] = "<?php echo $documentsarr[_DOC_TRAININGCODE_][$i]; ?>";
|
|
trainingUploadData['doc_id'] = "<?php echo $documentsid[_DOC_TRAININGCODE_][$i]; ?>";
|
|
trainingUploadData['progress'] = "10";
|
|
trainingUploadData['csrf_test_name'] = "<?= $get_csrf_token_value ?>";
|
|
add_training_documents(trainingUploadData);
|
|
<?php } ?>
|
|
<?php }else{ ?>
|
|
add_training_documents(null);
|
|
<?php } ?>
|
|
|
|
<?php if($other_doc_count>0){ ?>
|
|
<?php for($i=0;$i<$other_doc_count;$i++){?>
|
|
var otherUploadData = {};
|
|
otherUploadData['Ion_id'] = "<?php if (!empty($nurse->ion_user_id)) echo $nurse->ion_user_id; ?>";
|
|
otherUploadData['id'] = "<?php if (!empty($nurse->caregiver_table_id)) echo $nurse->caregiver_table_id; ?>";
|
|
otherUploadData['doc_type'] = "<?php echo _DOC_OTHERCODE_ ; ?>";
|
|
otherUploadData['<?php echo _DOC_OTHERCODE_ ; ?>_remarks'] = "<?php echo $documentsrem[_DOC_OTHERCODE_][$i]; ?>";
|
|
otherUploadData['<?php echo _DOC_OTHERCODE_ ; ?>'] = "<?php echo $documentsarr[_DOC_OTHERCODE_][$i]; ?>";
|
|
otherUploadData['doc_id'] = "<?php echo $documentsid[_DOC_OTHERCODE_][$i]; ?>";
|
|
otherUploadData['progress'] = "10";
|
|
otherUploadData['csrf_test_name'] = "<?= $get_csrf_token_value ?>";
|
|
add_other_documents(otherUploadData);
|
|
<?php } ?>
|
|
<?php }else{ ?>
|
|
add_other_documents(null);
|
|
<?php } ?>
|
|
|
|
<?php if($additional_certificate_count>0){ ?>
|
|
<?php for($i=0;$i<$additional_certificate_count;$i++){?>
|
|
var additionalCertificateData = {};
|
|
additionalCertificateData['<?php echo $this->security->get_csrf_token_name();?>'] = "<?php echo $this->security->get_csrf_hash();?>";
|
|
additionalCertificateData['id'] = "<?php if (!empty($nurse->caregiver_table_id)) echo $nurse->caregiver_table_id; ?>";
|
|
additionalCertificateData['doc_type'] = "<?php echo _ADDL_CERTIFICATE_ ; ?>";
|
|
additionalCertificateData['Name_Additional_Certifications_state'] = "<?php echo $documentsrem[_ADDL_CERTIFICATE_][$i]; ?>";
|
|
additionalCertificateData['Name_Additional_Certifications'] = "<?php echo $documentsrem[_ADDL_CERTIFICATE_][$i]; ?>";
|
|
additionalCertificateData['Additional_Certifications_Number'] = "<?php echo $documentsno[_ADDL_CERTIFICATE_][$i]; ?>";
|
|
additionalCertificateData['<?php echo _ADDL_CERTIFICATE_ ; ?>'] = "<?php echo $documentsarr[_ADDL_CERTIFICATE_][$i]; ?>";
|
|
additionalCertificateData['doc_id'] = "<?php echo $documentsid[_ADDL_CERTIFICATE_][$i]; ?>";
|
|
additionalCertificateData['progress'] = "5";
|
|
additionalCertificateData['form_status'] = "5";
|
|
additionalCertificateData['data_type'] = "Additional_Certifications";
|
|
add_additional_certificates(additionalCertificateData);
|
|
<?php } ?>
|
|
<?php }else{ ?>
|
|
add_additional_certificates(null);
|
|
<?php } ?>
|
|
<?php if($school_certificate_count>0){ ?>
|
|
<?php for($i=0;$i<$school_certificate_count;$i++){?>
|
|
var education_documents = {};
|
|
education_documents['school'] = "<?php if (!empty($educationBackground[$i]->school)) echo $educationBackground[$i]->school; ?>";
|
|
education_documents['location_school'] = "<?php if (!empty($educationBackground[$i]->location_school)) echo $educationBackground[$i]->location_school; ?>";
|
|
education_documents['edu_years'] = "<?php if (!empty($educationBackground[$i]->edu_years)) echo $educationBackground[$i]->edu_years; ?>";
|
|
education_documents['certificate_date'] = "<?php if (!empty($educationBackground[$i]->certificate_date))
|
|
$time=strtotime($educationBackground[$i]->certificate_date);
|
|
$month=date("m",$time);
|
|
$year=date("Y",$time);
|
|
echo $year.'-'.$month; ?>";
|
|
education_documents['major_subject'] = "<?php if (!empty($educationBackground[$i]->major_subject)) echo $educationBackground[$i]->major_subject; ?>";
|
|
|
|
add_education_documents(education_documents);
|
|
<?php } ?>
|
|
<?php }else{ ?>
|
|
add_education_documents(null);
|
|
<?php } ?>
|
|
|
|
<?php if($licenseDataCount>0){ ?>
|
|
<?php for($i=0;$i<$licenseDataCount;$i++){?>
|
|
var licenses = {};
|
|
licenses['license_no'] = "<?php if (!empty($licenseData[$i]->license_no)) echo $licenseData[$i]->license_no; ?>";
|
|
licenses['rn_lic_state'] = "<?php if (!empty($licenseData[$i]->state)) echo $licenseData[$i]->state; ?>";
|
|
licenses['license_exp_date'] = "<?php if (!empty($licenseData[$i]->license_exp_date)) echo $licenseData[$i]->license_exp_date; ?>";
|
|
licenses['licenseid'] = "<?php if (!empty($licenseData[$i]->id)) echo $licenseData[$i]->id; ?>";
|
|
|
|
add_license_documents(licenses);
|
|
<?php } ?>
|
|
<?php }else{ ?>
|
|
add_license_documents(null);
|
|
<?php } ?>
|
|
|
|
$("form[use=docSaveForm]").on("submit",function(e){
|
|
// alert('test');
|
|
e.preventDefault();
|
|
var frm = this;
|
|
setTimeout( function(){
|
|
var proceed = true;
|
|
$.each($(frm).find(".help-block,.with-errors"),function(){
|
|
//console.log((this));
|
|
if($(this).find('.list-unstyled').length>0){
|
|
//console.log('>>>>>>>>>>');
|
|
proceed = false;
|
|
return false;
|
|
}
|
|
});
|
|
$.each($(frm).find("input[type=file]"),function(){
|
|
var fileObj = $(this).prop('files')[0];
|
|
if(fileObj){
|
|
var fileName = fileObj.name;
|
|
var ext = fileName.split(".").pop();
|
|
var allowedTypes = $(this).attr("allowedType");
|
|
// alert(allowedTypes.indexOf(ext));
|
|
if(allowedTypes.indexOf(ext)<0){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Invalid File type.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
proceed = false;
|
|
return;
|
|
}else{
|
|
proceed = true;
|
|
}
|
|
}
|
|
});
|
|
// alert(fileObj);
|
|
// alert(proceed);
|
|
|
|
if(proceed==true){
|
|
var formObj = $(frm);
|
|
//alert("trying to submit");
|
|
var from_data=new FormData(frm);
|
|
console.log(formObj);
|
|
$.ajax({
|
|
url: $(frm).attr("action"),
|
|
type : 'POST',
|
|
data : from_data,
|
|
dataType: "json",
|
|
contentType: false,
|
|
cache: false,
|
|
processData:false,
|
|
beforeSend : function(){
|
|
$(frm).find('button').prop('disabled', true);
|
|
$(frm).find('button').html("Uploading . . .");
|
|
$(frm).find("div.save-only").children().html("Saving . . .");
|
|
$("#err").fadeOut();
|
|
},
|
|
success : function(data){
|
|
console.log(data);
|
|
$(frm).find('button').html("Upload");
|
|
$(frm).find('.savve').html("Save");
|
|
$(frm).find('button').prop('disabled', false);
|
|
if(data.upload=='success'){
|
|
console.log("hii");
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: data.msg,
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
openTab();
|
|
$(formObj).find("span[use=uploadContainer]").empty();
|
|
file ="<?php echo base_url(); ?>"+data.file_url;
|
|
|
|
var insert = '<a class="img-icon dwnload" data-docType="'+data.documents_type+'" data-userid="'+data.userid+'">'
|
|
/*'<a class="img-icon dwnload" target="_blank" href="'+file+'">'*/
|
|
+'<i class="far fa-arrow-alt-circle-down" style="font-size:24px"></i>'
|
|
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 75px;">'
|
|
+'</a>';
|
|
$(formObj).find("span[use=uploadContainer]").append(insert);
|
|
$(formObj).find("span[use=pending-msg]").html("unverified");
|
|
$(formObj).find("span[use=pending-msg]").parent().siblings("div.save-only").children().html("Saved");
|
|
$(frm).find("div.save-only").children().html("Saved");
|
|
var base_url=$(".base-url").val();
|
|
var file_link=base_url+data.file_url;
|
|
$(frm).find("a.file-link-after-uploaded").removeAttr("href").attr("href",file_link);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: data.msg,
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
}
|
|
},
|
|
error : function(err){
|
|
alert("error");
|
|
}
|
|
|
|
});
|
|
}
|
|
}, 1000);
|
|
});
|
|
|
|
});
|
|
function submit_upload_form(e,formObject){
|
|
e.preventDefault();
|
|
var formObj = $(formObject);
|
|
var from_data=new FormData(formObject);
|
|
$.ajax({
|
|
url: $(formObject).attr("action"),
|
|
type : 'POST',
|
|
data : from_data,
|
|
dataType: "json",
|
|
contentType: false,
|
|
cache: false,
|
|
processData:false,
|
|
beforeSend : function(){
|
|
console.log($(formObject).attr("action"));
|
|
//$("#preview").fadeOut();
|
|
$("#err").fadeOut();
|
|
},
|
|
success : function(data){
|
|
console.log(data);
|
|
if(data.upload=='success'){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: data.msg,
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
|
|
$(formObj).find("span[use=uploadContainer]").empty();
|
|
file ="<?php echo base_url(); ?>"+data.file_url;
|
|
var insert = '<a class="img-icon dwnload" data-docType="'+data.documents_type+'" data-userid="'+data.userid+'">'
|
|
+'<i class="far fa-arrow-alt-circle-down" style="font-size:24px"></i>'
|
|
|
|
+'</a>';
|
|
$(formObj).find("span[use=uploadContainer]").append(insert);
|
|
}
|
|
},
|
|
error : function(err){
|
|
alert("error2");
|
|
}
|
|
|
|
});
|
|
}
|
|
function isNumberKey(evt) {
|
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
|
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
|
return false;
|
|
return true;
|
|
}
|
|
$("#caregiverBasicForm").submit(function(e){
|
|
var proceed = true;
|
|
$.each($("input[type=email]"),function(){
|
|
//alert('1');
|
|
var email = $.trim($(this).val());
|
|
if(email!='')
|
|
{
|
|
//alert('2');
|
|
var reg =/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
|
if (reg.test(email)==false)
|
|
{
|
|
//alert('3');
|
|
var parent = $(this).parent().closest("div.form-group");
|
|
// console.log(parent);
|
|
$(parent).addClass('has-error').addClass('has-danger');
|
|
$(parent).find('div.help-block').append('<ul class="list-unstyled"><li>Please enter a valid email.</li></ul>');
|
|
//$(parent).show();
|
|
proceed = false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
if(!proceed)
|
|
{
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
function isEmpty(obj) {
|
|
for(var key in obj) {
|
|
if(obj.hasOwnProperty(key))
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
function getSkill(skillId){
|
|
getExperienceDetails();
|
|
}
|
|
|
|
function check_parmanent_address(){
|
|
|
|
var address1=$('#address1').val();
|
|
var zipcode1=$('#zipcode1').val();
|
|
if(address1!="" && zipcode1!=""){
|
|
$.ajax({
|
|
url:"<?php echo base_url(); ?>caregivers/checkaddress",
|
|
type:"GET",
|
|
data:{address:address1,zipcode:zipcode1},
|
|
dataType: "json",
|
|
beforeSend: function() {
|
|
$("#check_parmanent_address_btn").hide();
|
|
$("#check_parmanent_address_loader").show();
|
|
$("#basic_submit_btn").prop("disabled", true);
|
|
},
|
|
success:function(data){
|
|
$("#basic_submit_btn").removeAttr('disabled');
|
|
if(data.status_code=="200"){
|
|
$('#state1').val(data.state);
|
|
$('#county1').val(data.county);
|
|
$('#city1').val(data.city);
|
|
$('#lang1').val(data.lat);
|
|
$('#long1').val(data.long);
|
|
$('#contact_info_submit').prop('disabled',false);
|
|
$('#check_p_address').val('checked');
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'address not found.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
$('#contact_info_submit').prop('disabled',true);
|
|
}
|
|
$("#check_parmanent_address_btn").show();
|
|
$("#check_parmanent_address_loader").hide();
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Enter street address and zipcode.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('Enter street address and zipcode.');
|
|
}
|
|
}
|
|
function check_alternative_address(){
|
|
var address=$('#address2').val();
|
|
var zipcode=$('#zipcode2').val();
|
|
if(address!="" && zipcode!=""){
|
|
$.ajax({
|
|
url:"<?php echo base_url(); ?>caregivers/checkaddress",
|
|
type:"GET",
|
|
data:{address:address,zipcode:zipcode},
|
|
dataType: "json",
|
|
beforeSend: function() {
|
|
$("#check_alternative_address_btn").hide();
|
|
$("#check_alternative_address_loader").show();
|
|
$("#basic_submit_btn").prop("disabled", true);
|
|
},
|
|
success:function(data){
|
|
//console.log(data);
|
|
$("#basic_submit_btn").removeAttr('disabled');
|
|
if(data.status_code=="200"){
|
|
$('#state2').val(data.state);
|
|
$('#county2').val(data.county);
|
|
$('#city2').val(data.city);
|
|
$('#lang2').val(data.lat);
|
|
$('#long2').val(data.long);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'address not found.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('address not found.');
|
|
}
|
|
$("#check_alternative_address_btn").show();
|
|
$("#check_alternative_address_loader").hide();
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Enter street address and zipcode.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('Enter street address and zipcode.');
|
|
}
|
|
}
|
|
function check_emergency_address_loader(){
|
|
//alert();
|
|
var address=$('#Emergency_Contact_Address').val();
|
|
var zipcode=$('#Emergency_Contact_zipcode').val();
|
|
if(address!="" && zipcode!=""){
|
|
$.ajax({
|
|
url:"<?php echo base_url(); ?>caregivers/checkaddress",
|
|
type:"GET",
|
|
data:{address:address,zipcode:zipcode},
|
|
dataType: "json",
|
|
beforeSend: function() {
|
|
$("#check_emg_address_btn").hide();
|
|
$("#check_emg_address_loader").show();
|
|
},
|
|
success:function(data){
|
|
|
|
if(data.status_code=="200"){
|
|
$('#Emergency_Contact_State').val(data.state);
|
|
$('#Emergency_Contact_County').val(data.county);
|
|
$('#Emergency_Contact_City').val(data.city);
|
|
$('#Emergency_Contact_Lang').val(data.lat);
|
|
$('#Emergency_Contact_Long').val(data.long);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'address not found.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('address not found.');
|
|
}
|
|
$("#check_emg_address_btn").show();
|
|
$("#check_emg_address_loader").hide();
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Enter street address and zipcode.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('Enter street address and zipcode.');
|
|
}
|
|
}
|
|
function check_emergency_address_loader1(){
|
|
//alert();
|
|
var address=$('#Emergency_Contact_Address1').val();
|
|
var zipcode=$('#Emergency_Contact_zipcode1').val();
|
|
if(address!="" && zipcode!=""){
|
|
$.ajax({
|
|
url:"<?php echo base_url(); ?>caregivers/checkaddress",
|
|
type:"GET",
|
|
data:{address:address,zipcode:zipcode},
|
|
dataType: "json",
|
|
beforeSend: function() {
|
|
$("#check_emg_address_btn1").hide();
|
|
$("#check_emg_address_loader1").show();
|
|
},
|
|
success:function(data){
|
|
//console.log(data);
|
|
if(data.status_code=="200"){
|
|
$('#Emergency_Contact_State1').val(data.state);
|
|
$('#Emergency_Contact_County1').val(data.county);
|
|
$('#Emergency_Contact_City1').val(data.city);
|
|
$('#Emergency_Contact_Lang1').val(data.lat);
|
|
$('#Emergency_Contact_Long2').val(data.long);
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'address not found.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('address not found.');
|
|
}
|
|
$("#check_emg_address_btn1").show();
|
|
$("#check_emg_address_loader1").hide();
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Enter street address and zipcode.',
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
//alert('Enter street address and zipcode.');
|
|
}
|
|
}
|
|
|
|
function USformatPhoneNumber(phoneNumberString,_this) {
|
|
var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
|
|
if(cleaned.length > 10){
|
|
cleaned = cleaned.substr(0, 10);
|
|
}
|
|
var match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/)
|
|
if (cleaned.length == 10 && match) {
|
|
var intlCode = (match[1] ? '+1 ' : '')
|
|
var fres = [intlCode, '(', match[2], ') ', match[3], '-', match[4]].join('')
|
|
_this.value = fres;
|
|
}else{
|
|
_this.value = cleaned
|
|
}
|
|
return null
|
|
}
|
|
function socialSecurity(phoneNumberString,_this) {
|
|
//var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
|
|
var cleaned =phoneNumberString;
|
|
if(cleaned.length > 11){
|
|
cleaned = cleaned.substr(0, 11);
|
|
}
|
|
var match = cleaned.match(/^(1|)?(\d{3})(\d{2})(\d{4})$/);
|
|
if (cleaned.length == 9 && match) {
|
|
//var fres = [match[2], '-', match[3], '-', match[4]].join('');
|
|
$("#actual_ssn").val([match[2], '-', match[3], '-', match[4]].join(''));
|
|
var fres = ['XXX', '-', 'XX', '-', match[4]].join('');
|
|
_this.value = fres;
|
|
}else{
|
|
_this.value = cleaned
|
|
}
|
|
return null
|
|
}
|
|
function ConfirmSocialSecurity(phoneNumberString,_this) {
|
|
//var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
|
|
var cleaned =phoneNumberString;
|
|
if(cleaned.length > 11){
|
|
cleaned = cleaned.substr(0, 11);
|
|
}
|
|
var match = cleaned.match(/^(1|)?(\d{3})(\d{2})(\d{4})$/);
|
|
if (cleaned.length == 9 && match) {
|
|
//var fres = [match[2], '-', match[3], '-', match[4]].join('');
|
|
var confirm_actual_ssn=[match[2], '-', match[3], '-', match[4]].join('');
|
|
$("#confirm_actual_ssn").val(confirm_actual_ssn);
|
|
var fres = ['XXX', '-', 'XX', '-', match[4]].join('');
|
|
_this.value = fres;
|
|
}else{
|
|
_this.value = cleaned
|
|
}
|
|
return null
|
|
}
|
|
function checkActualSSNandConfirmSSN(){
|
|
var actual_ssn=$("#actual_ssn").val();
|
|
var confirm_actual_ssn=$("#confirm_actual_ssn").val();
|
|
if(actual_ssn!=confirm_actual_ssn){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Confirm Social Security Number Not Matched.',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
$("#confirm_actual_ssn").val('');
|
|
$("#confirm_actual_ssn_field").val('');
|
|
}
|
|
}
|
|
function showHideXRay(){
|
|
var PPD_Quantiferonon_status=$("#PPD_Quantiferonon_status").val();
|
|
$('input[name=CXR]').removeAttr('required');
|
|
if(PPD_Quantiferonon_status=='Negative'){
|
|
$("#chest_X_ray_File").find('div').first().hide();
|
|
$("#chest_X_ray_File_camera").hide();
|
|
}else{
|
|
//$("#chest_X_ray_File").html(html_data);
|
|
$("#chest_X_ray_File").find('div').first().show();
|
|
$("#chest_X_ray_File_camera").show();
|
|
$('input[name=CXR]').attr('required','required');
|
|
}
|
|
}
|
|
function ShowHideAutomobileInfo(){
|
|
var drive_info=$("#drive_info").val();
|
|
if(drive_info=="Yes"){
|
|
$("#automobile_insurance_info").show();
|
|
// $("input[name='Automobile_Policy_Holder_Name']").attr('required','required');
|
|
// $("input[name='Automobile_Policy_Number']").attr('required','required');
|
|
// $("input[name='Automobile_Policy_Expiration_Date']").attr('required','required');
|
|
}else{
|
|
$("#automobile_insurance_info").hide();
|
|
// $("input[name='Automobile_Policy_Holder_Name']").removeAttr('required');
|
|
// $("input[name='Automobile_Policy_Number']").removeAttr('required');
|
|
// $("input[name='Automobile_Policy_Expiration_Date']").removeAttr('required');
|
|
}
|
|
}
|
|
$('.nav-item').click(function(event){
|
|
if ($(this).hasClass('disabled')) {
|
|
return false;
|
|
}else{
|
|
//alert();
|
|
$(".nav-item").removeClass("active");
|
|
$(this).addClass("active");
|
|
}
|
|
});
|
|
|
|
$( window ).on( "load", function() {
|
|
var caregiverView = $('#basicVerificStatus').val();
|
|
if(caregiverView == 'verified'){
|
|
$(".vStatus h3").html("View Caregiver Information");
|
|
$('#more_education_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_education_documents').find("i[use=minusbutt]").hide();
|
|
$('#more_additional_certifications').find("i[use=plusbutt]").hide();
|
|
$('#more_additional_certifications').find("i[use=minusbutt]").hide();
|
|
$('#more_other_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_other_documents').find("i[use=minusbutt]").hide();
|
|
$('#more_license_documents').find("i[use=plusbutt]").hide();
|
|
$('#more_license_documents').find("i[use=minusbutt]").hide();
|
|
$('#empPlus').hide();
|
|
$('#more_reference').find("i[use=plusbutt]").hide();
|
|
$('#more_reference').find("i[use=minusbutt]").hide();
|
|
$('.agreeSubmit_btn').hide();
|
|
|
|
|
|
}
|
|
});
|
|
/*Sticky Tab Header*/
|
|
window.onscroll = function() { stickyTab();};
|
|
var navbar = document.getElementById("myTab");
|
|
// var sticky = navbar.offsetTop;
|
|
|
|
function stickyTab() {
|
|
// console.log('>>>>>>>>>>>>>>>>>>>>>>>>>',window.pageYOffset,sticky);
|
|
if (window.pageYOffset >= 50) {
|
|
navbar.classList.add("sticky")
|
|
} else {
|
|
navbar.classList.remove("sticky");
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
var today=new Date();
|
|
var dd=today.getDate();
|
|
var mm=today.getMonth()+1;
|
|
var yyyy=today.getFullYear();
|
|
if(dd<10){
|
|
dd='0'+dd
|
|
}
|
|
if(mm<10){
|
|
mm='0'+mm
|
|
}
|
|
today = yyyy+'-'+mm+'-'+dd;
|
|
$(".not-past-time").attr("min",today);
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
var today=new Date();
|
|
var dd=today.getDate();
|
|
var mm=today.getMonth()+1;
|
|
var yyyy=today.getFullYear();
|
|
if(dd<10){
|
|
dd='0'+dd
|
|
}
|
|
if(mm<10){
|
|
mm='0'+mm
|
|
}
|
|
today = yyyy+'-'+mm;
|
|
$(".not-future-month").attr("max",today);
|
|
});
|
|
</script>
|
|
|
|
<!-- <script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$("form[use=docSaveFormNpi]").on('submit',function(e){
|
|
e.preventDefault();
|
|
var thi_s=this;
|
|
var form=$(this);
|
|
var url=form.attr('action');
|
|
|
|
var proceed=true;
|
|
$.each($(thi_s).find("input[type=file]"),function(){
|
|
var fileObj=$(this).prop('files')[0];
|
|
if(fileObj){
|
|
var fileName=fileObj.name;
|
|
var ext=fileName.split(".").pop();
|
|
var allowedTypes=$(this).attr("allowedType");
|
|
if(allowedTypes.indexOf(ext)<0){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Invalid File type.',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
proceed=false;
|
|
return;
|
|
}else{
|
|
proceed=true;
|
|
}
|
|
}
|
|
});
|
|
|
|
if(proceed==true){
|
|
var formObj=$(thi_s);
|
|
var from_data=new FormData(thi_s);
|
|
$.ajax({
|
|
type: "POST",
|
|
url: url,
|
|
// data: form.serialize(),
|
|
data: from_data,
|
|
contentType: false,
|
|
cache: false,
|
|
processData:false,
|
|
beforeSend : function(){
|
|
|
|
},
|
|
success: function(data){
|
|
var data=$.parseJSON(data);
|
|
if(data.upload=="success"){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'Updated Successfully',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
}
|
|
if(data.upload=="faild"){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Opps Something Went Wrong ! Try Again',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
</script> -->
|
|
<script>
|
|
function getSecondDropdown(list_type,short_code) {
|
|
var citizen_status = $('#citizenStatus').val();
|
|
// alert(citizen_status);
|
|
if(list_type == 'B'){
|
|
$('.type2div').show();
|
|
$.ajax({
|
|
type: "GET",
|
|
url: "<?=base_url()?>caregivers/getCTypeList",
|
|
data: {list_type:list_type,short_code:short_code,citizen_status:citizen_status,
|
|
'<?php echo $this->security->get_csrf_token_name(); ?>' : '<?php echo $this->security->get_csrf_hash(); ?>'},
|
|
async: false,
|
|
success: function(outputData) {
|
|
var data = JSON.parse(outputData);
|
|
var dropdown1 = '<option value="">Select</option>';
|
|
for(var i=0; i< data.length;i++){
|
|
|
|
var slt ='';
|
|
if(data[i].short_code == '<?php echo $nurse->second_documents_type ;?>'){
|
|
slt = 'selected';
|
|
}
|
|
// console.log(slt);
|
|
var short_code = data[i].short_code;
|
|
dropdown2 = '<option '+slt+' value="'+data[i].short_code+'" data_name="'+data[i].name+'">'+data[i].name+'</option>';
|
|
dropdown1 = dropdown1+dropdown2
|
|
|
|
}
|
|
|
|
console.log(dropdown1);
|
|
$("#second_document_type").html(dropdown1);
|
|
}
|
|
});
|
|
}else{
|
|
$('.type2div').hide();
|
|
$('#second_document_type').val('');
|
|
}
|
|
|
|
};
|
|
</script>
|
|
|
|
<!--main content end-->
|
|
<!--footer start-->
|