|
|
|
|
@ -2148,6 +2148,29 @@ class ClientController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function generateKycPrimaryTable($client_id){
|
|
|
|
|
|
|
|
|
|
$db = db_connect();
|
|
|
|
|
$builder = $db->table('kyc_docs kd');
|
|
|
|
|
$builder->select('kd.*, ck.file_name AS upload_doc_name');
|
|
|
|
|
$builder->join('clients c', 'kd.kyc_type_id = c.entity_type_id');
|
|
|
|
|
$builder->join(
|
|
|
|
|
'client_kyc_documents ck',
|
|
|
|
|
'kd.id = ck.kyc_doc_type_id AND ck.client_id = c.id AND ck.is_active = 1',
|
|
|
|
|
'left'
|
|
|
|
|
);
|
|
|
|
|
$builder->where('c.id', $client_id);
|
|
|
|
|
$builder->groupBy(['kd.id', 'ck.file_name']);
|
|
|
|
|
|
|
|
|
|
$query = $builder->get();
|
|
|
|
|
$result['data'] = $query->getResult();
|
|
|
|
|
|
|
|
|
|
$table = view('client_kyc_primary_table', $result);
|
|
|
|
|
|
|
|
|
|
print_r($table);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getPolicesByInsurerId($id = null)
|
|
|
|
|
{
|
|
|
|
|
$this->myLogger->logme('error', 'getPolicesByInsurerId function called');
|
|
|
|
|
@ -2659,194 +2682,269 @@ class ClientController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// public function enrollmentGMCDisplayValueTransform()
|
|
|
|
|
// {
|
|
|
|
|
// $data = [];
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("waiverofpreexistingdiseases_display")) {
|
|
|
|
|
// $data['Waiver of Pre-existing Diseases'] = $this->request->getPost("waiverofpreexistingdiseases");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("waiverof1234thyearexclusions_display")) {
|
|
|
|
|
// $data['Waiver of 1, 2, 3 & 4th year Exclusions'] = $this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("waiverof30dayswaitingperiod_display")) {
|
|
|
|
|
// $data['Waiver of 30 days waiting period'] = $this->request->getPost("waiverof30dayswaitingperiod");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("suminsuredenhancement_display")) {
|
|
|
|
|
// $data['Sum Insured Enhancement'] = $this->request->getPost("suminsuredenhancement");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("waiver_of_90_days_waiting_period_display")) {
|
|
|
|
|
// $data['Waiver of 90 Days Waiting Period'] = $this->request->getPost("waiver_of_90_days_waiting_period");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("waiver_of_other_waiting_periods_display")) {
|
|
|
|
|
// $data['Waiver of Other Waiting Periods'] = $this->request->getPost("waiver_of_other_waiting_periods");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("maternity_benefit_display")) {
|
|
|
|
|
// $data['Maternity Benefit'] = $this->request->getPost("maternity_benefit");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("9monthwaitingperiodwaived_display")) {
|
|
|
|
|
// $data['9-month waiting Period - waived'] = $this->request->getPost("9monthwaitingperiodwaived");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("maternitycoverage_display")) {
|
|
|
|
|
// $data['Maternity Coverage'] = $this->request->getPost("maternitycoverage");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("twindelivery_display")) {
|
|
|
|
|
// $data['Twin Delivery'] = $this->request->getPost("twindelivery");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("well_baby_well_mother_expenses_display")) {
|
|
|
|
|
// $data['Well baby / Well Mother Expenses'] = $this->request->getPost("well_baby_well_mother_expenses");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("preandpostnatal_display")) {
|
|
|
|
|
// $data['Pre and Post natal'] = $this->request->getPost("preandpostnatal");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("infertility_treatment_coverage_display")) {
|
|
|
|
|
// $data['Infertility Treatment Coverage'] = $this->request->getPost("infertility_treatment_coverage");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("babyday1cover_display")) {
|
|
|
|
|
// $data['Baby Day 1 Cover'] = $this->request->getPost("babyday1cover");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("coverfromthedateofjoining_display")) {
|
|
|
|
|
// $data['Cover from the date of Joining'] = $this->request->getPost("coverfromthedateofjoining");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse_display")) {
|
|
|
|
|
// $data['Mid Term Addition of New Born / Newly Wedded Spouse'] = $this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("prehospitalizationcover_display")) {
|
|
|
|
|
// $data['Pre Hospitalization Cover'] = $this->request->getPost("prehospitalizationcover");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("posthospitalizationcover_display")) {
|
|
|
|
|
// $data['Post Hospitalization Cover'] = $this->request->getPost("posthospitalizationcover");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("congenitaldiseasesinternal_display")) {
|
|
|
|
|
// $data['Congenital Diseases - Internal'] = $this->request->getPost("congenitaldiseasesinternal");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("congenitaldiseasesexternal_display")) {
|
|
|
|
|
// $data['Congenital Diseases - External'] = $this->request->getPost("congenitaldiseasesexternal");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("copayzonewisecopay_display")) {
|
|
|
|
|
// $data['Co-Pay/Zone wise Co Pay'] = $this->request->getPost("copayzonewisecopay");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("roomrentlimit_display")) {
|
|
|
|
|
// $data['Room Rent Limit'] = $this->request->getPost("roomrentlimit");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("icu_limit_display")) {
|
|
|
|
|
// $data['ICU Limit'] = $this->request->getPost("icu_limit");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("proportionatedeductionclause_display")) {
|
|
|
|
|
// $data['Proportionate Deduction Clause'] = $this->request->getPost("proportionatedeductionclause");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("ailmentcapping_display")) {
|
|
|
|
|
// $data['Ailment capping'] = $this->request->getPost("ailmentcapping");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("ailment_capping_details_display")) {
|
|
|
|
|
// $data['Ailment capping Details'] = $this->request->getPost("ailment_capping_details");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("corporatebuffer_display")) {
|
|
|
|
|
// $data['Corporate Buffer'] = $this->request->getPost("corporatebuffer");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("non_admissible_contingency_corporate_buffer_display")) {
|
|
|
|
|
// $data['Non-Admissible / Contingency Corporate Buffer'] = $this->request->getPost("non_admissible_contingency_corporate_buffer");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("ambulancecharges_display")) {
|
|
|
|
|
// $data['Ambulance Charges'] = $this->request->getPost("ambulancecharges");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("airambulance_display")) {
|
|
|
|
|
// $data['Air Ambulance'] = $this->request->getPost("airambulance");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("reasonableandcustomarycharges_display")) {
|
|
|
|
|
// $data['Reasonable and Customary Charges'] = $this->request->getPost("reasonableandcustomarycharges");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("daycaretreatment_display")) {
|
|
|
|
|
// $data['Day Care Treatment'] = $this->request->getPost("daycaretreatment");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("lasiksurgery_display")) {
|
|
|
|
|
// $data['Lasik Surgery'] = $this->request->getPost("lasiksurgery");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("ayushtreatmentcover_display")) {
|
|
|
|
|
// $data['AYUSH treatment cover'] = $this->request->getPost("ayudhtreatmentcover");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("moderntreatmentsasperirdai_display")) {
|
|
|
|
|
// $data['Modern treatments as per IRDAI'] = $this->request->getPost("moderntreatmentsasperirdai");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("opd_treatment_display")) {
|
|
|
|
|
// $data['OPD Treatment'] = $this->request->getPost("opd_treatment");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("days_of_discharge_display")) {
|
|
|
|
|
// $data['Claim Intimation Clause'] = $this->request->getPost("days_of_discharge");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("days_from_dod_display")) {
|
|
|
|
|
// $data['Claim Submission'] = $this->request->getPost("days_from_dod");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("terrorism_display")) {
|
|
|
|
|
// $data['Terrorism'] = $this->request->getPost("terrorism");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("widower_cover_display")) {
|
|
|
|
|
// $data['Widower Cover'] = $this->request->getPost("widower_cover");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("breavement_cover_display")) {
|
|
|
|
|
// $data['Breavement Cover'] = $this->request->getPost("breavement_cover");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("special_condition_display_value")) {
|
|
|
|
|
|
|
|
|
|
// $specialConditionKeyValue = $this->request->getPost("special_condition_display_value") ?? [];
|
|
|
|
|
// $specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
|
|
|
|
|
|
|
|
|
// if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
|
|
|
|
// $mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
|
|
|
|
// $data = array_merge($data, $mergedArray);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if(isset($data) && !empty($data)){
|
|
|
|
|
// return $data;
|
|
|
|
|
// }else{
|
|
|
|
|
// $data = [];
|
|
|
|
|
// return $data;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
public function enrollmentGMCDisplayValueTransform()
|
|
|
|
|
{
|
|
|
|
|
$data = [];
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("waiverofpreexistingdiseases_display")) {
|
|
|
|
|
$data['Waiver of Pre-existing Diseases'] = $this->request->getPost("waiverofpreexistingdiseases");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("waiverof1234thyearexclusions_display")) {
|
|
|
|
|
$data['Waiver of 1, 2, 3 & 4th year Exclusions'] = $this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("waiverof30dayswaitingperiod_display")) {
|
|
|
|
|
$data['Waiver of 30 days waiting period'] = $this->request->getPost("waiverof30dayswaitingperiod");
|
|
|
|
|
}
|
|
|
|
|
// Mapping of POST keys to display labels
|
|
|
|
|
$fields = [
|
|
|
|
|
'waiverofpreexistingdiseases' => 'Waiver of Pre-existing Diseases',
|
|
|
|
|
'waiverof1,2,3&4thyearexclusions' => 'Waiver of 1, 2, 3 & 4th year Exclusions',
|
|
|
|
|
'waiverof30dayswaitingperiod' => 'Waiver of 30 days waiting period',
|
|
|
|
|
'suminsuredenhancement' => 'Sum Insured Enhancement',
|
|
|
|
|
'waiver_of_90_days_waiting_period' => 'Waiver of 90 Days Waiting Period',
|
|
|
|
|
'waiver_of_other_waiting_periods' => 'Waiver of Other Waiting Periods',
|
|
|
|
|
'maternity_benefit' => 'Maternity Benefit',
|
|
|
|
|
'9monthwaitingperiodwaived' => '9-month waiting Period - waived',
|
|
|
|
|
'maternitycoverage' => 'Maternity Coverage',
|
|
|
|
|
'twindelivery' => 'Twin Delivery',
|
|
|
|
|
'well_baby_well_mother_expenses' => 'Well baby / Well Mother Expenses',
|
|
|
|
|
'preandpostnatal' => 'Pre and Post natal',
|
|
|
|
|
'infertility_treatment_coverage' => 'Infertility Treatment Coverage',
|
|
|
|
|
'babyday1cover' => 'Baby Day 1 Cover',
|
|
|
|
|
'coverfromthedateofjoining' => 'Cover from the date of Joining',
|
|
|
|
|
'mid_term_addition_of_new_born_newly_wedded_spouse' => 'Mid Term Addition of New Born / Newly Wedded Spouse',
|
|
|
|
|
'prehospitalizationcover' => 'Pre Hospitalization Cover',
|
|
|
|
|
'posthospitalizationcover' => 'Post Hospitalization Cover',
|
|
|
|
|
'congenitaldiseasesinternal' => 'Congenital Diseases - Internal',
|
|
|
|
|
'congenitaldiseasesexternal' => 'Congenital Diseases - External',
|
|
|
|
|
'copayzonewisecopay' => 'Co-Pay/Zone wise Co Pay',
|
|
|
|
|
'roomrentlimit' => 'Room Rent Limit',
|
|
|
|
|
'icu_limit' => 'ICU Limit',
|
|
|
|
|
'proportionatedeductionclause' => 'Proportionate Deduction Clause',
|
|
|
|
|
'ailmentcapping' => 'Ailment capping',
|
|
|
|
|
'ailment_capping_details' => 'Ailment capping Details',
|
|
|
|
|
'corporatebuffer' => 'Corporate Buffer',
|
|
|
|
|
'non_admissible_contingency_corporate_buffer' => 'Non-Admissible / Contingency Corporate Buffer',
|
|
|
|
|
'ambulancecharges' => 'Ambulance Charges',
|
|
|
|
|
'airambulance' => 'Air Ambulance',
|
|
|
|
|
'reasonableandcustomarycharges' => 'Reasonable and Customary Charges',
|
|
|
|
|
'daycaretreatment' => 'Day Care Treatment',
|
|
|
|
|
'lasiksurgery' => 'Lasik Surgery',
|
|
|
|
|
'ayudhtreatmentcover' => 'AYUSH treatment cover',
|
|
|
|
|
'moderntreatmentsasperirdai' => 'Modern treatments as per IRDAI',
|
|
|
|
|
'opd_treatment' => 'OPD Treatment',
|
|
|
|
|
'days_of_discharge' => 'Claim Intimation Clause',
|
|
|
|
|
'days_from_dod' => 'Claim Submission',
|
|
|
|
|
'terrorism' => 'Terrorism',
|
|
|
|
|
'widower_cover' => 'Widower Cover',
|
|
|
|
|
'breavement_cover' => 'Breavement Cover'
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("suminsuredenhancement_display")) {
|
|
|
|
|
$data['Sum Insured Enhancement'] = $this->request->getPost("suminsuredenhancement");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("waiver_of_90_days_waiting_period_display")) {
|
|
|
|
|
$data['Waiver of 90 Days Waiting Period'] = $this->request->getPost("waiver_of_90_days_waiting_period");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("waiver_of_other_waiting_periods_display")) {
|
|
|
|
|
$data['Waiver of Other Waiting Periods'] = $this->request->getPost("waiver_of_other_waiting_periods");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("maternity_benefit_display")) {
|
|
|
|
|
$data['Maternity Benefit'] = $this->request->getPost("maternity_benefit");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("9monthwaitingperiodwaived_display")) {
|
|
|
|
|
$data['9-month waiting Period - waived'] = $this->request->getPost("9monthwaitingperiodwaived");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("maternitycoverage_display")) {
|
|
|
|
|
$data['Maternity Coverage'] = $this->request->getPost("maternitycoverage");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("twindelivery_display")) {
|
|
|
|
|
$data['Twin Delivery'] = $this->request->getPost("twindelivery");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("well_baby_well_mother_expenses_display")) {
|
|
|
|
|
$data['Well baby / Well Mother Expenses'] = $this->request->getPost("well_baby_well_mother_expenses");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("preandpostnatal_display")) {
|
|
|
|
|
$data['Pre and Post natal'] = $this->request->getPost("preandpostnatal");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("infertility_treatment_coverage_display")) {
|
|
|
|
|
$data['Infertility Treatment Coverage'] = $this->request->getPost("infertility_treatment_coverage");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("babyday1cover_display")) {
|
|
|
|
|
$data['Baby Day 1 Cover'] = $this->request->getPost("babyday1cover");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("coverfromthedateofjoining_display")) {
|
|
|
|
|
$data['Cover from the date of Joining'] = $this->request->getPost("coverfromthedateofjoining");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse_display")) {
|
|
|
|
|
$data['Mid Term Addition of New Born / Newly Wedded Spouse'] = $this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("prehospitalizationcover_display")) {
|
|
|
|
|
$data['Pre Hospitalization Cover'] = $this->request->getPost("prehospitalizationcover");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("posthospitalizationcover_display")) {
|
|
|
|
|
$data['Post Hospitalization Cover'] = $this->request->getPost("posthospitalizationcover");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("congenitaldiseasesinternal_display")) {
|
|
|
|
|
$data['Congenital Diseases - Internal'] = $this->request->getPost("congenitaldiseasesinternal");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("congenitaldiseasesexternal_display")) {
|
|
|
|
|
$data['Congenital Diseases - External'] = $this->request->getPost("congenitaldiseasesexternal");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("copayzonewisecopay_display")) {
|
|
|
|
|
$data['Co-Pay/Zone wise Co Pay'] = $this->request->getPost("copayzonewisecopay");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("roomrentlimit_display")) {
|
|
|
|
|
$data['Room Rent Limit'] = $this->request->getPost("roomrentlimit");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("icu_limit_display")) {
|
|
|
|
|
$data['ICU Limit'] = $this->request->getPost("icu_limit");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("proportionatedeductionclause_display")) {
|
|
|
|
|
$data['Proportionate Deduction Clause'] = $this->request->getPost("proportionatedeductionclause");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("ailmentcapping_display")) {
|
|
|
|
|
$data['Ailment capping'] = $this->request->getPost("ailmentcapping");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("ailment_capping_details_display")) {
|
|
|
|
|
$data['Ailment capping Details'] = $this->request->getPost("ailment_capping_details");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("corporatebuffer_display")) {
|
|
|
|
|
$data['Corporate Buffer'] = $this->request->getPost("corporatebuffer");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("non_admissible_contingency_corporate_buffer_display")) {
|
|
|
|
|
$data['Non-Admissible / Contingency Corporate Buffer'] = $this->request->getPost("non_admissible_contingency_corporate_buffer");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("ambulancecharges_display")) {
|
|
|
|
|
$data['Ambulance Charges'] = $this->request->getPost("ambulancecharges");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("airambulance_display")) {
|
|
|
|
|
$data['Air Ambulance'] = $this->request->getPost("airambulance");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("reasonableandcustomarycharges_display")) {
|
|
|
|
|
$data['Reasonable and Customary Charges'] = $this->request->getPost("reasonableandcustomarycharges");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("daycaretreatment_display")) {
|
|
|
|
|
$data['Day Care Treatment'] = $this->request->getPost("daycaretreatment");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("lasiksurgery_display")) {
|
|
|
|
|
$data['Lasik Surgery'] = $this->request->getPost("lasiksurgery");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("ayushtreatmentcover_display")) {
|
|
|
|
|
$data['AYUSH treatment cover'] = $this->request->getPost("ayudhtreatmentcover");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("moderntreatmentsasperirdai_display")) {
|
|
|
|
|
$data['Modern treatments as per IRDAI'] = $this->request->getPost("moderntreatmentsasperirdai");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("opd_treatment_display")) {
|
|
|
|
|
$data['OPD Treatment'] = $this->request->getPost("opd_treatment");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("days_of_discharge_display")) {
|
|
|
|
|
$data['Claim Intimation Clause'] = $this->request->getPost("days_of_discharge");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("days_from_dod_display")) {
|
|
|
|
|
$data['Claim Submission'] = $this->request->getPost("days_from_dod");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("terrorism_display")) {
|
|
|
|
|
$data['Terrorism'] = $this->request->getPost("terrorism");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("widower_cover_display")) {
|
|
|
|
|
$data['Widower Cover'] = $this->request->getPost("widower_cover");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("breavement_cover_display")) {
|
|
|
|
|
$data['Breavement Cover'] = $this->request->getPost("breavement_cover");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("special_condition_display_value")) {
|
|
|
|
|
|
|
|
|
|
$specialConditionKeyValue = $this->request->getPost("special_condition_display_value") ?? [];
|
|
|
|
|
$specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
|
|
|
|
|
|
|
|
|
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
|
|
|
|
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
|
|
|
|
$data = array_merge($data, $mergedArray);
|
|
|
|
|
foreach ($fields as $postKey => $label) {
|
|
|
|
|
$displayKey = $postKey . '_display';
|
|
|
|
|
$value = $this->request->getPost($postKey);
|
|
|
|
|
if ($this->request->getPost($displayKey) && $value !== null && $value !== '') {
|
|
|
|
|
$data[$label] = $value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($data) && !empty($data)){
|
|
|
|
|
return $data;
|
|
|
|
|
}else{
|
|
|
|
|
$data = [];
|
|
|
|
|
return $data;
|
|
|
|
|
|
|
|
|
|
// Handle special conditions
|
|
|
|
|
if ($this->request->getPost("special_condition_display_value")) {
|
|
|
|
|
$specialConditionKeyValue = json_decode($this->request->getPost("special_condition_display_value"), true);
|
|
|
|
|
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
|
|
|
|
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
|
|
|
|
// Only add non-empty values
|
|
|
|
|
foreach ($mergedArray as $k => $v) {
|
|
|
|
|
if ($v !== null && $v !== '') {
|
|
|
|
|
$data[$k] = $v;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getterms()
|
|
|
|
|
{
|
|
|
|
|
$client_policy_id = $this->request->getVar('client_policy_id');
|
|
|
|
|
@ -3006,92 +3104,145 @@ class ClientController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// public function enrollmentGPADisplayValueTransform()
|
|
|
|
|
// {
|
|
|
|
|
// $data = [];
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("accidentalDeathBenefit_display")) {
|
|
|
|
|
// $data['Accidental Death Benefit'] = $this->request->getPost("accidentalDeathBenefit");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("permanentTotalDisablement_display")) {
|
|
|
|
|
// $data['Permanent Total Disablement'] = $this->request->getPost("permanentTotalDisablement");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("permanentPartialDisablement_display")) {
|
|
|
|
|
// $data['Permanent Partial Disablement'] = $this->request->getPost("permanentPartialDisablement");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("temporaryTotalDisablementBenefit_display")) {
|
|
|
|
|
// $data['Temporary Total Disablement Benefit'] = $this->request->getPost("temporaryTotalDisablementBenefit");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("medical_expenses_medical_extension_display")) {
|
|
|
|
|
// $data['Medical Expenses / Medical Extension (IPD)'] = $this->request->getPost("medical_expenses_medical_extension");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("opd_treatment_cover_display")) {
|
|
|
|
|
// $data['OPD Treatment Cover'] = $this->request->getPost("opd_treatment_cover");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("ambulanceCharges_display")) {
|
|
|
|
|
// $data['Ambulance Charges'] = $this->request->getPost("ambulanceCharges");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("repatriation_of_mortal_remains_display")) {
|
|
|
|
|
// $data['Repatriation of Mortal Remains'] = $this->request->getPost("repatriation_of_mortal_remains");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("childrenEducationWelfareFund_display")) {
|
|
|
|
|
// $data['Children Education Welfare Fund'] = $this->request->getPost("childrenEducationWelfareFund");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("terrorism_display")) {
|
|
|
|
|
// $data['Terrorism'] = $this->request->getPost("terrorism");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("worldwideCover_display")) {
|
|
|
|
|
// $data['Worldwide Cover'] = $this->request->getPost("worldwideCover");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("family_transportation_benefits_display")) {
|
|
|
|
|
// $data['Family Transportation Benefits'] = $this->request->getPost("family_transportation_benefits");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("fractures_dislocation_burns_display")) {
|
|
|
|
|
// $data['Fractures / Dislocation / Burns'] = $this->request->getPost("fractures_dislocation_burns");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("coma_display")) {
|
|
|
|
|
// $data['Coma'] = $this->request->getPost("coma");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("carriageofDeadBody_display")) {
|
|
|
|
|
// $data['Carriage of Dead Body'] = $this->request->getPost("carriageOfDeadBody");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("compassionateVisitExpenses_display")) {
|
|
|
|
|
// $data['Compassionate Visit Expenses'] = $this->request->getPost("compassionateVisitExpenses");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("travel_expenses_for_medical_treatment_display")) {
|
|
|
|
|
// $data['Travel expenses for Medical Treatment'] = $this->request->getPost("travel_expenses_for_medical_treatment");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("daily_cash_allowance_display")) {
|
|
|
|
|
// $data['Daily cash Allowance'] = $this->request->getPost("daily_cash_allowance");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("artifical_limb_and_prosthesis_display")) {
|
|
|
|
|
// $data['Artifical Limb and Prosthesis'] = $this->request->getPost("artifical_limb_and_prosthesis");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("animalSnakeInsectBite_display")) {
|
|
|
|
|
// $data['Animal/Snake/Insect Bite'] = $this->request->getPost("animalSnakeInsectBite");
|
|
|
|
|
// }
|
|
|
|
|
// if ($this->request->getPost("air_ambulance_display")) {
|
|
|
|
|
// $data['Air Ambulance'] = $this->request->getPost("air_ambulance");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($this->request->getPost("gpa_special_condition_display_value")) {
|
|
|
|
|
|
|
|
|
|
// $specialConditionKeyValue = $this->request->getPost("gpa_special_condition_display_value") ?? [];
|
|
|
|
|
// $specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
|
|
|
|
|
|
|
|
|
// if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
|
|
|
|
// $mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
|
|
|
|
// $data = array_merge($data, $mergedArray);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// // print_r($data); die;
|
|
|
|
|
|
|
|
|
|
// if (isset($data) && !empty($data)) {
|
|
|
|
|
// return $data;
|
|
|
|
|
// } else {
|
|
|
|
|
// $data = [];
|
|
|
|
|
// return $data;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
public function enrollmentGPADisplayValueTransform()
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
$data = [];
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("accidentalDeathBenefit_display")) {
|
|
|
|
|
$data['Accidental Death Benefit'] = $this->request->getPost("accidentalDeathBenefit");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("permanentTotalDisablement_display")) {
|
|
|
|
|
$data['Permanent Total Disablement'] = $this->request->getPost("permanentTotalDisablement");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("permanentPartialDisablement_display")) {
|
|
|
|
|
$data['Permanent Partial Disablement'] = $this->request->getPost("permanentPartialDisablement");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("temporaryTotalDisablementBenefit_display")) {
|
|
|
|
|
$data['Temporary Total Disablement Benefit'] = $this->request->getPost("temporaryTotalDisablementBenefit");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("medical_expenses_medical_extension_display")) {
|
|
|
|
|
$data['Medical Expenses / Medical Extension (IPD)'] = $this->request->getPost("medical_expenses_medical_extension");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("opd_treatment_cover_display")) {
|
|
|
|
|
$data['OPD Treatment Cover'] = $this->request->getPost("opd_treatment_cover");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("ambulanceCharges_display")) {
|
|
|
|
|
$data['Ambulance Charges'] = $this->request->getPost("ambulanceCharges");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("repatriation_of_mortal_remains_display")) {
|
|
|
|
|
$data['Repatriation of Mortal Remains'] = $this->request->getPost("repatriation_of_mortal_remains");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("childrenEducationWelfareFund_display")) {
|
|
|
|
|
$data['Children Education Welfare Fund'] = $this->request->getPost("childrenEducationWelfareFund");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("terrorism_display")) {
|
|
|
|
|
$data['Terrorism'] = $this->request->getPost("terrorism");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("worldwideCover_display")) {
|
|
|
|
|
$data['Worldwide Cover'] = $this->request->getPost("worldwideCover");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("family_transportation_benefits_display")) {
|
|
|
|
|
$data['Family Transportation Benefits'] = $this->request->getPost("family_transportation_benefits");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("fractures_dislocation_burns_display")) {
|
|
|
|
|
$data['Fractures / Dislocation / Burns'] = $this->request->getPost("fractures_dislocation_burns");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("coma_display")) {
|
|
|
|
|
$data['Coma'] = $this->request->getPost("coma");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("carriageofDeadBody_display")) {
|
|
|
|
|
$data['Carriage of Dead Body'] = $this->request->getPost("carriageOfDeadBody");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("compassionateVisitExpenses_display")) {
|
|
|
|
|
$data['Compassionate Visit Expenses'] = $this->request->getPost("compassionateVisitExpenses");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("travel_expenses_for_medical_treatment_display")) {
|
|
|
|
|
$data['Travel expenses for Medical Treatment'] = $this->request->getPost("travel_expenses_for_medical_treatment");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("daily_cash_allowance_display")) {
|
|
|
|
|
$data['Daily cash Allowance'] = $this->request->getPost("daily_cash_allowance");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("artifical_limb_and_prosthesis_display")) {
|
|
|
|
|
$data['Artifical Limb and Prosthesis'] = $this->request->getPost("artifical_limb_and_prosthesis");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("animalSnakeInsectBite_display")) {
|
|
|
|
|
$data['Animal/Snake/Insect Bite'] = $this->request->getPost("animalSnakeInsectBite");
|
|
|
|
|
}
|
|
|
|
|
if ($this->request->getPost("air_ambulance_display")) {
|
|
|
|
|
$data['Air Ambulance'] = $this->request->getPost("air_ambulance");
|
|
|
|
|
}
|
|
|
|
|
// Map POST keys to display labels
|
|
|
|
|
$fields = [
|
|
|
|
|
'accidentalDeathBenefit' => 'Accidental Death Benefit',
|
|
|
|
|
'permanentTotalDisablement' => 'Permanent Total Disablement',
|
|
|
|
|
'permanentPartialDisablement' => 'Permanent Partial Disablement',
|
|
|
|
|
'temporaryTotalDisablementBenefit' => 'Temporary Total Disablement Benefit',
|
|
|
|
|
'medical_expenses_medical_extension' => 'Medical Expenses / Medical Extension (IPD)',
|
|
|
|
|
'opd_treatment_cover' => 'OPD Treatment Cover',
|
|
|
|
|
'ambulanceCharges' => 'Ambulance Charges',
|
|
|
|
|
'repatriation_of_mortal_remains' => 'Repatriation of Mortal Remains',
|
|
|
|
|
'childrenEducationWelfareFund' => 'Children Education Welfare Fund',
|
|
|
|
|
'terrorism' => 'Terrorism',
|
|
|
|
|
'worldwideCover' => 'Worldwide Cover',
|
|
|
|
|
'family_transportation_benefits' => 'Family Transportation Benefits',
|
|
|
|
|
'fractures_dislocation_burns' => 'Fractures / Dislocation / Burns',
|
|
|
|
|
'coma' => 'Coma',
|
|
|
|
|
'carriageOfDeadBody' => 'Carriage of Dead Body',
|
|
|
|
|
'compassionateVisitExpenses' => 'Compassionate Visit Expenses',
|
|
|
|
|
'travel_expenses_for_medical_treatment' => 'Travel expenses for Medical Treatment',
|
|
|
|
|
'daily_cash_allowance' => 'Daily cash Allowance',
|
|
|
|
|
'artifical_limb_and_prosthesis' => 'Artifical Limb and Prosthesis',
|
|
|
|
|
'animalSnakeInsectBite' => 'Animal/Snake/Insect Bite',
|
|
|
|
|
'air_ambulance' => 'Air Ambulance'
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if ($this->request->getPost("gpa_special_condition_display_value")) {
|
|
|
|
|
|
|
|
|
|
$specialConditionKeyValue = $this->request->getPost("gpa_special_condition_display_value") ?? [];
|
|
|
|
|
$specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
|
|
|
|
|
|
|
|
|
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
|
|
|
|
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
|
|
|
|
$data = array_merge($data, $mergedArray);
|
|
|
|
|
foreach ($fields as $postKey => $label) {
|
|
|
|
|
$displayKey = $postKey . '_display';
|
|
|
|
|
$value = $this->request->getPost($postKey);
|
|
|
|
|
if ($this->request->getPost($displayKey) && $value !== null && $value !== '') {
|
|
|
|
|
$data[$label] = $value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// print_r($data); die;
|
|
|
|
|
|
|
|
|
|
if (isset($data) && !empty($data)) {
|
|
|
|
|
return $data;
|
|
|
|
|
} else {
|
|
|
|
|
$data = [];
|
|
|
|
|
return $data;
|
|
|
|
|
// Handle GPA special conditions
|
|
|
|
|
if ($this->request->getPost("gpa_special_condition_display_value")) {
|
|
|
|
|
$specialConditionKeyValue = json_decode($this->request->getPost("gpa_special_condition_display_value"), true);
|
|
|
|
|
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
|
|
|
|
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
|
|
|
|
foreach ($mergedArray as $k => $v) {
|
|
|
|
|
if ($v !== null && $v !== '') {
|
|
|
|
|
$data[$k] = $v;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getPolicyGPATerms()
|
|
|
|
|
|