getEmpFamilybyEmpCode(emp_code: $emp_code,client_id: $client_id,emp_status: ['draft'],policy_status:['draft'],client_branch_id:[ $client_branch_id ]);//,relationship:[$relationship];
}
public static function getHospitalLink($client_policy_id){
// $client_policy_id = 336;
// $emp_id = 12288;
$EmployeePolicyModel = new EmployeePolicyModel();
$res = $EmployeePolicyModel->getHospitalLinkByPolicyandEmp($client_policy_id);
return is_array($res) && count($res) ? $res[0]['network_hospitals'] : null;
}
public static function getPhoneNumber($chat_session_info){
$emp_id = $chat_session_info['emp_id'];
$EmployeeModel = new EmployeeModel();
return $EmployeeModel->select('mobile')->where('id',$emp_id)->first()['mobile'];
}
public static function sendReimbursementProcessOverMail($chat_session_info)
{
$emp_id = $chat_session_info['emp_id'];
$emp_code = $chat_session_info['emp_code'];
$client_id = $chat_session_info['client_id'];
$client_branch_id = $chat_session_info['client_branch_id'];
// $policy_id = 0;
// $relationship ='Father';
$EmployeeModel = new EmployeeModel();
$data = $EmployeeModel->find($emp_id);
if(isset($data) && isset($data['email_corporate']))
{
$message = SELF::ReimbursementProcessMailTemplate();
$attachments = [
["filePath" => ROOTPATH."public/sample_excel/sample_addition.xls","fileName" => "sample_addition.xls"],
["filePath" => ROOTPATH."public/sample_excel/sample_inception.xls","fileName" => "sample_inception.xls"],
["filePath" => ROOTPATH."public/assets/images/login_bg.jpg","fileName" => "login_bg.jpg"]
];
$common = ['mail_type'=>'reimbursement_mail_process_bot'];
$email_id = $data['email_corporate'];
$res = MailHelper::send_email(['mail' => $email_id, 'subject' => 'Mail Via CLI', 'message' => $message,'attachments' => $attachments,'common'=>$common]);
$res = json_decode($res);
if($res->status == 'success')
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
public static function ReimbursementProcessMailTemplate()
{
$template = '
How to Claim Your Insurance Reimbursement
How to Claim Your Insurance Reimbursement
Dear [Customer Name],
We are here to assist you in claiming your insurance reimbursement smoothly. Please follow the steps below:
- Gather Documents: Collect all required documents such as bills, invoices, and medical reports.
- Complete the Claim Form: Fill out the insurance claim form accurately.
- Attach Supporting Documents: Attach all necessary documents to support your claim.
- Submit Your Claim: Send the completed form and documents via email or through our online portal.
- Track Your Claim: Use our tracking system to monitor the status of your claim.
- Receive Reimbursement: Once approved, the reimbursement will be processed to your registered account.
Submit Your Claim
If you have any questions, feel free to contact our support team.
';
return $template;
}
public static function getInsurersList(){
$insurer = new InsurerModel();
$data = $insurer->select('short_name,name')->where('category','general')->where('is_active',1)->findAll();
return $data;
}
public static function sendQuotationRequestMail($data){
$message = SELF::quotationRequestMailTemplate($data);
$common = ['mail_type'=>'request_quotation_bot'];
$email_id = 'no-reply-otp@nhanceindia.in';
$res = MailHelper::send_email(['mail' => $email_id, 'subject' => 'Quotation Request Received from bot.', 'message' => $message,'common'=>$common]);
$res = json_decode($res);
log_message('error','res: '.json_encode($res));
if($res->status == 'success')
{
return true;
}
else
{
return false;
}
}
public static function quotationRequestMailTemplate($data){
$message = 'A customer has requested for a quotation using bot,Here are all the details for it:
'.$data;
return $message;
}
public static function getReimbursementClaimStatus($chat_session_info){
$emp_id = $chat_session_info['emp_id'];
$emp_code = $chat_session_info['emp_code'];
$client_id = $chat_session_info['client_id'];
$client_branch_id = $chat_session_info['client_branch_id'];
$ticketMaster = new TicketMasterModel();
$data = $ticketMaster->select('tcs.claim_status,ticket_master.claim_number,ticket_master.id')
// ->join('client_policy cp',"cp.client_id = {$client_id} and cp.client_branch_id = {$client_branch_id} and cp.policy_id = {$policy_id} and cp.is_active = 1")
->join('ticket_claim_status tcs',"ticket_master.claim_status_id = tcs.id and tcs.is_active = 1")
->where('ticket_master.emp_id',$emp_id)
->where('ticket_master.emp_code',$emp_code)
->where('ticket_master.is_active',1)
->orderBy('ticket_master.created_at', 'DESC')
->first();
$ticket_controller = new TicketController();
if (!empty($data)){
$ticket_id = $data['id'];
$mail_content = $ticket_controller->constructMailContent($ticket_id);
$mail_response = $ticket_controller->sendTrigger($mail_content);
return $data;
}else{
return false;
}
}
}
?>