1212 lines
42 KiB
PHP
1212 lines
42 KiB
PHP
<?php
|
|
/** @var array $report */
|
|
/** @var array $view_model */
|
|
/** @var int $policy_id */
|
|
/** @var string $pdf_url */
|
|
/** @var bool $embed */
|
|
|
|
$embed = $embed ?? false;
|
|
$report = $report ?? [];
|
|
$vm = $view_model ?? ($report['view_model'] ?? $report);
|
|
$meta = $report['meta'] ?? ($vm['meta'] ?? []);
|
|
$header = $report['header'] ?? ($vm['header'] ?? []);
|
|
$plr = $vm['premium_lr'] ?? [];
|
|
$cs = $vm['claims_summary'] ?? [];
|
|
$iltc = $vm['iltc_summary'] ?? [];
|
|
$enr = $vm['enrollment'] ?? [];
|
|
$ageA = $vm['age_analysis'] ?? [];
|
|
$relA = $vm['relation_acs'] ?? [];
|
|
$amtB = $vm['amount_bands'] ?? [];
|
|
$siB = $vm['si_bands'] ?? [];
|
|
$iltcApp = $vm['iltc_app'] ?? [];
|
|
$utilE = $vm['utilization_employees'] ?? [];
|
|
$utilD = $vm['utilization_dependents'] ?? [];
|
|
$disease = $vm['disease'] ?? [];
|
|
$hosp = $vm['hospitals'] ?? [];
|
|
$cities = $vm['cities'] ?? [];
|
|
$tat = $vm['tat'] ?? [];
|
|
$take = $vm['takeaways'] ?? [];
|
|
|
|
$logoSrc = !empty($embed)
|
|
? (rtrim(ROOTPATH, '/\\') . '/public/assets/images/icici_lambard_new.png')
|
|
: base_url('public/assets/images/icici_lambard_new.png');
|
|
|
|
$fmt = static function ($n, int $d = 0): string {
|
|
if ($n === null || $n === '' || $n === false) {
|
|
return '--';
|
|
}
|
|
if (is_numeric($n) && (float) $n == 0.0 && $d === 0) {
|
|
// keep zeros as -- for count/amount display? PDF uses -- for empty; show 0 for totals
|
|
}
|
|
return number_format((float) $n, $d);
|
|
};
|
|
$cell = static function ($count, $amount = null, bool $forceAmount = false) use ($fmt): string {
|
|
if ($amount === null) {
|
|
return ((int) $count) > 0 ? $fmt($count, 0) : '--';
|
|
}
|
|
if ((int) $count <= 0 && (float) $amount <= 0) {
|
|
return '--';
|
|
}
|
|
return $fmt($amount);
|
|
};
|
|
$cnt = static function ($n) use ($fmt): string {
|
|
return ((int) $n) > 0 ? $fmt($n, 0) : '--';
|
|
};
|
|
$amt = static function ($n) use ($fmt): string {
|
|
return ((float) $n) > 0 ? $fmt($n, 0) : '--';
|
|
};
|
|
$acs = static function ($n) use ($fmt): string {
|
|
return ((float) $n) > 0 ? $fmt($n, 0) : '--';
|
|
};
|
|
$pct = static function ($n): string {
|
|
if ($n === null || $n === '') {
|
|
return '--';
|
|
}
|
|
return ((int) $n) . '%';
|
|
};
|
|
|
|
$ageBands = ['00-05', '06-18', '19-25', '26-35', '36-45', '46-55', '56-65', '66-75', 'Above 75'];
|
|
$relations = ['Self', 'Parents', 'Spouse', 'Children', 'Siblings', 'In Laws', 'Others'];
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>ICICI Lombard - Portfolio Analysis Report</title>
|
|
<style>
|
|
:root{
|
|
--navy:#1b3a6b;
|
|
--navy-dark:#16305a;
|
|
--red:#a63a3a;
|
|
--red-header:#a13a3a;
|
|
--border:#7f7f7f;
|
|
--page-bg:#ffffff;
|
|
}
|
|
*{box-sizing:border-box;}
|
|
body{
|
|
font-family: DejaVu Sans, Arial, Helvetica, sans-serif;
|
|
background:#e9e9e9;
|
|
margin:0;
|
|
padding:0;
|
|
color:#1a1a1a;
|
|
}
|
|
.page{
|
|
background:var(--page-bg);
|
|
width:1000px;
|
|
margin:24px auto;
|
|
padding:40px 48px;
|
|
box-shadow:0 0 8px rgba(0,0,0,0.25);
|
|
}
|
|
.cover-page{
|
|
position:relative;
|
|
padding-top:4px;
|
|
}
|
|
.cover-page .cover-header{
|
|
position:relative;
|
|
min-height:105px;
|
|
margin-bottom:12px;
|
|
}
|
|
.cover-page .logo{
|
|
position:absolute;
|
|
top:0;
|
|
right:0;
|
|
text-align:right;
|
|
}
|
|
.cover-page .logo img{
|
|
width:300px;
|
|
height:auto;
|
|
display:block;
|
|
}
|
|
.cover-page .cover-body{
|
|
text-align:center;
|
|
padding:0 12px;
|
|
}
|
|
.cover-page h1.title{
|
|
color:#0a3d7a;
|
|
font-size:26px;
|
|
font-weight:bold;
|
|
margin:0 0 6px 0;
|
|
text-align:center;
|
|
white-space:nowrap;
|
|
line-height:1.15;
|
|
letter-spacing:0;
|
|
}
|
|
.cover-page h2.subtitle{
|
|
color:#0a3d7a;
|
|
font-size:20px;
|
|
font-weight:bold;
|
|
margin:0 0 24px 0;
|
|
text-align:center;
|
|
line-height:1.2;
|
|
}
|
|
.cover-page .meta{
|
|
color:#0a3d7a;
|
|
font-weight:bold;
|
|
font-size:14px;
|
|
margin:7px 0;
|
|
text-align:center;
|
|
line-height:1.35;
|
|
}
|
|
.cover-page .meta.meta-client{
|
|
font-size:16px;
|
|
margin-top:0;
|
|
}
|
|
.cover-page .meta.meta-upload{
|
|
font-weight:normal;
|
|
font-size:13px;
|
|
margin-top:12px;
|
|
}
|
|
.cover-page .toc-wrap{
|
|
margin:28px auto 0 auto;
|
|
max-width:620px;
|
|
}
|
|
.cover-page .toc-table{
|
|
width:100%;
|
|
font-size:13px;
|
|
}
|
|
.cover-page .toc-table th,
|
|
.cover-page .toc-table td{
|
|
border:1px solid #333;
|
|
padding:6px 8px;
|
|
text-align:center;
|
|
}
|
|
.cover-page .toc-table th{
|
|
background:#d9d9d9;
|
|
color:#111;
|
|
font-weight:bold;
|
|
}
|
|
.top-bar{
|
|
text-align:right;
|
|
margin-bottom:10px;
|
|
}
|
|
.logo img{height:52px;width:auto;}
|
|
h1.title{
|
|
color:#0a3d7a;
|
|
font-size:26px;
|
|
margin:10px 0 0 0;
|
|
}
|
|
h2.subtitle{
|
|
color:#0a3d7a;
|
|
font-size:20px;
|
|
margin:2px 0 18px 0;
|
|
}
|
|
.meta{
|
|
color:#0a3d7a;
|
|
font-weight:bold;
|
|
font-size:14px;
|
|
margin:4px 0;
|
|
}
|
|
.section-title{
|
|
text-align:center;
|
|
color:#0a3d7a;
|
|
font-size:17px;
|
|
font-weight:bold;
|
|
margin:26px 0 8px 0;
|
|
}
|
|
table{
|
|
border-collapse:collapse;
|
|
width:100%;
|
|
margin-bottom:6px;
|
|
font-size:12.5px;
|
|
}
|
|
caption{
|
|
caption-side:top;
|
|
background:#1b3a6b;
|
|
color:#fff;
|
|
font-weight:bold;
|
|
padding:5px;
|
|
text-align:center;
|
|
}
|
|
th, td{
|
|
border:1px solid #7f7f7f;
|
|
padding:5px 6px;
|
|
text-align:center;
|
|
}
|
|
thead tr.group-header th{
|
|
background:#1b3a6b;
|
|
color:#fff;
|
|
font-weight:bold;
|
|
}
|
|
thead tr.col-header th{
|
|
background:#a13a3a;
|
|
color:#fff;
|
|
font-weight:bold;
|
|
}
|
|
tbody th.rowlabel{
|
|
text-align:left;
|
|
font-weight:normal;
|
|
background:#fff;
|
|
}
|
|
tr.total-row td, tr.total-row th{
|
|
background:#a13a3a;
|
|
color:#fff;
|
|
font-weight:bold;
|
|
}
|
|
tr.total-row th.rowlabel{
|
|
color:#fff;
|
|
background:#a13a3a;
|
|
}
|
|
th.header-spacer{
|
|
background:#a13a3a;
|
|
color:#fff;
|
|
padding:4px 6px;
|
|
}
|
|
.iltc-wrap{
|
|
width:420px;
|
|
max-width:100%;
|
|
margin:8px 0 0 0;
|
|
}
|
|
.iltc-wrap table{
|
|
width:100%;
|
|
table-layout:fixed;
|
|
}
|
|
.enroll-summary-table{
|
|
width:420px;
|
|
max-width:100%;
|
|
margin:0 auto 20px auto;
|
|
table-layout:fixed;
|
|
}
|
|
.mis-table-wrap{
|
|
margin-bottom:8px;
|
|
}
|
|
.toc-table td, .toc-table th{text-align:left;}
|
|
.toc-table td:first-child, .toc-table td:last-child{text-align:center;}
|
|
.toc-table th{background:#1b3a6b;color:#fff;}
|
|
.notes-block{margin-top:14px;font-size:12.5px;}
|
|
.notes-cols{width:100%;}
|
|
.notes-cols td{border:none;vertical-align:top;text-align:left;padding:0 12px 0 0;}
|
|
.notes-block strong{display:block; margin-bottom:4px; color:#111;}
|
|
ul{margin:4px 0 0 18px; padding:0;}
|
|
li{margin-bottom:3px;}
|
|
.page-break{page-break-before: always;}
|
|
@media print{
|
|
body{background:#fff;}
|
|
.page{box-shadow:none; margin:0; width:auto;}
|
|
}
|
|
<?php if (!empty($embed)): ?>
|
|
body{background:#fff;padding:0;}
|
|
.page{width:auto;margin:0;padding:14px 16px;box-shadow:none;}
|
|
.cover-page{
|
|
page-break-inside:avoid;
|
|
padding-top:2px;
|
|
}
|
|
.cover-page .cover-header{min-height:100px;}
|
|
.cover-page .logo img{width:280px;height:auto;}
|
|
.cover-page .cover-body{padding:0 8px;}
|
|
.cover-page h1.title{font-size:24px;white-space:nowrap;}
|
|
.cover-page h2.subtitle{font-size:19px;}
|
|
.cover-page .toc-wrap{max-width:560px;margin-top:18px;}
|
|
.page-break{page-break-before:always;}
|
|
.section-title{margin:14px 0 8px 0;font-size:16px;}
|
|
table{
|
|
font-size:9.5px;
|
|
table-layout:fixed;
|
|
page-break-inside:avoid;
|
|
}
|
|
th, td{padding:4px 3px;word-wrap:break-word;}
|
|
.mis-table-wrap{page-break-inside:avoid;}
|
|
.notes-block{font-size:9.5px;page-break-inside:avoid;}
|
|
.notes-cols td{padding:0 10px 0 0;}
|
|
.iltc-wrap{width:380px;}
|
|
.enroll-summary-table{width:360px;}
|
|
<?php endif; ?>
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- COVER -->
|
|
<div class="page cover-page">
|
|
<div class="cover-header">
|
|
<div class="logo">
|
|
<img src="<?= esc($logoSrc) ?>" alt="ICICI Lombard">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="cover-body">
|
|
<h1 class="title">ICICI Lombard General Insurance Company</h1>
|
|
<h2 class="subtitle"><?= esc($meta['report_month'] ?? date('F-Y')) ?></h2>
|
|
|
|
<p class="meta meta-client">Portfolio Analysis of <?= esc($meta['client_name'] ?? '') ?></p>
|
|
<p class="meta">Policy Number : <?= esc($header['policy_number'] ?? '') ?></p>
|
|
<p class="meta">Policy Period : <?= esc($header['policy_period'] ?? '') ?></p>
|
|
<p class="meta meta-upload">Data upload date : <?= esc($meta['data_upload'] ?? '') ?></p>
|
|
</div>
|
|
|
|
<div class="toc-wrap">
|
|
<table class="toc-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:12%;">S.No.</th>
|
|
<th>Contents</th>
|
|
<th style="width:18%;">Page No.</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr><td>1</td><td>Portfolio Analysis</td><td>Page 2</td></tr>
|
|
<tr><td>2</td><td>Enrollment Summary</td><td>Page 3</td></tr>
|
|
<tr><td>3</td><td>Age Wise Analysis</td><td>Page 4</td></tr>
|
|
<tr><td>4</td><td>Relation ACS</td><td>Page 5</td></tr>
|
|
<tr><td>5</td><td>Amount Band-wise Analysis</td><td>Page 6</td></tr>
|
|
<tr><td>6</td><td>SI Band-wise Analysis</td><td>Page 6</td></tr>
|
|
<tr><td>7</td><td>IL Take Care</td><td>Page 7</td></tr>
|
|
<tr><td>8</td><td>Disease-Analysis</td><td>Page 8</td></tr>
|
|
<tr><td>9</td><td>Claim Utilization report</td><td>Page 9</td></tr>
|
|
<tr><td>10</td><td>Top Hospitals</td><td>Page 10</td></tr>
|
|
<tr><td>11</td><td>Top Cities</td><td>Page 11</td></tr>
|
|
<tr><td>12</td><td>TAT Analysis</td><td>Page 12</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- PORTFOLIO ANALYSIS -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Portfolio Analysis</div>
|
|
|
|
<div class="mis-table-wrap">
|
|
<table>
|
|
<caption>Premium/LR_Details</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>Premium</th><th>Earned Premium</th><th>Loss Amount Paid</th><th>Loss Amount O/S</th>
|
|
<th>Hit (LOSS)</th><th>Claim Cost</th><th>Gross Incurred Cost</th><th>Loss Ratio</th><th>As on</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><?= esc($fmt($plr['premium'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($plr['earned_premium'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($plr['loss_amount_paid'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($plr['loss_amount_os'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($plr['hit_loss'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($plr['claim_cost'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($plr['gross_incurred_cost'] ?? 0)) ?></td>
|
|
<td><?= esc(($plr['loss_ratio'] ?? 0) . '%') ?></td>
|
|
<td><?= esc($plr['as_on'] ?? '') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mis-table-wrap">
|
|
<table>
|
|
<caption>Claims Summary</caption>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Status</th>
|
|
<th colspan="3">Cashless</th>
|
|
<th colspan="3">Reimbursement</th>
|
|
<th colspan="3">Overall</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Claims/OS Amount</th><th>Paid/OS Amt</th>
|
|
<th>No of Claims</th><th>Claims/OS Amount</th><th>Paid/OS Amt</th>
|
|
<th>No of Claims</th><th>Claims/OS Amount</th><th>Paid/OS Amt</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($cs['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $o = $r['overall'] ?? [];
|
|
$isReject = str_contains((string) ($r['label'] ?? ''), 'Reject');
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['claimed'] ?? 0)) ?></td>
|
|
<td><?= $isReject ? '--' : esc($amt($c['paid'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['claimed'] ?? 0)) ?></td>
|
|
<td><?= $isReject ? '--' : esc($amt($rb['paid'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($o['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($o['claimed'] ?? 0)) ?></td>
|
|
<td><?= $isReject ? '--' : esc($amt($o['paid'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$t = $cs['total'] ?? [];
|
|
$tc = $t['cashless'] ?? []; $tr = $t['reimb'] ?? []; $to = $t['overall'] ?? [];
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Total All</th>
|
|
<td><?= esc($fmt($tc['count'] ?? 0, 0)) ?></td>
|
|
<td><?= esc($fmt($tc['claimed'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($tc['paid'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($tr['count'] ?? 0, 0)) ?></td>
|
|
<td><?= esc($fmt($tr['claimed'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($tr['paid'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($to['count'] ?? 0, 0)) ?></td>
|
|
<td><?= esc($fmt($to['claimed'] ?? 0)) ?></td>
|
|
<td><?= esc($fmt($to['paid'] ?? 0)) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="iltc-wrap mis-table-wrap">
|
|
<table>
|
|
<caption>ILTC Summary</caption>
|
|
<thead>
|
|
<tr class="col-header"><th>ILTC %</th><th>RI Intimations</th><th>ILTC Intimations</th><th>ILTC %</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Intimations</td>
|
|
<td><?= esc($fmt($iltc['ri'] ?? 0, 0)) ?></td>
|
|
<td><?= esc($fmt($iltc['iltc'] ?? 0, 0)) ?></td>
|
|
<td><?= esc(($iltc['pct'] ?? 0) . '%') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="notes-block">
|
|
<table class="notes-cols"><tr>
|
|
<td style="width:55%;">
|
|
<strong>Notes:</strong>
|
|
<ul>
|
|
<li>No of Claims Based on Incidence.</li>
|
|
<li><strong style="display:inline;">AL Approved :</strong> Cashless requests approved, Documents pending</li>
|
|
<li><strong style="display:inline;">Claim / OS Amount -</strong> Claimed amount against settled cases. Claimed amount to the extent of SI against outstanding cases</li>
|
|
<li><strong style="display:inline;">Claims WIP :</strong> Claims under process.</li>
|
|
</ul>
|
|
</td>
|
|
<td style="width:45%;">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul>
|
|
<?php foreach ($take['portfolio'] ?? [] as $line): ?>
|
|
<li><?= esc($line) ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</td>
|
|
</tr></table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ENROLLMENT -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Enrollment Summary</div>
|
|
|
|
<table class="enroll-summary-table">
|
|
<thead>
|
|
<tr class="col-header"><th>Enrolled Lives</th><th>Claims</th><th>Claim Frequency</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><?= esc($fmt($enr['lives'] ?? 0, 0)) ?></td>
|
|
<td><?= esc($fmt($enr['claims'] ?? 0, 0)) ?></td>
|
|
<td><?= esc(number_format((float) ($enr['frequency'] ?? 0), 2) . '%') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table>
|
|
<caption>Age wise Enrollment Summary</caption>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Age Band</th>
|
|
<th colspan="7">Relationship</th>
|
|
<th>Overall</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<?php foreach ($relations as $rel): ?><th><?= esc($rel) ?></th><?php endforeach; ?>
|
|
<th class="header-spacer"> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$matrix = $enr['matrix'] ?? [];
|
|
foreach ($ageBands as $band):
|
|
$row = $matrix[$band] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($band) ?></th>
|
|
<?php foreach ($relations as $rel): ?>
|
|
<td><?= esc($cnt($row[$rel] ?? 0)) ?></td>
|
|
<?php endforeach; ?>
|
|
<td><?= esc($cnt($row['_total'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$colT = $enr['col_totals'] ?? [];
|
|
$grand = (int) ($enr['grand_total'] ?? 0);
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<?php foreach ($relations as $rel): ?>
|
|
<td><?= esc($cnt($colT[$rel] ?? 0)) ?></td>
|
|
<?php endforeach; ?>
|
|
<td><?= esc($fmt($grand, 0)) ?></td>
|
|
</tr>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Percentage (%)</th>
|
|
<?php foreach ($relations as $rel):
|
|
$p = $grand > 0 ? (int) round((($colT[$rel] ?? 0) / $grand) * 100) : 0;
|
|
?>
|
|
<td><?= ($colT[$rel] ?? 0) > 0 ? esc($p . '%') : '--' ?></td>
|
|
<?php endforeach; ?>
|
|
<td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="notes-block">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul>
|
|
<?php foreach ($take['enrollment'] ?? [] as $line): ?>
|
|
<li><?= esc($line) ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
$renderTypeGrid = static function (array $analysis, string $title, array $takeaways = [], bool $showNotes = true) use ($cnt, $amt, $acs): void {
|
|
?>
|
|
<div class="page page-break">
|
|
<div class="section-title"><?= esc($title) ?></div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Age Band</th>
|
|
<th colspan="3">Cashless</th><th colspan="3">Reimbursement</th><th colspan="3">Total</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($analysis['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $t = $r['total'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($c['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($rb['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($t['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($t['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($t['acs'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$tot = $analysis['total'] ?? [];
|
|
$c = $tot['cashless'] ?? []; $rb = $tot['reimb'] ?? []; $t = $tot['total'] ?? [];
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td><?= esc(number_format((int) ($c['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($rb['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['acs'] ?? 0))) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php if ($showNotes): ?>
|
|
<div class="notes-block">
|
|
<table class="notes-cols"><tr>
|
|
<td style="width:55%;">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul><?php foreach ($takeaways as $line): ?><li><?= esc($line) ?></li><?php endforeach; ?></ul>
|
|
</td>
|
|
<td style="width:45%;">
|
|
<strong>Notes:</strong>
|
|
<ul>
|
|
<li>No of Claims Based on Incidence.</li>
|
|
<li>ACS- Average Claim Size. Amount/No. of Claims</li>
|
|
</ul>
|
|
</td>
|
|
</tr></table>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php
|
|
};
|
|
$renderTypeGrid($ageA, 'Age-wise Analysis', [
|
|
'Employees are opting for Reimbursement Claims more where data supports it.',
|
|
'Age bands with maximum claims are highlighted in Key Takeaways where available.',
|
|
]);
|
|
// Fix relation header label
|
|
?>
|
|
<div class="page page-break">
|
|
<div class="section-title">Relation ACS</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Relation</th>
|
|
<th colspan="3">Cashless</th><th colspan="3">Reimbursement</th><th colspan="3">Total</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($relA['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $t = $r['total'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($c['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($rb['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($t['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($t['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($t['acs'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$tot = $relA['total'] ?? [];
|
|
$c = $tot['cashless'] ?? []; $rb = $tot['reimb'] ?? []; $t = $tot['total'] ?? [];
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td><?= esc(number_format((int) ($c['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($rb['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['acs'] ?? 0))) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="notes-block">
|
|
<table class="notes-cols"><tr>
|
|
<td style="width:55%;">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul>
|
|
<?php
|
|
$maxAcs = 0; $maxRel = '';
|
|
foreach ($relA['rows'] ?? [] as $rr) {
|
|
$a = (float) ($rr['total']['acs'] ?? 0);
|
|
if ($a > $maxAcs) { $maxAcs = $a; $maxRel = (string) ($rr['label'] ?? ''); }
|
|
}
|
|
if ($maxRel !== ''):
|
|
?>
|
|
<li>The Average Claim size is more in <?= esc($maxRel) ?> which is <?= esc(number_format($maxAcs)) ?></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</td>
|
|
<td style="width:45%;">
|
|
<strong>Notes:</strong>
|
|
<ul>
|
|
<li>No of Claims Based on Incidence.</li>
|
|
<li>ACS- Average Claim Size. Amount/No. of Claims</li>
|
|
</ul>
|
|
</td>
|
|
</tr></table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- AMOUNT + SI -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Amount Band-wise Analysis</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Amount Band</th>
|
|
<th colspan="2">Cashless</th><th colspan="2">Reimbursement</th><th colspan="2">Total</th><th colspan="2">Percentage</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th>
|
|
<th>No of Claims</th><th>Amount</th>
|
|
<th>No of Claims</th><th>Amount</th>
|
|
<th>% Claims</th><th>% Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($amtB['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($r['total_count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($r['total_amount'] ?? 0)) ?></td>
|
|
<td><?= ((int) ($r['total_count'] ?? 0)) > 0 ? esc(($r['pct_claims'] ?? 0) . '%') : '--' ?></td>
|
|
<td><?= ((float) ($r['total_amount'] ?? 0)) > 0 ? esc(($r['pct_value'] ?? 0) . '%') : '--' ?></td>
|
|
</tr>
|
|
<?php endforeach; $t = $amtB['total'] ?? []; ?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td><?= esc(number_format((int) ($t['cashless']['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['cashless']['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['reimb']['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['reimb']['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['total_count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['total_amount'] ?? 0))) ?></td>
|
|
<td>100%</td><td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="section-title">SI Band-wise Analysis</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>SI Band</th>
|
|
<th colspan="3">Cashless</th><th colspan="3">Reimbursement</th><th colspan="3">Total</th><th colspan="2">Percentage</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>% Claims</th><th>% Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($siB['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $tt = $r['total'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($c['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($rb['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($tt['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($tt['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($tt['acs'] ?? 0)) ?></td>
|
|
<td><?= ((int) ($tt['count'] ?? 0)) > 0 ? esc(($r['pct_claims'] ?? 0) . '%') : '--' ?></td>
|
|
<td><?= ((float) ($tt['amount'] ?? 0)) > 0 ? esc(($r['pct_value'] ?? 0) . '%') : '--' ?></td>
|
|
</tr>
|
|
<?php endforeach; $tot = $siB['total'] ?? []; $c = $tot['cashless'] ?? []; $rb = $tot['reimb'] ?? []; $tt = $tot['total'] ?? []; ?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td><?= esc(number_format((int) ($c['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($rb['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($tt['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($tt['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($tt['acs'] ?? 0))) ?></td>
|
|
<td>100%</td><td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="notes-block">
|
|
<strong>Notes:</strong>
|
|
<ul>
|
|
<li>No of Claims Based on Incidence.</li>
|
|
<li>ACS- Average Claim Size. Amount/No. of Claims</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- IL TAKE CARE -->
|
|
<div class="page page-break">
|
|
<div class="section-title">IL Take Care</div>
|
|
<?php $eng = $iltcApp['engagement'] ?? []; $feat = $iltcApp['features'] ?? []; $svc = $iltcApp['services'] ?? []; $m = $iltcApp['month'] ?? date('M-y'); ?>
|
|
|
|
<table>
|
|
<caption>ILTC App Engagement</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>Month</th><th>No. of Self Lives</th><th>Active Users</th><th>IL Take Care App Download</th><th>App Download Ratio</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><?= esc($m) ?></td>
|
|
<td><?= esc($eng['self_lives'] ?? '') ?></td>
|
|
<td><?= esc($eng['active_users'] ?? '') ?></td>
|
|
<td><?= esc($eng['downloads'] ?? '') ?></td>
|
|
<td><?= esc($eng['ratio'] ?? '0%') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table>
|
|
<caption>ILTC App Feature Usage Report</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>Month</th><th>E Card Download %</th><th>Face Scan Utilization %</th><th>ILHealth Blog Utilization %</th><th>Cross Sell Utilization %</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><?= esc($m) ?></td>
|
|
<td><?= esc($feat['ecard'] ?? '') ?></td>
|
|
<td><?= esc($feat['face_scan'] ?? '0%') ?></td>
|
|
<td><?= esc($feat['blog'] ?? '0%') ?></td>
|
|
<td><?= esc($feat['cross_sell'] ?? '') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table>
|
|
<caption>ILTC Service Usage Report</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>Month</th><th>HAT Request</th><th>HAT Fulfillment</th><th>ILHD prescription</th><th>Expertise utilization</th><th>Health Claim Utilization</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><?= esc($m) ?></td>
|
|
<td><?= esc($svc['hat_req'] ?? '') ?></td>
|
|
<td><?= esc($svc['hat_ful'] ?? '') ?></td>
|
|
<td><?= esc($svc['ilhd'] ?? '') ?></td>
|
|
<td><?= esc($svc['expertise'] ?? '0%') ?></td>
|
|
<td><?= esc($svc['health_claim'] ?? '') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table>
|
|
<caption>Utilization report for Employee</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>No of claims in current policy</th><th>No. of employees</th><th>Value (Rs)</th><th>% Claims</th><th>% Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($utilE['rows'] ?? [] as $r): ?>
|
|
<tr>
|
|
<td><?= esc($r['label'] ?? '') ?></td>
|
|
<td><?= esc($cnt($r['members'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($r['amount'] ?? 0)) ?></td>
|
|
<td><?= ((int) ($r['members'] ?? 0)) > 0 ? esc(($r['pct_claims'] ?? 0) . '%') : '--' ?></td>
|
|
<td><?= ((float) ($r['amount'] ?? 0)) > 0 ? esc(($r['pct_value'] ?? 0) . '%') : '--' ?></td>
|
|
</tr>
|
|
<?php endforeach; $te = $utilE['total'] ?? []; ?>
|
|
<tr class="total-row">
|
|
<td>Total</td>
|
|
<td><?= ((int) ($te['members'] ?? 0)) > 0 ? esc(number_format((int) $te['members'])) : '--' ?></td>
|
|
<td><?= ((float) ($te['amount'] ?? 0)) > 0 ? esc(number_format((float) $te['amount'])) : '--' ?></td>
|
|
<td>100%</td><td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table>
|
|
<caption>Utilization report for Dependents</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>No of claims in current policy</th><th>No. of employees</th><th>Value (Rs)</th><th>% Claims</th><th>% Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($utilD['rows'] ?? [] as $r): ?>
|
|
<tr>
|
|
<td><?= esc($r['label'] ?? '') ?></td>
|
|
<td><?= esc($cnt($r['members'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($r['amount'] ?? 0)) ?></td>
|
|
<td><?= ((int) ($r['members'] ?? 0)) > 0 ? esc(($r['pct_claims'] ?? 0) . '%') : '--' ?></td>
|
|
<td><?= ((float) ($r['amount'] ?? 0)) > 0 ? esc(($r['pct_value'] ?? 0) . '%') : '--' ?></td>
|
|
</tr>
|
|
<?php endforeach; $td = $utilD['total'] ?? []; ?>
|
|
<tr class="total-row">
|
|
<td>Total</td>
|
|
<td><?= esc(number_format((int) ($td['members'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($td['amount'] ?? 0))) ?></td>
|
|
<td>100%</td><td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="notes-block">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul><?php foreach ($take['utilization'] ?? [] as $line): ?><li><?= esc($line) ?></li><?php endforeach; ?></ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- DISEASE -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Disease-Analysis</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Disease Category</th>
|
|
<th colspan="3">Cashless</th><th colspan="3">Reimbursement</th><th colspan="3">Total</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($disease['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $t = $r['total'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($c['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($rb['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($t['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($t['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($t['acs'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$tot = $disease['total'] ?? [];
|
|
$c = $tot['cashless'] ?? []; $rb = $tot['reimb'] ?? []; $t = $tot['total'] ?? [];
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td><?= esc(number_format((int) ($c['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($rb['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['acs'] ?? 0))) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="notes-block">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul><?php foreach ($take['disease'] ?? [] as $line): ?><li><?= esc($line) ?></li><?php endforeach; ?></ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- CLAIM UTILIZATION (TOC page) -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Claim Utilization report</div>
|
|
<table>
|
|
<caption>Utilization report for Employee</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>No of claims in current policy</th><th>No. of employees</th><th>Value (Rs)</th><th>% Claims</th><th>% Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($utilE['rows'] ?? [] as $r): ?>
|
|
<tr>
|
|
<td><?= esc($r['label'] ?? '') ?></td>
|
|
<td><?= esc($cnt($r['members'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($r['amount'] ?? 0)) ?></td>
|
|
<td><?= ((int) ($r['members'] ?? 0)) > 0 ? esc(($r['pct_claims'] ?? 0) . '%') : '--' ?></td>
|
|
<td><?= ((float) ($r['amount'] ?? 0)) > 0 ? esc(($r['pct_value'] ?? 0) . '%') : '--' ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr class="total-row">
|
|
<td>Total</td>
|
|
<td><?= ((int) ($te['members'] ?? 0)) > 0 ? esc(number_format((int) $te['members'])) : '--' ?></td>
|
|
<td><?= ((float) ($te['amount'] ?? 0)) > 0 ? esc(number_format((float) $te['amount'])) : '--' ?></td>
|
|
<td>100%</td><td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<table>
|
|
<caption>Utilization report for Dependents</caption>
|
|
<thead>
|
|
<tr class="col-header">
|
|
<th>No of claims in current policy</th><th>No. of employees</th><th>Value (Rs)</th><th>% Claims</th><th>% Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($utilD['rows'] ?? [] as $r): ?>
|
|
<tr>
|
|
<td><?= esc($r['label'] ?? '') ?></td>
|
|
<td><?= esc($cnt($r['members'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($r['amount'] ?? 0)) ?></td>
|
|
<td><?= ((int) ($r['members'] ?? 0)) > 0 ? esc(($r['pct_claims'] ?? 0) . '%') : '--' ?></td>
|
|
<td><?= ((float) ($r['amount'] ?? 0)) > 0 ? esc(($r['pct_value'] ?? 0) . '%') : '--' ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr class="total-row">
|
|
<td>Total</td>
|
|
<td><?= esc(number_format((int) ($td['members'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($td['amount'] ?? 0))) ?></td>
|
|
<td>100%</td><td>100%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- TOP HOSPITALS -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Top Hospitals</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Hospital Name</th><th>City</th>
|
|
<th colspan="3">Cashless</th><th colspan="3">Reimbursement</th><th colspan="3">Total</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th><th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($hosp['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $t = $r['total'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($r['city'] ?? '--') ?></td>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($c['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($rb['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($t['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($t['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($t['acs'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$tot = $hosp['total'] ?? [];
|
|
$c = $tot['cashless'] ?? []; $rb = $tot['reimb'] ?? []; $t = $tot['total'] ?? [];
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td>--</td>
|
|
<td><?= esc(number_format((int) ($c['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($rb['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['acs'] ?? 0))) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="notes-block">
|
|
<strong>Notes:</strong>
|
|
<ul>
|
|
<li>No of Claims Based on Incidence.</li>
|
|
<li>ACS- Average Claim Size. Amount/No. of Claims</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TOP CITIES -->
|
|
<div class="page page-break">
|
|
<div class="section-title">Top Cities</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>City</th>
|
|
<th colspan="3">Cashless</th><th colspan="3">Reimbursement</th><th colspan="3">Total</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
<th>No of Claims</th><th>Amount</th><th>ACS</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($cities['rows'] ?? [] as $r):
|
|
$c = $r['cashless'] ?? []; $rb = $r['reimb'] ?? []; $t = $r['total'] ?? [];
|
|
?>
|
|
<tr>
|
|
<th class="rowlabel"><?= esc($r['label'] ?? '') ?></th>
|
|
<td><?= esc($cnt($c['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($c['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($c['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($rb['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($rb['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($rb['acs'] ?? 0)) ?></td>
|
|
<td><?= esc($cnt($t['count'] ?? 0)) ?></td>
|
|
<td><?= esc($amt($t['amount'] ?? 0)) ?></td>
|
|
<td><?= esc($acs($t['acs'] ?? 0)) ?></td>
|
|
</tr>
|
|
<?php endforeach;
|
|
$tot = $cities['total'] ?? [];
|
|
$c = $tot['cashless'] ?? []; $rb = $tot['reimb'] ?? []; $t = $tot['total'] ?? [];
|
|
?>
|
|
<tr class="total-row">
|
|
<th class="rowlabel">Overall</th>
|
|
<td><?= esc(number_format((int) ($c['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($c['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($rb['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($rb['acs'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((int) ($t['count'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['amount'] ?? 0))) ?></td>
|
|
<td><?= esc(number_format((float) ($t['acs'] ?? 0))) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="notes-block">
|
|
<strong>Notes:</strong>
|
|
<ul>
|
|
<li>No of Claims Based on Incidence.</li>
|
|
<li>ACS- Average Claim Size. Amount/No. of Claims</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TAT -->
|
|
<div class="page page-break">
|
|
<div class="section-title">TAT Analysis</div>
|
|
<table>
|
|
<thead>
|
|
<tr class="group-header">
|
|
<th>Month</th>
|
|
<th>Reimbursement (in Days)</th>
|
|
<th colspan="2">Cashless (in Hrs)</th>
|
|
</tr>
|
|
<tr class="col-header">
|
|
<th class="header-spacer"> </th>
|
|
<th class="header-spacer"> </th>
|
|
<th>Fresh AL</th><th>Enhancement</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($tat as $r): ?>
|
|
<tr>
|
|
<td><?= esc($r['month'] ?? '') ?></td>
|
|
<td><?= esc($r['reimb_days'] ?? '') ?></td>
|
|
<td><?= esc($r['fresh_al'] ?? '') ?></td>
|
|
<td><?= esc($r['enhancement'] ?? '') ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<div class="notes-block">
|
|
<strong>Key Takeaways:</strong>
|
|
<ul><?php foreach ($take['tat'] ?? [] as $line): ?><li><?= esc($line) ?></li><?php endforeach; ?></ul>
|
|
<strong style="margin-top:10px;">Notes:</strong>
|
|
<ul>
|
|
<li>The standard paid TAT is 8 Days</li>
|
|
<li>The standard cashless TAT is 1hr for Fresh and Enhancement cases.</li>
|
|
<li>Paid TAT - All reimbursement claims that have been paid. It is calculated as the period between the last communication date to the payment date which excludes verification cases.</li>
|
|
<li>Cashless TAT - All cashless claims other than reopen cases, offline cases and DNF cases.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|