CHANGE_ in terms display : GWM

This commit is contained in:
Gowtham M 2024-12-12 16:56:49 +05:30
parent 569b1c3c9d
commit 272b073582

View File

@ -2404,7 +2404,7 @@ class EmployeeRestController extends AdminController
function getEmployeeActiveOrInactivePolicy()
{
if($this->request->getGet('type') == 'Active'){ $policy_status = 1; }else{ $policy_status = 0; }
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policy_type.policy_type as policy_type,insurers.name as insurer_name,tpa.name as tpa_name,tpa.network_hospitals')
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policy_type.policy_type as policy_type,insurers.name as insurer_name,tpa.name as tpa_name,tpa.network_hospitals as network_hospitals_url')
->join('insurers', 'client_policy.insurer_id = insurers.id', 'left')
->join('tpa', 'client_policy.tpa_id = tpa.id', 'left')
->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left')
@ -2454,7 +2454,7 @@ class EmployeeRestController extends AdminController
$data['policy_no'] = $ClientPolicyValue['policy_no'];
$data['insurer_name'] = $ClientPolicyValue['insurer_name'];
$data['tpa_name'] = $ClientPolicyValue['tpa_name'];
$data['network_hospitals_url'] = $ClientPolicyValue['network_hospitals'];
$data['network_hospitals_url'] = $ClientPolicyValue['network_hospitals_url'];
$data['policy_start_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_start_date']);
$data['policy_end_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_end_date']);
// $data['policy_terms'] = $terms;
@ -2518,6 +2518,8 @@ class EmployeeRestController extends AdminController
function policyTermsFiter($terms , $type)
{
$gpa = [
"sumInsured2" => "Sum Insured",
@ -2547,18 +2549,25 @@ class EmployeeRestController extends AdminController
];
$gmc = [
"sum_insured" => "Sum Insured",
"waiverofpreexistingdiseases" => "Waiver of Pre-existing Diseases",
"maternitycoverage" => "Maternity Coverage",
"babyday1cover" => "Baby Day 1 Cover",
"9monthwaitingperiodwaived" => "9-month waiting Period <20>waived",
"coverfromthedateofjoining" => "Cover from the date of Joining",
"waiverof1,2,3&4thyearexclusions" => "Waiver of 1, 2, 3 & 4th year Exclusions",
"waiverof30dayswaitingperiod" => "Waiver of 30 days waiting period",
"9monthwaitingperiodwaived" => "9-month waiting Period waived",
"twindelivery" => "Twin Delivery",
"maternitycoverage" => "Maternity Coverage",
"preandpostnatal" => "Pre and Post natal",
"prehospitalizationcover" => "Pre Hospitalization Cover",
"copayzonewisecopay" => "Co-Pay/Zone wise Co Pay",
"posthospitalizationcover" => "Post Hospitalization Cover ",
"congenitaldiseasesinternal" => "Congenital Diseases - Internal ",
"congenitaldiseasesexternal" => "Congenital Diseases - External ",
"roomrentlimit" => "Room Rent Limit",
"proportionatedeductionclause" => "Proportionate Deduction Clause",
"ayudhtreatmentcover" => "AYUSH treatment covered",
"lasiksurgery" => "Lasik Surgery",
"cataract" => "Cataract",
"ailmentcapping" => "Ailment capping",
"moderntreatmentsasperirdai" => "Modern Treatment "
];
@ -2567,15 +2576,51 @@ class EmployeeRestController extends AdminController
if($type == 'gpa'){
foreach ($gpa as $key => $value) {
if(isset($terms->$key))
$finalarray[$value] = $terms->$key;
{
if($terms->$key == 1)
{
$termsValue = 'Yes';
}else if($terms->$key == 0)
{
$termsValue = 'No';
}else
{
$termsValue = $terms->$key;
}
$finalarray[$value] = $termsValue;
}
}
if(is_array($terms->gpa_special_condition_label) && is_array($terms->gpa_special_condition_input)){
for ($i=0; $i < count($terms->gpa_special_condition_label); $i++) {
$finalarray[$terms->gpa_special_condition_label[$i]] = $terms->gpa_special_condition_input[$i];
}
}
}else{
foreach ($gmc as $key => $value) {
if(isset($terms->$key))
$finalarray[$value] = $terms->$key;
{
if($terms->$key == 1)
{
$termsValue = 'Yes';
}else if($terms->$key == 0)
{
$termsValue = 'No';
}else
{
$termsValue = $terms->$key;
}
$finalarray[$value] = $termsValue;
}
}
if(is_array($terms->special_condition_label) && is_array($terms->special_condition_input)){
for ($i=0; $i < count($terms->special_condition_label); $i++) {
$finalarray[$terms->special_condition_label[$i]] = $terms->special_condition_input[$i];
}
}
}
return $finalarray;