diff --git a/.gitignore b/.gitignore index 1ab80e5d..adeb2bd5 100755 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ composer.lock .env .phpunit* phpqueue.sh +.claude diff --git a/app/Controllers/ApiServiceController.php b/app/Controllers/ApiServiceController.php index 2b7c2e45..23ee92c9 100644 --- a/app/Controllers/ApiServiceController.php +++ b/app/Controllers/ApiServiceController.php @@ -231,11 +231,23 @@ class ApiServiceController extends BaseController // json_decode(file_get_contents(WRITEPATH.'/tmp/db.json'),true), // json_decode(file_get_contents(WRITEPATH.'/tmp/medi.json'),true) // ); - // print_rr($report); + // print_rr('tata'); // die(); + // $mediAssistController = new MediAssistApiController(); + // $mediAssistController->MediAssistGetBenefDetails( [ 'policy_no' => '97000063250400000012', 'file_id' =>'5704','client_policy_id' => '1839' ] ); + // $mediAssistController->MediAssistGetBenefDetails( [ 'policy_no' => '97000063250400000016', 'file_id' =>'5704','client_policy_id' => '2002' ] ); + // die(); + // $vidalApiController = new VidalApiController; + // $vidalApiController->VidalGetBenefDetails( [ 'policy_no' => '570000/48/2026/363', 'file_id' =>'5264','client_policy_id' => '9433'] ); + // $fhplApiController = new FhplApiController; + // $fhplApiController->FhplGetBenefDetails( [ 'policy_no' => '570000/48/2026/453', 'file_id' =>'9999','client_policy_id' => '3557'] ); + + // $healthIndiaApiController = new HealthIndiaApiController; + // $healthIndiaApiController->HealthIndiaGetBenefDetails( [ 'policy_no' => '97000063250400000116', 'file_id' =>'9998','client_policy_id' => '6523'] ); + // die(); //START OF THE PROGRAM log_message('error', "getTPAID payloads :" . json_encode($this->request->getPost() ?? [])); $tpa_id = $this->request->getPost('tpa_id') ?? null; @@ -452,7 +464,7 @@ class ApiServiceController extends BaseController $data = $db->table('employees e') ->select('pt.policy_type, e.name, e.email_corporate as email, e.mobile as phone, e.emp_code as memberId, e.gender, e.dob, e.relationship as relation, - cp.policy_no as policyNumber, ep.employee_id as employeeId, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate , cp.wellness_plan_id as planId , cp.wellness_vendor_id') + cp.policy_no as policyNumber, ep.employee_id as employeeId,ep.id, cp.policy_start_date as policyStartDate, cp.policy_end_date as policyEndDate , cp.wellness_plan_id as planId , cp.wellness_vendor_id') ->join('employee_polices ep', 'e.id = ep.employee_id') ->join('client_policy cp', 'ep.client_policy_id = cp.id') ->join('policy_type pt', 'cp.policy_type_id = pt.id') @@ -480,20 +492,40 @@ class ApiServiceController extends BaseController } else if ($row['planId'] != null && empty($row['wellness_vendor_id'])) // VISIT { - $userParams['name'] = $row['name']; - $userParams['email'] = $row['email']; - $userParams['phone'] = $row['phone']; - $userParams['memberId'] = $row['employeeId']; // memberId is unique primary key. - $userParams['gender'] = $row['gender']; - $userParams['dob'] = $row['dob']; - $userParams['relation'] = $row['relation']; - $userParams['policyNumber'] = $row['policyNumber']; - $userParams['employeeId'] = $row['memberId']; - $userParams['policyStartDate']= $row['policyStartDate']; - $userParams['policyEndDate'] = $row['policyEndDate']; - $userParams['policyName'] = $row['policy_type']; - $userParams['planId'] = $row['planId']; - $userParams['moduleName'] = 'home'; + + //OLD PARAMS + // $userParams['name'] = $row['name']; + // $userParams['email'] = $row['email']; + // $userParams['phone'] = $row['phone']; + // $userParams['memberId'] = $row['employeeId']; // memberId is unique primary key. + // $userParams['gender'] = $row['gender']; + // $userParams['dob'] = $row['dob']; + // $userParams['relation'] = $row['relation']; + // $userParams['policyNumber'] = $row['policyNumber']; + // $userParams['employeeId'] = $row['memberId']; + // $userParams['policyStartDate']= $row['policyStartDate']; + // $userParams['policyEndDate'] = $row['policyEndDate']; + // $userParams['policyName'] = $row['policy_type']; + // $userParams['planId'] = $row['planId']; + // $userParams['moduleName'] = 'home'; + + //NEW PARAMS + $userParams['memberId'] = $row['id']; // employee policy primary key (which used while onboard)from DB + $userParams['phone'] = $row['phone']; + $userParams['email'] = $row['email']; + $userParams['relationship'] = $row['relation']; + $userParams['gender'] = $row['gender']; + $userParams['dob'] = $row['dob']; + $userParams['policyNumber'] = $row['policyNumber']; + $userParams['policyStartDate'] = $row['policyStartDate']; + $userParams['policyEndDate'] = $row['policyEndDate']; + $userParams['plan'] = $row['planId']; + $userParams['source'] = 'NAHANCE'; + $userParams['employeeId'] = $row['memberId']; + $userParams['firstName'] = $row['name']; + $userParams['middleName'] = ''; + $userParams['lastName'] = ''; + break; // stop after first GMC match } } diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 3fc7e8fe..1728bd57 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -497,6 +497,8 @@ class EmployeeController extends AdminController batch_files.amount, batch_files.status, batch_files.client_branch_id, + insurers.short_name as insurer_short_name, + tpa.short_name as tpa_short_name, DATE_FORMAT(batch_files.policy_issue_date, '%d/%m/%Y') AS policy_issue_date, CASE @@ -512,6 +514,8 @@ class EmployeeController extends AdminController ") ->join('client_policy', 'client_policy.id = batch_files.client_policy_id') + ->join('insurers', 'client_policy.insurer_id = insurers.id') + ->join('tpa', 'client_policy.tpa_id = tpa.id') ->join('client_branch', 'client_branch.id = batch_files.client_branch_id') ->join('policy_type', 'policy_type.id = client_policy.policy_type_id') ->join('clients', 'clients.id = client_policy.client_id') diff --git a/app/Controllers/FhplApiController.php b/app/Controllers/FhplApiController.php index f43430f4..0589b80e 100644 --- a/app/Controllers/FhplApiController.php +++ b/app/Controllers/FhplApiController.php @@ -1037,6 +1037,7 @@ class FhplApiController extends BaseController 'is_active' => 1, 'created_by' => $file_info[0]['created_by'] ?? null, + 'action_flag_status' => $row['IsActive'] == 1 ? 'A' : 'D' ]; } diff --git a/app/Controllers/HealthIndiaApiController.php b/app/Controllers/HealthIndiaApiController.php index 01e86c12..ed5f7e1a 100644 --- a/app/Controllers/HealthIndiaApiController.php +++ b/app/Controllers/HealthIndiaApiController.php @@ -1066,6 +1066,7 @@ class HealthIndiaApiController extends BaseController 'is_active' => 1, 'created_by' => $file_info[0]['created_by'] ?? null, + 'action_flag_status' => $row['insuredStatus'] == 'Active' ? 'A' : 'D' ]; } // log_message('error','HEALTH_INDIA - COUNT' . count($mappedRows)); diff --git a/app/Controllers/MediAssistApiController.php b/app/Controllers/MediAssistApiController.php index 3a70329b..e16a8cd1 100644 --- a/app/Controllers/MediAssistApiController.php +++ b/app/Controllers/MediAssistApiController.php @@ -807,7 +807,7 @@ class MediAssistApiController extends BaseController 'gender' => strtoupper($row['benefSex'] ?? null), 'self' => strtolower($row['relName'] ?? '') === 'self' ? 1 : 0, - 'si' => $row['sum_insured'] ?? null, + 'si' => $row['sum_Insured'] ?? null, 'doj' => $this->mediDate($row['benefWEF'] ?? null), diff --git a/app/Controllers/VidalApiController.php b/app/Controllers/VidalApiController.php index 23394231..06a78a57 100644 --- a/app/Controllers/VidalApiController.php +++ b/app/Controllers/VidalApiController.php @@ -1617,6 +1617,7 @@ class VidalApiController extends BaseController 'doj' => $doj, 'is_active' => 1, 'created_by' => $file_info[0]['created_by'] ?? null, + 'action_flag_status' => $row['isDeleted'] == 0 ? 'D' : 'A' ]; } diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 7b1b0f6f..29afb9f5 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -141,7 +141,14 @@ - - + + + + + +