FIX_TPA_ECARD_ISSUE
This commit is contained in:
parent
b77ea61044
commit
49edebf862
@ -12,6 +12,7 @@ use App\Controllers\BaseController;
|
||||
use App\Controllers\VidalApiController;
|
||||
use App\Controllers\ICICILombardController;
|
||||
use App\Controllers\MediAssistApiController;
|
||||
use App\Models\FileModel;
|
||||
|
||||
class ApiServiceController extends BaseController
|
||||
{
|
||||
@ -54,10 +55,12 @@ class ApiServiceController extends BaseController
|
||||
{
|
||||
try{
|
||||
|
||||
$id = $this->request->getPost('id');
|
||||
$emp_code = $this->request->getPost('emp_code');
|
||||
$client_policy_id = $this->request->getPost('client_policy_id');
|
||||
$policy_no = $this->request->getPost('policy_no');
|
||||
$payload = $this->request->getJSON(true);
|
||||
$id = $payload['id'] ?? null;
|
||||
$emp_code = $payload['emp_code'] ?? null;
|
||||
$client_policy_id = $payload['client_policy_id'] ?? null;
|
||||
$policy_no = $payload['policy_no'] ?? null;
|
||||
|
||||
|
||||
$employee_policy = $this->employeePolicyModel
|
||||
->select('employees.*, employee_polices.tpa_id , employee_polices.rand_string , employee_polices.uhid as uhid , client_policy.tpa_id as tpa_primary_id ')
|
||||
@ -102,6 +105,16 @@ class ApiServiceController extends BaseController
|
||||
|
||||
$tpa_id = $this->request->getPost('tpa_id');
|
||||
$policy_no = $this->request->getPost('policy_no');
|
||||
$client_id = $this->request->getPost('client_id');
|
||||
$branch_id = $this->request->getPost('client_branch_id');
|
||||
$policy_id = $this->request->getPost('client_policy_id');
|
||||
|
||||
$fileModel = new FileModel();
|
||||
$filesData = $fileModel->where('is_active', 1)->where('action', 'api')->countAllResults();
|
||||
|
||||
if($filesData > 0){
|
||||
return $this->respond(['status' => false, 'code' => 200,'message' => 'TPA not found ','data' => [] ]);
|
||||
}
|
||||
|
||||
if ($tpa_id == 2) // MediAssist
|
||||
{
|
||||
@ -109,10 +122,10 @@ class ApiServiceController extends BaseController
|
||||
$mediAssistController = new MediAssistApiController();
|
||||
$mediAssistController->GetBenefDetails( [ 'polict_no' => $policy_no ] );
|
||||
|
||||
return $this->respond(['status' => true,'message' => 'Action Triggered','data' => [] ]);
|
||||
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Action Triggered','data' => [] ]);
|
||||
|
||||
}else{
|
||||
return $this->respond(['status' => true,'message' => 'TPA not found ','data' => [] ]);
|
||||
return $this->respond(['status' => false, 'code' => 200,'message' => 'TPA not found ','data' => [] ]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user