2247 lines
136 KiB
PHP
Executable File
2247 lines
136 KiB
PHP
Executable File
<?php
|
|
|
|
if (!defined('BASEPATH'))
|
|
exit('No direct script access allowed');
|
|
|
|
class CaregiversDashboard extends MX_Controller {
|
|
|
|
function __construct() {
|
|
parent::__construct();
|
|
$this->load->model('caregivers/Caregiver_model');
|
|
$this->load->model('CaregiverDashboard_model');
|
|
$this->load->model('home/Home_model');
|
|
$this->load->helper('generatepdf_helper');
|
|
$this->load->helper('docexpiredate_helper');
|
|
// if (!$this->ion_auth->in_group(array('Caregiver','admin'))) {
|
|
// if(!$this->ion_auth->coordinator_permission('caregiver_menu')){
|
|
// redirect('home/permission');
|
|
// }
|
|
// }
|
|
}
|
|
|
|
public function index() {
|
|
$id = $this->session->userdata('user_id');
|
|
$data['nurse']=$this->Caregiver_model->getNurseByIonId($id);
|
|
$caregiver_id=$data['nurse']->id;
|
|
$data['progress']=$data['nurse']->progress;
|
|
//$data['patient']=$this->Caregiver_model->getCaregiverPatient($data['nurse']->id);
|
|
//$data['master_schdule']=$this->Caregiver_model->masterScheduleList();
|
|
$data['previuos_schedules']=$this->CaregiverDashboard_model->getCaregiverPreviousSchedule($caregiver_id);
|
|
$data['upcomming_schedules']=$this->CaregiverDashboard_model->getCaregiverUpcommingSchedule($caregiver_id);
|
|
//echo '<pre>';print_r($data['upcomming_schedule']);die;
|
|
$caregiverSchedule=$this->Caregiver_model->getCaregiverSchedule($caregiver_id);
|
|
foreach($caregiverSchedule as $schedule){
|
|
$data['caregiverScheduleid'][]=$schedule->schedule_master_id;
|
|
}
|
|
|
|
$nurse_data=$this->Caregiver_model->getNurseByIonId($id);
|
|
$progressData = json_decode($nurse_data->from_tab_status_pctg);
|
|
$progress = $progressData->form1+$progressData->form2+$progressData->form3+$progressData->form4+$progressData->form5+$progressData->form6+$progressData->form7+$progressData->form8+$progressData->form9+$progressData->form10+$progressData->form11;
|
|
if($progress < 100)
|
|
{
|
|
redirect(base_url()."CaregiversDashboard/profile");
|
|
}
|
|
//pr($data);die;
|
|
$this->load->view('home/dashboard',$data); // just the header file
|
|
$this->load->view('dashboard',$data);
|
|
$this->load->view('home/footer',$data);
|
|
}
|
|
public function load_progress(){
|
|
$id = $this->input->get('id');
|
|
$nurse_data=$this->Caregiver_model->getNurseByIonId($id);
|
|
$progressData = json_decode($nurse_data->from_tab_status_pctg);
|
|
$progress = $progressData->form1+$progressData->form2+$progressData->form3+$progressData->form4+$progressData->form5+$progressData->form6+$progressData->form7+$progressData->form8+$progressData->form9+$progressData->form10+$progressData->form11;
|
|
//$progress=$nurse_data->progress;
|
|
$data['progress']=$progress;
|
|
$doc_exsist=$this->Caregiver_model->CargiverDocumentsUploaded($id);
|
|
$data['upload']=$doc_exsist;
|
|
//pre($doc_exsist);
|
|
echo json_encode($data);
|
|
}
|
|
public function updatedata(){
|
|
// echo '<pre>'; print_r($_POST); echo '</pre>';
|
|
// die;
|
|
$id=$_POST['id'];
|
|
$ionid=$_POST['Ion_id'];
|
|
$doc_type=$_POST['doc_type'];
|
|
|
|
$folder_name='USER_'.str_pad($ionid, 6, "0", STR_PAD_LEFT);
|
|
if (!is_dir('uploads/Documents/'.$folder_name)) {
|
|
mkdir('./uploads/Documents/' . $folder_name, 0777, TRUE);
|
|
}
|
|
$uploadto="uploads/Documents/".$folder_name."/";
|
|
|
|
if($_FILES[$doc_type]['name']){
|
|
|
|
$file_name = $_FILES[$doc_type]['name'];
|
|
$file_name_pieces = explode('.', $file_name);
|
|
$count=count($file_name_pieces);
|
|
$new_file_name = $doc_type.'_'.str_pad($ionid, 6, "0", STR_PAD_LEFT).'_'.date('YmdHis').'_01.'.$file_name_pieces[$count-1];
|
|
|
|
$config = array(
|
|
'file_name' => $new_file_name,
|
|
'upload_path' => "./".$uploadto,
|
|
'allowed_types' => "gif|jpg|png|jpeg|pdf",
|
|
'overwrite' => False,
|
|
'max_size' => "20480000",
|
|
//'max_height' => "1768",
|
|
//'max_width' => "2024"
|
|
);
|
|
|
|
|
|
$this->load->library('Upload', $config);
|
|
$this->upload->initialize($config);
|
|
if ($this->upload->do_upload($doc_type)) {
|
|
$path = $this->upload->data();
|
|
//$photo = $path['file_name'];
|
|
}
|
|
if($path['file_name']!=""){
|
|
$_POST[$doc_type]=$uploadto.''.$path['file_name'];
|
|
}
|
|
}
|
|
|
|
$caregiver_data=$this->Caregiver_model->getNurseByIonId($ionid);
|
|
|
|
if(isset($_POST['drive_info'])){
|
|
if($caregiver_data->drive_info!=""){
|
|
unset($_POST['progress']);
|
|
}else{
|
|
$_POST['progress']=$caregiver_data->progress + $_POST['progress'];
|
|
}
|
|
}else if(isset($_POST['PPD_Quantiferonon'])){
|
|
if($caregiver_data->PPD_Quantiferonon!=""){
|
|
unset($_POST['progress']);
|
|
}else{
|
|
$_POST['progress']=$caregiver_data->progress + $_POST['progress'];
|
|
}
|
|
}else{
|
|
unset($_POST['progress']);
|
|
}
|
|
$id=$_POST['id'];
|
|
// $caregiver_data=$caregiver_details=$this->Caregiver_model->getNurseById($id);
|
|
// echo '<pre>'; print_r($caregiver_data); echo '</pre>';
|
|
//echo '<pre>'; print_r($caregiver_details); echo '</pre>';
|
|
//die;
|
|
unset($_POST['Ion_id']);
|
|
unset($_POST['doc_type']);
|
|
unset($_POST['id']);
|
|
unset($_POST['form_status']);
|
|
unset($_POST['data_type']);
|
|
unset($_POST['drive_info']);
|
|
unset($_POST['Automobile_Policy_Holder_Name']);
|
|
unset($_POST['Automobile_Policy_Number']);
|
|
unset($_POST['Automobile_Policy_Expiration_Date']);
|
|
// echo '<pre>'; print_r($_POST); echo '</pre>';die;
|
|
if(isset($_POST['PPD_Quantiferonon'])){
|
|
$data3['PPD_Quantiferonon'] = $_POST['PPD_Quantiferonon'];
|
|
}
|
|
if(isset($_POST['PPD_Quantiferonon_status'])){
|
|
$data3['PPD_Quantiferonon_status'] = $_POST['PPD_Quantiferonon_status'];
|
|
$caregiver_data=$this->Caregiver_model->getNurseById($id);
|
|
if($caregiver_data->PPD_Quantiferonon_status==""){
|
|
$caregiverPer = json_decode($caregiver_data->from_tab_status_pctg);
|
|
$caregiverPer->form11 = $caregiverPer->form11 + 1;
|
|
$process= json_encode($caregiverPer);
|
|
$caregiverUpdate=array(
|
|
'from_tab_status_pctg' => $process,
|
|
);
|
|
$this->Caregiver_model->updateNurse($id,$caregiverUpdate);
|
|
}
|
|
}
|
|
if(isset($_POST['CXR'])){
|
|
$data3['CXR'] = $_POST['CXR'];
|
|
}
|
|
if(isset($_POST['drive_info'])){
|
|
$data3['drive_info'] = $_POST['drive_info'];
|
|
}
|
|
if(isset($_POST['Automobile_Policy_Holder_Name'])){
|
|
$data3['Automobile_Policy_Holder_Name'] = $_POST['Automobile_Policy_Holder_Name'];
|
|
}
|
|
if(isset($_POST['Automobile_Policy_Number'])){
|
|
$data3['Automobile_Policy_Number'] = $_POST['Automobile_Policy_Number'];
|
|
}
|
|
if(isset($_POST['Automobile_Policy_Expiration_Date'])){
|
|
$data3['Automobile_Policy_Expiration_Date'] = $_POST['Automobile_Policy_Expiration_Date'];
|
|
}
|
|
if(isset($_POST['PPD_Quantiferonon_date'])){
|
|
$data3['PPD_Quantiferonon_date'] = $_POST['PPD_Quantiferonon_date'];
|
|
docExpireDate($id,'PPD',$data3['PPD_Quantiferonon_date'],null);
|
|
}
|
|
// echo 'post';
|
|
// pre($_POST);
|
|
// echo 'data3';
|
|
// pre($data3);
|
|
// echo 'data2';
|
|
// pre($data2);
|
|
// die;
|
|
|
|
|
|
$nurse_data=$this->Caregiver_model->updateNurse($id,$_POST,$data2,$data3);
|
|
if($nurse_data>0){
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else{
|
|
$output=array(
|
|
'upload'=>'failed',
|
|
'msg'=>'No Updation.',
|
|
);
|
|
echo json_encode($output);
|
|
}
|
|
|
|
}
|
|
public function profile() {
|
|
|
|
$data = array();
|
|
$eml = $_SESSION['email'];
|
|
$data['userType']=$this->Caregiver_model->get_user_type($eml);
|
|
|
|
// _die($_SESSION);
|
|
//unset($_SESSION['form_tab_status']);
|
|
$form_tab_status = $_SESSION['form_tab_status'];
|
|
unset($_SESSION['form_tab_status']);
|
|
$_SESSION['form_tab_status'] == '';
|
|
|
|
//unset($_SESSION['form_tab_status']);
|
|
|
|
$id = $this->session->userdata('user_id');
|
|
$data['nurse']=$this->Caregiver_model->getNurseByIonId($id);
|
|
//pr($data);die;
|
|
$caregiverId = $data['nurse']->caregiver_table_id;
|
|
|
|
$data['state_list']=$this->Caregiver_model->get_state_list();
|
|
$data['city_list']=$this->Caregiver_model->get_city_list();
|
|
$data['school_list']=$this->Caregiver_model->get_SchoolList();
|
|
$data['ethnicity_list']=$this->Caregiver_model->get_ethnicity_list();
|
|
$data['eyeColors']=$this->Caregiver_model->get_eyeColors();
|
|
$data['hairColors']=$this->Caregiver_model->get_hairColors();
|
|
$data['skills']=$this->Caregiver_model->caregiver_skill_list();
|
|
$data['language']=$this->Caregiver_model->get_language_list();
|
|
$data['country']=$this->Caregiver_model->get_country_list();
|
|
$data['relation']=$this->Caregiver_model->get_relation();
|
|
$data['time_slot']=$this->Caregiver_model->get_time_slot_list();
|
|
$data['ref_src_list']=$this->Caregiver_model->get_ref_src_list();
|
|
$data['services']=$this->Caregiver_model->get_service_list($caregiverId);
|
|
$data['religious_preferences']=$this->Caregiver_model->religious_preferences();
|
|
$data['reason_for_leaving']=$this->Caregiver_model->get_reason_for_leaving();
|
|
//echo '<pre>'; print_r($data['services']); echo '</pre>';die;
|
|
$data['exp_by_condition']=$this->Caregiver_model->exp_by_condition();
|
|
$data['exp_by_demographics']=$this->Caregiver_model->exp_by_demographics();
|
|
$data['rn_exp']=$this->Caregiver_model->rn_exp();
|
|
$data['experience']=$this->Caregiver_model->get_caregiver_experience($caregiverId);
|
|
$data['getNurseSkill']=$this->Caregiver_model->getNurseSkill($caregiverId);
|
|
$data['cg_services']=$this->Caregiver_model->get_cg_service_list();
|
|
$data['getPrefShift']=$this->Caregiver_model->getShiftPref($caregiverId);
|
|
$data['homecareRegitryRelease']=$this->HOME_CARE_REGISTRY_RELEASE_FORM($caregiverId);
|
|
$data['homecareHealthAid']=$this->Application_For_Home_Health_Aides($caregiverId);
|
|
$data['Professional_Profile']=$this->Professional_Profile($caregiverId);
|
|
$data['annual_physical_exam_form']=$this->ANNUAL_PHYSICAL_EXAMINATION_FORM($caregiverId);
|
|
$data['Employee_Health']=$this->Employee_Health($caregiverId);
|
|
// $data['employeeVaccineWaiver']=$this->EMPLOYEE_HEP_B_VACCINE_WAIVER($caregiverId);
|
|
// echo $data['phyExamForm'];
|
|
// die();
|
|
if($id!=""){
|
|
$data['cargiverService']=$this->Caregiver_model->get_CaregiverService_listById($caregiverId);
|
|
}else{
|
|
$data['cargiverService']="";
|
|
}
|
|
//echo '<pre>'; print_r($data['cargiverService']); echo '</pre>';die;
|
|
$data['documents']=$this->Caregiver_model->getNurseDocuments($id);
|
|
|
|
if($id){
|
|
$data['nurse']=$this->Caregiver_model->getNurseByIonId($id);
|
|
$progress = json_decode($data['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;
|
|
$data['tabstatus']=$this->getTabStatus($caregiverId);
|
|
//pr("form_tab_status".$form_tab_status);
|
|
if($form_tab_status==='0')
|
|
$data['tab']='0';
|
|
else if($form_tab_status==1)
|
|
$data['tab']=1;
|
|
else if($form_tab_status==2)
|
|
$data['tab']=3;
|
|
else if($form_tab_status==3)
|
|
$data['tab']=3;
|
|
else if($form_tab_status==4)
|
|
$data['tab']=4;
|
|
else if($form_tab_status==5)
|
|
$data['tab']=10;
|
|
else if($form_tab_status== 12 && $progress >= 100)
|
|
$data['tab']=12;
|
|
else
|
|
$data['tab']='';
|
|
|
|
}
|
|
// _die($data);
|
|
//pre($data['nurse']);die;
|
|
//pre($data['tabstatus']);die;
|
|
$data['progress']=$data['nurse']->progress;
|
|
//echo '<pre>'; print_r($data['nurse']); echo '</pre>';die;
|
|
$this->load->view('home/dashboard',$data); // just the header file
|
|
$this->load->view('profile',$data);
|
|
$this->load->view('home/footer',$data); // just the header file
|
|
|
|
}
|
|
public function getServices(){
|
|
$services=$this->Caregiver_model->getServices($_GET);
|
|
echo $services;
|
|
}
|
|
public function checkaddress(){
|
|
$this->load->helper('map_helper');
|
|
$address=$_GET['address'].'+'.$_GET['zipcode'];
|
|
//$response=address_info($_GET['address'],$_GET['zipcode']);
|
|
// $response=map_address($address);
|
|
$response=mapquest_address($_GET['address'],$_GET['zipcode']);
|
|
//print_r($response);die;
|
|
if($response){
|
|
$response['status_code']=200;
|
|
}else{
|
|
$response['status_code']=404;
|
|
}
|
|
echo json_encode($response);
|
|
}
|
|
public function documentsSave() {
|
|
// pre($_POST);pre($_FILES);die;
|
|
|
|
$ionid=$this->input->post('Ion_id');
|
|
$id=$this->input->post('id');
|
|
$caregiver_data=$this->Caregiver_model->getNurseByIonId($ionid);
|
|
$savetime=date ('Y-m-d H:i:s', now());
|
|
$doc_type=$this->input->post('doc_type');
|
|
|
|
$documentId=$this->input->post('doc_id');
|
|
$progress=$this->input->post('progress');
|
|
|
|
$usertype='Caregiver';
|
|
|
|
$folder_name='USER_'.str_pad($ionid, 6, "0", STR_PAD_LEFT);
|
|
if (!is_dir('uploads/Documents/'.$folder_name)) {
|
|
mkdir('./uploads/Documents/' . $folder_name, 0777, TRUE);
|
|
}
|
|
$uploadto="uploads/Documents/".$folder_name."/";
|
|
//pre($_FILES);die;
|
|
if($_FILES[$doc_type]['name']){
|
|
//echo '<pre>'; print_r($this->input->post()); echo '</pre>';die;
|
|
$file_name = $_FILES[$doc_type]['name'];
|
|
$file_name_pieces = explode('.', $file_name);
|
|
$count=count($file_name_pieces);
|
|
$new_file_name = $doc_type.'_'.str_pad($ionid, 6, "0", STR_PAD_LEFT).'_'.date('YmdHis').'_01.'.$file_name_pieces[$count-1];
|
|
if($doc_type==_DOC_PHOTOCODE_){
|
|
$config = array(
|
|
'file_name' => $new_file_name,
|
|
'upload_path' => "./".$uploadto,
|
|
'allowed_types' => "gif|jpg|png|jpeg",
|
|
'overwrite' => False,
|
|
'max_size' => "20480000",
|
|
//'max_height' => "1768",
|
|
//'max_width' => "2024"
|
|
);
|
|
}else{
|
|
$config = array(
|
|
'file_name' => $new_file_name,
|
|
'upload_path' => "./".$uploadto,
|
|
'allowed_types' => "gif|jpg|png|jpeg|pdf",
|
|
'overwrite' => False,
|
|
'max_size' => "20480000",
|
|
//'max_height' => "1768",
|
|
//'max_width' => "2024"
|
|
);
|
|
}
|
|
|
|
$this->load->library('Upload', $config);
|
|
$this->upload->initialize($config);
|
|
if ($this->upload->do_upload($doc_type)) {
|
|
$path = $this->upload->data();
|
|
//$photo = $path['file_name'];
|
|
}
|
|
|
|
if($path['file_name']!=""){
|
|
$data = array(
|
|
'ion_user_id' => $ionid,
|
|
'userid' => $id,
|
|
'user_type' => $usertype,
|
|
'path' => $uploadto,
|
|
'file_name' => $path['file_name'],
|
|
'originalfilename' => $_FILES[$doc_type]['name'],
|
|
'documents_type' => $doc_type
|
|
);
|
|
//pr($data);die;
|
|
$caregiverPer = json_decode($caregiver_data->from_tab_status_pctg);
|
|
|
|
$check_doc_exsist=$this->Caregiver_model->checkDocumentsExsist($ionid,$doc_type);
|
|
if($check_doc_exsist==0){
|
|
$caregiver_details=$this->Caregiver_model->getNurseById($id);
|
|
$caregiverPer = json_decode($caregiver_details->from_tab_status_pctg);
|
|
if($doc_type==_DOC_PCACODE_){
|
|
$caregiverPer->form11 = $caregiverPer->form11 + 2;
|
|
}else if($doc_type==_DOC_OTHERCODE_){
|
|
$caregiverPer->form11 = $caregiverPer->form11;
|
|
}else{
|
|
$caregiverPer->form11 = $caregiverPer->form11 + 1;
|
|
}
|
|
|
|
//pr($caregiverPer);die;
|
|
$caregiver_data=$this->Caregiver_model->getNurseByIonId($ionid);
|
|
$process= json_encode($caregiverPer);
|
|
if($caregiver_data->form_status<11)
|
|
$form_status=11;
|
|
else
|
|
$form_status=$caregiver_data->form_status;
|
|
$caregiverUpdate=array(
|
|
'from_tab_status_pctg' => $process,
|
|
'form_status' => $form_status,
|
|
);
|
|
// pr($caregiverUpdate);die;
|
|
$this->Caregiver_model->updateNurse($id,$caregiverUpdate);
|
|
}
|
|
$this->Caregiver_model->deleteNursePreDocuments($documentId);
|
|
|
|
$documentId = $this->Caregiver_model->addNurseDocuments($data);
|
|
|
|
$activitydata = array(
|
|
'activity_description' => $doc_type .' Upload',
|
|
'request_data' => $path['file_name'],
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
$this->Home_model->activity_log($activitydata);
|
|
}
|
|
|
|
}else{
|
|
if($doc_type==_DOC_COVID_ || $doc_type==_DOC_DIPHTHERIA_CODE_ || $doc_type==_DOC_TETANUS_CODE_ || $doc_type==_DOC_MUMPS_CODE_ || $doc_type==_DOC_VAR_CODE_){
|
|
$check_doc_exsist=$this->Caregiver_model->checkDocumentsExsist($ionid,$doc_type);
|
|
if($check_doc_exsist==0){
|
|
$caregiver_details=$this->Caregiver_model->getNurseById($id);
|
|
$caregiverPer = json_decode($caregiver_details->from_tab_status_pctg);
|
|
$caregiverPer->form11 = $caregiverPer->form11 + 1;
|
|
$caregiver_data=$this->Caregiver_model->getNurseByIonId($ionid);
|
|
$process= json_encode($caregiverPer);
|
|
if($caregiver_data->form_status<11)
|
|
$form_status=11;
|
|
else
|
|
$form_status=$caregiver_data->form_status;
|
|
$caregiverUpdate=array(
|
|
'from_tab_status_pctg' => $process,
|
|
'form_status' => $form_status,
|
|
);
|
|
$this->Caregiver_model->updateNurse($id,$caregiverUpdate);
|
|
}
|
|
$this->Caregiver_model->deleteNursePreDocuments($documentId);
|
|
$data = array(
|
|
'ion_user_id' => $ionid,
|
|
'userid' => $id,
|
|
'user_type' => $usertype,
|
|
'documents_type' => $doc_type
|
|
);
|
|
$documentId = $this->Caregiver_model->addNurseDocuments($data);
|
|
|
|
$activitydata = array(
|
|
'activity_description' => $doc_type .' Upload',
|
|
'request_data' => '',
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
$this->Home_model->activity_log($activitydata);
|
|
}
|
|
}
|
|
|
|
if($documentId){
|
|
|
|
$remarks=$this->input->post($doc_type.'_remarks');
|
|
$documents_no=$this->input->post($doc_type.'_documents_no');
|
|
$data = array(
|
|
'remarks' => $remarks,
|
|
'documents_no'=>$documents_no
|
|
);
|
|
$this->Caregiver_model->updateNurseDocuments($data,$documentId);
|
|
$haveExpireDoc=array("SFI","MIC","CPR");
|
|
if(in_array($doc_type, $haveExpireDoc)){
|
|
docExpireDate($id,$doc_type,null,$remarks);
|
|
}
|
|
$haveCompletedDoc=array("EHA","HBV","DSC");
|
|
if(in_array($doc_type, $haveCompletedDoc)){
|
|
docExpireDate($id,$doc_type,$remarks,null);
|
|
}
|
|
$activitydata = array(
|
|
'activity_description' => $doc_type .' Remarks Update',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
'file_url'=>$uploadto.$path['file_name'],
|
|
);
|
|
echo json_encode($output);
|
|
}else{
|
|
$output=array(
|
|
'upload'=>'failed',
|
|
'msg'=>'Check File Type.',
|
|
'file_url'=>$uploadto.$path['file_name'],
|
|
);
|
|
echo json_encode($output);
|
|
}
|
|
}
|
|
public function ProfileUpdate() {
|
|
//pre($_FILES['malpractice_document']);die;
|
|
$form_tab = $this->input->post('form_tab_status');
|
|
$_SESSION['form_tab_status']=$form_tab;
|
|
|
|
$id = $this->input->post('id');
|
|
$form_status = $this->input->post('form_status');
|
|
$form_mode = $this->input->post('form_mode');
|
|
|
|
$fname = $this->input->post('fname');
|
|
$lname = $this->input->post('lname');
|
|
$phone = $this->input->post('phone');
|
|
$qualification_type = $this->input->post('qualification_type');
|
|
$service = $this->input->post('service');
|
|
|
|
$gender = $this->input->post('gender');
|
|
$marital_status = $this->input->post('marital_status');
|
|
$dependents = $this->input->post('dependents');
|
|
$dob = $this->input->post('dob');
|
|
$soc_sec = $this->input->post('soc_sec');
|
|
$country_of_birth = $this->input->post('country_of_birth');
|
|
$ethnicity = $this->input->post('ethnicity');
|
|
$height = $this->input->post('height_feet').'/'.$this->input->post('height_inches');
|
|
$weight = $this->input->post('weight');
|
|
$eye_color = $this->input->post('eye_color');
|
|
$hair_color = $this->input->post('hair_color');
|
|
$primary_language = $this->input->post('primary_langualge');
|
|
$primary_language=implode("/",$primary_language);
|
|
$availability_borough = $this->input->post('availability_borough');
|
|
$availability_borough=implode("/",$availability_borough);
|
|
$availability = $this->input->post('availability');
|
|
|
|
$availability=implode("/",$availability);
|
|
|
|
$address1 = $this->input->post('address1');
|
|
$apt1 = $this->input->post('apt1');
|
|
$direction1 = $this->input->post('direction1');
|
|
$state1 = $this->input->post('state1');
|
|
$county1 = $this->input->post('county1');
|
|
$zipcode1 = $this->input->post('zipcode1');
|
|
$lang1 = $this->input->post('lang1');
|
|
$long1 = $this->input->post('long1');
|
|
$city1 = $this->input->post('city1');
|
|
|
|
$address2 = $this->input->post('address2');
|
|
$apt2 = $this->input->post('apt2');
|
|
$direction2 = $this->input->post('direction2');
|
|
$state2 = $this->input->post('state2');
|
|
$county2 = $this->input->post('county2');
|
|
$zipcode2 = $this->input->post('zipcode2');
|
|
$lang2 = $this->input->post('lang2');
|
|
$long2 = $this->input->post('long2');
|
|
$city2 = $this->input->post('city2');
|
|
|
|
$phone2 = $this->input->post('phone2');
|
|
$other_contact = $this->input->post('other_contact');
|
|
$alternative_email = $this->input->post('alternative_email');
|
|
$preferred_contact = $this->input->post('preferred_contact');
|
|
$years_of_exp = $this->input->post('years_of_exp');
|
|
$caregiver = $this->Caregiver_model->getNurseById($id);
|
|
|
|
|
|
if (!empty($id)) {
|
|
$data = array();
|
|
$data['nurse'] = $this->Caregiver_model->getNurseById($id);
|
|
$data['state_list']=$this->Caregiver_model->get_state_list();
|
|
$data['skills']=$this->Caregiver_model->caregiver_skill_list();
|
|
|
|
$data['tab']=$form_status;
|
|
$this->load->view('home/dashboard'); // just the header file
|
|
$this->load->view('profile', $data);
|
|
$this->load->view('home/footer'); // just the footer file
|
|
}
|
|
|
|
$data = array();
|
|
if(empty($id)){
|
|
//die;
|
|
$this->session->set_flashdata('feedback_error', 'Data Saving Error.');
|
|
redirect('CaregiversDashboard');
|
|
}
|
|
else {
|
|
//Cargiver IONID,NAME,ID
|
|
$CData=$this->Caregiver_model->getNameIdById($id);
|
|
//pre($CData);
|
|
$folder_name='uploads/Documents/USER_'.str_pad($CData['ion_user_id'], 6, "0", STR_PAD_LEFT).'/';
|
|
$uploadData['folder_name']=$folder_name;
|
|
$uploadData['CONFIG']['allowed_types']='gif|jpg|png|jpeg|pdf';
|
|
$uploadData['CONFIG']['max_size']='20480000';
|
|
|
|
$citizen = array(
|
|
'citizen'=>$this->input->post('citizen'),
|
|
'remain_permanently'=>$this->input->post('remain_permanently'),
|
|
'authorization_to_work'=>$this->input->post('authorization_to_work'),
|
|
'involved_as_defendant'=>$this->input->post('involved_as_defendant'),
|
|
'involved_as_defendant_explain'=>$this->input->post('involved_as_defendant_explain'),
|
|
'convicted'=>$this->input->post('convicted'),
|
|
'convicted_crime_explain'=>$this->input->post('convicted_crime_explain'),
|
|
'convicted_for_negligence'=>$this->input->post('convicted_for_negligence'),
|
|
'negligence_explain'=>$this->input->post('negligence_explain'),
|
|
'criminal_convictions'=>$this->input->post('criminal_convictions'),
|
|
'criminal_convictions_details'=>$this->input->post('criminal_convictions_details'));
|
|
|
|
$citizenJson = json_encode($citizen);
|
|
$physicalExamForm = array();
|
|
if($this->input->post('height_feet')!=""){ $physicalExamForm['height_feet'] = $this->input->post('height_feet'); }
|
|
if($this->input->post('height_inches')!=""){ $physicalExamForm['height_inches'] = $this->input->post('height_inches'); }
|
|
if($this->input->post('weight')!=""){ $physicalExamForm['weight'] = $this->input->post('weight'); }
|
|
if($this->input->post('blood_pressure')!=""){ $physicalExamForm['blood_pressure'] = $this->input->post('blood_pressure'); }
|
|
if($this->input->post('pulse')!=""){ $physicalExamForm['pulse'] = $this->input->post('pulse'); }
|
|
if($this->input->post('respiration')!=""){ $physicalExamForm['respiration'] = $this->input->post('respiration'); }
|
|
if($this->input->post('heart')!=""){ $physicalExamForm['heart'] = $this->input->post('heart'); }
|
|
if($this->input->post('lungs')!=""){ $physicalExamForm['lungs'] = $this->input->post('lungs'); }
|
|
if($this->input->post('muscular_skeleta')!=""){ $physicalExamForm['muscular_skeleta'] = $this->input->post('muscular_skeleta'); }
|
|
if($this->input->post('gu')!=""){ $physicalExamForm['gu'] = $this->input->post('gu'); }
|
|
if($this->input->post('gi')!=""){ $physicalExamForm['gi'] = $this->input->post('gi'); }
|
|
if($this->input->post('ppd1_testDate')!=""){ $physicalExamForm['ppd1_testDate'] = $this->input->post('ppd1_testDate'); }
|
|
if($this->input->post('ppd1_result')!=""){ $physicalExamForm['ppd1_result'] = $this->input->post('ppd1_result'); }
|
|
if($this->input->post('ppd1_resultDate')!=""){ $physicalExamForm['ppd1_resultDate'] = $this->input->post('ppd1_resultDate'); }
|
|
if($this->input->post('ppd2_testDate')!=""){ $physicalExamForm['ppd2_testDate'] = $this->input->post('gi'); }
|
|
if($this->input->post('ppd2_result')!=""){ $physicalExamForm['ppd2_result'] = $this->input->post('ppd2_result'); }
|
|
if($this->input->post('ppd2_resultDate')!=""){ $physicalExamForm['ppd2_resultDate'] = $this->input->post('ppd2_resultDate'); }
|
|
if($this->input->post('xray_testDate')!=""){ $physicalExamForm['xray_testDate'] = $this->input->post('xray_testDate'); }
|
|
if($this->input->post('xray_result')!=""){ $physicalExamForm['xray_result'] = $this->input->post('xray_result'); }
|
|
if($this->input->post('xray_resultDate')!=""){ $physicalExamForm['xray_resultDate'] = $this->input->post('xray_resultDate'); }
|
|
if($this->input->post('rubella_testDate')!=""){ $physicalExamForm['rubella_testDate'] = $this->input->post('rubella_testDate'); }
|
|
if($this->input->post('rubella_result')!=""){ $physicalExamForm['rubella_result'] = $this->input->post('rubella_result'); }
|
|
if($this->input->post('rubella_resultDate')!=""){ $physicalExamForm['rubella_resultDate'] = $this->input->post('rubella_resultDate'); }
|
|
if($this->input->post('rubeola_testDate')!=""){ $physicalExamForm['rubeola_testDate'] = $this->input->post('rubeola_testDate'); }
|
|
if($this->input->post('rubeola_result')!=""){ $physicalExamForm['rubeola_result'] = $this->input->post('rubeola_result'); }
|
|
if($this->input->post('rubeola_resultDate')!=""){ $physicalExamForm['rubeola_resultDate'] = $this->input->post('rubeola_resultDate'); }
|
|
if($this->input->post('rubeola_details')!=""){ $physicalExamForm['rubeola_details'] = $this->input->post('rubeola_details'); }
|
|
if($this->input->post('influenza_testDate')!=""){ $physicalExamForm['influenza_testDate'] = $this->input->post('influenza_testDate'); }
|
|
if($this->input->post('influenza_resultDate')!=""){ $physicalExamForm['influenza_resultDate'] = $this->input->post('influenza_resultDate'); }
|
|
if($this->input->post('Diphtheria')!=""){ $physicalExamForm['Diphtheria'] = $this->input->post('Diphtheria'); }
|
|
if($this->input->post('Tetanus')!=""){ $physicalExamForm['Tetanus'] = $this->input->post('Tetanus'); }
|
|
if($this->input->post('Mumps')!=""){ $physicalExamForm['Mumps'] = $this->input->post('Mumps'); }
|
|
if($this->input->post('RubellaVaccine')!=""){ $physicalExamForm['RubellaVaccine'] = $this->input->post('RubellaVaccine'); }
|
|
if($this->input->post('MeaslesVaccine1')!=""){ $physicalExamForm['MeaslesVaccine1'] = $this->input->post('MeaslesVaccine1'); }
|
|
if($this->input->post('MeaslesVaccine2')!=""){ $physicalExamForm['MeaslesVaccine2'] = $this->input->post('MeaslesVaccine2'); }
|
|
if($this->input->post('HB1')!=""){ $physicalExamForm['HB1'] = $this->input->post('HB1'); }
|
|
if($this->input->post('HB2')!=""){ $physicalExamForm['HB2'] = $this->input->post('HB2'); }
|
|
if($this->input->post('HB3')!=""){ $physicalExamForm['HB3'] = $this->input->post('HB3'); }
|
|
if($this->input->post('DrugScreen')!=""){ $physicalExamForm['DrugScreen'] = $this->input->post('DrugScreen'); }
|
|
if($this->input->post('lot_num')!=""){ $physicalExamForm['lot_num'] = $this->input->post('lot_num'); }
|
|
if($this->input->post('lot_exp')!=""){ $physicalExamForm['lot_exp'] = $this->input->post('lot_exp'); }
|
|
if($this->input->post('due_to_pregnancy')!=""){ $physicalExamForm['due_to_pregnancy'] = $this->input->post('due_to_pregnancy'); }
|
|
if($this->input->post('list_of_medications')!=""){ $physicalExamForm['list_of_medications'] = $this->input->post('list_of_medications'); }
|
|
if($this->input->post('eyeglasses')!=""){ $physicalExamForm['eyeglasses'] = $this->input->post('eyeglasses'); }
|
|
if($this->input->post('hearingAid')!=""){ $physicalExamForm['hearingAid'] = $this->input->post('hearingAid'); }
|
|
if($this->input->post('extended_periods')!=""){ $physicalExamForm['extended_periods'] = $this->input->post('extended_periods'); }
|
|
if($this->input->post('extended_periods_explain')!=""){ $physicalExamForm['extended_periods_explain'] = $this->input->post('extended_periods_explain'); }
|
|
if($this->input->post('disorders')!=""){ $physicalExamForm['disorders'] = $this->input->post('disorders'); }
|
|
if($this->input->post('extended_periods_explain')!=""){ $physicalExamForm['extended_periods_explain'] = $this->input->post('extended_periods_explain'); }
|
|
|
|
$physicalExamFormJson = json_encode($physicalExamForm);
|
|
|
|
$emp_health_assesment = array();
|
|
if($this->input->post('diabetes')!=""){ $emp_health_assesment['diabetes'] = $this->input->post('diabetes'); }
|
|
if($this->input->post('kidney_disease')!=""){ $emp_health_assesment['kidney_disease'] = $this->input->post('kidney_disease'); }
|
|
if($this->input->post('heart_disease')!=""){ $emp_health_assesment['heart_disease'] = $this->input->post('heart_disease'); }
|
|
if($this->input->post('high_blood_pressure')!=""){ $emp_health_assesment['high_blood_pressure'] = $this->input->post('high_blood_pressure'); }
|
|
if($this->input->post('arthritis')!=""){ $emp_health_assesment['arthritis'] = $this->input->post('arthritis'); }
|
|
if($this->input->post('mental_illness')!=""){ $emp_health_assesment['mental_illness'] = $this->input->post('mental_illness'); }
|
|
if($this->input->post('epilepsy')!=""){ $emp_health_assesment['epilepsy'] = $this->input->post('epilepsy'); }
|
|
if($this->input->post('swelling_extremities')!=""){ $emp_health_assesment['swelling_extremities'] = $this->input->post('swelling_extremities'); }
|
|
if($this->input->post('allergies')!=""){ $emp_health_assesment['allergies'] = $this->input->post('allergies'); }
|
|
if($this->input->post('back_pain')!=""){ $emp_health_assesment['back_pain'] = $this->input->post('back_pain'); }
|
|
if($this->input->post('pain_urination')!=""){ $emp_health_assesment['pain_urination'] = $this->input->post('pain_urination'); }
|
|
if($this->input->post('change_bowel_habit')!=""){ $emp_health_assesment['change_bowel_habit'] = $this->input->post('change_bowel_habit'); }
|
|
if($this->input->post('increased_thirst')!=""){ $emp_health_assesment['increased_thirst'] = $this->input->post('increased_thirst'); }
|
|
if($this->input->post('persistent_lumps')!=""){ $emp_health_assesment['persistent_lumps'] = $this->input->post('persistent_lumps'); }
|
|
if($this->input->post('infectious_disease')!=""){ $emp_health_assesment['infectious_disease'] = $this->input->post('infectious_disease'); }
|
|
if($this->input->post('cancer')!=""){ $emp_health_assesment['cancer'] = $this->input->post('cancer'); }
|
|
if($this->input->post('other_disability')!=""){ $emp_health_assesment['other_disability'] = $this->input->post('other_disability'); }
|
|
if($this->input->post('cough_3_weeks')!=""){ $emp_health_assesment['cough_3_weeks'] = $this->input->post('cough_3_weeks'); }
|
|
if($this->input->post('blood_sputum')!=""){ $emp_health_assesment['blood_sputum'] = $this->input->post('blood_sputum'); }
|
|
if($this->input->post('shortness_breath')!=""){ $emp_health_assesment['shortness_breath'] = $this->input->post('shortness_breath'); }
|
|
if($this->input->post('night_sweat')!=""){ $emp_health_assesment['night_sweat'] = $this->input->post('night_sweat'); }
|
|
if($this->input->post('chest_pain')!=""){ $emp_health_assesment['chest_pain'] = $this->input->post('chest_pain'); }
|
|
if($this->input->post('unexplained_weight_loss')!=""){ $emp_health_assesment['unexplained_weight_loss'] = $this->input->post('unexplained_weight_loss'); }
|
|
if($this->input->post('appetite_loss')!=""){ $emp_health_assesment['appetite_loss'] = $this->input->post('appetite_loss'); }
|
|
if($this->input->post('hoarseness')!=""){ $emp_health_assesment['hoarseness'] = $this->input->post('hoarseness'); }
|
|
if($this->input->post('thirst_increase')!=""){ $emp_health_assesment['thirst_increase'] = $this->input->post('thirst_increase'); }
|
|
if($this->input->post('fatigue')!=""){ $emp_health_assesment['fatigue'] = $this->input->post('fatigue'); }
|
|
if($this->input->post('fever')!=""){ $emp_health_assesment['fever'] = $this->input->post('fever'); }
|
|
if($this->input->post('positive_ppd')!=""){ $emp_health_assesment['positive_ppd'] = $this->input->post('positive_ppd'); }
|
|
if($this->input->post('ppd_explain')!=""){ $emp_health_assesment['ppd_explain'] = $this->input->post('ppd_explain'); }
|
|
if($this->input->post('under_care')!=""){ $emp_health_assesment['under_care'] = $this->input->post('under_care'); }
|
|
if($this->input->post('under_care_explain')!=""){ $emp_health_assesment['under_care_explain'] = $this->input->post('under_care_explain'); }
|
|
if($this->input->post('change_behaviour')!=""){ $emp_health_assesment['change_behaviour'] = $this->input->post('change_behaviour'); }
|
|
if($this->input->post('change_behaviour_explain')!=""){ $emp_health_assesment['change_behaviour_explain'] = $this->input->post('change_behaviour_explain'); }
|
|
if($this->input->post('prescription_medications')!=""){ $emp_health_assesment['prescription_medications'] = $this->input->post('prescription_medications'); }
|
|
if($this->input->post('prescription_medications_explain')!=""){ $emp_health_assesment['prescription_medications_explain'] = $this->input->post('prescription_medications_explain'); }
|
|
if($this->input->post('screening_test')!=""){ $emp_health_assesment['screening_test'] = $this->input->post('screening_test'); }
|
|
if($this->input->post('screening_test_explain')!=""){ $emp_health_assesment['screening_test_explain'] = $this->input->post('screening_test_explain'); }
|
|
|
|
if($this->input->post('past_illness')!=""){ $emp_health_assesment['past_illness'] = $this->input->post('past_illness'); }
|
|
|
|
if($this->input->post('past_illness_explain')!=""){ $emp_health_assesment['past_illness_explain'] = $this->input->post('past_illness_explain'); }
|
|
if($this->input->post('name_of_physician')!=""){ $emp_health_assesment['name_of_physician'] = $this->input->post('name_of_physician'); }
|
|
if($this->input->post('tel_of_physician')!=""){ $emp_health_assesment['tel_of_physician'] = $this->input->post('tel_of_physician'); }
|
|
//pr($emp_health_assesment);die;
|
|
|
|
//pr($physicalExamFormJson);die;
|
|
$emp_health_assesmentJson =json_encode($emp_health_assesment);
|
|
|
|
$hb_form = array();
|
|
if($this->input->post('Allergies')!=""){ $hb_form['Allergies'] = $this->input->post('Allergies'); }
|
|
if($this->input->post('date_of_exposure')!=""){ $hb_form['date_of_exposure'] = $this->input->post('date_of_exposure'); }
|
|
if($this->input->post('location')!=""){ $hb_form['location'] = $this->input->post('location'); }
|
|
if($this->input->post('type_of_exposure')!=""){ $hb_form['type_of_exposure'] = $this->input->post('type_of_exposure'); }
|
|
if($this->input->post('incident_report')!=""){ $hb_form['incident_report'] = $this->input->post('incident_report'); }
|
|
if($this->input->post('report_completed')!=""){ $hb_form['report_completed'] = $this->input->post('report_completed'); }
|
|
if($this->input->post('Initial_Dose_Type')!=""){ $hb_form['Initial_Dose_Type'] = $this->input->post('Initial_Dose_Type'); }
|
|
if($this->input->post('Initial_Dose_Date')!=""){ $hb_form['Initial_Dose_Date'] = $this->input->post('Initial_Dose_Date'); }
|
|
if($this->input->post('Initial_Dose')!=""){ $hb_form['Initial_Dose'] = $this->input->post('Initial_Dose'); }
|
|
if($this->input->post('Initial_Dose_Site')!=""){ $hb_form['Initial_Dose_Site'] = $this->input->post('Initial_Dose_Site'); }
|
|
if($this->input->post('Initial_Dose_Type2')!=""){ $hb_form['Initial_Dose_Type2'] = $this->input->post('Initial_Dose_Type2'); }
|
|
if($this->input->post('Initial_Dose_Date2')!=""){ $hb_form['Initial_Dose_Date2'] = $this->input->post('Initial_Dose_Date2'); }
|
|
if($this->input->post('Initial_Dose2')!=""){ $hb_form['Initial_Dose2'] = $this->input->post('Initial_Dose2'); }
|
|
if($this->input->post('Initial_Dose_Site2')!=""){ $hb_form['Initial_Dose_Site2'] = $this->input->post('Initial_Dose_Site2'); }
|
|
if($this->input->post('Initial_Dose_Type3')!=""){ $hb_form['Initial_Dose_Type3'] = $this->input->post('Initial_Dose_Type3'); }
|
|
if($this->input->post('Initial_Dose_Date3')!=""){ $hb_form['Initial_Dose_Date3'] = $this->input->post('Initial_Dose_Date3'); }
|
|
if($this->input->post('Initial_Dose3')!=""){ $hb_form['Initial_Dose3'] = $this->input->post('Initial_Dose3'); }
|
|
if($this->input->post('Initial_Dose_Site3')!=""){ $hb_form['Initial_Dose_Site3'] = $this->input->post('Initial_Dose_Site3'); }
|
|
if($this->input->post('Initial_Dose_Type4')!=""){ $hb_form['Initial_Dose_Type4'] = $this->input->post('Initial_Dose_Type4'); }
|
|
if($this->input->post('Initial_Dose_Date4')!=""){ $hb_form['Initial_Dose_Date4'] = $this->input->post('Initial_Dose_Date4'); }
|
|
if($this->input->post('Initial_Dose4')!=""){ $hb_form['Initial_Dose4'] = $this->input->post('Initial_Dose4'); }
|
|
if($this->input->post('Initial_Dose_Site4')!=""){ $hb_form['Initial_Dose_Site4'] = $this->input->post('Initial_Dose_Site4'); }
|
|
if($this->input->post('lab_date1')!=""){ $hb_form['lab_date1'] = $this->input->post('lab_date1'); }
|
|
if($this->input->post('lab_type1')!=""){ $hb_form['lab_type1'] = $this->input->post('lab_type1'); }
|
|
if($this->input->post('lab_result1')!=""){ $hb_form['lab_result1'] = $this->input->post('lab_result1'); }
|
|
if($this->input->post('lab_action1')!=""){ $hb_form['lab_action1'] = $this->input->post('lab_action1'); }
|
|
if($this->input->post('lab_date2')!=""){ $hb_form['lab_date2'] = $this->input->post('lab_date2'); }
|
|
if($this->input->post('lab_type2')!=""){ $hb_form['lab_type2'] = $this->input->post('lab_type2'); }
|
|
if($this->input->post('lab_result2')!=""){ $hb_form['lab_result2'] = $this->input->post('lab_result2'); }
|
|
if($this->input->post('lab_action2')!=""){ $hb_form['lab_action2'] = $this->input->post('lab_action2'); }
|
|
if($this->input->post('lab_date3')!=""){ $hb_form['lab_date3'] = $this->input->post('lab_date3'); }
|
|
if($this->input->post('lab_type3')!=""){ $hb_form['lab_type3'] = $this->input->post('lab_type3'); }
|
|
if($this->input->post('lab_result3')!=""){ $hb_form['lab_result3'] = $this->input->post('lab_result3'); }
|
|
if($this->input->post('lab_action3')!=""){ $hb_form['lab_action3'] = $this->input->post('lab_action3'); }
|
|
if($this->input->post('lab_date4')!=""){ $hb_form['lab_date4'] = $this->input->post('lab_date4'); }
|
|
if($this->input->post('lab_type4')!=""){ $hb_form['lab_type4'] = $this->input->post('lab_type4'); }
|
|
if($this->input->post('lab_result4')!=""){ $hb_form['lab_result4'] = $this->input->post('lab_result4'); }
|
|
if($this->input->post('lab_action4')!=""){ $hb_form['lab_action4'] = $this->input->post('lab_action4'); }
|
|
|
|
//pr($physicalExamFormJson);die;
|
|
$hb_form_Json =json_encode($hb_form);
|
|
$employementHistory = array();
|
|
if($this->input->post('no_job_history')!=""){ $employementHistory['no_job_history'] = $this->input->post('no_job_history'); }
|
|
//else{
|
|
if($this->input->post('Current_emp_1')!=""){ $employementHistory['Current_emp_1'] = $this->input->post('Current_emp_1'); } else { $employementHistory['Current_emp_1'] = "0"; }
|
|
if($this->input->post('name_of_employeer')!=""){ $employementHistory['name_of_employeer'] = $this->input->post('name_of_employeer'); }
|
|
if($this->input->post('address_of_employer')!=""){ $employementHistory['address_of_employer'] = $this->input->post('address_of_employer'); }
|
|
if($this->input->post('tel_of_employer')!=""){ $employementHistory['tel_of_employer'] = $this->input->post('tel_of_employer'); }
|
|
if($this->input->post('work_performance_years')!=""){ $employementHistory['work_performance_years'] = $this->input->post('work_performance_years'); }
|
|
if($this->input->post('work_performance_months')!=""){ $employementHistory['work_performance_months'] = $this->input->post('work_performance_months'); }
|
|
if($this->input->post('reasonForLeaving')!=""){ $employementHistory['reasonForLeaving'] = $this->input->post('reasonForLeaving'); }
|
|
if($this->input->post('Current_emp_2')!=""){ $employementHistory['Current_emp_2'] = $this->input->post('Current_emp_2'); } else { $employementHistory['Current_emp_2'] = "0"; }
|
|
if($this->input->post('name_of_employeer1')!=""){ $employementHistory['name_of_employeer1'] = $this->input->post('name_of_employeer1'); }
|
|
if($this->input->post('address_of_employer1')!=""){ $employementHistory['address_of_employer1'] = $this->input->post('address_of_employer1'); }
|
|
if($this->input->post('tel_of_employer1')!=""){ $employementHistory['tel_of_employer1'] = $this->input->post('tel_of_employer1'); }
|
|
if($this->input->post('work_performance_years1')!=""){ $employementHistory['work_performance_years1'] = $this->input->post('work_performance_years1'); }
|
|
if($this->input->post('work_performance_months1')!=""){ $employementHistory['work_performance_months1'] = $this->input->post('work_performance_months1'); }
|
|
if($this->input->post('reasonForLeaving1')!=""){ $employementHistory['reasonForLeaving1'] = $this->input->post('reasonForLeaving1'); }
|
|
//}
|
|
|
|
if($this->input->post('license_no')!=""){ $employementHistory2['license_no'] = $this->input->post('license_no'); }
|
|
if($this->input->post('rn_lic_state')!=""){ $employementHistory2['rn_lic_state'] = $this->input->post('rn_lic_state'); }
|
|
if($this->input->post('license_exp_date')!=""){
|
|
$employementHistory2['license_exp_date'] = $this->input->post('license_exp_date');
|
|
docExpireDate($id,'rn_license',null,$employementHistory2['license_exp_date']);
|
|
}
|
|
// if(file_exists($_FILES['license_document']['tmp_name'])){
|
|
// $uploadData['NEW_FILENAME_START']='LIC';
|
|
// $uploadData['NAME']='license_document';
|
|
// $output=fileStore($_FILES,$uploadData);
|
|
// $employementHistory['license_document']=$output['PATH'].''.$output['NEW_FILE_NAME'];
|
|
// }else{
|
|
// $employementHistory['license_document']=$this->input->post('pre_license_document');
|
|
// }
|
|
// if(file_exists($_FILES['malpractice_document']['tmp_name'])){
|
|
// $uploadData['NEW_FILENAME_START']='MLP';
|
|
// $uploadData['NAME']='malpractice_document';
|
|
// $output1=fileStore($_FILES,$uploadData);
|
|
// $employementHistory['malpractice_document']=$output1['PATH'].''.$output1['NEW_FILE_NAME'];
|
|
// }else{
|
|
// $employementHistory['malpractice_document']=$this->input->post('pre_malpractice_document');
|
|
// }
|
|
|
|
if($this->input->post('malpractice_co')!=""){ $employementHistory2['malpractice_co'] = $this->input->post('malpractice_co'); }
|
|
if($this->input->post('malpractice_policy_no')!=""){ $employementHistory2['malpractice_policy_no'] = $this->input->post('malpractice_policy_no'); }
|
|
if($this->input->post('malpractice_policy_exp_date')!=""){
|
|
$employementHistory2['malpractice_policy_exp_date'] = $this->input->post('malpractice_policy_exp_date');
|
|
docExpireDate($id,'malpractice_policy',null,$employementHistory2['malpractice_policy_exp_date']);
|
|
}
|
|
if($this->input->post('license_investigated')!=""){ $employementHistory2['license_investigated'] = $this->input->post('license_investigated'); }
|
|
if($this->input->post('malpractice_claim')!=""){ $employementHistory2['malpractice_claim'] = $this->input->post('malpractice_claim'); }
|
|
if($this->input->post('license_or_malpractice_explanation')!=""){ $employementHistory2['license_or_malpractice_explanation'] = $this->input->post('license_or_malpractice_explanation'); }
|
|
if($this->input->post('pre_work_certificate_no')!=""){ $employementHistory2['pre_work_certificate_no'] = $this->input->post('pre_work_certificate_no'); }
|
|
if($this->input->post('pre_work_certificate_state')!=""){ $employementHistory2['pre_work_certificate_state'] = $this->input->post('pre_work_certificate_state'); }
|
|
if($this->input->post('last_hha_employed_date')!=""){ $employementHistory2['last_hha_employed_date'] = $this->input->post('last_hha_employed_date'); }
|
|
if($this->input->post('last_employed_for')!=""){ $employementHistory2['last_employed_for'] = $this->input->post('last_employed_for'); }
|
|
$employementHistoryJson = json_encode($employementHistory);
|
|
$employementHistoryJson2 = json_encode($employementHistory2);
|
|
|
|
// pre($employementHistory);die;
|
|
$data = array();
|
|
if($this->input->post('concent_signature')!=""){ $data['concent_signature'] = $this->input->post('concent_signature'); }
|
|
if($this->input->post('concent_date')!=""){ $data['concent_date'] = $this->input->post('concent_date'); }
|
|
|
|
if($this->input->post('Emergency_Contact_Name')!=""){ $data['Emergency_Contact_Name'] = $this->input->post('Emergency_Contact_Name'); }
|
|
if($this->input->post('Emergency_Contact_Relationship')!=""){ $data['Emergency_Contact_Relationship'] = $this->input->post('Emergency_Contact_Relationship'); }
|
|
|
|
if($this->input->post('Emergency_Contact_Telephone')!=""){ $data['Emergency_Contact_Telephone'] = $this->input->post('Emergency_Contact_Telephone'); }
|
|
if($this->input->post('Emergency_Contact_Cellphone')!=""){ $data['Emergency_Contact_Cellphone'] = $this->input->post('Emergency_Contact_Cellphone'); }
|
|
if($this->input->post('Emergency_Contact_Other')!=""){ $data['Emergency_Contact_Other'] = $this->input->post('Emergency_Contact_Other'); }
|
|
if($this->input->post('Emergency_Contact_Email')!=""){ $data['Emergency_Contact_Email'] = $this->input->post('Emergency_Contact_Email'); }
|
|
|
|
if($this->input->post('Emergency_Contact_Address')!=""){ $Emergency_Contact['Emergency_Contact_Address'] = $this->input->post('Emergency_Contact_Address'); }
|
|
if($this->input->post('Emergency_Contact_zipcode')!=""){ $Emergency_Contact['Emergency_Contact_zipcode'] = $this->input->post('Emergency_Contact_zipcode'); }
|
|
if($this->input->post('Emergency_Contact_County')!=""){ $Emergency_Contact['Emergency_Contact_County'] = $this->input->post('Emergency_Contact_County'); }
|
|
if($this->input->post('Emergency_Contact_State')!=""){ $Emergency_Contact['Emergency_Contact_State'] = $this->input->post('Emergency_Contact_State'); }
|
|
if($this->input->post('Emergency_Contact_City')!=""){ $Emergency_Contact['Emergency_Contact_City'] = $this->input->post('Emergency_Contact_City'); }
|
|
if($this->input->post('Emergency_Contact_Lang')!=""){ $Emergency_Contact['Emergency_Contact_Lang'] = $this->input->post('Emergency_Contact_Lang'); }
|
|
if($this->input->post('Emergency_Contact_Long')!=""){ $Emergency_Contact['Emergency_Contact_Long'] = $this->input->post('Emergency_Contact_Long'); }
|
|
if($this->input->post('Emergency_Contact_Address')!=""){ $data['Emergency_Contact_Address']=json_encode($Emergency_Contact); }
|
|
|
|
if($this->input->post('Emergency_Contact_Name1')!=""){ $data['Emergency_Contact_Name1'] = $this->input->post('Emergency_Contact_Name1'); }
|
|
if($this->input->post('Emergency_Contact_Relationship1')!=""){ $data['Emergency_Contact_Relationship1'] = $this->input->post('Emergency_Contact_Relationship1'); }
|
|
if($this->input->post('Emergency_Contact_Telephone1')!=""){ $data['Emergency_Contact_Telephone1'] = $this->input->post('Emergency_Contact_Telephone1'); }
|
|
if($this->input->post('Emergency_Contact_Cellphone1')!=""){ $data['Emergency_Contact_Cellphone1'] = $this->input->post('Emergency_Contact_Cellphone1'); }
|
|
if($this->input->post('Emergency_Contact_Other1')!=""){ $data['Emergency_Contact_Other1'] = $this->input->post('Emergency_Contact_Other1'); }
|
|
if($this->input->post('Emergency_Contact_Email1')!=""){ $data['Emergency_Contact_Email1'] = $this->input->post('Emergency_Contact_Email1'); }
|
|
|
|
if($this->input->post('Emergency_Contact_Address1')!=""){ $Emergency_Contact1['Emergency_Contact_Address1'] = $this->input->post('Emergency_Contact_Address1'); }
|
|
if($this->input->post('Emergency_Contact_zipcode1')!=""){ $Emergency_Contact1['Emergency_Contact_zipcode1'] = $this->input->post('Emergency_Contact_zipcode1'); }
|
|
if($this->input->post('Emergency_Contact_County1')!=""){ $Emergency_Contact1['Emergency_Contact_County1'] = $this->input->post('Emergency_Contact_County1'); }
|
|
if($this->input->post('Emergency_Contact_State1')!=""){ $Emergency_Contact1['Emergency_Contact_State1'] = $this->input->post('Emergency_Contact_State1'); }
|
|
if($this->input->post('Emergency_Contact_City1')!=""){ $Emergency_Contact1['Emergency_Contact_City1'] = $this->input->post('Emergency_Contact_City1'); }
|
|
if($this->input->post('Emergency_Contact_Lang1')!=""){ $Emergency_Contact1['Emergency_Contact_Lang1'] = $this->input->post('Emergency_Contact_Lang1'); }
|
|
if($this->input->post('Emergency_Contact_Long2')!=""){ $Emergency_Contact1['Emergency_Contact_Long2'] = $this->input->post('Emergency_Contact_Long2'); }
|
|
if($this->input->post('Emergency_Contact_Address1')!=""){ $data2['Emergency_Contact_Address1']=json_encode($Emergency_Contact1); }
|
|
|
|
if($this->input->post('citizen')!=""){ $data['citizen'] = $citizenJson; }
|
|
if($this->input->post('preferred_shifts')!=""){ $data['preferred_shifts'] = $this->input->post('preferred_shifts'); }
|
|
if($this->input->post('lic_no')!=""){ $data['lic_no'] = $this->input->post('lic_no'); }
|
|
if($this->input->post('lic_exp_date')!=""){ $data['lic_exp_date'] = $this->input->post('lic_exp_date'); }
|
|
if($this->input->post('lic_state')!=""){ $data['lic_state'] = $this->input->post('lic_state'); }
|
|
// if($this->input->post('alien_Authorized')!=""){ $data['alien_Authorized'] = $this->input->post('alien_Authorized'); }
|
|
// if($this->input->post('other_reg_number')!=""){ $data['other_reg_number'] = $this->input->post('other_reg_number'); }
|
|
// if($this->input->post('uscis')!=""){ $data['uscis'] = $this->input->post('uscis'); }
|
|
|
|
if($this->input->post('documents_type')!=""){ $data['documents_type'] = $this->input->post('documents_type'); }
|
|
if($this->input->post('documents_no')!=""){ $data['documents_no'] = $this->input->post('documents_no'); }
|
|
if($this->input->post('documents_expire_date')!=""){
|
|
$data['documents_expire_date'] = $this->input->post('documents_expire_date');
|
|
docExpireDate($id,'CTZ',null,$data['documents_expire_date']);
|
|
}
|
|
if($this->input->post('documents_type')=="Citizenship Document"){ $data['documents_expire_date']=""; }
|
|
if($this->input->post('physicaldefects')!=""){ $data['physicaldefects'] = $this->input->post('physicaldefects'); }
|
|
if($this->input->post('physicaldefects_details')!=""){ $data['physicaldefects_details'] = $this->input->post('physicaldefects_details'); }
|
|
|
|
if($this->input->post('injured')!=""){ $data['injured'] = $this->input->post('injured'); }
|
|
if($this->input->post('injuryDetails')!=""){ $data['injuryDetails'] = $this->input->post('injuryDetails'); }
|
|
|
|
if($this->input->post('defects')!=""){ $data['defects'] = $this->input->post('defects'); }
|
|
if($this->input->post('hearingdefectsDetails')!=""){ $data['hearingdefectsDetails'] = $this->input->post('hearingdefectsDetails'); }
|
|
|
|
if($this->input->post('inVision')!=""){ $data['inVision'] = $this->input->post('inVision'); }
|
|
if($this->input->post('visiondefectsDetails')!=""){ $data['visiondefectsDetails'] = $this->input->post('visiondefectsDetails'); }
|
|
|
|
if($this->input->post('speach')!=""){ $data['speach'] = $this->input->post('speach'); }
|
|
if($this->input->post('speechdefectsDetails')!=""){ $data['speechdefectsDetails'] = $this->input->post('speechdefectsDetails'); }
|
|
|
|
if($physicalExamFormJson!="" && $this->input->post('form_status')=="5"){ $data['physical_exam_form'] = $physicalExamFormJson; }
|
|
if($emp_health_assesmentJson!=""){ $data['emp_health_assesment'] = $emp_health_assesmentJson; }
|
|
if($hb_form_Json!=""){ $data['hb_form'] = $hb_form_Json; }
|
|
if($employementHistoryJson!="" && $this->input->post('form_status')=="4"){ $data['employementHistory'] = $employementHistoryJson; }
|
|
if($employementHistoryJson2!=""&& $employementHistoryJson2!="[]" && $this->input->post('form_status')=="4"){ $data['employementHistory2'] = $employementHistoryJson2; }
|
|
|
|
if($this->input->post('position_applied')!=""){ $data['position_applied'] = $this->input->post('position_applied'); }
|
|
// _die($_POST);
|
|
// echo '<pre>'; print_r($data); die;
|
|
//pre($data);die;
|
|
// pr($data);die;
|
|
if($this->input->post('school')){
|
|
$schoolCount = count($this->input->post('school'));
|
|
$school=$this->input->post('school');
|
|
for($i = 0; $i<$schoolCount; $i++){
|
|
$educationBackground[$i]['school']=$_POST['school'][$i];
|
|
$educationBackground[$i]['location_school']=$_POST['location_school'][$i];
|
|
$educationBackground[$i]['edu_years']=$_POST['edu_years'][$i];
|
|
$educationBackground[$i]['certificate_date']=$_POST['certificate_date'][$i];
|
|
$educationBackground[$i]['major_subject']=$_POST['major_subject'][$i];
|
|
}
|
|
$data['educationBackground'] = json_encode($educationBackground);
|
|
}
|
|
// _die($data['educationBackground']);
|
|
//pr($id);die;
|
|
if(!empty($data))
|
|
{
|
|
$success=$this->Caregiver_model->saveCaregiverStep('caregiver_step2',$data,$id);
|
|
};
|
|
$data = array();
|
|
if($this->input->post('fname')!=""){ $data['fname'] = $this->input->post('fname'); }
|
|
if($this->input->post('mid_name')!="" || $this->input->post('mid_name')==""){ $data['mid_name'] = $this->input->post('mid_name'); }
|
|
if($this->input->post('lname')!=""){ $data['lname'] = $this->input->post('lname'); }
|
|
if($this->input->post('fname')!=""){ $data['fname'] = $this->input->post('fname'); }
|
|
if($this->input->post('email')!=""){ $data['email'] = $this->input->post('email'); }
|
|
if($this->input->post('qualification_type')!=""){ $data['qualification_type'] = $qualification_type; }
|
|
if($this->input->post('address')!=""){ $data['address'] = $this->input->post('address'); }
|
|
if($this->input->post('phone')!=""){ $data['phone'] = $this->input->post('phone'); }
|
|
if($this->input->post('primary_langualge')!=""){ $data['primary_langualge'] = $primary_language; }
|
|
if($this->input->post('gender')!=""){ $data['gender'] = $this->input->post('gender'); }
|
|
if($this->input->post('marital_status')!=""){ $data['marital_status'] = $this->input->post('marital_status'); }
|
|
if($this->input->post('maiden_name')!=""){ $data['maiden_name'] = $this->input->post('maiden_name'); }
|
|
if($this->input->post('dependents')!=""){ $data['dependents'] = $this->input->post('dependents'); }
|
|
if($this->input->post('dob')!=""){ $data['dob'] = $this->input->post('dob'); }
|
|
if($this->input->post('soc_sec')!=""){ $data['soc_sec'] = $this->input->post('soc_sec'); }
|
|
if($this->input->post('ethnicity')!=""){ $data['ethnicity'] = $this->input->post('ethnicity'); }
|
|
if($this->input->post('eye_color')!=""){ $data['eye_color'] = $this->input->post('eye_color'); }
|
|
if($this->input->post('hair_color')!=""){ $data['hair_color'] = $this->input->post('hair_color'); }
|
|
if($this->input->post('address1')!=""){ $data['address1'] = $this->input->post('address1'); }
|
|
// if($this->input->post('direction1')!=""){ $data['direction1'] = $this->input->post('direction1'); }
|
|
if($this->input->post('state1')!=""){ $data['state1'] = $this->input->post('state1'); }
|
|
if($this->input->post('county1')!=""){ $data['county1'] = $this->input->post('county1'); }
|
|
if($this->input->post('zipcode1')!=""){ $data['zipcode1'] = $this->input->post('zipcode1'); }
|
|
if($this->input->post('apt1')!=""){ $data['apartment1'] = $this->input->post('apt1'); }
|
|
if($this->input->post('city1')!=""){ $data['city1'] = $this->input->post('city1'); }
|
|
if($this->input->post('submission_date')!=""){ $data['submission_date'] = $this->input->post('submission_date'); }
|
|
if($this->input->post('lang1')!=""){ $data['lang1'] = $this->input->post('lang1'); }
|
|
if($this->input->post('long1')!=""){ $data['long1'] = $this->input->post('long1'); }
|
|
if($this->input->post('other_contact')!=""){ $data['other_contact'] = $this->input->post('other_contact'); }
|
|
if($this->input->post('alternative_email')!=""){ $data['alternative_email'] = $this->input->post('alternative_email'); }
|
|
if($this->input->post('preferred_contact')!=""){ $data['preferred_contact'] = $this->input->post('preferred_contact'); }
|
|
if($this->input->post('availability')!=""){ $data['availability'] = $availability; }
|
|
if($this->input->post('availability_borough')!=""){ $data['availability_borough'] = $availability_borough; }
|
|
if($this->input->post('availability_time_slot')!=""){ $data['availability_time_slot'] = $this->input->post('availability_time_slot'); }
|
|
if($this->input->post('availability_stay')!=""){ $data['availability_stay'] = $this->input->post('availability_stay'); }
|
|
if($this->input->post('availability_note')!=""){ $data['availability_note'] = $this->input->post('availability_note'); }
|
|
if($this->input->post('referral_source')!=""){ $data['referral_source'] = $this->input->post('referral_source'); }
|
|
if($this->input->post('photo')!=""){ $data['photo'] = $this->input->post('photo'); }
|
|
if($this->input->post('PCA_Registry_Number')!=""){ $data['PCA_Registry_Number'] = $this->input->post('PCA_Registry_Number'); }
|
|
if($this->input->post('NPI_Number')!=""){ $data['NPI_Number'] = $this->input->post('NPI_Number'); }
|
|
if($this->input->post('live_with_patient')!=""){ $data['live_with_patient'] = $this->input->post('live_with_patient'); }
|
|
if($this->input->post('have_key')!=""){ $data['have_key'] = $this->input->post('have_key'); }
|
|
if($this->input->post('Religious_Preferences')!=""){ $data['Religious_Preferences'] = $this->input->post('Religious_Preferences'); }
|
|
if($this->input->post('Preffered_Gender')!=""){ $data['Preffered_Gender'] = $this->input->post('Preffered_Gender'); }
|
|
if($this->input->post('Notes')!=""){ $data['Notes'] = $this->input->post('Notes'); }
|
|
if($this->input->post('ion_user_id')!=""){ $data['ion_user_id'] = $this->input->post('ion_user_id'); }
|
|
// _die($data);
|
|
$caregiver = $this->Caregiver_model->getNurseById($id);
|
|
if($form_status->$caregiver->form_status){ if($this->input->post('form_status')!=""){ $data['form_status'] = $this->input->post('form_status'); } }
|
|
if($this->input->post('application_date')!=""){ $data['application_date'] = $this->input->post('application_date'); }
|
|
if($this->input->post('submited_for_verification')!=""){ $data['submited_for_verification'] = $this->input->post('submited_for_verification'); }
|
|
if($this->input->post('verification_submitted_by')!=""){ $data['verification_submitted_by'] = $this->input->post('verification_submitted_by'); }
|
|
if($this->input->post('verification_status')!=""){ $data['verification_status'] = $this->input->post('verification_status'); }
|
|
if($this->input->post('verification_date')!=""){ $data['verification_date'] = $this->input->post('verification_date'); }
|
|
if($this->input->post('referral_source')!=""){ $data['referral_source'] = $this->input->post('referral_source'); }
|
|
if($this->input->post('status')!=""){ $data['status'] = $this->input->post('status'); }
|
|
if($this->input->post('created_by')!=""){ $data['created_by'] = $this->input->post('created_by'); }
|
|
if($this->input->post('years_of_exp')!=""){ $data['years_of_exp'] = $years_of_exp; }
|
|
|
|
$caregiverPer = json_decode($caregiver->from_tab_status_pctg);
|
|
$empAppPectg = $this->empAppPectg($id,$form_status);
|
|
//pre($empAppPectg);
|
|
$caregiverPer->{'form'.$form_status} = $empAppPectg;
|
|
//pre($caregiverPer);die;
|
|
$data['from_tab_status_pctg'] = json_encode($caregiverPer);
|
|
|
|
//if($this->input->post('from_tab_status_pctg')!=""){ $data['from_tab_status_pctg'] = $this->input->post('from_tab_status_pctg'); }
|
|
//pr($form_status."".$data);die;
|
|
if(!empty($data))
|
|
{
|
|
|
|
$success=$this->Caregiver_model->saveCaregiverStep('caregiver',$data,$id);
|
|
};
|
|
|
|
$data = array();
|
|
if($this->input->post('country_of_birth')!=""){ $data['country_of_birth'] = $this->input->post('country_of_birth'); }
|
|
if($this->input->post('height')!=""){ $data['height'] = $this->input->post('height'); }
|
|
if($this->input->post('weight')!=""){ $data['weight'] = $this->input->post('weight'); }
|
|
if($this->input->post('address2')!=""){ $data['address2'] = $this->input->post('address2'); }
|
|
if($this->input->post('direction2')!=""){ $data['direction2'] = $this->input->post('direction2'); }
|
|
if($this->input->post('state2')!=""){ $data['state2'] = $this->input->post('state2'); }
|
|
if($this->input->post('county2')!=""){ $data['county2'] = $this->input->post('county2'); }
|
|
if($this->input->post('zipcode2')!=""){ $data['zipcode2'] = $this->input->post('zipcode2'); }
|
|
if($this->input->post('apt2')!=""){ $data['apartment2'] = $this->input->post('apt2'); }
|
|
if($this->input->post('city2')!=""){ $data['city2'] = $this->input->post('city2'); }
|
|
if($this->input->post('lang2')!=""){ $data['lang2'] = $this->input->post('lang2'); }
|
|
if($this->input->post('long2')!=""){ $data['long2'] = $this->input->post('long2'); }
|
|
if($this->input->post('phone2')!=""){ $data['phone2'] = $this->input->post('phone2'); }
|
|
if($this->input->post('profession')!=""){ $data['profession'] = $this->input->post('profession'); }
|
|
if($this->input->post('employee_type')!=""){ $data['employee_type'] = $this->input->post('employee_type'); }
|
|
if($this->input->post('pre_employment_skill')!=""){ $data['pre_employment_skill'] = $this->input->post('pre_employment_skill'); }
|
|
if($this->input->post('Personal_References_Name')!=""){ $data['Personal_References_Name'] = $this->input->post('Personal_References_Name'); }
|
|
if($this->input->post('Personal_References_Address')!=""){ $data['Personal_References_Address'] = $this->input->post('Personal_References_Address'); }
|
|
if($this->input->post('Personal_References_Telephone')!=""){ $data['Personal_References_Telephone'] = $this->input->post('Personal_References_Telephone'); }
|
|
if($this->input->post('Profesonal_References_Name')!=""){ $data['Profesonal_References_Name'] = $this->input->post('Profesonal_References_Name'); }
|
|
if($this->input->post('Profesonal_References_Address')!=""){ $data['Profesonal_References_Address'] = $this->input->post('Profesonal_References_Address'); }
|
|
if($this->input->post('Profesonal_References_Telephone')!=""){ $data['Profesonal_References_Telephone'] = $this->input->post('Profesonal_References_Telephone'); }
|
|
if($this->input->post('PPD_Quantiferonon')!=""){ $data['PPD_Quantiferonon'] = $this->input->post('PPD_Quantiferonon'); }
|
|
if($this->input->post('PPD_Quantiferonon_status')!=""){ $data['PPD_Quantiferonon_status'] = $this->input->post('PPD_Quantiferonon_status'); }
|
|
if($this->input->post('CXR')!=""){ $data['CXR'] = $this->input->post('CXR'); }
|
|
if($this->input->post('drive_info')!=""){ $data['drive_info'] = $this->input->post('drive_info'); }
|
|
if($this->input->post('ny_drive_info')!=""){ $data['ny_drive_info'] = $this->input->post('ny_drive_info'); }
|
|
if($this->input->post('Carrier_Name')!=""){ $data['Carrier_Name'] = $this->input->post('Carrier_Name'); }
|
|
if($this->input->post('Policy_Number')!=""){ $data['Policy_Number'] = $this->input->post('Policy_Number'); }
|
|
if($this->input->post('Expiration_Date')!=""){ $data['Expiration_Date'] = $this->input->post('Expiration_Date'); }
|
|
if($this->input->post('Automobile_Policy_Holder_Name')!=""){ $data['Automobile_Policy_Holder_Name'] = $this->input->post('Automobile_Policy_Holder_Name'); }
|
|
if($this->input->post('Automobile_Policy_Number')!=""){ $data['Automobile_Policy_Number'] = $this->input->post('Automobile_Policy_Number'); }
|
|
if($this->input->post('Automobile_Policy_Expiration_Date')!=""){ $data['Automobile_Policy_Expiration_Date'] = $this->input->post('Automobile_Policy_Expiration_Date'); }
|
|
if($this->input->post('CPR_Certification_Expiration_Date')!=""){ $data['CPR_Certification_Expiration_Date'] = $this->input->post('CPR_Certification_Expiration_Date'); }
|
|
|
|
if($this->input->post('preferancesData'))
|
|
{
|
|
$prefDat = $this->input->post('preferancesData');
|
|
}
|
|
if(!empty($data))
|
|
{
|
|
$success=$this->Caregiver_model->saveCaregiverStep('caregiver_step3',$data,$id);
|
|
};
|
|
}
|
|
|
|
if (empty($id)) {
|
|
$this->session->set_flashdata('feedback_error', 'Data Saving Error.');
|
|
redirect('CaregiversDashboard');
|
|
} else {
|
|
// Updating Nurse
|
|
if($form_status==1){
|
|
$shPref = $this->Caregiver_model->updateShiftPreferances($id, $prefDat);
|
|
// _die($shPref);
|
|
$this->Caregiver_model->updateNurse($id, $data,$data2,$data3);
|
|
$this->Caregiver_model->updateService($id, $service);
|
|
|
|
|
|
//$this->Caregiver_model->updateNurse($id, $data,$data2);
|
|
$this->session->set_flashdata('feedback_success', 'Basic Information Updated.');
|
|
}else if($form_status==2){
|
|
$post = $this->input->post();
|
|
if(isset($post['none_demographic'])){
|
|
$data2['demographics_exp']='';
|
|
}else{
|
|
$demographysic_exp=json_encode($post['demo_exp_label']);
|
|
$data2['demographics_exp']=$demographysic_exp;
|
|
}
|
|
//pre($demographysic_exp);die;
|
|
// _die($post);
|
|
$this->Caregiver_model->updateNurse($id, $data,$data2);
|
|
$this->Caregiver_model->caregiversExperience($id, $post);
|
|
$this->Caregiver_model->updateService($id, $service);
|
|
$this->session->set_flashdata('feedback_success', 'Experience & skills Updated.');
|
|
}else if($form_status==3){
|
|
$this->Caregiver_model->updateNurse($id,$data,$data2,$data3);
|
|
$this->session->set_flashdata('feedback_success', 'Contact Information Updated.');
|
|
}
|
|
}
|
|
// Loading View
|
|
redirect($_SERVER['HTTP_REFERER']);
|
|
|
|
}
|
|
public function saveDocumentSignature()
|
|
{
|
|
// _die($_POST);
|
|
$data = array();
|
|
$data['document_details'] = $this->input->post("documentType");
|
|
$data['document_html'] = $this->input->post("rawForm");
|
|
$data['caregiver_id'] = $this->input->post("id");
|
|
$data['signature'] = $this->input->post("signature");
|
|
$data['signature_date'] = $this->input->post("date");
|
|
// $data['raw_form'] = $this->input->post("date");
|
|
if(!isset($_POST['signature_type']))
|
|
{
|
|
$data['signature_type'] = 'draw';
|
|
}
|
|
else
|
|
{
|
|
$data['signature_type'] =$this->input->post("signature_type");
|
|
}
|
|
$resp = $this->CaregiverDashboard_model->saveDislosureSignature($data);
|
|
echo $resp;
|
|
}
|
|
public function empAppPectg($id,$form_status)
|
|
{
|
|
$res = $this->Caregiver_model->getNurseById($id);
|
|
if($form_status == 1){
|
|
if($res->qualification_type==4){
|
|
//$total = 30;//Basic Tab RN
|
|
$total = 21;//Basic Tab RN
|
|
}else if($res->qualification_type==6 || $res->qualification_type==7){
|
|
//$total = 28;//Basic Tab HHA PCADD
|
|
$total = 20;//Basic Tab HHA PCADD
|
|
}else{
|
|
$total = 23;//Basic Tab LPN
|
|
}
|
|
}
|
|
elseif($form_status == 2){
|
|
$total = 20;//Experience
|
|
}
|
|
elseif($form_status == 4){
|
|
$total = 15;//Emp History
|
|
}
|
|
elseif($form_status == 5){
|
|
$total = 20;//Physical Info
|
|
}
|
|
|
|
// $res = $this->Caregiver_model->getNurseById($id);
|
|
// // echo "<pre>"; print_r($res); die;
|
|
// foreach ($mandateFields as $value)
|
|
// {
|
|
// if($res->$value == '')
|
|
// {
|
|
// // echo $value .':'. $res->$value .'<br>';
|
|
// $total = $total;
|
|
// }
|
|
// }
|
|
return ceil($total);
|
|
}
|
|
public function getTabStatus($id){
|
|
$caregiverData=$this->Caregiver_model->getNurseByIonId($id);
|
|
$from_tab_status_pctg=json_decode($caregiverData->from_tab_status_pctg);
|
|
//pre($caregiverData);
|
|
//pre($from_tab_status_pctg);
|
|
if($caregiverData->concent_date!=""){
|
|
$tabstatus['auth']=2;
|
|
}else{
|
|
$tabstatus['auth']=1;
|
|
}
|
|
|
|
if($tabstatus['auth']==1){
|
|
$tabstatus['basic']=0;
|
|
}else if($from_tab_status_pctg->form1!=0){
|
|
$tabstatus['basic']=2;
|
|
}else{
|
|
$tabstatus['basic']=1;
|
|
}
|
|
|
|
if($from_tab_status_pctg->form2!=0 && $tabstatus['basic']==2){
|
|
$tabstatus['exp']=2;
|
|
}else if($tabstatus['basic']==2){
|
|
$tabstatus['exp']=1;
|
|
}else{
|
|
$tabstatus['exp']=0;
|
|
}
|
|
|
|
|
|
if($from_tab_status_pctg->form4!=0 && $tabstatus['exp']==2){
|
|
$tabstatus['emp']=2;
|
|
}else if($tabstatus['exp']==2){
|
|
$tabstatus['emp']=1;
|
|
}else{
|
|
$tabstatus['emp']=0;
|
|
}
|
|
|
|
if($from_tab_status_pctg->form5!=0 && $tabstatus['emp']==2){
|
|
$tabstatus['phy']=2;
|
|
}else if($tabstatus['emp']==2){
|
|
$tabstatus['phy']=1;
|
|
}else{
|
|
$tabstatus['phy']=0;
|
|
}
|
|
|
|
if($caregiverData->qualification_type==4){
|
|
$doc_per=24;
|
|
}else if($caregiverData->qualification_type==5){
|
|
$doc_per=14;
|
|
}else if($caregiverData->qualification_type==6 || $caregiverData->qualification_type==7){
|
|
$doc_per=17;
|
|
}
|
|
|
|
//pre($doc_per);
|
|
if($from_tab_status_pctg->form11==$doc_per && $tabstatus['phy']=2){
|
|
$tabstatus['doc']=2;
|
|
}else if($tabstatus['phy']==2){
|
|
$tabstatus['doc']=1;
|
|
}else{
|
|
$tabstatus['doc']=0;
|
|
}
|
|
|
|
if($from_tab_status_pctg->submited_for_verification=='yes' && $tabstatus['doc']==2){
|
|
$tabstatus['dis']=2;
|
|
}else if($tabstatus['doc']==2){
|
|
$tabstatus['dis']=1;
|
|
}else{
|
|
$tabstatus['dis']=0;
|
|
}
|
|
return $tabstatus;
|
|
// var_dump($tabstatus);
|
|
// _die();
|
|
//pre($tabstatus);
|
|
}
|
|
public function getTabStatus_ajax($id){
|
|
$caregiverData=$this->Caregiver_model->getNurseByIonId($id);
|
|
$from_tab_status_pctg=json_decode($caregiverData->from_tab_status_pctg);
|
|
//pre($caregiverData);
|
|
//pre($from_tab_status_pctg);
|
|
if($caregiverData->concent_date!=""){
|
|
$tabstatus['auth']=2;
|
|
}else{
|
|
$tabstatus['auth']=1;
|
|
}
|
|
|
|
if($tabstatus['auth']==1){
|
|
$tabstatus['basic']=0;
|
|
}else if($from_tab_status_pctg->form1!=0){
|
|
$tabstatus['basic']=2;
|
|
}else{
|
|
$tabstatus['basic']=1;
|
|
}
|
|
|
|
if($from_tab_status_pctg->form2!=0 && $tabstatus['basic']==2){
|
|
$tabstatus['exp']=2;
|
|
}else if($tabstatus['basic']==2){
|
|
$tabstatus['exp']=1;
|
|
}else{
|
|
$tabstatus['exp']=0;
|
|
}
|
|
|
|
|
|
if($from_tab_status_pctg->form4!=0 && $tabstatus['exp']==2){
|
|
$tabstatus['emp']=2;
|
|
}else if($tabstatus['exp']==2){
|
|
$tabstatus['emp']=1;
|
|
}else{
|
|
$tabstatus['emp']=0;
|
|
}
|
|
|
|
if($from_tab_status_pctg->form5!=0 && $tabstatus['emp']==2){
|
|
$tabstatus['phy']=2;
|
|
}else if($tabstatus['emp']==2){
|
|
$tabstatus['phy']=1;
|
|
}else{
|
|
$tabstatus['phy']=0;
|
|
}
|
|
|
|
if($caregiverData->qualification_type==4){
|
|
$doc_per=24;
|
|
}else if($caregiverData->qualification_type==5){
|
|
$doc_per=14;
|
|
}else if($caregiverData->qualification_type==6 || $caregiverData->qualification_type==7){
|
|
$doc_per=17;
|
|
}
|
|
|
|
//pre($doc_per);
|
|
if($from_tab_status_pctg->form11==$doc_per && $tabstatus['phy']=2){
|
|
$tabstatus['doc']=2;
|
|
}else if($tabstatus['phy']==2){
|
|
$tabstatus['doc']=1;
|
|
}else{
|
|
$tabstatus['doc']=0;
|
|
}
|
|
|
|
if($from_tab_status_pctg->submited_for_verification=='yes' && $tabstatus['doc']==2){
|
|
$tabstatus['dis']=2;
|
|
}else if($tabstatus['doc']==2){
|
|
$tabstatus['dis']=1;
|
|
}else{
|
|
$tabstatus['dis']=0;
|
|
}
|
|
echo json_encode($tabstatus);
|
|
// var_dump($tabstatus);
|
|
// _die();
|
|
//pre($tabstatus);
|
|
}
|
|
public function profileOtherInfo(){
|
|
// echo '<pre>'; print_r($this->input->post()); echo '</pre>';
|
|
// echo '<pre>'; print_r($_FILES); echo '</pre>';die;
|
|
$usertype='Caregiver';
|
|
$savetime=date ('Y-m-d H:i:s', now());
|
|
$data_type=$this->input->post('data_type');
|
|
$id=$this->input->post('id');
|
|
$Ion_id=$this->input->post('Ion_id');
|
|
$form_status=$this->input->post('form_status');
|
|
$progress=$this->input->post('progress');
|
|
|
|
$pre_update_data=$this->Caregiver_model->getNurseByIonId($Ion_id);
|
|
if($pre_update_data->form_status->$form_status){ $form_status=$pre_update_data->form_status; }
|
|
|
|
//pre($data_type);die;
|
|
if($data_type=='data_for_varification'){
|
|
|
|
if($pre_update_data->availability_borough!=""){
|
|
$progress=$pre_update_data->progress;
|
|
}else{
|
|
$progress=$pre_update_data->progress + $progress;
|
|
}
|
|
|
|
$data=array(
|
|
'availability_borough'=>$this->input->post('availability_borough'),
|
|
'availability_time_slot'=>$this->input->post('availability_time_slot'),
|
|
'availability_stay'=>$this->input->post('availability_stay'),
|
|
'availability_note'=>$this->input->post('availability_note'),
|
|
'referral_source'=>$this->input->post('referral_source'),
|
|
'application_date'=>$this->input->post('application_date'),
|
|
'PCA_Registry_Number'=>$this->input->post('PCA_Registry_Number'),
|
|
'NPI_Number'=>$this->input->post('NPI_Number'),
|
|
'progress'=>$progress,
|
|
'form_status'=>$form_status,
|
|
);
|
|
$data3=array(
|
|
'profession'=>$this->input->post('profession'),
|
|
'employee_type'=>$this->input->post('employee_type'),
|
|
'pre_employment_skill'=>$this->input->post('pre_employment_skill')
|
|
);
|
|
//echo $id;
|
|
// echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($id,$data,$data2,$data3);
|
|
|
|
$activitydata = array(
|
|
'activity_description' =>'Data for Varification Updated.',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else if($data_type=='data_reference'){
|
|
//pre($pre_update_data);die;
|
|
if($pre_update_data->Personal_References_Name!=""){
|
|
$process=$pre_update_data->from_tab_status_pctg;
|
|
}else{
|
|
//$progress=$pre_update_data->progress + $progress;
|
|
$caregiverPer = json_decode($pre_update_data->from_tab_status_pctg);
|
|
$caregiverPer->form11 = $caregiverPer->form11 + 1;
|
|
$process= json_encode($caregiverPer);
|
|
}
|
|
|
|
$data=array(
|
|
'from_tab_status_pctg' => $process,
|
|
'form_status' => $form_status,
|
|
);
|
|
//pre($data);die;
|
|
$data3=array(
|
|
'Personal_References_Name'=>$this->input->post('Personal_References_Name'),
|
|
'Personal_References_Address'=>$this->input->post('Personal_References_Address'),
|
|
'Personal_References_Telephone'=>$this->input->post('Personal_References_Telephone'),
|
|
'Profesonal_References_Name'=>$this->input->post('Profesonal_References_Name'),
|
|
'Profesonal_References_Address'=>$this->input->post('Profesonal_References_Address'),
|
|
'Profesonal_References_Telephone'=>$this->input->post('Profesonal_References_Telephone'),
|
|
);
|
|
// echo $id;
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($id,$data,$data2,$data3);
|
|
|
|
$activitydata = array(
|
|
'activity_description' =>'Data for Reference Updated.',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else if($data_type=='Malpractice_Insurance_Policy'){
|
|
if($pre_update_data->Policy_Number!=""){
|
|
$progress=$pre_update_data->progress;
|
|
}else{
|
|
$progress=$pre_update_data->progress + $progress;
|
|
}
|
|
|
|
$data=array(
|
|
'progress'=>$progress,
|
|
'form_status'=>$form_status,
|
|
);
|
|
$data3=array(
|
|
'Carrier_Name'=>$this->input->post('Carrier_Name'),
|
|
'Policy_Number'=>$this->input->post('Policy_Number'),
|
|
'Expiration_Date'=>$this->input->post('Expiration_Date'),
|
|
);
|
|
// echo $id;
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($id,$data,$data2,$data3);
|
|
|
|
$activitydata = array(
|
|
'activity_description' =>'Data for Malpractice_Insurance_Policy Updated.',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else if($data_type=='Automobile_Insurance_Policy'){
|
|
if($pre_update_data->Automobile_Policy_Number!=""){
|
|
$progress=$pre_update_data->progress;
|
|
}else{
|
|
$progress=$pre_update_data->progress + $progress;
|
|
}
|
|
|
|
$data=array(
|
|
'progress'=>$progress,
|
|
'form_status'=>$form_status,
|
|
);
|
|
$data3=array(
|
|
'Automobile_Policy_Holder_Name'=>$this->input->post('Automobile_Policy_Holder_Name'),
|
|
'Automobile_Policy_Number'=>$this->input->post('Automobile_Policy_Number'),
|
|
'Automobile_Policy_Expiration_Date'=>$this->input->post('Automobile_Policy_Expiration_Date'),
|
|
'CPR_Certification_Expiration_Date'=>$this->input->post('CPR_Certification_Expiration_Date'),
|
|
);
|
|
// echo $id;
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($id,$data,$data2,$data3);
|
|
|
|
$activitydata = array(
|
|
'activity_description' =>'Data for Automobile_Insurance_Policy Updated.',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else if($data_type=='Emergency_Contact'){
|
|
if($pre_update_data->Emergency_Contact_Name!=""){
|
|
$progress=$pre_update_data->progress;
|
|
}else{
|
|
$progress=$pre_update_data->progress + $progress;
|
|
}
|
|
|
|
$data=array(
|
|
'live_with_patient'=>$this->input->post('live_with_patient'),
|
|
'have_key'=>$this->input->post('have_key'),
|
|
'progress'=>$progress,
|
|
'form_status'=>$form_status,
|
|
);
|
|
$data2=array(
|
|
'Emergency_Contact_Name'=>$this->input->post('Emergency_Contact_Name'),
|
|
'Emergency_Contact_Relationship'=>$this->input->post('Emergency_Contact_Relationship'),
|
|
'Emergency_Contact_Address'=>$this->input->post('Emergency_Contact_Address'),
|
|
'Emergency_Contact_Telephone'=>$this->input->post('Emergency_Contact_Telephone'),
|
|
'Emergency_Contact_Cellphone'=>$this->input->post('Emergency_Contact_Cellphone'),
|
|
'Emergency_Contact_Other'=>$this->input->post('Emergency_Contact_Other'),
|
|
'Emergency_Contact_Email'=>$this->input->post('Emergency_Contact_Email'),
|
|
);
|
|
// echo $id;
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($id,$data,$data2);
|
|
|
|
$activitydata = array(
|
|
'activity_description' =>'Data for Emergency_Contact Updated.',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else if($data_type=='Caregiver_Preferences'){
|
|
if($pre_update_data->Religious_Preferences!=""){
|
|
$progress=$pre_update_data->progress;
|
|
}else{
|
|
$progress=$pre_update_data->progress + $progress;
|
|
}
|
|
|
|
$data=array(
|
|
'Religious_Preferences'=>$this->input->post('Religious_Preferences'),
|
|
'Preffered_Gender'=>$this->input->post('Preffered_Gender'),
|
|
'Notes'=>$this->input->post('Notes'),
|
|
'progress'=>$progress,
|
|
'form_status'=>$form_status,
|
|
);
|
|
// echo $id;
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($id,$data);
|
|
|
|
$activitydata = array(
|
|
'activity_description' =>'Data for Caregiver_Preferences Updated.',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
);
|
|
echo json_encode($output);
|
|
}else if($data_type=='Additional_Certifications'){
|
|
// pre($data_type);die;
|
|
$folder_name='USER_'.str_pad($Ion_id, 6, "0", STR_PAD_LEFT);
|
|
if (!is_dir('uploads/Documents/'.$folder_name)) {
|
|
mkdir('./uploads/Documents/' . $folder_name, 0777, TRUE);
|
|
}
|
|
$uploadto="uploads/Documents/".$folder_name."/";
|
|
$doc_type=$this->input->post('doc_type');
|
|
$documentId=$this->input->post('doc_id');
|
|
if($_FILES[$doc_type]['name']){
|
|
|
|
$file_name = $_FILES[$doc_type]['name'];
|
|
$file_name_pieces = explode('.', $file_name);
|
|
$count=count($file_name_pieces);
|
|
$new_file_name = $doc_type.'_'.str_pad($Ion_id, 6, "0", STR_PAD_LEFT).'_'.date('YmdHis').'_01.'.$file_name_pieces[$count-1];
|
|
|
|
$config = array(
|
|
'file_name' => $new_file_name,
|
|
'upload_path' => "./".$uploadto,
|
|
'allowed_types' => "gif|jpg|png|jpeg|pdf",
|
|
'overwrite' => False,
|
|
'max_size' => "20480000",
|
|
//'max_height' => "1768",
|
|
//'max_width' => "2024"
|
|
);
|
|
|
|
$this->load->library('Upload', $config);
|
|
$this->upload->initialize($config);
|
|
if ($this->upload->do_upload($doc_type)) {
|
|
$path = $this->upload->data();
|
|
//$photo = $path['file_name'];
|
|
}
|
|
|
|
$data = array(
|
|
'ion_user_id' => $Ion_id,
|
|
'userid' => $id,
|
|
'user_type' => $usertype,
|
|
'path' => $uploadto,
|
|
'file_name' => $path['file_name'],
|
|
'originalfilename' => $_FILES[$doc_type]['name'],
|
|
'documents_type' => $doc_type
|
|
);
|
|
//pre($data_type);die;
|
|
$check_doc_exsist=$this->Caregiver_model->checkDocumentsExsist($Ion_id,$doc_type);
|
|
|
|
if($check_doc_exsist==0){
|
|
$caregiver_data=$this->Caregiver_model->getNurseByIonId($Ion_id);
|
|
$caregiverPer = json_decode($caregiver_data->from_tab_status_pctg);
|
|
$caregiverPer->form11 = $caregiverPer->form11 + 1;
|
|
$process= json_encode($caregiverPer);
|
|
|
|
$caregiverUpdate=array(
|
|
'from_tab_status_pctg' => $process,
|
|
'form_status' => $form_status,
|
|
);
|
|
//pre($caregiverUpdate);die;
|
|
$this->Caregiver_model->updateNurse($id,$caregiverUpdate);
|
|
}
|
|
//die;
|
|
//$this->Caregiver_model->deleteNursePreDocuments($documentId);
|
|
|
|
$documentId = $this->Caregiver_model->addNurseDocuments($data);
|
|
|
|
$activitydata = array(
|
|
'activity_description' => $doc_type .' Upload',
|
|
'request_data' => $path['file_name'],
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
}
|
|
|
|
|
|
$remarks=$this->input->post('Name_Additional_Certifications');
|
|
$documents_no=$this->input->post('Additional_Certifications_Number');
|
|
$nameState=$this->input->post('Name_Additional_Certifications_state');
|
|
$data = array(
|
|
'remarks' => $remarks,
|
|
'documents_no' => $documents_no,
|
|
'state' => $nameState
|
|
);
|
|
$this->Caregiver_model->updateNurseDocuments($data,$documentId);
|
|
|
|
$activitydata = array(
|
|
'activity_description' => $doc_type .' Documents Name Update',
|
|
'request_data' => serialize($_REQUEST),
|
|
'activity_user_id' => $ionid,
|
|
'activity_user_type' => $usertype,
|
|
'activity_time' => $savetime,
|
|
'activity_page' => $_SERVER['REQUEST_URI'],
|
|
);
|
|
|
|
$this->Home_model->activity_log($activitydata);
|
|
|
|
$output=array(
|
|
'upload'=>'success',
|
|
'msg'=>'Updated Successfully.',
|
|
'file_url'=>$uploadto.$path['file_name'],
|
|
);
|
|
echo json_encode($output);
|
|
}
|
|
else{
|
|
$output=array(
|
|
'upload'=>'failed',
|
|
'msg'=>'Update Failed',
|
|
);
|
|
echo json_encode($output);
|
|
}
|
|
|
|
|
|
//echo '<pre>'; print_r($data); echo '</pre>';
|
|
|
|
}
|
|
function formPrint($id){
|
|
|
|
// $id = 11;
|
|
$data['nurse'] = $this->Caregiver_model->getNurseById($id);
|
|
//pr($data);die;
|
|
$this->load->view('caregivers/rnLpnForm',$data); // just the header file
|
|
}
|
|
public function send_for_approval(){
|
|
|
|
$ionid=$this->input->post('ion_id');
|
|
/*---------------------------Signature section---------------------------------*/
|
|
$data = array();
|
|
$data['document_details'] = $this->input->post("documentType");
|
|
$data['caregiver_id'] = $this->input->post("id");
|
|
$data['signature'] = $this->input->post("signature");
|
|
$data['signature_date'] = $this->input->post("date");
|
|
if(!isset($_POST['signature_type']))
|
|
{
|
|
$data['signature_type'] = 'draw';
|
|
}
|
|
else
|
|
{
|
|
$data['signature_type'] =$this->input->post("signature_type");
|
|
}
|
|
$this->CaregiverDashboard_model->saveDislosureSignature($data);
|
|
/*---------------------------Signature section---------------------------------*/
|
|
$verification_submitted_by=$this->session->userdata('user_id');
|
|
|
|
$savetime=date ('Y-m-d H:i:s', now());
|
|
$caregiverData=$this->Caregiver_model->getNurseByIonId($ionid);
|
|
|
|
//if($caregiverData->progress >=100){
|
|
$data=array(
|
|
'submited_for_verification'=>'yes',
|
|
'submission_date'=>$savetime,
|
|
'verification_submitted_by'=>$verification_submitted_by
|
|
);
|
|
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->Caregiver_model->updateNurse($caregiverData->caregiver_table_id,$data);
|
|
$name=$caregiverData->fname." ".$caregiverData->lname;
|
|
$from = array(
|
|
'name' => 'HMS Admin',
|
|
'email' => 'admin@hms.com'
|
|
);
|
|
$subject ='Successfully send for approval';
|
|
$emaildata['emaildata'] = array(
|
|
'name' =>$name
|
|
);
|
|
$to = $caregiverData->email;
|
|
$message= $this->load->view('email_template_management/cararegiver_send_approval',$emaildata,TRUE);
|
|
send_email($from,$to,$subject,$message);
|
|
//}
|
|
if($ionid == $verification_submitted_by){
|
|
redirect('CaregiversDashboard');
|
|
}else{
|
|
redirect('caregivers/pendingAcceptance');
|
|
}
|
|
//echo '<pre>'; print_r($caregiverData); echo '</pre>';die;
|
|
}
|
|
|
|
|
|
function getNurse() {
|
|
$requestData = $_REQUEST;
|
|
$start = $requestData['start'];
|
|
$limit = $requestData['length'];
|
|
$search = $this->input->post('search')['value'];
|
|
|
|
// if ($limit == -1) {
|
|
// if (!empty($search)) {
|
|
// $data['users'] = $this->Coordinators_model->getCoordinatorBysearch($search);
|
|
// } else {
|
|
// $data['users'] = $this->Coordinators_model->getCoordinator();
|
|
// }
|
|
// } else {
|
|
// if (!empty($search)) {
|
|
// $data['users'] = $this->Coordinators_model->getCoordinatorByLimitBySearch($limit, $start, $search);
|
|
// } else {
|
|
// $data['users'] = $this->Coordinators_model->getCoordinatorByLimit($limit, $start);
|
|
// }
|
|
// }
|
|
$data['caregiver'] = $this->Caregiver_model->getNurse();
|
|
foreach ($data['caregiver'] as $caregiver) {
|
|
if ($this->ion_auth->in_group(array('admin'))) {
|
|
$options1 = '<a class="btn btn-info btn-xs btn_width" title="' . lang('Edit') . '" href="caregivers/addNewView?id='.$caregiver->id.'"><i class="fa fa-edit"> </i> ' . lang('edit') . '</a>';
|
|
}
|
|
if ($this->ion_auth->in_group(array('admin'))) {
|
|
$options2 = '<a class="btn btn-info btn-xs btn_width" title="' . lang('Verify') . '" href="coordinators/editCoordinator?id='.$caregiver->id.'"><i class="fa fa-edit"> </i> ' . lang('Verify') . '</a>';
|
|
}
|
|
if ($this->ion_auth->in_group(array('admin'))) {
|
|
$options3 = '<a class="btn btn-info btn-xs btn_width" title="' . lang('Medical/Physical') . '" href="coordinators/editCoordinator?id='.$caregiver->id.'"><i class="fa fa-edit"> </i> ' . lang('Medical/Physical') . '</a>';
|
|
}
|
|
if ($this->ion_auth->in_group(array('admin'))) {
|
|
$options4 = '<a class="btn btn-info btn-xs btn_width" title="' . lang('Pre Employment Info') . '" href="coordinators/editCoordinator?id='.$caregiver->id.'"><i class="fa fa-edit"> </i> ' . lang('Pre Employment Info') . '</a>';
|
|
}
|
|
if ($this->ion_auth->in_group(array('admin'))) {
|
|
$options5 = '<a class="btn btn-info btn-xs btn_width" title="' . lang('Employment Info') . '" href="coordinators/editCoordinator?id='.$caregiver->id.'"><i class="fa fa-edit"> </i> ' . lang('Employment Info') . '</a>';
|
|
}
|
|
if ($this->ion_auth->in_group(array('admin'))) {
|
|
$options6 = '<a class="btn btn-info btn-xs btn_width" title="' . lang('Pre Employment Verify') . '" href="coordinators/editCoordinator?id='.$caregiver->id.'"><i class="fa fa-edit"> </i> ' . lang('Pre Employment Verify') . '</a>';
|
|
}
|
|
// if ($this->ion_auth->in_group(array('admin'))) {
|
|
// $options10 = '<a class="btn btn-info btn-xs btn_width detailsbutton inffo" title="permission" href="coordinators/addNewPermissionView?id=' . $caregiver->id . '" onclick="return confirm(\'Are you sure you want to manage permission?\');"><i class="fas fa-tasks"></i> Manage Permission</a>';
|
|
// }
|
|
if($caregiver->form_status=="1")
|
|
$status='<span class="badge badge-secondary">Basic Info</span>';
|
|
if($caregiver->form_status=="2")
|
|
$status='<span class="badge badge-secondary">Contact Info</span>';
|
|
if($caregiver->form_status=="3")
|
|
$status='<span class="badge badge-secondary">Data Added</span>';
|
|
$info[] = array(
|
|
$caregiver->id,
|
|
$caregiver->fname.' ' .$caregiver->lname,
|
|
$caregiver->email,
|
|
$caregiver->phone,
|
|
$caregiver->zipcode1,
|
|
$status,
|
|
$options1.' '.$options2.' '.$options3.' '.$options4.' '.$options5.' '.$options6,
|
|
);
|
|
}
|
|
|
|
if (!empty($data['caregiver'])) {
|
|
$output = array(
|
|
"draw" => intval($requestData['draw']),
|
|
"recordsTotal" => $this->db->get('caregiver')->num_rows(),
|
|
"recordsFiltered" => $this->db->get('caregiver')->num_rows(),
|
|
"data" => $info
|
|
);
|
|
} else {
|
|
$output = array(
|
|
// "draw" => 1,
|
|
"recordsTotal" => 0,
|
|
"recordsFiltered" => 0,
|
|
"data" => []
|
|
);
|
|
}
|
|
|
|
echo json_encode($output);
|
|
}
|
|
|
|
function editNurse() {
|
|
$data = array();
|
|
$id = $this->input->get('id');
|
|
$data['nurse'] = $this->nurse_model->getNurseById($id);
|
|
$this->load->view('home/dashboard'); // just the header file
|
|
$this->load->view('add_new', $data);
|
|
$this->load->view('home/footer'); // just the footer file
|
|
}
|
|
|
|
function editNurseByJason() {
|
|
$id = $this->input->get('id');
|
|
$data['nurse'] = $this->nurse_model->getNurseById($id);
|
|
echo json_encode($data);
|
|
}
|
|
|
|
function delete() {
|
|
$data = array();
|
|
$id = $this->input->get('id');
|
|
$user_data = $this->db->get_where('nurse', array('id' => $id))->row();
|
|
$path = $user_data->img_url;
|
|
|
|
if (!empty($path)) {
|
|
unlink($path);
|
|
}
|
|
$ion_user_id = $user_data->ion_user_id;
|
|
$this->db->where('id', $ion_user_id);
|
|
$this->db->delete('users');
|
|
$this->nurse_model->delete($id);
|
|
$this->session->set_flashdata('feedback', 'Deleted');
|
|
redirect('nurse');
|
|
}
|
|
|
|
function caregiverEventDetails(){
|
|
$id = $this->input->get('id');
|
|
//print_r($id);
|
|
$caregiverSchedule=$this->Caregiver_model->getCaregiverEventSchedule($id);
|
|
foreach($caregiverSchedule as $schedule){
|
|
$sed[]=$schedule;
|
|
}
|
|
echo json_encode($sed,true);
|
|
}
|
|
function PreviuosSchedule(){
|
|
$id = $this->session->userdata('user_id');
|
|
$data['nurse']=$this->Caregiver_model->getNurseByIonId($id);
|
|
//$data['patient']=$this->Caregiver_model->getCaregiverPatient($data['nurse']->id);
|
|
$data['cgSchedule']=$this->Caregiver_model->getPreviousCaregiverPatientSchedule($data['nurse']->id);
|
|
// $caregiverSchedule=$this->Caregiver_model->getCaregiverSchedule($data['nurse']->id);
|
|
|
|
foreach($caregiverSchedule as $schedule){
|
|
$data['caregiverScheduleid'][]=$schedule->schedule_master_id;
|
|
}
|
|
$data['page_title']='Previous Schedule';
|
|
//echo '<pre>'; print_r($data['nurse']); echo '</pre>';die;
|
|
$this->load->view('home/dashboard',$data); // just the header file
|
|
$this->load->view('myschedule',$data);
|
|
$this->load->view('home/footer',$data);
|
|
}
|
|
function UpcomingSchedule(){
|
|
$id = $this->session->userdata('user_id');
|
|
$data['nurse']=$this->Caregiver_model->getNurseByIonId($id);
|
|
//$data['patient']=$this->Caregiver_model->getCaregiverPatient($data['nurse']->id);
|
|
$data['cgSchedule']=$this->Caregiver_model->getUpcommingCaregiverPatientSchedule($data['nurse']->id);
|
|
// $caregiverSchedule=$this->Caregiver_model->getCaregiverSchedule($data['nurse']->id);
|
|
//echo '<pre>'; print_r($data['cgSchedule']); echo '</pre>';die;
|
|
foreach($caregiverSchedule as $schedule){
|
|
$data['caregiverScheduleid'][]=$schedule->schedule_master_id;
|
|
}
|
|
$data['page_title']='Upcoming Schedule';
|
|
|
|
$this->load->view('home/dashboard',$data); // just the header file
|
|
$this->load->view('myschedule',$data);
|
|
$this->load->view('home/footer',$data);
|
|
}
|
|
|
|
public function updateAcceptence()
|
|
{
|
|
$data=$this->input->post();
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$id=$data['scheduleId'];
|
|
unset($data['scheduleId']);
|
|
unset($data['submit']);
|
|
|
|
if($data['acceptance_status']=='Accepted'){
|
|
unset($data['rejection_reason']);
|
|
$success=$this->CaregiverDashboard_model->updateAcceptance($data,$id);
|
|
if($success){
|
|
$this->session->set_flashdata('UpdateAlert', 'You have '.$data['acceptance_status'].' the schesule');
|
|
}
|
|
}else if($data['rejection_reason']!=""){
|
|
$success=$this->CaregiverDashboard_model->updateAcceptance($data,$id);
|
|
if($success){
|
|
$this->session->set_flashdata('UpdateAlert', 'You have '.$data['acceptance_status'].' the schesule');
|
|
}
|
|
}else{
|
|
$this->session->set_flashdata('UpdateFail', 'Please enter reason for declined.');
|
|
}
|
|
|
|
|
|
|
|
// echo $this->db->last_query();
|
|
|
|
// $this->load->helper('NotificationUpdate_helper');
|
|
// NotificationUpdate("sdf","sdfsd");
|
|
redirect($_SERVER['HTTP_REFERER']);
|
|
//redirect('CaregiversDashboard/mySchedule');
|
|
}
|
|
|
|
public function viewPatient()
|
|
{
|
|
|
|
$id = $this->session->userdata('user_id');
|
|
$data['nurse']=$this->Caregiver_model->getNurseByIonId($id);
|
|
$caregiver_id=$data['nurse']->id;
|
|
$data['patient']=$this->CaregiverDashboard_model->getPatientByCaregiverId($caregiver_id);
|
|
|
|
$this->load->view('home/dashboard',$data); // just the header file
|
|
$this->load->view('patient_details',$data);
|
|
$this->load->view('home/footer',$data);
|
|
}
|
|
function checkEmergencyAddress(){
|
|
$response=address_info($_GET['address'],$_GET['zipcode']);
|
|
echo json_encode($response);
|
|
}
|
|
function deleteDocument(){
|
|
$id = $this->input->get('id');
|
|
$success=$this->Caregiver_model->updateCaregiverDoc($id);
|
|
if($success){
|
|
$this->session->set_flashdata('UpdateAlert', 'Deleted Successfully');
|
|
}else{
|
|
$this->session->set_flashdata('UpdateFail', 'Error! Not Possible to delete.');
|
|
}
|
|
}
|
|
function getExperienceDetails(){
|
|
$caregiver_type=$this->input->get('caregiver_type');
|
|
$caregiverId=$this->input->get('CargiverId');
|
|
$YearExperience=$this->input->get('YearExperience');
|
|
if($YearExperience>3){
|
|
$lvlThree='';
|
|
}else{
|
|
$lvlThree='disabled';
|
|
}
|
|
if($YearExperience<1){
|
|
$lvlZero='disabled';
|
|
}else{
|
|
$lvlZero='';
|
|
}
|
|
$exprience_head=$this->Caregiver_model->getServiceHeadByType($caregiver_type);
|
|
$caregiver_experience=$this->Caregiver_model->get_caregiver_experience($caregiverId);
|
|
//pre($exprience_head);die;
|
|
foreach($caregiver_experience as $exp){
|
|
$exp_arr['experience_value'][$exp->experience_id]=$exp->experience_value;
|
|
$group[] = $exp->group_id;
|
|
}
|
|
foreach($exp_arr['experience_value'] as $key=>$val){ $cg_exp_arr[]=$key; }
|
|
// echo '<pre>';print_r($exp_arr['experience_value']);
|
|
// echo '<pre>';print_r($group);
|
|
// die;
|
|
$output='';
|
|
$output2='';
|
|
foreach ($exprience_head as $exp_head) {
|
|
$experience_level=$this->Caregiver_model->getExperienceByHeadId($caregiver_type,$exp_head->service_head_id);
|
|
// echo 'Group<pre>';print_r($group);
|
|
// echo 'Group<pre>';print_r($exp_head->service_head_id);
|
|
// echo '<br>';
|
|
//die;
|
|
if($exp_head->service_head_id==13 && $caregiver_type==4){
|
|
$check_required_class='PULMONARY';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==19 && $caregiver_type==4){
|
|
$check_required_class='WOUND';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==22 && $caregiver_type==4){
|
|
$check_required_class='IVTHERAPY';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==16 && $caregiver_type==4){
|
|
$check_required_class='GASTROINTESTINAL';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==70){
|
|
$check_required_class='HOMEHEALTHCARE';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==29 && $caregiver_type==4){
|
|
$check_required_class='Hospice';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==27 && $caregiver_type==4){
|
|
$check_required_class='Pediatrics';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==30 && $caregiver_type==4){
|
|
$check_required_class='Medications';
|
|
$required_lvl_class='required-field';
|
|
}else if($exp_head->service_head_id==12 && $caregiver_type==4){
|
|
$check_required_class='CARDIOVASCULAR';
|
|
$required_lvl_class='required-field';
|
|
}else{
|
|
$check_required_class='';
|
|
$required_lvl_class='';
|
|
}
|
|
// || () || ($exp_head->service_head_id==22 && $caregiver_type==4) || ($exp_head->service_head_id==16 && $caregiver_type==4)){
|
|
if(!in_array($exp_head->service_head_id,$group)){ $head_check='checked'; $style='style="display:none;"'; $style1=''; }else{ $head_check=''; $style=''; $style1='style="display:none;"'; }
|
|
|
|
if($required_lvl_class!='')
|
|
{
|
|
$output.='<div class="col-md-8 skill-row" style="border: 0.5px solid lavender;">';
|
|
$output.=' <h5 class=" '.$required_lvl_class.'" ><strong>'.ucwords(($exp_head->service_head_name)).'</strong>
|
|
<label class="pull-right open_close_btn" for="NoneExp_'.$exp_head->service_head_id.'" > <i class="la la-angle-down"></i> </label>
|
|
</h5>';
|
|
|
|
$output.=' <div class="chkTxt">';
|
|
$output.=' <div class="form-group col-md-12">';
|
|
$output.=' <input style="display:none;" type="checkbox" class="exp_label_'.$exp_head->service_head_id.'" id="NoneExp_'.$exp_head->service_head_id.'" onclick="checkNone('.$exp_head->service_head_id.');" '.$head_check.'>';
|
|
//$output.=' <label class="open_close_btn" for="NoneExp_'.$exp_head->service_head_id.'"> Open / Close </label>';
|
|
$output.=' </div>';
|
|
|
|
foreach ($experience_level as $expLbl) {
|
|
//echo '<pre>'; print_r($expLbl);
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id){ $exp_check="checked"; }else{ $exp_check=""; } }
|
|
//echo $exp_arr['experience_value'][$expLbl->id];
|
|
if(in_array($expLbl->id, $cg_exp_arr)){ $exp_check="checked"; $required='value'; }else{ $exp_check=""; $required='none'; }
|
|
$output.=' <div class="form-group col-md-12 nonExp_All NoneExp_'.$exp_head->service_head_id.'" '.$style.'>';
|
|
/* $output.=' <input class="'.$check_required_class.'" type="checkbox" onclick="validateExp('.$expLbl->id.');" name="experience_id_'.$expLbl->id.'" id="experience_id_'.$expLbl->id.'" value="'.$expLbl->id.'" '.$exp_check.'>';
|
|
*/
|
|
$output.=' <label class="expLblName" for="experience_id_'.$expLbl->id.'">'.ucwords($expLbl->service_name).'</label>';
|
|
|
|
$output.=' <div class="pull-right">';
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 0){ $check_value="checked"; }else{ $check_value="";} }
|
|
/*if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==0){ $check_value="checked"; }else{ $check_value="";}
|
|
$output.=' <div class="form-check form-check-inline">';
|
|
$output.=' <input class="form-check-input" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_0" value="0" '.$check_value.' >';
|
|
$output.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_0">0</label>';
|
|
$output.=' </div>';*/
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 1){ $check_value="checked"; }else{ $check_value="";} }
|
|
if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==1){ $check_value="checked"; }else{ $check_value="";}
|
|
$output.=' <div class="form-check form-check-inline">';
|
|
$output.=' <input class="form-check-input '.$check_required_class.'" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_1" value="1" '.$check_value.' '.$lvlZero.'>';
|
|
$output.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_1">1</label>';
|
|
$output.=' </div>';
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 2){ $check_value="checked"; }else{ $check_value="";} }
|
|
if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==2){ $check_value="checked"; }else{ $check_value="";}
|
|
$output.=' <div class="form-check form-check-inline">';
|
|
$output.=' <input class="form-check-input '.$check_required_class.'" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_2" value="2" '.$check_value.' '.$lvlZero.'>';
|
|
$output.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_2">2</label>';
|
|
$output.=' </div>';
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 3){ $check_value="checked"; }else{ $check_value="";} }
|
|
if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==3){ $check_value="checked"; }else{ $check_value="";}
|
|
$output.=' <div class="form-check form-check-inline">';
|
|
$output.=' <input class="form-check-input '.$check_required_class.'" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_3" value="3" '.$check_value.' '.$lvlThree.'>';
|
|
$output.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_3">3</label>';
|
|
$output.=' </div>';
|
|
|
|
$output.='<div class="form-check form-check-inline clear_check" for="exp_label['.$expLbl->id.']" style="height: 20px;width: 20px;border: 1px solid lavender;text-align: center;cursor: pointer;">X</div>';
|
|
|
|
|
|
$output.=' </div>';
|
|
$output.=' </div>';
|
|
|
|
|
|
}
|
|
$output.=' <label class="pull-right open_close_btn close_btn nonExp_All NoneExp_'.$exp_head->service_head_id.'" for="NoneExp_'.$exp_head->service_head_id.'" '.$style.'> Close </label>';
|
|
$output.=' </div>';
|
|
$output.='</div>';
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
$output2.='<div class="col-md-8 skill-row" style="border: 0.5px solid lavender;">';
|
|
$output2.=' <h5 class=" '.$required_lvl_class.'" ><strong>'.ucwords(($exp_head->service_head_name)).'</strong>
|
|
<label class="pull-right open_close_btn" for="NoneExp_'.$exp_head->service_head_id.'" > <i class="la la-angle-down"></i> </label>
|
|
</h5>';
|
|
|
|
$output2.=' <div class="chkTxt">';
|
|
$output2.=' <div class="form-group col-md-12">';
|
|
$output2.=' <input style="display:none;" type="checkbox" class="exp_label_'.$exp_head->service_head_id.'" id="NoneExp_'.$exp_head->service_head_id.'" onclick="checkNone('.$exp_head->service_head_id.');" '.$head_check.'>';
|
|
//$output2.=' <label class="open_close_btn" for="NoneExp_'.$exp_head->service_head_id.'"> Open / Close </label>';
|
|
$output2.=' </div>';
|
|
|
|
foreach ($experience_level as $expLbl) {
|
|
//echo '<pre>'; print_r($expLbl);
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id){ $exp_check="checked"; }else{ $exp_check=""; } }
|
|
//echo $exp_arr['experience_value'][$expLbl->id];
|
|
if(in_array($expLbl->id, $cg_exp_arr)){ $exp_check="checked"; $required='value'; }else{ $exp_check=""; $required='none'; }
|
|
$output2.=' <div class="form-group col-md-12 nonExp_All NoneExp_'.$exp_head->service_head_id.'" '.$style.'>';
|
|
/* $output2.=' <input class="'.$check_required_class.'" type="checkbox" onclick="validateExp('.$expLbl->id.');" name="experience_id_'.$expLbl->id.'" id="experience_id_'.$expLbl->id.'" value="'.$expLbl->id.'" '.$exp_check.'>';
|
|
*/
|
|
$output2.=' <label class="expLblName" for="experience_id_'.$expLbl->id.'">'.ucwords($expLbl->service_name).'</label>';
|
|
|
|
$output2.=' <div class="pull-right">';
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 0){ $check_value="checked"; }else{ $check_value="";} }
|
|
/*if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==0){ $check_value="checked"; }else{ $check_value="";}
|
|
$output2.=' <div class="form-check form-check-inline">';
|
|
$output2.=' <input class="form-check-input" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_0" value="0" '.$check_value.' >';
|
|
$output2.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_0">0</label>';
|
|
$output2.=' </div>';*/
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 1){ $check_value="checked"; }else{ $check_value="";} }
|
|
if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==1){ $check_value="checked"; }else{ $check_value="";}
|
|
$output2.=' <div class="form-check form-check-inline">';
|
|
$output2.=' <input class="form-check-input '.$check_required_class.'" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_1" value="1" '.$check_value.' '.$lvlZero.'>';
|
|
$output2.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_1">1</label>';
|
|
$output2.=' </div>';
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 2){ $check_value="checked"; }else{ $check_value="";} }
|
|
if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==2){ $check_value="checked"; }else{ $check_value="";}
|
|
$output2.=' <div class="form-check form-check-inline">';
|
|
$output2.=' <input class="form-check-input '.$check_required_class.'" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_2" value="2" '.$check_value.' '.$lvlZero.'>';
|
|
$output2.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_2">2</label>';
|
|
$output2.=' </div>';
|
|
//foreach($exp_arr['experience_value'] as $key=>$val){ if($key == $expLbl->id && $val == 3){ $check_value="checked"; }else{ $check_value="";} }
|
|
if(isset($exp_arr['experience_value'][$expLbl->id]) && $exp_arr['experience_value'][$expLbl->id]==3){ $check_value="checked"; }else{ $check_value="";}
|
|
$output2.=' <div class="form-check form-check-inline">';
|
|
$output2.=' <input class="form-check-input '.$check_required_class.'" type="radio" name="exp_label['.$expLbl->id.']" id="exp_label_'.$expLbl->id.'_3" value="3" '.$check_value.' '.$lvlThree.'>';
|
|
$output2.=' <label class="form-check-label" for="exp_label_'.$expLbl->id.'_3">3</label>';
|
|
$output2.=' </div>';
|
|
|
|
$output2.='<div class="form-check form-check-inline clear_check" for="exp_label['.$expLbl->id.']" style="height: 20px;width: 20px;border: 1px solid lavender;text-align: center;cursor: pointer;">X</div>';
|
|
|
|
|
|
$output2.=' </div>';
|
|
$output2.=' </div>';
|
|
|
|
|
|
}
|
|
$output2.=' <label class="pull-right open_close_btn close_btn nonExp_All NoneExp_'.$exp_head->service_head_id.'" for="NoneExp_'.$exp_head->service_head_id.'" '.$style.'> Close </label>';
|
|
$output2.=' </div>';
|
|
$output2.='</div>';
|
|
}
|
|
|
|
$output.='<script>';
|
|
$output.="$('.open_close_btn').click(function(){
|
|
var forval=$(this).attr('for');
|
|
var foundobj=$('.open_close_btn').find('[for='+forval+']').hide();
|
|
console.log(foundobj);
|
|
|
|
//$('for[forval]').hide();
|
|
})";
|
|
$output.='</script>';
|
|
|
|
$output.='<script>';
|
|
$output.="$('.clear_check').click(function(){
|
|
var forval=$(this).attr('for');
|
|
var foundobj=$('input[name=\"'+forval+'\"]').attr('checked', false);
|
|
console.log(foundobj);
|
|
|
|
//$('for[forval]').hide();
|
|
})";
|
|
$output.='</script>';
|
|
}
|
|
|
|
echo $output.$output2;
|
|
|
|
//echo '$caregiver_type:'.$caregiver_type.'$caregiverId'.$caregiverId;
|
|
}
|
|
function AnnualPhysicalExaminationForm($caregiver_id){
|
|
$data=array();
|
|
return generate_pdf("welcome.pdf", "forms_pdf/physicalExamForm3.php", $data);
|
|
}
|
|
function EMPLOYEE_HEP_B_VACCINE_WAIVER ($caregiver_id){
|
|
$data=array();
|
|
echo generate_html("welcome.pdf", "forms_pdf/EMPLOYEE_HEP_B_VACCINE_WAIVER.php", $data);
|
|
}
|
|
function CHEST_X_RAY_FORM($caregiver_id){
|
|
$data=array();
|
|
generate_pdf("welcome.pdf", "forms_pdf/CHEST_X_RAY_FORM.php", $data);
|
|
}
|
|
public function ChangePassword(){
|
|
$id = $this->input->get('id');
|
|
$data['nurse']=$this->Caregiver_model->getNurseById($id);
|
|
$this->load->view('home/dashboard'); // just the header file
|
|
$this->load->view('change_password',$data);
|
|
$this->load->view('home/footer');
|
|
}
|
|
function UpdatePassword(){
|
|
$id = $this->input->post('id');
|
|
$ionid = $this->input->post('ionid');
|
|
$password = $this->input->post('password');
|
|
$repassword = $this->input->post('repassword');
|
|
$email = $this->input->post('email');
|
|
|
|
if($password!=$repassword){
|
|
$this->session->set_flashdata('feedback_error', 'Confirm Password Not Matched!');
|
|
redirect('CaregiversDashboard/ChangePassword?id='.$id);
|
|
}else
|
|
if($password==""){
|
|
$this->session->set_flashdata('feedback_error', 'Password Can Not Blank!');
|
|
redirect('CaregiversDashboard/ChangePassword?id='.$id);
|
|
}else
|
|
if ($this->Caregiver_model->update_email_check($email,$ionid)) {
|
|
$this->session->set_flashdata('feedback_error', 'This Email Address Is Already Registered');
|
|
redirect('CaregiversDashboard/ChangePassword?id='.$id);
|
|
}else{
|
|
|
|
$password = $this->ion_auth_model->hash_password($password);
|
|
$this->Caregiver_model->updateIonUser($email,$password,$id,$ionid);
|
|
|
|
$this->session->set_flashdata('feedback_success', 'Updated');
|
|
redirect('CaregiversDashboard/ChangePassword?id='.$id);
|
|
}
|
|
}
|
|
public function HOME_CARE_REGISTRY_RELEASE_FORM()
|
|
{
|
|
$data['city_of_birth']="";
|
|
$data['mothersMaidenName']="";
|
|
$data['mothersFirstName']="";
|
|
$data['Registry']="";
|
|
$data['signature']="";
|
|
$data['date']="";
|
|
$data['tick'] = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAaQAAAGkBcaGY2AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNzdCxDYJgEAbQxwK6g2ED7QyTWFKxhQPQso4tIzAAG0AN2GhiYfLjmaDXv+++O3492Rf2hGMUFxjRRfAZA3rk/4EbXBL4efPbzTdMKCMYdmgxo1pbe03Ixw/bP0Im1KnaqSZLBL82ueIQwdvPHdIVIU3fgaM4AAAAAElFTkSuQmCC';
|
|
//$data['title']=($datas->fname!='')? : "N/A" ;
|
|
//$data = array('title' => 'N/A | ERP','data' => 'Test');
|
|
// generate_pdf("welcome.pdf", array("HOME_CARE_REGISTRY_RELEASE_FORM.php"), $data);
|
|
$data['pages'] = array('home_care_registry_release_form.css.php','home_care_registry_release_form.template.php');
|
|
|
|
return generate_html("welcome.pdf", "forms_pdf/generate_html_cmn", $data);
|
|
// die;
|
|
}
|
|
|
|
public function Application_For_Home_Health_Aides($id = '')
|
|
{
|
|
if($id != '')
|
|
{
|
|
$datas = $this->Caregiver_model->getNurseById($id);
|
|
$data['cg'] = $datas;
|
|
$data['eha'] = json_decode($datas->emp_health_assesment);
|
|
// _die($data['cg']);
|
|
}
|
|
$data['tick'] = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAaQAAAGkBcaGY2AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNzdCxDYJgEAbQxwK6g2ED7QyTWFKxhQPQso4tIzAAG0AN2GhiYfLjmaDXv+++O3492Rf2hGMUFxjRRfAZA3rk/4EbXBL4efPbzTdMKCMYdmgxo1pbe03Ixw/bP0Im1KnaqSZLBL82ueIQwdvPHdIVIU3fgaM4AAAAAElFTkSuQmCC';
|
|
|
|
$data['pages'] = array('WECURO_HHA_APPLICATION_1st_Disclosure_Page.css.php','WECURO_HHA_APPLICATION_1st_Disclosure_Page.template.php');
|
|
return generate_html("welcome.pdf", "forms_pdf/generate_html_cmn", $data);
|
|
}
|
|
|
|
public function Professional_Profile($id = '')
|
|
{
|
|
if($id != '')
|
|
{
|
|
$datas = $this->Caregiver_model->getNurseById($id);
|
|
$data['cg'] = $datas;
|
|
$data['eha'] = json_decode($datas->emp_health_assesment);
|
|
// _die($data['cg']);
|
|
}
|
|
$data['tick'] = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAaQAAAGkBcaGY2AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNzdCxDYJgEAbQxwK6g2ED7QyTWFKxhQPQso4tIzAAG0AN2GhiYfLjmaDXv+++O3492Rf2hGMUFxjRRfAZA3rk/4EbXBL4efPbzTdMKCMYdmgxo1pbe03Ixw/bP0Im1KnaqSZLBL82ueIQwdvPHdIVIU3fgaM4AAAAAElFTkSuQmCC';
|
|
|
|
$data['pages'] = array('WECURO_HHA_APPLICATION_1st_Disclosure_Page2.css.php','WECURO_HHA_APPLICATION_1st_Disclosure_Page2.template.php');
|
|
return generate_html("welcome.pdf", "forms_pdf/generate_html_cmn", $data);
|
|
}
|
|
|
|
public function ANNUAL_PHYSICAL_EXAMINATION_FORM($id = '')
|
|
{
|
|
if($id != '')
|
|
{
|
|
$datas = $this->Caregiver_model->getNurseById($id);
|
|
$data['cg'] = $datas;
|
|
$data['eha'] = json_decode($datas->emp_health_assesment);
|
|
// _die($data['cg']);
|
|
}
|
|
$data['tick'] = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAaQAAAGkBcaGY2AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNzdCxDYJgEAbQxwK6g2ED7QyTWFKxhQPQso4tIzAAG0AN2GhiYfLjmaDXv+++O3492Rf2hGMUFxjRRfAZA3rk/4EbXBL4efPbzTdMKCMYdmgxo1pbe03Ixw/bP0Im1KnaqSZLBL82ueIQwdvPHdIVIU3fgaM4AAAAAElFTkSuQmCC';
|
|
|
|
$data['pages'] = array('ANNUAL_PHYSICAL_EXAMINATION_FORM.css.php','ANNUAL_PHYSICAL_EXAMINATION_FORM.template.php');
|
|
return generate_html("welcome.pdf", "forms_pdf/generate_html_cmn", $data);
|
|
}
|
|
|
|
public function Employee_Health($id='')
|
|
{
|
|
if($id != '')
|
|
{
|
|
$datas = $this->Caregiver_model->getNurseById($id);
|
|
$data['cg'] = $datas;
|
|
$data['eha'] = json_decode($datas->emp_health_assesment);
|
|
// _die($data['cg']);
|
|
}
|
|
$data['tick'] = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAaQAAAGkBcaGY2AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNzdCxDYJgEAbQxwK6g2ED7QyTWFKxhQPQso4tIzAAG0AN2GhiYfLjmaDXv+++O3492Rf2hGMUFxjRRfAZA3rk/4EbXBL4efPbzTdMKCMYdmgxo1pbe03Ixw/bP0Im1KnaqSZLBL82ueIQwdvPHdIVIU3fgaM4AAAAAElFTkSuQmCC';
|
|
$data['pages'] = array('employee_health.css.php','employee_health.template.php');
|
|
return generate_html("welcome.pdf", "forms_pdf/generate_html_cmn", $data);
|
|
}
|
|
|
|
}
|
|
|
|
/* End of file nurse.php */
|
|
/* Location: ./application/modules/nurse/controllers/nurse.php */
|