1364 lines
66 KiB
PHP
Executable File
1364 lines
66 KiB
PHP
Executable File
<?php
|
|
$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>';
|
|
//Moli
|
|
$date_completed[$document->documents_type][]=$document->date_completed;
|
|
$doc_expire[$document->documents_type][]=$document->expiration_date;
|
|
|
|
}
|
|
$traing_doc_count=count($documentsarr[_DOC_TRAININGCODE_]);
|
|
$other_doc_count=count($documentsarr[_DOC_OTHERCODE_]);
|
|
$additional_certificate_count=count($documentsarr[_ADDL_CERTIFICATE_]);
|
|
// _die($documentsarr);
|
|
|
|
// verification Status
|
|
|
|
$verification_type=array();
|
|
$verification_status=array();
|
|
$verification_id=array();
|
|
$verification_date=array();
|
|
foreach($verified_tab as $verify)
|
|
{
|
|
$verification_type[$verify->tab_type][]=$verify->tab_type;
|
|
$verification_status[$verify->tab_type][]=$verify->status;
|
|
$verification_id[$verify->tab_type][]=$verify->id;
|
|
$verification_date[$verify->tab_type][]=date("d-m-Y",strtotime($verify->verification_date));
|
|
}
|
|
// _die($verification_date);
|
|
|
|
$verifyAndDocData['verification_type']=$verification_type;
|
|
$verifyAndDocData['verification_status'] = $verification_status;
|
|
$verifyAndDocData['verification_id'] = $verification_id;
|
|
$verifyAndDocData['verification_date'] = $verification_date;
|
|
|
|
$verifyAndDocData['documentsarr']=$documentsarr;
|
|
$verifyAndDocData['documentsrem'] = $documentsrem;
|
|
$verifyAndDocData['documentsid'] = $documentsid;
|
|
$verifyAndDocData['documentsno'] = $documentsno;
|
|
$verifyAndDocData['date_completed'] = $date_completed;
|
|
$verifyAndDocData['doc_expire'] = $doc_expire;
|
|
?>
|
|
<?php $physical_exam_form=json_decode($nurse->physical_exam_form); ?>
|
|
<!--sidebar end-->
|
|
<!--main content start-->
|
|
<style type="text/css">
|
|
.required-field:after {
|
|
content: "*";
|
|
color: red;
|
|
}
|
|
.verification-tab{
|
|
background-color: aliceblue;
|
|
}
|
|
.errmsg{
|
|
color: #e76a6a;
|
|
font-size: 11px;
|
|
}
|
|
</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>
|
|
<?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 } ?>
|
|
|
|
|
|
|
|
<div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card pending_card">
|
|
<div class="card-header card-header-title-part">
|
|
<h3>
|
|
Caregiver Information
|
|
<span class="float-right">
|
|
<!-- <i class="fa fa-pencil" id="basic_card_edit" aria-hidden="true" data-toggle="modal" data-target="#updateBasicModal"></i> -->
|
|
<?php if($verification_status[_VERIFY_CAREGIVER_INFO_][0]==1){?>
|
|
<a class="btn btn-success white" href="javascript:void(0)" title="Verified"><i class="la la-check-square"></i> Verified</a>
|
|
<?php }else{?>
|
|
<a class="btn btn-warning white save_verification_status" title="Verify" cg_id="<?php echo $nurse->id;?>" tab_type="<?php echo _VERIFY_CAREGIVER_INFO_ ;?>"><i class="la la-check-square"></i> Verify</a>
|
|
<?php }?>
|
|
<a class="btn btn-outline-info blue_btn" id="basic_card_edit" title="Edit" aria-hidden="true" data-toggle="modal" data-target="#updateBasicModal"><i class="la la-edit"> </i> Edit</a>
|
|
</span>
|
|
</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<h6 class="">
|
|
<b>Caregiver Id :</b> <span><?php echo $nurse->caregiver_id;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<h6 class="">
|
|
<b>Name :</b> <span><?php echo $nurse->fname;?> <?php echo $nurse->lname; ?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<h6 class="">
|
|
<b>Caregiver Type :</b> <span><?php echo $nurse->skill_name;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<h6 class="">
|
|
<b>Employee Type :</b>
|
|
<span>
|
|
<?php if($nurse->employee_type =='contrator'){echo 'Contractor';}else{echo 'Inhouse';} ;?>
|
|
</span>
|
|
</h6>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>D.O.B :</b> <span><?php echo date("d-m-Y",strtotime($nurse->dob));?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<h6 class="">
|
|
<b>Address :</b> <span><?php echo $nurse->address1;?>, <?php echo $nurse->state1; ?>,<?php echo $nurse->county1;?>, <?php echo $nurse->zipcode1; ?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Photo :</b>
|
|
<span>
|
|
<a class="btn btn-outline-info dwnload" data-docType="<?=_DOC_PHOTOCODE_?>" data-userid="<?=$nurse->id?>">
|
|
<i class="fa fa-download" aria-hidden="true"></i>
|
|
</a>
|
|
</span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Email :</b> <span><?php echo $nurse->email;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Phone Number :</b> <span><?php echo $nurse->phone;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
|
|
<h6 class="">
|
|
<b>Gender :</b> <span><?php echo $nurse->gender;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
|
|
<h6 class="">
|
|
<b>Country of Birth :</b> <span><?php echo $nurse->country_of_birth;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
|
|
<h6 class="">
|
|
<b>Ethnicity :</b> <span><?php echo $nurse->ethnicity;?></span>
|
|
</h6>
|
|
</div>
|
|
<!-- <div class="col-md-3">
|
|
|
|
<h6 class="">
|
|
<b>Referral Source :</b> <span><?php echo $nurse->ref_source;?></span>
|
|
</h6>
|
|
</div> -->
|
|
<div class="col-md-3">
|
|
|
|
<h6 class="">
|
|
<b>Year of Experience :</b> <span><?php echo ($nurse->years_of_exp).' years';?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Hire Date :</b> <span><?php echo (isset($nurse->hire_date) && ($nurse->hire_date!='0000-00-00')) ?date("d-m-Y",strtotime($nurse->hire_date)):'NA'; ?></span>
|
|
</h6>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h6 class="">
|
|
<b>Language (s) :</b> <span><?php echo $nurse->primary_langualge;?></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Hair Color :</b> <span><?php echo $nurse->hair_color;?></span>
|
|
</h6>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Eye color :</b> <span><?php echo $nurse->eye_color;?></span>
|
|
</h6>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Height:</b> <span><?php echo $physical_exam_form->height_feet; ?> feets <?php echo $physical_exam_form->height_inches; ?> inches</span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<h6 class="">
|
|
<b>Weight :</b>
|
|
<span>
|
|
<?php if($physical_exam_form->weight){echo $physical_exam_form->weight;}?> lbps
|
|
</span>
|
|
</h6>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card" >
|
|
<div class="card-content collapse show">
|
|
<div class="card-body card-dashboard">
|
|
<div class="col-lg-12">
|
|
<ul class="nav nav-tabs nav-linetriangle no-hover-bg pending_tab" id="myTab" role="tablist" style="margin-bottom: 20px; border-radius: 0px;">
|
|
<li class="nav-item">
|
|
<a class="nav-link acceptence-tab1 active" id="INTERNAL-tab" data-toggle="tab" href="#INTERNAL" role="tab" aria-controls="INTERNAL" aria-selected="true" onclick="getActiveTab()">Non Medical</a>
|
|
</li>
|
|
<li class="nav-item ">
|
|
<a class="nav-link acceptence-tab2" data-toggle="tab" href="#tab2" role="tab" aria-selected="false"
|
|
onclick="getActiveTab()">Medical</a>
|
|
</li>
|
|
<li class="nav-item ">
|
|
<a class="nav-link acceptence-tab3" data-toggle="tab" href="#tab3" role="tab" aria-selected="false"
|
|
onclick="getActiveTab()">Verification</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
<div class="tab-pane acceptence-tab-div1 fade show active" id="INTERNAL" role="tabpanel" aria-labelledby="INTERNAL-tab" style="padding: 5px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('acceptance/components/non_medical/non_medical_page',$verifyAndDocData); ?>
|
|
</div>
|
|
|
|
<div class="tab-pane acceptence-tab-div2 fade" id="tab2" role="tabpanel" aria-labelledby="" style="padding: 5px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('acceptance/components/medical/medical_page',$verifyAndDocData); ?>
|
|
</div>
|
|
|
|
<div class="tab-pane acceptence-tab-div3 fade" id="tab3" role="tabpanel" aria-labelledby="" style="padding: 5px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
|
|
<?php $this->view('acceptance/components/verification/verification_page'); ?>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
</div>
|
|
|
|
<!-- updateBasicModal -->
|
|
|
|
<div class="modal width_600 fade" id="updateBasicModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" onsubmit="return addressCheck()">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="exampleModalLabel"><?php echo lang("Caregiver Information");?></h5>
|
|
<div class="bg-lg m-auto">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
</div>
|
|
</div>
|
|
<div class="modal-body">
|
|
|
|
<div id="card_1">
|
|
<form role="form" action="<?php echo base_url()?>caregivers/save_caregiver_info" enctype="multipart/form-data" method="post" enctype="multipart/form-data" name="newGenInfo">
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
|
|
<!--data-toggle="validator" novalidate="true"-->
|
|
<input type="hidden" name="form_tab_status" value="1">
|
|
<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="form_status" value="1">
|
|
<div class="row">
|
|
<div class="form-group col-md-4">
|
|
<label for="first_name" class="col-form-label"><?php echo lang("Caregiver Id");?></label>
|
|
<input type="text" class="form-control" value="<?php echo $nurse->caregiver_id;?>" readonly>
|
|
</div>
|
|
|
|
<div class="form-group col-md-4">
|
|
<label for="exampleInputEmail1" class="col-form-label required-field">
|
|
<?php echo lang('Employee Type'); ?>
|
|
</label>
|
|
<select type="text" class="form-control" name="employee_type" id="employee_type" required data-error="Please select an employee Type.">
|
|
<option value="contrator" <?php if($nurse->employee_type=="contrator"){echo "selected";}?>>CONTRACTOR</option>
|
|
<option value="inhouse" <?php if($nurse->employee_type=="inhouse"){echo "selected";}?>>IN-HOUSE</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group col-md-4">
|
|
<label for="exampleInputEmail1" class="col-form-label required-field">
|
|
<?php echo lang('Caregiver Type'); ?>
|
|
</label>
|
|
<select type="text" class="form-control" name="qualification_type" id="qualification_type" required data-error="Please select an employee Type.">
|
|
<?php foreach ($skills as $value) {?>
|
|
<option value="<?php echo $value->id?>" <?php if($nurse->qualification_type == $value->id){echo "selected";}?>><?php echo $value->name?></option>
|
|
<?php }?>
|
|
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group col-md-4">
|
|
<label for="first_name" class="col-form-label required-field"><?php echo lang("First Name");?></label>
|
|
<input type="text" class="form-control" id="first_name" name="fname" value="<?php echo $nurse->fname;?>" required>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="cg_middle_name_1" class="col-form-label <?php if ($nurse->mid_name !="") { echo "required-field"; } ?>" id="cg_middle_name_lbl"><?php echo lang('Middle Name'); ?></label>
|
|
|
|
<input type="text" class="form-control" name="mid_name" id="cg_middle_name_1" value='<?php
|
|
if (!empty($setval)) {
|
|
echo set_value('mid_name');
|
|
}
|
|
if (!empty($nurse->mid_name)) {
|
|
echo $nurse->mid_name;
|
|
}
|
|
|
|
?>' data-error="Please enter a valid middle name." <?php if (empty($nurse->mid_name)) { echo $nurse->mid_name; } else { echo "required"; } if ($nurse->mid_name =="") { echo "disabled"; } ?>>
|
|
|
|
<input type="checkbox" id="midName" name="midNameOptional" <?php if (empty($nurse->mid_name)) { echo "checked"; } ?>> I don't have a middle name
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="last_name" class="col-form-label required-field"><?php echo lang("Last Name");?></label>
|
|
<input type="text" class="form-control" id="last_name" name="lname" value="<?php echo $nurse->lname;?>" required>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="form-group col-md-4">
|
|
<label for="pt_dob" class="col-form-label required-field"><?php echo lang("Date of Birth");?></label>
|
|
<input type="date" class="form-control" id="cg_dob" name="dob" value="<?php echo $nurse->dob;?>" required>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="pt_email" class="col-form-label"><?php echo lang("Email");?></label>
|
|
<input type="email" class="form-control" id="pt_email" name="email" value="<?php echo $nurse->email;?>" readonly>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label class="col-form-label required-field"><?php echo lang('Gender'); ?></label>
|
|
<select class="form-control" name="gender" data-error="Please select a gender." required>
|
|
<option value="" selected disabled>Select</option>
|
|
<option value="Male" <?php if (!empty($nurse->gender)) { if ($nurse->gender == "Male") { echo 'selected'; } } ?> >Male</option>
|
|
<option value="Female" <?php if (!empty($nurse->gender)) { if ($nurse->gender == "Female") { echo 'selected'; } } ?> >Female</option>
|
|
<option value="Other" <?php if (!empty($nurse->gender)) { if ($nurse->gender == "Other") { echo 'selected'; } } ?>>Other</option>
|
|
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="form-group col-md-4">
|
|
<label class="col-form-label required-field"><?php echo lang('Country of Birth'); ?></label>
|
|
<select class="form-control" name="country_of_birth" data-error="Please enter a valid country of birth." required>
|
|
<option value="" selected disabled>Select</option>
|
|
<?php foreach ($country as $cnty) { ?>
|
|
<option value="<?php echo $cnty->name; ?>" <?php
|
|
if (!empty($setval)) {
|
|
if ($cnty->name == set_value('country_of_birth')) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
if (!empty($nurse->country_of_birth)) {
|
|
if ($nurse->country_of_birth == $cnty->name) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
if (empty($nurse->country_of_birth)||$nurse->country_of_birth=="") {
|
|
if ($cnty->name == 'UNITED STATES') {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
?> > <?php echo $cnty->name; ?> </option>
|
|
<?php } ?>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label class="col-form-label required-field"><?php echo lang('Ethnicity'); ?></label>
|
|
<select class="form-control" name="ethnicity" data-error="Please Select Ethnicity." required>
|
|
<option value="" selected disabled>Select</option>
|
|
<?php foreach ($ethnicity_list as $ethnicity) { ?>
|
|
<option value="<?php echo $ethnicity->name; ?>" <?php
|
|
if (!empty($setval)) {
|
|
if ($ethnicity->name == set_value('ethnicity')) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
if (!empty($nurse->ethnicity)) {
|
|
if ($nurse->ethnicity == $ethnicity->name) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
?> > <?php echo $ethnicity->name; ?> </option>
|
|
<?php } ?>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label class="col-form-label required-field"><?php echo lang('Referral Source'); ?></label>
|
|
<select class="form-control" name="referral_source" required>
|
|
<option value="">Select</option>
|
|
<?php foreach($referral_source as $val){ ?>
|
|
<option value="<?php echo $val->id ?>" <?php if (!empty($nurse->referral_source)) { if ($nurse->referral_source == $val->id) { echo 'selected'; } } ?>><?php echo $val->name;?></option>
|
|
<?php } ?>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Address -->
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<label for="firstName3">
|
|
<h3>Address</h3>
|
|
</label>
|
|
</div>
|
|
<input type="hidden" id="check_p_address" value="<?php if(isset($nurse->zipcode1)){ echo 'checked'; } ?>" >
|
|
<input type="hidden" name="lang1" id="lang1" value="<?php echo $nurse->lang1; ?>">
|
|
<input type="hidden" name="long1" id="long1" value="<?php echo $nurse->long1; ?>">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label class="required-field"><?php echo lang('House Number and/or Street Name'); ?></label>
|
|
<input type="text" class="form-control" name="address1" id="address1" value='<?php
|
|
if (!empty($setval)) {
|
|
echo set_value('address1');
|
|
}
|
|
if (!empty($nurse->address1)) {
|
|
echo $nurse->address1;
|
|
}
|
|
?>' placeholder="" required data-error="Please enter your permanent address.">
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label><?php echo lang('Apt #'); ?></label>
|
|
<input type="text" class="form-control" name="apt1" id="apt1" value='<?php
|
|
if (!empty($setval)) {
|
|
echo set_value('apt1');
|
|
}
|
|
if (!empty($nurse->apartment1)) {
|
|
echo $nurse->apartment1;
|
|
}
|
|
?>' placeholder="" data-error="Please enter your permanent address.">
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label ><?php echo lang('City'); ?></label>
|
|
<input type="text" class="form-control" name="city1" id="city1" value="<?php echo $nurse->city1; ?>" readonly required data-error="Please enter zipcode and check address.">
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label ><?php echo lang('State'); ?></label>
|
|
<input type="text" class="form-control" name="state1" id="state1" value="<?php echo $nurse->state1; ?>" readonly required data-error="Please enter zipcode and check address.">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label ><?php echo lang('County'); ?></label>
|
|
<input type="text" class="form-control" name="county1" id="county1" value="<?php echo $nurse->county1; ?>" readonly required data-error="Please enter zipcode and check address.">
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label class="required-field"><?php echo lang('Zip Code'); ?></label>
|
|
<input type="text" class="form-control" name="zipcode1" id="zipcode1" minlength="5" maxlength="5" onkeypress="return isNumberKey(event)" value='<?php
|
|
if (!empty($setval)) {
|
|
echo set_value('zipcode1');
|
|
}
|
|
if (!empty($nurse->zipcode1)) {
|
|
echo $nurse->zipcode1;
|
|
}
|
|
?>' placeholder="" data-error="Please enter your zip code." required>
|
|
<section id="zipcode1Error" class="col-md-12 zipcode1Error"></section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 mt-2">
|
|
<div class="form-group m-auto">
|
|
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader" Style="display:none;">
|
|
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn" onclick="check_parmanent_address();"><?php echo lang('Check'); ?></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Address -->
|
|
<div class="row">
|
|
<div class="form-group col-md-4">
|
|
<label class="required-field"><?php echo lang('Mobile Number'); ?></label>
|
|
<input type="text" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" class="form-control onlyNumber" name="phone" value="<?php echo $nurse->phone; ?>" required>
|
|
</div>
|
|
|
|
<div class="form-group col-md-8">
|
|
<label class="required-field"><?php echo lang('Languages spoken'); ?></label>
|
|
<select class="form-control multiselect-class" name="primary_langualge[]" id="primary_langualge" required multiple data-error="Please select a primary language." style="width:100%">
|
|
|
|
<?php foreach ($language as $lang) { ?>
|
|
<option value="<?php echo $lang->name; ?>" <?php
|
|
if (!empty($setval)) {
|
|
if ($lang->name == set_value('primary_langualge')) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
if (!empty($nurse->primary_langualge)) {
|
|
$primary_lang_arr=explode("/",$nurse->primary_langualge);
|
|
if (in_array($lang->name, $primary_lang_arr)) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
?> > <?php echo $lang->name; ?> </option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="form-group col-md-4">
|
|
<label class="required-field"><?php echo lang('Eye Color'); ?></label>
|
|
<select class="form-control" name="eye_color" required data-error="Please Select Eye Color.">
|
|
<option value="" selected disabled>Select</option>
|
|
<?php foreach ($eyeColors as $eyeColor) { ?>
|
|
<option value="<?php echo $eyeColor->name; ?>" <?php
|
|
if (!empty($setval)) {
|
|
if ($eyeColor->name == set_value('eye_color')) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
if (!empty($nurse->eye_color)) {
|
|
if ($nurse->eye_color == $eyeColor->name) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
?> > <?php echo $eyeColor->name; ?> </option>
|
|
<?php } ?>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label class="required-field"><?php echo lang('Hair Color'); ?></label>
|
|
<select class="form-control" name="hair_color" required data-error="Please Select Hair Color">
|
|
<option value="" selected disabled>Select</option>
|
|
<?php foreach ($hairColors as $hairColor) { ?>
|
|
<option value="<?php echo $hairColor->name; ?>" <?php
|
|
if (!empty($setval)) {
|
|
if ($hairColor->name == set_value('hair_color')) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
if (!empty($nurse->hair_color)) {
|
|
if ($nurse->hair_color == $hairColor->name) {
|
|
echo 'selected';
|
|
}
|
|
}
|
|
?> > <?php echo $hairColor->name; ?> </option>
|
|
<?php } ?>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group col-md-4">
|
|
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Weight in pounds (lbs)'); ?></label>
|
|
<div class="input-group">
|
|
<input type="number" class="form-control" name="weight" min="1" value="<?php if($physical_exam_form->weight){echo $physical_exam_form->weight;}else{echo "1";} ?>" min="1" required>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
|
|
<div class="form-group col-md-4">
|
|
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Height (feet & inches)'); ?></label>
|
|
<div class="input-group">
|
|
<input type="number" class="form-control height-feet-phy-tab" name="height_feet" min="1" value="<?php echo $physical_exam_form->height_feet; ?>" required/>
|
|
<span class=""> & </span>
|
|
<input type="number" class="form-control height-inch-phy-tab" name="height_inches" min="0" value="<?php echo $physical_exam_form->height_inches; ?>" required>
|
|
</div>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="pt_dob" class="required-field"><?php echo lang("Hire Date");?></label>
|
|
<input type="date" class="form-control" id="hire_date" name="hire_date" value="<?php echo $nurse->hire_date; ?>" required>
|
|
</div>
|
|
|
|
<input type="hidden" name="doc_type" value="<?php echo _DOC_PHOTOCODE_ ; ?>">
|
|
<input type="hidden" name="doc_id" value="<?php echo $documentsid[_DOC_PHOTOCODE_][0]; ?>">
|
|
<input type="hidden" name="progress" value="2">
|
|
|
|
<div class="form-group col-md-4">
|
|
<label class=""><?php echo lang('Photo (gif/jpg/png/jpeg)'); ?></label>
|
|
|
|
<input type="file" class="form-control " name="<?php echo _DOC_PHOTOCODE_ ;?>" accept="image/*" <?php if($documentsid[_DOC_PHOTOCODE_][0]==""){ echo "required"; } ?> allowedType="gif|jpg|png|jpeg">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group mt-2 center-y">
|
|
<button type="submit" class="btn btn-primary" name="submit" id="basic_submit_btn" class="btn btn-info">
|
|
<?php echo lang('Update'); ?>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- updateBasicModal -->
|
|
|
|
<!-- Modal For Mail -->
|
|
|
|
<div class="modal mail_modal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title"><?php echo lang("Send Mail"); ?></h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<form id="mailForm" action="<?php echo base_url(); ?>caregivers/send_acceptance_mail" method="post">
|
|
<div class="modal-body">
|
|
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
|
|
|
|
<div class="row">
|
|
<input type="hidden" name="Ion_id" id="caregiver_ion_id" value="<?=$nurse->ion_user_id?>">
|
|
<input type="hidden" name="cg_id" value="<?=$nurse->id?>">
|
|
<input type="hidden" name="to_mail" class="to_mail" value="<?=$nurse->email?>">
|
|
|
|
<div class="form-group col-md-12">
|
|
<label class="required-field"><?php echo lang('Subject'); ?></label>
|
|
|
|
<input type="text" class="form-control" name="subject" id="subject">
|
|
<span id="subjectErr" class="errmsg"></span>
|
|
</div>
|
|
|
|
<div class="form-group col-md-12">
|
|
<label class="required-field">Message Contain</label>
|
|
<textarea class="form-control mail_msgtxt" name="msg" id="mail_msgtxt">
|
|
|
|
</textarea>
|
|
<span id="msgtextErr" class="errmsg"></span>
|
|
</div>
|
|
<!-- <div id="submitbutton">
|
|
<button class="btn btn-primary submtStl" name="upload" type="submit" id="submit_pic" > Submit</button>
|
|
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button name="upload" type="submit" id="submit_mail" class="btn btn-primary file-upload">Send</button>
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" style="background-color: #e76b6b;">Close</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal For Mail -->
|
|
|
|
<script>
|
|
$('.mail-trigger').click(function(){
|
|
if(($(this).closest('tr').find('.getSubject').text())!=''){
|
|
var name = ($(this).closest('tr').find('.getSubject').text());
|
|
}else{
|
|
var name = $(this).attr("data-name");
|
|
}
|
|
|
|
// alert(name);
|
|
$(".mail_modal").modal("show");
|
|
$('#subject').val(name);
|
|
});
|
|
$("#mailForm").submit(function(e) {
|
|
|
|
e.preventDefault(); // avoid to execute the actual submit of the form.
|
|
|
|
var form = $(this);
|
|
var actionUrl = form.attr('action');
|
|
var proceed=true;
|
|
var sub = $('#subject').val();
|
|
var msg = theEditor.getData();
|
|
$('#subjectErr').text('');
|
|
$('#msgtextErr').text('');
|
|
if(sub ==''){
|
|
$('#subjectErr').text('This field is required');
|
|
proceed=false;
|
|
return;
|
|
}
|
|
if(msg ==''){
|
|
$('#msgtextErr').text('This field is required');
|
|
proceed=false;
|
|
return;
|
|
}
|
|
$('.mail_msgtxt').val(msg);
|
|
if(proceed==true){
|
|
$.ajax({
|
|
type: "POST",
|
|
url: actionUrl,
|
|
data: form.serialize(), // serializes the form's elements.
|
|
async: false,
|
|
success: function (data, status, xhr) {
|
|
$('.mail_modal').modal('toggle');
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'Mail sent successfully' ,
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
|
|
},
|
|
error: function (jqXhr, textStatus, errorMessage) {
|
|
// $('p').append('Error' + errorMessage);
|
|
alert("error duc");
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
$(".ck-blurred p").html("");
|
|
});
|
|
|
|
</script>
|
|
<script src="https://cdn.ckeditor.com/ckeditor5/24.0.0/classic/ckeditor.js"></script>
|
|
<script>
|
|
|
|
// ClassicEditor
|
|
// .create( document.querySelector( '#mail_msgtxt' ) )
|
|
// .catch( error => {
|
|
// console.error( error );
|
|
// } );
|
|
let theEditor;
|
|
|
|
ClassicEditor
|
|
.create(document.querySelector('#mail_msgtxt'))
|
|
.then(editor => {
|
|
theEditor = editor;
|
|
|
|
})
|
|
.catch( error => {
|
|
console.error( error );
|
|
} );
|
|
</script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function addressCheck(){
|
|
var new_zipcode1 = $("#zipcode1").val();
|
|
var new_address1=$('#address1').val();
|
|
var old_zipcode1 = <?php echo $nurse->zipcode1?>;
|
|
var old_address1 = '<?php echo $nurse->address1?>';
|
|
if((new_zipcode1 != old_zipcode1)){
|
|
$('#check_p_address').val('');
|
|
}
|
|
var check_value= $('#check_p_address').val();
|
|
if(check_value== ''){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Please check address.',
|
|
showConfirmButton: false,
|
|
timer: 1500
|
|
});
|
|
return false;
|
|
}else{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
$('.save_verification_status').click(function(){
|
|
var tab_type = $(this).attr('tab_type');
|
|
var cg_id = $(this).attr('cg_id');
|
|
// alert(tab_type);
|
|
Swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "Do you want to verify this tab?",
|
|
icon: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes'
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
|
|
$.ajax('<?= base_url()?>caregivers/change_verification_status', {
|
|
type: 'POST', // http method
|
|
data: { tab_type: tab_type,cg_id: cg_id,<?php echo $this->security->get_csrf_token_name(); ?>:'<?php echo $this->security->get_csrf_hash(); ?>' }, // data to submit
|
|
async: false,
|
|
success: function (data, status, xhr) {
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'successfully verified' ,
|
|
showConfirmButton: false,
|
|
timer: 3500
|
|
});
|
|
saveTabstatusSession();
|
|
window.location.reload(true);
|
|
|
|
},
|
|
error: function (jqXhr, textStatus, errorMessage) {
|
|
// $('p').append('Error' + errorMessage);
|
|
alert("error duc");
|
|
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
})
|
|
})
|
|
</script>
|
|
|
|
<script>
|
|
$('#basic_card_edit').click(function() {
|
|
$('#updateBasicModal').modal("show");
|
|
})
|
|
|
|
$("input[type='checkbox']").change(function(){
|
|
// alert("hii");
|
|
var a = $("input[type='checkbox']");
|
|
// if((a.length - 2)== a.filter(":checked").length){
|
|
if((a.length)== a.filter(":checked").length){
|
|
//alert('all checked');
|
|
$('#submit_btn').show();
|
|
}else{
|
|
$('#submit_btn').hide();
|
|
}
|
|
});
|
|
</script>
|
|
<script>
|
|
$("#checkAll").click(function(){
|
|
if (! $('input:checkbox').is('checked')) {
|
|
$('input:checkbox').attr('checked','checked');
|
|
} else {
|
|
$('input:checkbox').removeAttr('checked');
|
|
}
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* future date dob not accept */
|
|
$(document).ready(function() {
|
|
// alert("dateSec");
|
|
var todaysDate = new Date(); // Gets today's date
|
|
|
|
// Max date attribute is in "YYYY-MM-DD". Need to format today's date accordingly
|
|
|
|
var year = todaysDate.getFullYear(); // YYYY
|
|
var month = ("0" + (todaysDate.getMonth() + 1)).slice(-2); // MM
|
|
var day = ("0" + todaysDate.getDate()).slice(-2); // DD
|
|
|
|
var maxDate = (year + "-" + month + "-" + day); // Results in "YYYY-MM-DD" for today's date
|
|
|
|
// Now to set the max date value for the calendar to be today's date
|
|
$('.ftrDate').attr('max', maxDate);
|
|
});
|
|
function validateAcceptance(){
|
|
|
|
var acceptCaregiver=$('input[name=acceptCaregiver]:checked').val();
|
|
//alert(acceptCaregiver);
|
|
var rejectionNote=$("textarea[name=rejectionNote]").val();
|
|
//alert(rejectionNote);
|
|
if(acceptCaregiver == 'YES')
|
|
{
|
|
return true;
|
|
// if (! $('input:checkbox').is('checked')) {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
}
|
|
else
|
|
{
|
|
if(rejectionNote!='')
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|
|
$('input[name=acceptCaregiver]').click(function(){
|
|
var acceptCaregiver=$(this).val();
|
|
//alert(acceptCaregiver);
|
|
if(acceptCaregiver=='NO'){
|
|
$("#rejectionNote").show();
|
|
}else{
|
|
$("#rejectionNote").hide();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
$("#checkNpi_no").blur(function(){
|
|
var npi_no=$("input[name=npi_no]").val();
|
|
if(npi_no!=""){
|
|
$.ajax({
|
|
url:'<?=base_url()?>referral/getNpiData?code='+npi_no,
|
|
type :'GET',
|
|
dataType: "json",
|
|
beforeSend: function() {
|
|
$("#npiValid").hide();
|
|
$("#npiinValid").hide();
|
|
$("#npiNoValidating").show();
|
|
$("#npivalidateTab").show();
|
|
$(".check-npi").hide();
|
|
$("#approve_submitBtn").prop('disabled', true);
|
|
},
|
|
success:function(data){
|
|
console.log(data);
|
|
$('#phymdfName').val(data.fname);
|
|
if(data.license)
|
|
{
|
|
$("#npivalidate").val('valid');
|
|
$("#npiValid").show();
|
|
$("#npiinValid").hide();
|
|
$("#npiNoValidating").hide();
|
|
$("#approve_submitBtn").prop('disabled', false);
|
|
}
|
|
else
|
|
{
|
|
$("#npivalidate").val('invalid');
|
|
$("#npiValid").hide();
|
|
$("#npiinValid").show();
|
|
$("#npiNoValidating").hide();
|
|
$(".check-npi").show();
|
|
$("#approve_submitBtn").prop('disabled', true);
|
|
}
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Please enter npi no.',
|
|
showConfirmButton: false,
|
|
timer: 1500
|
|
});
|
|
}
|
|
});
|
|
|
|
function isNumberKey(evt) {
|
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
|
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
|
return false;
|
|
return true;
|
|
}
|
|
</script>
|
|
<!--main content end-->
|
|
<!--footer start-->
|
|
<script>
|
|
|
|
|
|
$(document).ready(function() {
|
|
$(".citizen_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 yesDocumentsOption= '<option value="">Select</option>'
|
|
+'<option value="Birth Certificate">Birth Certificate</option>'
|
|
+'<option value="State ID">State ID</option>'
|
|
+'<option value="Citizenship Certificate">Citizenship Certificate</option>'
|
|
+'<option value="US Passport">US Passport</option>';
|
|
|
|
var noDocumentsOption= '<option value="">Select</option>'
|
|
+'<option value="Permanent Resident Card">Permanent Resident Card</option>'
|
|
+'<option value="Employment Authorization Card">Employment Authorization Card</option>'
|
|
+'<option value="Valid Work Visa">Valid Work Visa</option>';
|
|
|
|
if($('#remain_permanentlyyes').is(':checked')){
|
|
noDocumentsOption += '<option value="Foreign Passport with I-94 Stamp">Foreign Passport with I-94 Stamp</option>';
|
|
}
|
|
|
|
if (target_val == open_value){
|
|
$("#"+change_required_to).hide();
|
|
// $("#documents_type").html(yesDocumentsOption);
|
|
$(".documents_expire_date_container").hide()
|
|
$("#documents_expire_date").removeAttr('required');
|
|
$("#documents_expire_date").val('');
|
|
$("#uscis").val('');
|
|
$(".docExpLvl").removeClass("required-field");
|
|
}else{
|
|
$("#documents_expire_date").val('');
|
|
$("#uscis").val('');
|
|
$("#"+change_required_to).show();
|
|
// $("#documents_type").html(noDocumentsOption);
|
|
$(".documents_expire_date_container").show();
|
|
}
|
|
lookingForCitizenYes();
|
|
checkBasicCheckList();
|
|
});
|
|
});
|
|
|
|
function lookingForCitizenYes(){
|
|
$(document).ready(function(){
|
|
if(!$('#citizenyes').is(':checked')){
|
|
$(".citizen-yes-state-list").hide();
|
|
$(".citizen-yes-state-list").children("label").removeClass("required-field");
|
|
$(".citizen-yes-state-list").children("select").prop("required",false);
|
|
}
|
|
});
|
|
}
|
|
|
|
$(".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();
|
|
});
|
|
|
|
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)){
|
|
$("#us_submit").removeAttr('disabled');
|
|
}else{
|
|
$('#us_submit').prop("disabled", true);
|
|
}
|
|
|
|
}
|
|
|
|
$('.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();
|
|
});
|
|
|
|
function check_parmanent_address(){
|
|
|
|
var address1=$('#address1').val();
|
|
var zipcode1=$('#zipcode1').val();
|
|
if(address1!="" && zipcode1!=""){
|
|
$.ajax({
|
|
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 USformatPhoneNumber(phoneNumberString,_this) {
|
|
var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
|
|
var match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/)
|
|
if (match) {
|
|
var intlCode = (match[1] ? '+1 ' : '')
|
|
var fres = [intlCode, '(', match[2], ') ', match[3], '-', match[4]].join('')
|
|
_this.value = fres;
|
|
}
|
|
return null
|
|
}
|
|
$( document ).ready(function() {
|
|
$(".onlyNumber").keypress(function(evt){
|
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
|
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
|
return false;
|
|
return true;
|
|
})
|
|
});
|
|
$('#primary_langualge').select2();
|
|
|
|
$(function(){
|
|
$("#midName").click(function(){
|
|
if($(this).is(":checked"))
|
|
{
|
|
$("#cg_middle_name_1").val("");
|
|
$("#cg_middle_name_1").prop( "disabled", true );
|
|
$("#cg_middle_name_lbl").removeClass('required-field');
|
|
$('#cg_middle_name_1').removeAttr('required');
|
|
}
|
|
else
|
|
{
|
|
$("#cg_middle_name_1").prop( "disabled", false );
|
|
$("#cg_middle_name_lbl").addClass('required-field');
|
|
$('#cg_middle_name_1').prop('required',true);
|
|
}
|
|
})
|
|
});
|
|
</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);
|
|
$(".not-future-time").attr("max",today);
|
|
today = yyyy+'-'+mm;
|
|
$(".not-future-month").attr("max",today);
|
|
});
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$(".acceptence-edit-form").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){
|
|
console.log(data);
|
|
var data=$.parseJSON(data);
|
|
$(thi_s).closest("div.modal").modal("hide");
|
|
if(data.response==1 || data.response=="1"){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'Updated Successfully',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
}
|
|
if(data.response==0 || data.response=="0"){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Opps Something Went Wrong ! Try Again',
|
|
showConfirmButton: false,
|
|
timer: 2500
|
|
});
|
|
}
|
|
|
|
saveTabstatusSession();
|
|
location.reload();
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
function saveTabstatusSession(){
|
|
var tab=0;
|
|
if($(".acceptence-tab1").hasClass("active")){
|
|
tab=1;
|
|
}
|
|
if($(".acceptence-tab2").hasClass("active")){
|
|
tab=2;
|
|
}
|
|
if($(".acceptence-tab3").hasClass("active")){
|
|
tab=3;
|
|
}
|
|
sessionStorage.activeTab=tab;
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
if(sessionStorage.activeTab==1){
|
|
$(".acceptence-tab1").addClass("active");
|
|
$(".acceptence-tab1").parent().siblings().children("a").removeClass("active");
|
|
$(".acceptence-tab-div1").addClass("show active");
|
|
$(".acceptence-tab-div1").siblings().removeClass("show active");
|
|
}if(sessionStorage.activeTab==2){
|
|
$(".acceptence-tab2").addClass("active");
|
|
$(".acceptence-tab2").parent().siblings().children("a").removeClass("active");
|
|
$(".acceptence-tab-div2").addClass("show active");
|
|
$(".acceptence-tab-div2").siblings().removeClass("show active");
|
|
}if(sessionStorage.activeTab==3){
|
|
$(".acceptence-tab3").addClass("active");
|
|
$(".acceptence-tab3").parent().siblings().children("a").removeClass("active");
|
|
$(".acceptence-tab-div3").addClass("show active");
|
|
$(".acceptence-tab-div3").siblings().removeClass("show active");
|
|
}
|
|
});
|
|
function getActiveTab(){
|
|
var tab=0;
|
|
sessionStorage.activeTab=tab;
|
|
}
|
|
</script>
|
|
|
|
<?php $this->view('saveCaregiverModalOther'); ?>
|
|
|
|
<!-- notes modal-->
|
|
<?php $this->view('acceptance/components/modal/notemodal'); ?>
|
|
<!-- notes modal-->
|
|
<script type="text/javascript">
|
|
$(document).on('click','.add-note-btn',function(){
|
|
$("#notes_modal").modal("show");
|
|
var cg_id=<?=$nurse->id?>;
|
|
var short_code=$(this).attr("short-code");
|
|
$(".short-code").val(short_code);
|
|
$.ajax({
|
|
type: "GET",
|
|
url: "<?=base_url()?>caregivers/getNotesModal",
|
|
dataType: 'json',
|
|
data: {
|
|
cg_id: cg_id,
|
|
short_code: short_code,
|
|
},
|
|
success: function(data){
|
|
$(".notes-modal").find("div.modal-body").html(data.html);
|
|
$(".notes-modal").find("h5.modal-title").html(data.modal_title);
|
|
$("#notes_modal").modal("hide");
|
|
},
|
|
error: function(data){
|
|
$(".notes-modal").find("div.modal-body").html("Can't Load Data Error Occured ! Try Again");
|
|
// $("#notes_modal").modal("hide");
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(document).on("click",".dwnload",function() {
|
|
var docType=$(this).data('doctype');
|
|
var userid=$(this).data('userid');
|
|
var link='<?=base_url()?>CaregiversDashboard/file_downloader?doctype='+docType+'&userid='+userid;
|
|
window.open(link, 'download');
|
|
});
|
|
</script>
|
|
|