CHANGE_CLAIM_LIST_EXPORT_AND_APPROVED_CUSTM_MSG_FIELD : RV
This commit is contained in:
parent
3cbd911724
commit
15e1fb5a4a
@ -123,6 +123,7 @@ class TicketController extends BaseController
|
||||
'((CLAIM_FEEDBACK_FORM))' => 'claim_feedback_form',
|
||||
'((SETTLED_LETTER))' => 'settle_letter',
|
||||
'((APPROVED_LETTER))' => 'approved_letter',
|
||||
'((APPROVED_DESCRIBTION))' => 'approved_description',
|
||||
];
|
||||
$this->extraFields = [
|
||||
1 => ['non_id_reason'],
|
||||
@ -132,13 +133,13 @@ class TicketController extends BaseController
|
||||
5 => ['claim_number', 'registration_date'],
|
||||
7 => ['query_received_date'],
|
||||
8 => ['denial_reason','denial_date'],
|
||||
9 => ['approved_amount','approved_date', 'approved_letter'],
|
||||
9 => ['approved_amount','approved_date', 'approved_letter', "approved_description"],
|
||||
11 => ['utr_details', 'settled_date', 'settle_letter'],
|
||||
40 => ['approved_amount','approved_date', 'approved_letter'],
|
||||
40 => ['approved_amount','approved_date', 'approved_letter', "approved_description"],
|
||||
44 => ['utr_details', 'settled_date', 'settle_letter'],
|
||||
30 => ['approved_amount','approved_date', 'approved_letter'],
|
||||
30 => ['approved_amount','approved_date', 'approved_letter', "approved_description"],
|
||||
34 => ['utr_details', 'settled_date', 'settle_letter'],
|
||||
20 => ['approved_amount','approved_date', 'approved_letter'],
|
||||
20 => ['approved_amount','approved_date', 'approved_letter', "approved_description"],
|
||||
24 => ['utr_details', 'settled_date', 'settle_letter'],
|
||||
14 => ['return_remark', 'awb_no_courier_name'],
|
||||
48 => ['return_remark', 'awb_no_courier_name'],
|
||||
@ -173,6 +174,9 @@ class TicketController extends BaseController
|
||||
public function ticketList()
|
||||
{
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
$data['modeOFIntimate'] = $this->modeOFIntimate;
|
||||
$data['priorityType'] = $this->priorityType;
|
||||
$data['claimType'] = $this->claimType;
|
||||
if ($this->request->is('get')) {
|
||||
$data['page_name'] = "Claims";
|
||||
$data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active', 1)->findAll();
|
||||
@ -199,13 +203,13 @@ class TicketController extends BaseController
|
||||
}
|
||||
|
||||
public function ticketSearch($action = null)
|
||||
{
|
||||
{
|
||||
$db = db_connect();
|
||||
|
||||
$subquery = $db->table('ticket_master tm')
|
||||
->select([
|
||||
'tm.id AS ticket_id',
|
||||
"CASE
|
||||
->select([
|
||||
'tm.id AS ticket_id',
|
||||
"CASE
|
||||
WHEN DATEDIFF(
|
||||
CURDATE(),
|
||||
COALESCE(latest_history.created_at, tm.created_at)
|
||||
@ -220,17 +224,17 @@ class TicketController extends BaseController
|
||||
) BETWEEN 13 AND 20 THEN '13-20 Days'
|
||||
ELSE 'Above 20 Days'
|
||||
END AS tat"
|
||||
])
|
||||
->join(
|
||||
'(SELECT th.ticket_id, MAX(th.created_at) AS created_at
|
||||
])
|
||||
->join(
|
||||
'(SELECT th.ticket_id, MAX(th.created_at) AS created_at
|
||||
FROM ticket_history th
|
||||
WHERE th.field_name = "claim_status_id"
|
||||
GROUP BY th.ticket_id) AS latest_history',
|
||||
'latest_history.ticket_id = tm.id',
|
||||
'left'
|
||||
)
|
||||
->where('tm.is_active', 1)
|
||||
->groupBy('tm.id, tm.created_at, latest_history.created_at');
|
||||
'latest_history.ticket_id = tm.id',
|
||||
'left'
|
||||
)
|
||||
->where('tm.is_active', 1)
|
||||
->groupBy('tm.id, tm.created_at, latest_history.created_at');
|
||||
|
||||
|
||||
//action 1 get last 100 rows, action 2 filter and get all rows related to that and action 3 gets according to dashboard
|
||||
@ -248,12 +252,63 @@ class TicketController extends BaseController
|
||||
'tm.tpa_no',
|
||||
'tm.emp_name',
|
||||
'tm.emp_code',
|
||||
'tm.relationship',
|
||||
'i.name AS insurer_name',
|
||||
'c.client_name',
|
||||
'tm.insured_name',
|
||||
'c.short_name',
|
||||
'DATE_FORMAT(tm.created_at, "%d-%m-%Y") AS ticket_created_date',
|
||||
'COALESCE(tat_category.tat, "0-6 Days") AS tat'
|
||||
'COALESCE(tat_category.tat, "0-6 Days") AS tat',
|
||||
|
||||
'tm.claim_status_id',
|
||||
|
||||
'(SELECT first_name FROM user_profiles WHERE user_profiles.id = tm.acm_id) AS acm_name',
|
||||
'(SELECT name FROM insurers WHERE insurers.id = tm.insurer_id) AS insurer_name',
|
||||
'(SELECT name FROM tpa WHERE tpa.id = tm.tpa_id) AS tpa_name',
|
||||
|
||||
'tm.acm_id',
|
||||
'tm.insurer_id',
|
||||
'tm.tpa_id',
|
||||
'tm.client_policy_id',
|
||||
|
||||
'tm.policy_no',
|
||||
'tm.priority',
|
||||
'tm.relationship',
|
||||
'tm.emp_mobile',
|
||||
'tm.emp_mail',
|
||||
'tm.emp_personal_mail',
|
||||
'tm.mode_of_intimation',
|
||||
'tm.claim_type',
|
||||
'tm.hospital_name',
|
||||
'tm.doa',
|
||||
'tm.dod',
|
||||
'tm.claim_amount',
|
||||
'tm.pod_no',
|
||||
'tm.date_of_join',
|
||||
'tm.date_of_incep',
|
||||
'tm.dob',
|
||||
'tm.date_of_accident',
|
||||
'tm.date_of_death',
|
||||
'tm.date_of_intimat',
|
||||
'tm.si_amt',
|
||||
'tm.raised_date',
|
||||
'tm.registration_date',
|
||||
'tm.query_received_date',
|
||||
'tm.denial_date',
|
||||
'tm.approved_date',
|
||||
'tm.settled_date',
|
||||
'tm.denial_reason',
|
||||
'tm.approved_letter',
|
||||
'tm.approved_amount',
|
||||
'tm.utr_details',
|
||||
'tm.settle_letter',
|
||||
'tm.return_remark',
|
||||
'tm.cancel_remark',
|
||||
'tm.awb_no_courier_name',
|
||||
'tm.non_id_reason',
|
||||
'tm.pay_initiate_date',
|
||||
'tm.approved_description'
|
||||
|
||||
])
|
||||
->join('insurers i', 'i.id = tm.insurer_id AND i.is_active = 1', 'left')
|
||||
->join('clients c', 'c.id = tm.client_id AND c.is_active = 1', 'left')
|
||||
@ -262,13 +317,12 @@ class TicketController extends BaseController
|
||||
->where('tm.is_active', 1)
|
||||
->orderBy('tm.id', 'DESC');
|
||||
|
||||
$data = $query->get()->getResultArray();
|
||||
$data = $query->get()->getResultArray();
|
||||
|
||||
// dd(db_connect()->getLastQuery());
|
||||
|
||||
return $data;
|
||||
|
||||
}else if ($action == 3) {
|
||||
} else if ($action == 3) {
|
||||
$ids = $this->request->getPost('ids');
|
||||
$ids = array_filter(explode(',', $ids));
|
||||
|
||||
@ -290,41 +344,90 @@ class TicketController extends BaseController
|
||||
}
|
||||
}
|
||||
// print_rr($where);
|
||||
|
||||
|
||||
}
|
||||
$query = $db->table('ticket_master tm')
|
||||
->select([
|
||||
'tm.id',
|
||||
'tm.ticket_type_id',
|
||||
'tcs.claim_status AS status',
|
||||
'tm.claim_number AS claim_no',
|
||||
'tm.claim_status_id',
|
||||
'tm.is_head_approved',
|
||||
'tm.tpa_id',
|
||||
'tm.tpa_no',
|
||||
'tm.emp_name',
|
||||
'tm.emp_code',
|
||||
'i.name AS insurer_name',
|
||||
'c.client_name',
|
||||
'tm.insured_name',
|
||||
'c.short_name',
|
||||
'DATE_FORMAT(tm.created_at, "%d-%m-%Y") AS ticket_created_date',
|
||||
'COALESCE(tat_category.tat, "0-6 Days") AS tat'
|
||||
])
|
||||
->join('insurers i', 'i.id = tm.insurer_id AND i.is_active = 1', 'left')
|
||||
->join('clients c', 'c.id = tm.client_id AND c.is_active = 1', 'left')
|
||||
->join('ticket_claim_status tcs', 'tcs.id = tm.claim_status_id AND tcs.is_active = 1', 'left')
|
||||
->join("({$subquery->getCompiledSelect()}) tat_category", 'tm.id = tat_category.ticket_id', 'left')
|
||||
->where('tm.is_active', 1)
|
||||
->where($where)
|
||||
->orderBy('tm.id', 'DESC');
|
||||
->select([
|
||||
'tm.id',
|
||||
'tm.ticket_type_id',
|
||||
'tcs.claim_status AS status',
|
||||
'tm.claim_number AS claim_no',
|
||||
'tm.claim_status_id',
|
||||
'tm.is_head_approved',
|
||||
'tm.tpa_id',
|
||||
'tm.tpa_no',
|
||||
'tm.emp_name',
|
||||
'tm.emp_code',
|
||||
'tm.relationship',
|
||||
'i.name AS insurer_name',
|
||||
'c.client_name',
|
||||
'tm.insured_name',
|
||||
'c.short_name',
|
||||
'DATE_FORMAT(tm.created_at, "%d-%m-%Y") AS ticket_created_date',
|
||||
'COALESCE(tat_category.tat, "0-6 Days") AS tat',
|
||||
|
||||
$data = $query->get()->getResultArray();
|
||||
// print_rr($data);
|
||||
// log_message('error',' Claims Master Data '.json_encode($data));die();
|
||||
// print_rr($data);die();
|
||||
'(SELECT first_name FROM user_profiles WHERE user_profiles.id = tm.acm_id) AS acm_name',
|
||||
'(SELECT name FROM insurers WHERE insurers.id = tm.insurer_id) AS insurer_name',
|
||||
'(SELECT name FROM tpa WHERE tpa.id = tm.tpa_id) AS tpa_name',
|
||||
|
||||
return $data;
|
||||
'tm.claim_status_id',
|
||||
'tm.acm_id',
|
||||
'tm.insurer_id',
|
||||
'tm.tpa_id',
|
||||
'tm.client_policy_id',
|
||||
'tm.policy_no',
|
||||
'tm.priority',
|
||||
'tm.relationship',
|
||||
'tm.emp_mobile',
|
||||
'tm.emp_mail',
|
||||
'tm.emp_personal_mail',
|
||||
'tm.mode_of_intimation',
|
||||
'tm.claim_type',
|
||||
'tm.hospital_name',
|
||||
'tm.doa',
|
||||
'tm.dod',
|
||||
'tm.claim_amount',
|
||||
'tm.pod_no',
|
||||
'tm.date_of_join',
|
||||
'tm.date_of_incep',
|
||||
'tm.dob',
|
||||
'tm.date_of_accident',
|
||||
'tm.date_of_death',
|
||||
'tm.date_of_intimat',
|
||||
'tm.si_amt',
|
||||
'tm.raised_date',
|
||||
'tm.registration_date',
|
||||
'tm.query_received_date',
|
||||
'tm.denial_date',
|
||||
'tm.approved_date',
|
||||
'tm.settled_date',
|
||||
'tm.denial_reason',
|
||||
'tm.approved_letter',
|
||||
'tm.approved_amount',
|
||||
'tm.utr_details',
|
||||
'tm.settle_letter',
|
||||
'tm.return_remark',
|
||||
'tm.cancel_remark',
|
||||
'tm.awb_no_courier_name',
|
||||
'tm.non_id_reason',
|
||||
'tm.pay_initiate_date',
|
||||
'tm.approved_description'
|
||||
|
||||
])
|
||||
->join('insurers i', 'i.id = tm.insurer_id AND i.is_active = 1', 'left')
|
||||
->join('clients c', 'c.id = tm.client_id AND c.is_active = 1', 'left')
|
||||
->join('ticket_claim_status tcs', 'tcs.id = tm.claim_status_id AND tcs.is_active = 1', 'left')
|
||||
->join("({$subquery->getCompiledSelect()}) tat_category", 'tm.id = tat_category.ticket_id', 'left')
|
||||
->where('tm.is_active', 1)
|
||||
->where($where)
|
||||
->orderBy('tm.id', 'DESC');
|
||||
|
||||
$data = $query->get()->getResultArray();
|
||||
// print_rr($data);
|
||||
// log_message('error',' Claims Master Data '.json_encode($data));die();
|
||||
// print_rr($data);die();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function ticket_form($ticket_type)
|
||||
|
||||
@ -74,7 +74,9 @@ class TicketMasterModel extends Model
|
||||
'head_rejection_reason',
|
||||
'pay_initiate_date',
|
||||
'emp_personal_mail',
|
||||
'client_policy_id'
|
||||
'client_policy_id',
|
||||
|
||||
'approved_description'
|
||||
|
||||
];
|
||||
|
||||
|
||||
@ -336,6 +336,12 @@
|
||||
value="<?= isset($ticket_data['approved_letter']) ? $ticket_data['approved_letter'] : '' ?>" name="approved_letter">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 approved" style="display: none;">
|
||||
<label for="approved_description">Approved Description</label>
|
||||
<input type="text" class="form-control" id="approved_description" placeholder="Enter Approved Description"
|
||||
value="<?= isset($ticket_data['approved_description']) ? $ticket_data['approved_description'] : '' ?>" name="approved_description">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="utr_details">UTR Details</label>
|
||||
<input type="text" class="form-control" id="utr_details" placeholder="Enter UTR Details"
|
||||
@ -690,6 +696,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$field = $('#approved_description')
|
||||
$field.prop('required', false);
|
||||
var $parentDiv = $field.closest("div");
|
||||
$parentDiv.find("label[for='approved_description'] .text-danger").remove();
|
||||
|
||||
});
|
||||
|
||||
// function addRequiredFieldSymbol(field_name) {
|
||||
|
||||
@ -262,6 +262,12 @@
|
||||
value="<?= isset($ticket_data['approved_letter']) ? $ticket_data['approved_letter'] : '' ?>" name="approved_letter">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 approved" style="display: none;">
|
||||
<label for="approved_description">Approved Description</label>
|
||||
<input type="text" class="form-control" id="approved_description" placeholder="Enter Approved Description"
|
||||
value="<?= isset($ticket_data['approved_description']) ? $ticket_data['approved_description'] : '' ?>" name="approved_description">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="utr_details">UTR Details</label>
|
||||
<input type="text" class="form-control" id="utr_details" placeholder="Enter UTR Details"
|
||||
@ -526,6 +532,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$field = $('#approved_description')
|
||||
$field.prop('required', false);
|
||||
var $parentDiv = $field.closest("div");
|
||||
$parentDiv.find("label[for='approved_description'] .text-danger").remove();
|
||||
|
||||
});
|
||||
// function addRequiredFieldSymbol(field_name) {
|
||||
// // Find the field with the given name
|
||||
|
||||
@ -65,6 +65,49 @@ table.dataTable tbody td {
|
||||
<th>Emp name</th>
|
||||
<th>Insured Name</th>
|
||||
<th>Corporate name</th>
|
||||
|
||||
<th style="display: none;">ACM</th>
|
||||
<th style="display: none;">Insurer</th>
|
||||
<th style="display: none;">TPA</th>
|
||||
<th style="display: none;">Policy No</th>
|
||||
<th style="display: none;">Priority</th>
|
||||
<th style="display: none;">Relationship</th>
|
||||
<th style="display: none;">Emp Mobile</th>
|
||||
<th style="display: none;">Emp Email</th>
|
||||
<th style="display: none;">Emp Personal Email</th>
|
||||
<th style="display: none;">Mode of Intimation</th>
|
||||
<th style="display: none;">Claim Type</th>
|
||||
<th style="display: none;">Hospital Name</th>
|
||||
<th style="display: none;">DOA</th>
|
||||
<th style="display: none;">DOD</th>
|
||||
<th style="display: none;">Claim Amount</th>
|
||||
<th style="display: none;">POD No.</th>
|
||||
<th style="display: none;">Date of Join</th>
|
||||
<th style="display: none;">Date of Inception</th>
|
||||
<th style="display: none;">DOB</th>
|
||||
<th style="display: none;">Date of Accident</th>
|
||||
<th style="display: none;">Date of Death</th>
|
||||
<th style="display: none;">Date of Intimate</th>
|
||||
<th style="display: none;">Sum Insured</th>
|
||||
<th style="display: none;">Raised Date</th>
|
||||
<th style="display: none;">Registration Date</th>
|
||||
<th style="display: none;">Query Received Date</th>
|
||||
<th style="display: none;">Denial Date</th>
|
||||
<th style="display: none;">Approved Date</th>
|
||||
<th style="display: none;">Settled Date</th>
|
||||
<th style="display: none;">Denial Reason</th>
|
||||
<th style="display: none;">Approved Letter</th>
|
||||
<th style="display: none;">Approved Amount</th>
|
||||
<th style="display: none;">UTR Details</th>
|
||||
<th style="display: none;">Settle Letter</th>
|
||||
<th style="display: none;">Return Remark</th>
|
||||
<th style="display: none;">Cancel Remark</th>
|
||||
<th style="display: none;">AWB No. and Courier Name</th>
|
||||
<th style="display: none;">Non ID Reason</th>
|
||||
<th style="display: none;">Payment Initiate Date</th>
|
||||
<th style="display: none;">Approved Description</th>
|
||||
|
||||
|
||||
<th>TAT</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -119,6 +162,59 @@ table.dataTable tbody td {
|
||||
<td><?php echo $row['emp_name']; ?></td>
|
||||
<td><?php echo $row['insured_name']; ?></td>
|
||||
<td><?php echo $row['short_name']; ?></td>
|
||||
|
||||
<td style="display: none;"><?php echo $row['acm_name']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['insurer_name']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['tpa_name']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['policy_no']; ?></td>
|
||||
<td style="display: none;"><?php echo isset($priorityType[$row['priority'] ?? 0]) ? $priorityType[$row['priority'] ?? 0] : ''; ?></td>
|
||||
<td style="display: none;"><?php echo $row['relationship']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['emp_mobile']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['emp_mail']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['emp_personal_mail']; ?></td>
|
||||
<td style="display: none;"><?php echo isset($modeOFIntimate[$row['mode_of_intimation'] ?? '']) ? $modeOFIntimate[$row['mode_of_intimation']] : ''; ?></td>
|
||||
<td style="display: none;">
|
||||
<?php
|
||||
$typeId = $row['ticket_type_id'] ?? 0;
|
||||
$claimKey = $row['claim_type'] ?? '';
|
||||
if ($typeId == 1) {
|
||||
echo isset($claimType[1][$claimKey]) ? $claimType[1][$claimKey] : '';
|
||||
} else {
|
||||
echo isset($claimType[2][$claimKey]) ? $claimType[2][$claimKey] : '';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td style="display: none;"><?php echo $row['hospital_name']; ?></td>
|
||||
<td style="display: none;"><?php echo change_date_format($row['doa'], null, 'd-m-Y'); ?></td>
|
||||
<td style="display: none;"><?php echo $row['dod']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['claim_amount']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['pod_no']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['date_of_join']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['date_of_incep']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['dob']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['date_of_accident']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['date_of_death']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['date_of_intimat']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['si_amt']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['raised_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['registration_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['query_received_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['denial_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['approved_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['settled_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['denial_reason']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['approved_letter']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['approved_amount']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['utr_details']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['settle_letter']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['return_remark']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['cancel_remark']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['awb_no_courier_name']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['non_id_reason']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['pay_initiate_date']; ?></td>
|
||||
<td style="display: none;"><?php echo $row['approved_description']; ?></td>
|
||||
|
||||
|
||||
<td><?php echo $row['tat']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user