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\VidalApiController;
|
||||||
use App\Controllers\ICICILombardController;
|
use App\Controllers\ICICILombardController;
|
||||||
use App\Controllers\MediAssistApiController;
|
use App\Controllers\MediAssistApiController;
|
||||||
|
use App\Models\FileModel;
|
||||||
|
|
||||||
class ApiServiceController extends BaseController
|
class ApiServiceController extends BaseController
|
||||||
{
|
{
|
||||||
@ -54,10 +55,12 @@ class ApiServiceController extends BaseController
|
|||||||
{
|
{
|
||||||
try{
|
try{
|
||||||
|
|
||||||
$id = $this->request->getPost('id');
|
$payload = $this->request->getJSON(true);
|
||||||
$emp_code = $this->request->getPost('emp_code');
|
$id = $payload['id'] ?? null;
|
||||||
$client_policy_id = $this->request->getPost('client_policy_id');
|
$emp_code = $payload['emp_code'] ?? null;
|
||||||
$policy_no = $this->request->getPost('policy_no');
|
$client_policy_id = $payload['client_policy_id'] ?? null;
|
||||||
|
$policy_no = $payload['policy_no'] ?? null;
|
||||||
|
|
||||||
|
|
||||||
$employee_policy = $this->employeePolicyModel
|
$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 ')
|
->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');
|
$tpa_id = $this->request->getPost('tpa_id');
|
||||||
$policy_no = $this->request->getPost('policy_no');
|
$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
|
if ($tpa_id == 2) // MediAssist
|
||||||
{
|
{
|
||||||
@ -109,10 +122,10 @@ class ApiServiceController extends BaseController
|
|||||||
$mediAssistController = new MediAssistApiController();
|
$mediAssistController = new MediAssistApiController();
|
||||||
$mediAssistController->GetBenefDetails( [ 'polict_no' => $policy_no ] );
|
$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{
|
}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