From 30e9d9dd6d385b3cd00decdadd0ace7a3d2fd81e Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Mon, 3 Aug 2026 12:10:43 +0530 Subject: [PATCH] FIX_STATUS_WRONGLY_MAPPED --- .../ClaimReportDashboardController.php | 8 +++---- app/Controllers/FhplApiController.php | 14 +++++------ app/Controllers/HealthIndiaApiController.php | 24 +++++++++---------- app/Controllers/VidalApiController.php | 8 +++---- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/Controllers/ClaimReportDashboardController.php b/app/Controllers/ClaimReportDashboardController.php index c57b97df..61f2ccf3 100644 --- a/app/Controllers/ClaimReportDashboardController.php +++ b/app/Controllers/ClaimReportDashboardController.php @@ -85,7 +85,7 @@ class ClaimReportDashboardController extends BaseController 'status' => false, 'message' => 'Unknown KPI. Pass Metabase id or method slug.', 'allowed' => ClaimsCollectionV2DashboardModel::KPI_MAP, - ], 404); + ], 200); } $model = new ClaimReportDashboardModel(); @@ -610,7 +610,7 @@ class ClaimReportDashboardController extends BaseController return $this->respond([ 'status' => false, 'message' => 'No claim_report records with dump linkage found for this policy.', - ], 404); + ], 200); } // Group dump IDs by source_table @@ -631,7 +631,7 @@ class ClaimReportDashboardController extends BaseController return $this->respond([ 'status' => false, 'message' => 'No valid TPA dump table references found for this policy.', - ], 404); + ], 200); } $spreadsheet = new Spreadsheet(); @@ -687,7 +687,7 @@ class ClaimReportDashboardController extends BaseController return $this->respond([ 'status' => false, 'message' => 'No dump table rows found for the linked claim_report records.', - ], 404); + ], 200); } $spreadsheet->setActiveSheetIndex(0); diff --git a/app/Controllers/FhplApiController.php b/app/Controllers/FhplApiController.php index f736d7a2..785095a7 100644 --- a/app/Controllers/FhplApiController.php +++ b/app/Controllers/FhplApiController.php @@ -264,12 +264,12 @@ class FhplApiController extends BaseController $tpa_ailments = $claimData['AILMENT'] ?? ''; $validStatuses = [ - "In-Progress" => 5, - "Under Process" => 5, + "In-Progress" => 61, + "Under Process" => 61, "Query" => 4, "Paid" => 11, "Rejected" => 8, - "Approved" => 8, + "Approved" => 9, "Required Information" => 4, ]; @@ -806,10 +806,10 @@ class FhplApiController extends BaseController $status = $row['CLAIM_STATUS']; $map = [ - "Under Process"=>5, + "Under Process"=>61, "Paid"=>11, "Rejected"=>8, - "Approved"=>8 + "Approved"=>9 ]; $claimStatus = $map[$status] ?? 1; @@ -900,10 +900,10 @@ class FhplApiController extends BaseController $status = $row['CLAIM_STATUS'] ?? null; $map = [ - "Under Process"=>5, + "Under Process"=>61, "Paid"=>11, "Rejected"=>8, - "Approved"=>8 + "Approved"=>9 ]; $claimStatus = $map[$status] ?? 61; diff --git a/app/Controllers/HealthIndiaApiController.php b/app/Controllers/HealthIndiaApiController.php index 1050ceb3..408467e3 100644 --- a/app/Controllers/HealthIndiaApiController.php +++ b/app/Controllers/HealthIndiaApiController.php @@ -322,12 +322,12 @@ class HealthIndiaApiController extends BaseController $tpa_ailments = $claimData['ailment'] ?? ''; $validStatuses = [ - "In-Progress" => 5, - "Under Process" => 5, - "Query" => 4, + "In-Progress" => 61, + "Under Process" => 61, + "Query" => 7, "Paid" => 11, "Rejected" => 8, - "Approved" => 8, + "Approved" => 9, "Required Information" => 4, "Intimated and File NOT received" => 4, ]; @@ -800,12 +800,12 @@ class HealthIndiaApiController extends BaseController $status = $row['Claim_Status'] ?? 'Under Process'; $map = [ - "Under Process" => 5, - "Pending for Bill Entry" => 5, + "Under Process" => 61, + "Pending for Bill Entry" => 61, "Paid" => 11, "Rejected" => 8, - "Approved" => 8, - "Outstanding" => 5, + "Approved" => 9, + "Outstanding" => 61, ]; $claimStatus = $map[$status] ?? 1; @@ -899,12 +899,12 @@ class HealthIndiaApiController extends BaseController $status = $row['Claim_Status'] ?? 'Under Process'; $map = [ - "Under Process" => 5, - "Pending for Bill Entry" => 5, + "Under Process" => 61, + "Pending for Bill Entry" => 61, "Paid" => 11, "Rejected" => 8, - "Approved" => 8, - "Outstanding" => 5, + "Approved" => 9, + "Outstanding" => 61, ]; $claimStatus = $map[$status] ?? 1; diff --git a/app/Controllers/VidalApiController.php b/app/Controllers/VidalApiController.php index aa83c129..5b4c51af 100644 --- a/app/Controllers/VidalApiController.php +++ b/app/Controllers/VidalApiController.php @@ -555,11 +555,11 @@ class VidalApiController extends BaseController // VALID STATUS LIST $validStatuses = [ - "In-Progress" => 5, + "In-Progress" => 61, "Required Information" => 4, "Paid" => 11, "Rejected" => 8, - "Approved" => 8, + "Approved" => 9, ]; $updateArray = [ @@ -685,11 +685,11 @@ class VidalApiController extends BaseController // VALID STATUS LIST $validStatuses = [ - "In-Progress" => 5, + "In-Progress" => 61, "Required Information" => 4, "Paid" => 11, "Rejected" => 8, - "Approved" => 8, + "Approved" => 9, ]; $updateArray = [