Health india live release code

This commit is contained in:
Gowtham M 2026-02-21 11:49:02 +05:30
parent eaa2e9d5e4
commit a10e006cae
2 changed files with 14 additions and 55 deletions

View File

@ -688,51 +688,4 @@ class ApiServiceController extends BaseController
// Get Claims
public function getClaims($id)
{
if ($id == 1) {
$controller = new VidalApiController();
} elseif ($id == 2) {
$controller = new ICICILombardController();
} elseif ($id == 3) {
$controller = new MediAssistApiController();
}
}
// Get UHID
public function getUhid($id)
{
if ($id == 1) {
$controller = new VidalApiController();
} elseif ($id == 2) {
$controller = new ICICILombardController();
} elseif ($id == 3) {
$controller = new MediAssistApiController();
}
}
// Push Enrollment
public function pushEnrollment($id)
{
if ($id == 1) {
$controller = new VidalApiController();
} elseif ($id == 2) {
$controller = new ICICILombardController();
} elseif ($id == 3) {
$controller = new MediAssistApiController();
}
}
// Get Hospital Network
public function getHospitalNetwork($id)
{
if ($id == 1) {
$controller = new VidalApiController();
} elseif ($id == 2) {
$controller = new ICICILombardController();
} elseif ($id == 3) {
$controller = new MediAssistApiController();
}
}
} }

View File

@ -79,7 +79,7 @@ class HealthIndiaApiController extends BaseController
]); ]);
} }
public function SubmitClaim($claimId = 729) public function SubmitClaim($claimId = null)
{ {
helper('api'); helper('api');
@ -222,9 +222,9 @@ class HealthIndiaApiController extends BaseController
$this->db->table('ticket_master') $this->db->table('ticket_master')
->where('id', $claimId) ->where('id', $claimId)
->update([ ->update([
'claim_number' => $ccn, // 'claim_number' => $ccn,
'tpa_claim_id' => $ccn, // 'tpa_claim_id' => $ccn,
'tpa_claim_push_reference_no' => $ccn . '(' . $ccnExt . ')', 'tpa_claim_push_reference_no' => $ccn . '-' . $ccnExt,
'updated_at' => date('Y-m-d H:i:s') 'updated_at' => date('Y-m-d H:i:s')
]); ]);
@ -237,14 +237,14 @@ class HealthIndiaApiController extends BaseController
return; return;
} }
public function ClaimDetail($claimId = 729) public function ClaimDetail($claimId = null)
{ {
helper('api'); helper('api');
log_message('error', 'HEALTH_INDIA - Claim Status | Started for claimId: ' . $claimId); log_message('error', 'HEALTH_INDIA - Claim Status | Started for claimId: ' . $claimId);
$ticket = $this->db->table('ticket_master tm') $ticket = $this->db->table('ticket_master tm')
->select("tm.id, tm.tpa_claim_id as ccn, cp.policy_no, cp.policy_start_date, cp.policy_end_date, tm.emp_code") ->select("tm.id, tm.tpa_claim_push_reference_no, cp.policy_no, cp.policy_start_date, cp.policy_end_date, tm.emp_code")
->join('client_policy cp', 'tm.client_policy_id=cp.id') ->join('client_policy cp', 'tm.client_policy_id=cp.id')
->where('tm.id', $claimId) ->where('tm.id', $claimId)
->get()->getRowArray(); ->get()->getRowArray();
@ -267,10 +267,14 @@ class HealthIndiaApiController extends BaseController
$url = getenv('HEALTH_INDIA_BASE_URL') . "/Claims/GetClaims"; $url = getenv('HEALTH_INDIA_BASE_URL') . "/Claims/GetClaims";
// Using claim number wise approach (Section 7.3 - option 3) // Using claim number wise approach (Section 7.3 - option 3)
$reference = $ticket['tpa_claim_push_reference_no'];
$parts = explode('-', $reference);
$ccn = $parts[0] ?? null;
$ccnExt = $parts[1] ?? null;
$body = [ $body = [
"policY_NUMBER" => $ticket['policy_no'], "policY_NUMBER" => $ticket['policy_no'],
"CCN" => $ticket['ccn'], "CCN" => $ccn,
"CCN_EXT" => "0" "CCN_EXT" => $ccnExt
]; ];
$headers = [ $headers = [
@ -309,6 +313,8 @@ class HealthIndiaApiController extends BaseController
$updateArray = [ $updateArray = [
'tpa_claim_status' => $currentStatus, 'tpa_claim_status' => $currentStatus,
'tpa_claim_id' => $tpa_claim_no,
'claim_number' => $tpa_claim_no,
'updated_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s'),
]; ];
if (isset($validStatuses[$currentStatus])) { if (isset($validStatuses[$currentStatus])) {