2750 lines
130 KiB
PHP
Executable File

<!--sidebar end-->
<?php
// _die($tabstatus);
$documentsarr=array();
$documentsrem=array();
$documentsid=array();
$documentsno=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;
//echo '<pre>'; print_r($document); echo '</pre>';
}
// $traing_doc_count=count($documentsarr[_DOC_TRAININGCODE_]);
// $other_doc_count=count($documentsarr[_DOC_OTHERCODE_]);
// $additional_certificate_count=count($documentsarr[_ADDL_CERTIFICATE_]);
// $educationBackground = json_decode($nurse->educationBackground);
// $school_certificate_count=count($educationBackground);
# modified on 07-19-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
$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;
$get_csrf_token_name = $this->security->get_csrf_token_name();
$get_csrf_token_value = $this->security->get_csrf_hash();
// $docdata['documentsarr']=$documentsarr;
// $docdata['documentsrem'] = $documentsrem;
$docdata['documentsarr']=$documentsarr;
$docdata['documentsrem'] = $documentsrem;
$docdata['documentsid'] = $documentsid;
$docdata['documentsno'] = $documentsno;
foreach($licenses as $data){
$lic[]=$data;
}
$licensevalue= json_encode($lic,true);
$licenseData = json_decode($licensevalue);
if($licenses!=""){$licenseDataCount=count($licenses);}else{$licenseDataCount=0;}
// $licenseDataCount=count($licenses);
// die($licenseeDataCount);
?>
<!--main content start-->
<link href="https://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>common/signature/drawing-table.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<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>
<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: scroll;
}
label.open_close_btn {
color: #1e9ff2;
}
.close_btn{
padding-bottom: 20px;
}
</style>
<style type="text/css">
.check-left-level{
margin-left: 30px;
}
.check-left-input{
margin-left: 10px;
}
.required-field:before {
content: "*";
color: red;
}
.skill-row{}
.skill-row label{ margin-bottom: 0px !important;}
.form-control.multiselect-class{
height: 300px !important;
}
.row.experienceLabel.hide {
display: none;
}
.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;
}
.inline-space{
margin-left: 20px !important;
}
.Exp-heading{
border-bottom: thin solid #babfc7;
}
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;
}
.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%;
}
}
</style>
<?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 } ?>
<?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 } ?>
<input type="hidden" class="base-url" value="<?=base_url()?>">
<div class="app-content content">
<section class="content-wrapper">
<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">
<h3 class="mar_cus">
<?php echo lang('Profile Information'); ?>
</h3>
</header>
</div>
</div>
</div>
<hr class="mt-0 mb-0" />
<div class="col-md-12">
<div class="row">
<?php
//echo '<pre>'; print_r($nurse->submited_for_verification); echo '</pre>';die;
if($nurse->submited_for_verification=='no'){ ?>
<div class="col-md-12 panel-body">
<label class="progres_bar"><?php echo lang('Progress'); ?> (<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 } ?>
</div>
</div>
<?php if($nurse->concent_date==""){ $disable_tab='disabled';} ?>
<div class="col-lg-12">
<?php if (!empty($nurse->caregiver_table_id)){ ?>
<a href="<?php echo base_url(); ?>CaregiversDashboard/ChangePassword" class=" float-right"><?php echo lang('Change Password');?></a>
<?php } ?>
</div>
<!-- page start-->
<div class="row col-md-12">
<div class="panel-body col-md-12"></div>
<div class="col-md-12">
<ul class="nav nav-tabs nav-linetriangle no-hover-bg" id="myTab" role="tablist" style="border: none; margin-bottom: 20px;">
<li class="nav-item <?php if(isset($tab) && $tab === '') {?> active <?php } ?>">
<a class="nav-link <?php if(isset($tab) && $tab === '') {?> active <?php } ?>" id="tab0-tab" data-toggle="tab" href="#tab0" role="tab" aria-selected="true" style=" cursor: pointer;">
<?php if($tabstatus['auth']==0){ ?>
<i class="la la-expeditedssl" style="color: gray;"></i>
<?php }else if($tabstatus['auth']==1){ ?>
<i class="la la-exclamation-circle" style="color: orange;"></i>
<?php }else if($tabstatus['auth']==2){ ?>
<i class="la la-check" style="color: green;"></i>
<?php } ?>
<?php echo lang('Authorization Release'); ?>
</a>
</li>
<?php if($tabstatus['basic']==0){ $disable_tab='disabled';} ?>
<li class="nav-item <?php echo $disable_tab ?><?php if(isset($tab) && $tab === '0') {?> active <?php } ?>">
<a class="nav-link <?php if(isset($tab) && $tab === '0') {?> active <?php } ?>" id="tab1-tab" data-toggle="tab" href="#tab1" role="tab" aria-selected="true" style=" cursor: pointer;"> <?php if($progress->form1 < 15){ ?> <?php } ?>
<?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 } ?>
<?php echo lang('Basic Info'); ?>
</a>
</li>
<?php if($tabstatus['exp']==0){ $disable_tab='disabled';} ?>
<li class="nav-item <?php echo $disable_tab ?> <?php if($tab == 1) {?> active <?php } ?>" >
<a class="nav-link head-tab <?php if($tab == 1) {?> active <?php } ?>" data-toggle="tab" href="#tab2" role="tab" aria-selected="false"> <?php if($progress->form2 < 5){ ?> <?php } ?>
<?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 } ?>
<?php echo lang('Experience & Skills'); ?>
</a>
</li>
<?php if($tabstatus['emp']==0){ $disable_tab='disabled';} ?>
<li class="nav-item <?php echo $disable_tab ?> <?php if($tab == 3) {?> active <?php } ?>" >
<a class="nav-link head-tab <?php if($tab == 3) {?> active <?php } ?>" data-toggle="tab" href="#tab4" role="tab" aria-selected="false"> <?php if($progress->form4 < 5){ ?> <?php } ?>
<?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 } ?>
<?php echo lang('Employment & Education'); ?>
</a>
</li>
<?php if($tabstatus['phy']==0){ $disable_tab='disabled';} ?>
<li class="nav-item <?php echo $disable_tab ?> <?php if($tab == 4) {?> active <?php } ?>" >
<a class="nav-link head-tab <?php if($tab == 4) {?> active <?php } ?>" data-toggle="tab" href="#tab5" role="tab" aria-selected="false"><?php if($progress->form5 < 10){ ?><?php } ?>
<?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 } ?>
<?php echo lang('Health & Physical Assessment'); ?>
</a>
</li>
<?php if($tabstatus['doc']==0){ $disable_tab='disabled';} ?>
<li class="nav-item nav-doc <?php echo $disable_tab ?> <?php if($tab == 10) {?> active <?php } ?>">
<a id="document_upload_ancore" class="nav-link head-tab <?php if($tab == 10) {?> active <?php } ?>" data-toggle="tab" href="#tab11" role="tab" aria-selected="false"><?php if($progress->form11 < 15){ ?><?php } ?>
<?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 } ?>
<?php echo lang('Documents Upload'); ?>
</a>
</li>
<?php if($tabstatus['dis']==0){ $disable_tab='disabled';} ?>
<li class="nav-item nav-dis <?php echo $disable_tab ?> <?php if ($tab ==11) echo 'active'; ?> first current" >
<a id="disclouser_sign_ancore" 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 echo lang('Disclosures & Signatures'); ?>
</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade <?php if(isset($tab) && $tab === '') {?> active in show <?php } ?>" id="tab0" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<?php $this->view('caregivers/saveAuthorizationRelease'); ?>
</div>
<?php
/*
<div class="tab-pane fade <?php if(isset($tab) && $tab === '') {?> active in show <?php } ?>" id="tab0" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" action="<?php echo base_url(); ?>CaregiversDashboard/ProfileUpdate" onsubmit="return validateForm1(),sigVal()" id="caregiverBasicForm" 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="0">
<input type="hidden" name="id" id="caregiver_id" value="<?php if (!empty($nurse->id)) echo $nurse->id; ?>">
<div class="row">
<div class="col-md-12 text-center"><h3 style="margin-bottom: 20px;"><?php echo lang('Authorization Release Form'); ?></h3></div>
<p><?php echo lang('Employee\'s Name'); ?> :<strong><?= $nurse->fname." ".$nurse->mid_name." ".$nurse->lname ?></strong><br></p>
<p><?php echo lang('I hereby consent to the release of any of the following information that may need to be obtained or verified in the course of my employment with'); ?> <strong>WECURO, INC</strong></p>
<ul>
<li><?php echo lang('Personal records'); ?></li>
<li><?php echo lang('Employment records'); ?></li>
<li><?php echo lang('Medical record including, PPD testing, Rubella and Rubeolla titers and vaccinations'); ?>,
<?php echo lang('physical exams'); ?>, <?php echo lang('chest x-rays'); ?>,
<?php echo lang('drug screening and other medical conditions that may impair my ability to function in my designated job'); ?>.</li>
<li><?php echo lang('Criminal background check'); ?>/ <?php echo lang('records'); ?>/ <?php echo lang('finger printing'); ?>.</li>
</ul>
<p style="width: 100%">
<?php echo lang('I authorize WECURO, INC to contact any doctor, prior employers, etc; to obtain and examine this information and that is to be used for EMPLOYMENT RELATED PURPOSES ONLY'); ?>
</p>
<p style="width: 100%">
<?php echo lang('WECURO, INC may obtain information directly from the providers by fax, e-mail, telephone, or e-mail'); ?>.
</p>
<p style="width: 100%">
<?php echo lang('A copy of this signed formed shall be deemed to be as valid as the original'); ?>.
</p>
<p style="width: 100%">
<?php echo lang('I hereby release WECURO, INC from all legal responsibility or liability that may arise from compliance with this consent and request contained herein'); ?>
</p>
<p style="width: 100%">
<?php echo lang('I understand that any information obtained in the use of this authorization may be used to evaluate my suitability for employment and/or continued employment'); ?>.
</p>
<p style="width: 100%">
My signature confirms that I have read and understand all of the above.
</p>
</div>
<div class="row">
<input type="hidden" name="concent_signature" id="signature_field" value="">
<div class="col-lg-6 form-group">
<label>Signature</label>
<?php if($nurse->concent_date!=""){ ?>
<img class="form-control" width="200" height="200" src="<?php echo $nurse->concent_signature; ?>" />
<!-- <label>Approved By : <?php echo $md_order_data_object->submitted_by; ?> On : <?php echo $md_order_data_object->submitted_on; ?></label> -->
<?php }else{ ?>
<label class="pull-right"><span style="cursor: pointer" onclick="clearCanvass()" class="badge badge-info">Erase</span></label>
<canvas class="form-control" id="signature" width="400" height="200" ></canvas>
<!-- <label>Entered By : <?php echo $md_order_data_object->submitted_by; ?> On : <?php echo $md_order_data_object->submitted_on; ?></label> -->
<?php } ?>
</div>
<div class="col-lg-6 form-group">
<label>Date</label>
<?php if($nurse->concent_date!=""){ ?>
<label></label>
<?php echo $nurse->concent_date; ?>
<?php } else{ ?>
<?php $now_time=date('Y-m-d'); ?>
<input type="datetime" class="form-control" name="concent_date" value="<?php echo date('Y-m-d'); ?> <?php echo date('H:i'); ?>" required>
<?php } ?>
</div>
</div>
<center>
<div class="row" >
<div class="form-group col-md-12" style="padding: 20px;">
<button type="submit" name="submit" class="btn btn-info "><?php echo lang('Start Application'); ?></button>
</div>
</div>
</center>
</form>
</div>
*/
?>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh" crossorigin="anonymous"></script>
<script src="<?php echo base_url(); ?>common/signature/drawing-table.js" type="text/javascript"></script>
<script type="text/javascript">
function sigVal()
{
// return false
if(isCanvasBlank(document.getElementById('signature')))
{
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please sign the agreement.',
showConfirmButton: false,
timer: 1500
});
return false;
}
else
{
return true;
}
}
function isCanvasBlank(canvas) {
const context = canvas.getContext('2d');
const pixelBuffer = new Uint32Array(
context.getImageData(0, 0, canvas.width, canvas.height).data.buffer
);
return !pixelBuffer.some(color => color !== 0);
}
</script>
<script>
try {
fetch(new Request("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", { method: 'HEAD', mode: 'no-cors' })).then(function(response) {
return true;
}).catch(function(e) {
var carbonScript = document.createElement("script");
carbonScript.src = "//cdn.carbonads.com/carbon.js?serve=CK7DKKQU&placement=wwwjqueryscriptnet";
carbonScript.id = "_carbonads_js";
document.getElementById("carbon-block").appendChild(carbonScript);
});
} catch (error) {
console.log(error);
}
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
function validateForm1(){
//return false;
var canvas = document.getElementById('signature');
if(canvas){
var signature=canvas.toDataURL("image/png");
$("#signature_field").val(signature);
}
}
/**-- done by Moli--*/
function clearCanvass()
{
// alert("hh");
var c = document.getElementById("signature");
var ctx = c.getContext("2d");
ctx.fillStyle = "red";
ctx.clearRect(0, 0, 400, 200);
}
</script>
<div class="tab-pane fade <?php if(isset($tab) && $tab === '0') {?> 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('caregivers/saveCaregiverBasicTab'); ?>
</div>
<div class="tab-pane 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('caregivers/saveCaregiverExpTab'); ?>
</div>
<div class="tab-pane 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('caregivers/saveCaregiverEmpEduTab'); ?>
</div>
<div class="tab-pane 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('caregivers/saveCaregiverPhyTab'); ?>
</div>
<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('caregivers/saveCaregiverDocTab',$docdata); ?>
</div>
<div class="tab-pane fade <?php if($tab == 11 && $progressData>=100) {?> active in show <?php } ?>" id="tab12" role="tabpanel" aria-labelledby="" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<div class="Complete-Submit">
<?php $this->view('caregivers/saveCaregiverDisClose',$data); ?>
</div>
<div class="submit-due">
<span class="text-danger">Summery</span>
<div class="row">
<?php
//echo $nurse->from_tab_status_pctg;
$per_status=json_decode($nurse->from_tab_status_pctg);
//pre($per_status);
?>
<ul>
<li>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>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>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>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>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>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>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>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>Resume: <span class="text-success RSM-UP" style="display:none;">Submitted</span><span class="text-danger RSM-DOWN" style="display:none;">Pending</span></li>
<!-- <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>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>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>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>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>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>
</div>
</div>
<!-- </div> -->
</div>
<!-- page end-->
</div>
</div>
</div>
</section>
</div>
<?php $this->view('caregivers/saveCaregiverModalOther'); ?>
<?php
/*
<div use="educationUploadFormContainer" style="display: none;">
<div class="row" use="educationPart">
<div class="form-group col-md-4">
<label class="required-field"><?php echo lang('School Name'); ?></label>
<select class="form-control" name="school[]" mname="school" required>
<?php foreach ($school_list as $school ) { ?>
<option value="<?php echo $school->name; ?>"><?php echo $school->name; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Location of school'); ?></label>
<input type="text" class="form-control" name="location_school[]" mname="location_school" required>
</div>
<div class="form-group col-md-1">
<label class="required-field"><?php echo lang('Years'); ?></label>
<select class="form-control" name="edu_years[]" mname="edu_years" required>
<?php
$now_year=date('Y');
for($i=1800;$i<=$now_year;$i++){
?>
<option value="<?php echo $i;?>"><?php echo $i;?></option>
<?php } ?>
</select>
<!-- <input type="text" class="form-control onlyNumber" minlength="4" maxlength="4" onkeypress="return isNumberKey(event)" onkeyup ="isFutureDate(this.value)" name="edu_years[]" mname="edu_years" required> -->
<div class="yearError"></div>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Certificate Date'); ?></label>
<input type="date" class="form-control" name="certificate_date[]" mname="certificate_date" onkeyup ="isFutureDate(this.value)" required>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Major Subject'); ?></label>
<input type="text" class="form-control" name="major_subject[]" mname="major_subject" required>
</div>
<div class="form-group col-md-1 pd-25 plus_sec">
<!-- <img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="less_education_documents(this,'<?php echo $documentsid[_DOC_TRAININGCODE_][0]; ?>');" class="img-thumbnail" style="height: 60px; cursor: pointer;"> -->
<i class="la la-minus-circle" aria-hidden="true" use="minusbutt" onclick="less_education_documents(this,'<?php echo $documentsid[_DOC_TRAININGCODE_][0]; ?>');"></i>
<!-- <img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="add_education_documents(null);" class="img-thumbnail" style="height: 50px; cursor: pointer;"> -->
<i class="la la-plus-circle" aria-hidden="true" use="plusbutt" onclick="add_education_documents(null);"></i>
</div>
</div>
</div>
<div use="trainingUploadFormContainer" style="display: none;">
<form action="<?php echo base_url(); ?>CaregiversDashboard/documentsSave" method="post" enctype="multipart/form-data" use="trainingUploadForm">
<input type="hidden" name="<?php echo $get_csrf_token_name; ?>" value="<?php echo $get_csrf_token_value ?>" />
<div class="row">
<input type="hidden" name="Ion_id" id="caregiver_ion_id" value="<?php if (!empty($nurse->ion_user_id)) echo $nurse->ion_user_id; ?>">
<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="doc_type" value="<?php echo _DOC_TRAININGCODE_ ; ?>">
<input type="hidden" name="doc_id" value="">
<input type="hidden" name="progress" value="10">
<div class="form-group col-md-5">
<label class="required-field"><?php echo lang('Aditional Certificates (gif/jpg/png/jpeg/pdf)'); ?></label>
<input type="file" class="form-control" name="TRN" required>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Name Additional Certifications'); ?></label>
<input type="text" class="form-control" name="TRN_remarks" required>
</div>
<div class="form-group col-md-2">
<label class="required-field"><?php echo lang('Additional Certifications Number'); ?></label>
<input type="text" class="form-control" name="TRN_documents_no" required>
</div>
<div class="form-group col-md-1">
<button class="btn btn-primary file-upload" name="upload" type="submit"> Upload</button>
</div>
<div class="form-group col-md-1">
<span use="uploadContainer"></span>
</div>
<div class="form-group col-md-1">
<img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="less_training_documents(this,'<?php echo $documentsid[_DOC_TRAININGCODE_][0]; ?>');" class="img-thumbnail" style="height: 60px; cursor: pointer;">
<img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="add_training_documents(null);" class="img-thumbnail" style="height: 50px; cursor: pointer;">
</div>
</div>
</form>
</div>
<div use="otherUploadFormContainer" style="display: none;">
<form action="<?php echo base_url(); ?>CaregiversDashboard/documentsSave" method="post" enctype="multipart/form-data" use="otherUploadForm">
<input type="hidden" name="<?php echo $get_csrf_token_name; ?>" value="<?php echo $get_csrf_token_value ?>" />
<div class="row">
<input type="hidden" name="Ion_id" id="caregiver_ion_id" value="<?php if (!empty($nurse->ion_user_id)) echo $nurse->ion_user_id; ?>">
<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="doc_type" value="<?php echo _DOC_OTHERCODE_ ; ?>">
<input type="hidden" name="doc_id" value="">
<input type="hidden" name="progress" value="10">
<div class="form-group col-md-4">
<label class="required-field"><?php echo lang('Other Documents (gif/jpg/png/jpeg/pdf)'); ?></label>
<input type="file" class="form-control" name="<?php echo _DOC_OTHERCODE_ ; ?>" required>
</div>
<div class="form-group col-md-5">
<label class="required-field"><?php echo lang('Document Name'); ?></label>
<input type="text" class="form-control" name="<?php echo _DOC_OTHERCODE_ ; ?>_remarks" required>
</div>
<div class="form-group col-md-1 mt-2">
<button class="btn btn-primary file-upload" name="upload" type="submit"> Upload</button>
</div>
<div class="form-group col-md-1">
<span use="uploadContainer"></span>
</div>
<div class="form-group col-md-1 pd-25 plus_sec">
<i class="la la-minus-circle" aria-hidden="true" use="minusbutt" onclick="less_other_documents(this,'<?php echo $documentsid[_DOC_OTHERCODE_][0]; ?>');"></i>
<i class="la la-plus-circle" aria-hidden="true" use="plusbutt" onclick="add_other_documents(null);"></i>
<!-- <img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="less_other_documents(this,'<?php echo $documentsid[_DOC_OTHERCODE_][0]; ?>');" class="img-thumbnail" style="height: 60px; cursor: pointer;">
<img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="add_other_documents(null);" class="img-thumbnail" style="height: 50px; cursor: pointer;"> -->
</div>
</div>
</form>
</div>
<div use="moreAdditionalCertificateFormContainer" style="display:none;">
<form role="form" action="<?php echo base_url(); ?>CaregiversDashboard/profileOtherInfo" method="post" enctype="multipart/form-data" use="docUploadForm">
<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->caregiver_table_id)) echo $nurse->caregiver_table_id; ?>">
<input type="hidden" name="Ion_id" id="caregiver_ion_id" value="<?php if (!empty($nurse->ion_user_id)) echo $nurse->ion_user_id; ?>" >
<input type="hidden" name="form_status" value="5">
<input type="hidden" name="progress" value="0">
<input type="hidden" name="data_type" value="Additional_Certifications">
<input type="hidden" name="form_mode" value="Add">
<input type="hidden" name="doc_type" value="<?php echo _ADDL_CERTIFICATE_ ; ?>">
<input type="hidden" name="doc_id" value="">
<div class="row">
<div class="form-group col-md-3">
<label ><?php echo lang('Licenses or Certification'); ?></label>
<select class="form-control" name="Name_Additional_Certifications" required>
<option value="RN Licenses">RN Licenses</option>
<option value="LPN Licenses">LPN Licenses</option>
<option value="IV Certification">IV Certification</option>
<option value="HHA/PCA Certificate">HHA/PCA Certificate</option>
</select>
</div>
<div class="form-group col-md-3">
<label ><?php echo lang('Licenses or Certification Number'); ?></label>
<input type="text" class="form-control" name="Additional_Certifications_Number" required>
</div>
<div class="form-group col-md-3 ">
<label ><?php echo lang('Certifications Document'); ?></label>
<input type="file" class="form-control" name="<?php echo _ADDL_CERTIFICATE_ ; ?>" required>
</div>
<div class="col-md-1 mt-2">
<button type="submit" name="submit" class="btn btn-info "><?php echo lang('Update'); ?></button>
</div>
<div class="form-group col-md-1">
<span use="uploadContainer"></span>
</div>
<div class="form-group col-md-1 pd-25 plus_sec">
<i class="la la-minus-circle" aria-hidden="true" use="minusbutt" onclick="less_additional_certificates(this,'<?php echo $documentsid[_ADDL_CERTIFICATE_][0]; ?>');"></i>
<i class="la la-plus-circle" aria-hidden="true" use="plusbutt" onclick="add_additional_certificates(null);"></i>
<!-- <img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="less_additional_certificates(this,'<?php echo $documentsid[_ADDL_CERTIFICATE_][0]; ?>');" class="img-thumbnail" style="height: 60px; cursor: pointer;">
<img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="add_additional_certificates(null);" class="img-thumbnail" style="height: 50px; cursor: pointer;"> -->
</div>
</div>
</form>
</div>
*/
?>
<?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>
$('#listOfService').select2();
$('#primary_langualge').select2();
$('#boros').select2();
$('#availability').select2();
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);
}
}
$( 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");
if (target_val == open_value)
{
$("#"+change_required_to).show();
}
else
{
$("#"+change_required_to).hide();
}
checkBasicCheckList();
});
$('.criminal_convictions').click(function(){
var inputValue = $(this).attr("value");
if(inputValue == true)
{
$("#criminal_convictions_details").show();
}
else{
$("#criminal_convictions_details").hide();
}
checkBasicCheckList();
});
//$("#injuryDetails").hide();
$('.injury').click(function(){
var inputValue = $(this).attr("value");
if(inputValue == true)
{
$("#injuryDetails").show();
}
else{
$("#injuryDetails").hide();
}
checkBasicCheckList();
});
//$("#physicaldefectsDetails").hide();
$('.physicaldefects').click(function(){
var inputValue = $(this).attr("value");
if(inputValue == true)
{
$("#physicaldefectsDetails").show();
}
else{
$("#physicaldefectsDetails").hide();
}
checkBasicCheckList();
});
//$("#hearingdefectsDetails").hide();
$('.hearingdefects').click(function(){
var inputValue = $(this).attr("value");
if(inputValue == true)
{
$("#hearingdefectsDetails").show();
}
else{
$("#hearingdefectsDetails").hide();
}
checkBasicCheckList();
});
//$("#visiondefectsDetails").hide();
$('.visiondefects').click(function(){
var inputValue = $(this).attr("value");
if(inputValue == true)
{
$("#visiondefectsDetails").show();
}
else{
$("#visiondefectsDetails").hide();
}
checkBasicCheckList();
});
//$("#speechdefectsDetails").hide();
$('.speechdefects').click(function(){
var inputValue = $(this).attr("value");
if(inputValue == true)
{
$("#speechdefectsDetails").show();
}
else{
$("#speechdefectsDetails").hide();
}
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);
}
}
// $("#same_emergency").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'){
// $("#address2").val(address1);
// $("#state2").val(state1);
// $("#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);
// }
// }
// });
// $("#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);
// }
// }
// });
// $("#same_emergency1").click(function(){
// if($(this).is(":checked")){
// //alert("kkkk");
// 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);
// }
// }
// });
$("#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("");
}
});
$("#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);
});
$('#years_of_exp').on('change', function() {
var value = $(this).val();
if(value > 0){
$(".experienceLabel").removeClass("hide");
}else{
$(".experienceLabel").addClass("hide");
}
});
// function socialSecurity(phoneNumberString,_this) {
// var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
// if(cleaned.length > 9){
// cleaned = cleaned.substr(0, 9);
// }
// 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('');
// _this.value = fres;
// }else{
// _this.value = cleaned
// }
// return null
// }
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(); ?>CaregiversDashboard/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 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();
}
}
return true;
}
$( document ).ready(function() {
$('#agreeSubmit').attr("disabled", true);
$('#agree').click(function(){
//If the checkbox is checked.
if($(this).is(':checked')){
//Enable the submit button.
$('#agreeSubmit').attr("disabled", false);
} else{
//If it is not checked, disable the button.
$('#agreeSubmit').attr("disabled", true);
}
});
});
function add_additional_certificates(data){
var appenddata = $("div[use=moreAdditionalCertificateFormContainer]").find("form[use=docUploadForm]").clone();
//console.log(appenddata);
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 class="img-icon" 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_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){
//alert();
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 class="img-icon" 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 class="img-icon" 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_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 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 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(){
$.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>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+'%;');
if(progress==100){
$('div[use=progressbardiv]').removeClass('col-md-12').addClass('col-md-10');
$('div[use=send_to_approval_div]').show();
}
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 ) {
$('.MIC-UP').show();
$('.MIC-DOWN').hide();
}else{
$('.MIC-UP').hide();
$('.MIC-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();
}
}
$( document ).ready(function() {
//loadProgress Bar
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['Ion_id'] = "<?php if (!empty($nurse->ion_user_id)) echo $nurse->ion_user_id; ?>";
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'] = "<?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 } ?>
// $('.nav-item').click(function(event){
// if ($(this).hasClass('disabled')) {
// return false;
// }
// });
$("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];
//console.log(fileObj);
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: 3500
});
proceed = false;
return;
}
}
});
if(proceed==true)
{
var formObj = $(frm);
//alert("trying to submit");
var from_data=new FormData(frm);
$.ajax({
url: $(frm).attr("action"),
type : 'POST',
data : from_data,
dataType: "json",
contentType: false,
cache: false,
processData:false,
beforeSend : function(){
//$("#preview").fadeOut();
$(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('button').prop('disabled', false);
if(data.upload=='success'){
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;
//console.log(file);
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>'
//+'<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();
//console.log('>>>>>>>>>>');
var formObj = $(formObject);
//alert("trying to submit");
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(){
//$("#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>'
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 75px;">'
+'</a>';
$(formObj).find("span[use=uploadContainer]").append(insert);
}
},
error : function(err){
alert("error");
}
});
}
</script>
<script>
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();
}
});
</script>
<script type="text/javascript">
// $('.socialSec').keyup(function() {
// var cleaned = ('' + $(this).val()).replace(/\D/g, '');
// var match = cleaned.match(/^(1|)?(\d{3})(\d{2})(\d{4})$/);
// if (match) {
// var fres = [match[2], '-', match[3], '-', match[4]].join('');
// console.log(fres);
// $(this).val(fres);
// }
// });
</script>
<script>
function getSkill(skillId){
if(skillId == 4){
$(".rnExp").show();
$(".lpnExp").hide();
$(".pcaExp").hide();
$(".hhaExp").hide();
}
if(skillId == 5){
$(".lpnExp").show();
$(".rnExp").hide();
}
$.ajax({
url:"CaregiversDashboard/getServices",
type:"GET",
data:{skillId:skillId},
dataType: "html",
success:function(data){
$("#services").html(data);
// console.log(data);
}
});
}
function check_parmanent_address(){
var address1=$('#address1').val();
var zipcode1=$('#zipcode1').val();
if(address1!="" && zipcode1!=""){
$.ajax({
url:"<?php echo base_url(); ?>CaregiversDashboard/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(); ?>CaregiversDashboard/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_loader1(){
//alert();
var address=$('#Emergency_Contact_Address1').val();
var zipcode=$('#Emergency_Contact_zipcode1').val();
if(address!="" && zipcode!=""){
$.ajax({
url:"<?php echo base_url(); ?>CaregiversDashboard/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.');
}
}
</script>
<script type="text/javascript">
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
}
</script>
<script>
function showHideXRay(){
var PPD_Quantiferonon_status=$("#PPD_Quantiferonon_status").val();
//alert(PPD_Quantiferonon_status);
var html_data='<label for="exampleInputEmail1" class="required-field">Chest X-ray (gif/jpg/png/jpeg/pdf)</label>'
+'<input type="hidden" name="doc_type" value="CXR">'
+'<input type="file" class="form-control" name="CXR" required allowedType="gif|jpg|png|jpeg|pdf">';
if(PPD_Quantiferonon_status=='Negative'){
$("#chest_X_ray_File").empty();
}else{
$("#chest_X_ray_File").html(html_data);
}
}
</script>
<script>
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');
}
}
</script>
<script>
//$( document ).ready(function() {
$('.nav-item').click(function(event){
if ($(this).hasClass('disabled')) {
return false;
}else{
$(".nav-item").removeClass("active");
$(this).addClass("active");
$(".discloser_tab").addClass("active");
}
});
//});
function validateExp(id) {
//alert(id);
if($('#experience_id_'+id).prop('checked')){
$('#exp_label_'+id+'_0').prop('required',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 getExperienceDetails() {
var YearExperience = $('#years_of_exp').val();
var caregiver_type=$("input[name=qualification_type]:checked").val();
var CargiverId=<?php echo $nurse->caregiver_table_id; ?>;
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){
//console.log(data);
$("#experience_details").html(data);
$(".have-exp-label").show();
$(".have-not-exp-label").hide();
}
});
$('.ExpDtl').show();
}else{
$(".experienceLabel").addClass("hide");
$('.ExpDtl').hide();
}
}
$("#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);
});
$( document ).ready(function() {
$('.headCheckBox').click(function() {
if ($(this).is(":checked"))
{
$(event.target).closest('div').find('.chkTxt').show();
}else{
$(event.target).closest('div').find('.chkTxt').hide();
}
})
checkNone();
})
function checkNone(headId){
if($("#NoneExp_"+headId).is(":checked")){
$(".NoneExp_"+headId).hide();
}else{
// var parent_div=$("#NoneExp_"+headId).parent();
// console.log(parent_div);
$(".NoneExp_"+headId).show();
}
}
</script>
<script type="text/javascript">
function showTabIcon()
{
$.ajax({
url:'<?php echo base_url(); ?>CaregiversDashboard/getTabStatus_ajax/<?php echo $nurse->ion_user_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();
}
}
});
}
</script>
<script type="text/javascript">
/*Sticky Tab Header*/
window.onscroll = function() { stickyTab();};
var navbar = document.getElementById("myTab");
function stickyTab() {
if (window.pageYOffset >= 50) {
navbar.classList.add("sticky")
} else {
navbar.classList.remove("sticky");
}
}
</script>
<!-- for canvas drawing signature -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh" crossorigin="anonymous"></script>
<script src="<?php echo base_url(); ?>common/signature/drawing-table-multi.js" type="text/javascript"></script>
<!-- for canvas drawing signature -->
<!-- Document signature -->
<script type="text/javascript">
function signatureVal(id){
if(isCanvasBlanked(document.getElementById('signature_canvas_'+id))){
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please sign the agreement.',
showConfirmButton: false,
timer: 1500
});
return false;
}
else{
ajaxforFinalSubmit();
return true;
}
}
function isCanvasBlanked(canvas) {
const context = canvas.getContext('2d');
const pixelBuffer = new Uint32Array(
context.getImageData(0, 0, canvas.width, canvas.height).data.buffer
);
return !pixelBuffer.some(color => color !== 0);
}
</script>
<script type="text/javascript">
function validateFormSig(id){
if($("#"+id).is(":checked")){
var sig = $("#signature_field_write_"+id).val();
var dateSig = $("#signature_field_date_write_"+id).val();
$("#signature_final_field_"+id).val(sig);
$("#signature_final_date_"+id).val(dateSig);
}
else{
var canvas1 = document.getElementById('signature_canvas_'+id);
if(canvas1){
var signature=canvas1.toDataURL("image/png");
$("#signature_final_field_"+id).val(signature);
var dateSig = $("#signature_field_date_"+id).val();
$("#signature_final_date_"+id).val(dateSig);
}
}
$("#date_signature_container_"+id).hide();
$("#container_next_"+id).show();
}
function clearCanvas(id){
var cnvid = "signature_canvas_"+id;
var c = document.getElementById(cnvid);
var ctx = c.getContext("2d");
ctx.fillStyle = "red";
ctx.clearRect(0, 0, 400, 200);
}
</script>
<!-- Document signature -->
<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>
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()?>CaregiversDashboard/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-->