$num($c['count'] ?? 0),
'amount' => $num($c['amount'] ?? 0),
];
};
$genderMax = 1;
foreach ($chartGender as $g) {
$genderMax = max($genderMax, (int) ($g['male'] ?? 0) + (int) ($g['female'] ?? 0));
}
$ageMax = 1;
foreach ($chartAge as $a) {
$ageMax = max($ageMax, (int) ($a['total'] ?? 0));
}
$ageBarColor = static function (string $dominant): string {
return match (true) {
$dominant === 'Child' => '#4472c4',
str_contains($dominant, 'Self') => '#264478',
str_contains($dominant, 'Parents') => '#ffc000',
default => '#70ad47',
};
};
/** DomPDF-safe horizontal bar (nested table widths). */
$renderBar = static function (float $pct, string $color): void {
$filled = (int) max(0, min(100, round($pct)));
$empty = 100 - $filled;
echo '
| ' . esc($label) . ' | ';
foreach ($ageRelations as $rel) {
$ca = $cellCa($row[$rel] ?? []);
echo '' . esc($ca['count']) . ' | ' . esc($ca['amount']) . ' | ';
}
$tot = $cellCa($row['total'] ?? ($row['_total'] ?? []));
echo '' . esc($tot['count']) . ' | ' . esc($tot['amount']) . ' | ';
$pct = $row['pct'] ?? [];
if (is_array($pct) && (isset($pct['count']) || isset($pct['amount']))) {
echo '' . esc($pct2($pct['count'] ?? 0) . ' / ' . $pct2($pct['amount'] ?? 0)) . ' | ';
} else {
echo ' | ';
}
echo '
';
};
$renderRelationPctRow = static function (array $colPct, array $ageRelations) use ($pct): void {
echo '
|
Corporate Analysis Report
|
Policy Details:
| Corporate Name: | = esc($header['corporate_name'] ?? '') ?> |
| Insurer Policy Number: | = esc($header['policy_number'] ?? '') ?> |
| Policy Start Date: | = esc($header['start'] ?? '') ?> |
| Policy End Date: | = esc($header['end'] ?? '') ?> |
| Total Premium:(in Rs.) | = esc($num($header['premium'] ?? 0)) ?> |
| Earned Premium:(in Rs.) | = esc($num($header['earned'] ?? 0)) ?> |
| Lives Covered:(in Nos.) | = esc($num($header['lives'] ?? 0)) ?> |
| Report Generated By(Broker): | = esc($header['generated_by'] ?? '') ?> |
| Report Generated Date: | = esc($header['generated_at'] ?? ($meta['generated_at'] ?? '')) ?> |
|
Table of Contents
- = esc((string) $item) ?>
|
|
1. Incurred Claims Ratio (ICR):
| Claim Status |
Cashless |
Member |
Total |
| Nos. | Amt. (in Rs.) | Nos. | Amt. (in Rs.) | Nos. | Amt. (in Rs.) |
>
| = esc($row['label'] ?? '') ?> |
= esc($c['count']) ?> | = esc($c['amount']) ?> |
= esc($m['count']) ?> | = esc($m['amount']) ?> |
= esc($t['count']) ?> | = esc($t['amount']) ?> |
| ICR On EP* | | = esc($pct($sum['icr_on_ep'] ?? 0, 1)) ?> |
| Incidence Rate | | = esc($pct($sum['incidence_rate'] ?? 0, 1)) ?> |
| Disposal Rate |
= esc($pct($dr['cashless'] ?? 0)) ?> |
= esc($pct($dr['member'] ?? 0)) ?> |
= esc($pct($dr['total'] ?? 0)) ?> |
| Cost per Claims(CPC) |
= esc($num($cpc['cashless'] ?? 0)) ?> |
= esc($num($cpc['member'] ?? 0)) ?> |
= esc($num($cpc['total'] ?? 0)) ?> |
|
2. Hospitalisation Type Details:
| Claim Subtype |
Cashless |
Member |
| Nos. | Amt. (in Rs.) | Nos. | Amt. (in Rs.) |
| = esc($row['label'] ?? '') ?> |
= esc($c['count']) ?> | = esc($c['amount']) ?> |
= esc($m['count']) ?> | = esc($m['amount']) ?> |
| Total |
= esc($hc['count']) ?> | = esc($hc['amount']) ?> |
= esc($hm['count']) ?> | = esc($hm['amount']) ?> |
*Considering Only Settled ,Approved and UTR Awaiting (Cheque Pending)
Notes:
ICR = (Settled Amt + Outstanding Amt) / Annual Premium
ICR on EP* = (Settled Amt + Outstanding Amt) / Earned Premium
Earned Premium = Prorated premium as on report generated date
Cost Per Claim(CPC) = Approved Amt / Number of Events(Main Claims) for IPD + Daycare Cases
Incidents Rate = No of Claim Events/ Lives
Disposal Rate = (Settled+Rejected+Awaiting UTR+Cancelled / Claims Reported)
* EP- Earned Premium ; O/S - Outstanding
* Event = Main Claims Only (Excluding Prepost and Addendum)
|
3. Member Details - Relationship & Gender wise :
| Relation | Male | Female | Total | % |
| = esc($row['relation'] ?? '') ?> |
= esc($num($row['male'] ?? 0)) ?> |
= esc($num($row['female'] ?? 0)) ?> |
= esc($num($row['total'] ?? 0)) ?> |
= esc($pct2($row['pct'] ?? 0)) ?> |
| Total |
= esc($num($mgt['male'] ?? 0)) ?> |
= esc($num($mgt['female'] ?? 0)) ?> |
= esc($num($mgt['total'] ?? 0)) ?> |
= esc($pct2(100)) ?> |
| % |
= esc($pct($mgp['male'] ?? 0)) ?> |
= esc($pct($mgp['female'] ?? 0)) ?> |
= esc($pct(100)) ?> |
|
|
$male) ? '#ed7d31' : '#4472c4';
?>
| = esc($rel) ?> |
|
= esc($num($total)) ?> |
Male
Female
|
|
4. Member Details - Age Band & Relationship wise :
| AgeBand |
= esc($rel) ?> |
Total | % |
| = esc($row['band'] ?? '') ?> |
= esc($num($row[$rel] ?? 0)) ?> |
= esc($num($row['total'] ?? 0)) ?> |
= esc($pct2($row['pct'] ?? 0)) ?> |
| Total |
= esc($num($mat[$rel] ?? 0)) ?> |
= esc($num($mat['_total'] ?? 0)) ?> |
= esc($pct2(100)) ?> |
| % |
= esc($pct($mac[$rel] ?? 0)) ?> |
= esc($pct(100)) ?> |
|
|
| = esc($a['band'] ?? '') ?> |
|
= esc($label) ?> |
Self
Spouse
Parents
Child
In Law/Other
|
|
5. Claims Approved - Age Band & Relationship wise :
| Age Band |
= esc($rel) ?> |
Total | Total % |
|
No. | Amt.(Rs.) |
No. | Amt.(Rs.) | No.%/Amt.% |
100, 'amount' => 100];
$renderRelationClaimRow('Total', $totalRow, $ageRelations, true);
$renderRelationPctRow($claimsAge['col_pct'] ?? [], $ageRelations);
?>
* Count is only for Approved Claims(Settled and Awaiting UTR(Cheque Pending)) .
6. Claims Approved - Amount Band & Relationship wise :
| Amount Band |
= esc($rel) ?> |
Total | Total % |
|
No. | Amt.(Rs.) |
No. | Amt.(Rs.) | No.%/Amt.% |
100, 'amount' => 100];
$renderRelationClaimRow('Total', $amtTotalRow, $ageRelations, true);
$renderRelationPctRow($claimsAmount['col_pct'] ?? [], $ageRelations);
?>
* Count is only for Approved Claims(Settled and Awaiting UTR (Cheque Pending)). * Banding for Incurred Amount
7. Claims Approved - Top 15 Ailment wise :
| Ailment Group |
= esc($rel) ?> |
Total | Total % |
|
No. | Amt.(Rs.) |
No. | Amt.(Rs.) | No.%/Amt.% |
100, 'amount' => 100];
$renderRelationClaimRow('Total', $ailTotalRow, $ageRelations, true);
$renderRelationPctRow($ailments['col_pct'] ?? [], $ageRelations);
?>
* Count is only for Approved Claims(Settled and Awaiting UTR (Cheque Pending)) .
8. Top 15 Cashless Hospital wise utilization:
| Hospital_ID |
Hospital_Name |
No of Claims |
Amount |
| No cashless hospital utilization |
| = esc($h['hospital_id'] ?? '') ?> |
= esc($h['hospital_name'] ?? '') ?> |
= esc($num($h['count'] ?? 0)) ?> |
= esc($num($h['amount'] ?? 0)) ?> |
9. Claims Approved - Cashless & Member Summary:
| Type of claim |
Events | Events% | Amount | Amount% |
| = esc($row['label'] ?? '') ?> |
= esc($num($row['count'] ?? 0)) ?> |
= esc($pct2($row['count_pct'] ?? 0)) ?> |
= esc($num($row['amount'] ?? 0)) ?> |
= esc($pct2($row['amount_pct'] ?? 0)) ?> |
| TOTAL |
= esc($num($cmt['count'] ?? 0)) ?> |
= esc($pct2(100)) ?> |
= esc($num($cmt['amount'] ?? 0)) ?> |
= esc($pct2(100)) ?> |
10. Turn Around Time (TAT) :
Claim Process TAT :
| TAT Band | Nos. | % |
| = esc($row['band'] ?? '') ?> |
= esc($num($row['count'] ?? 0)) ?> |
= esc($pct2($row['pct'] ?? 0)) ?> |
| Total |
= esc($num($tat['total'] ?? 0)) ?> |
= esc($pct2(100)) ?> |
Note: Only Settled,Awaiting UTR, Approved and Rejected claims are considered
* LDR to Decision date
* only for Member claims
11. Month on Month
| Admission Month |
Hospitalization and Daycare |
Other than Hospitalization |
Total |
|
Inc Count | Inc Amount |
Inc Count | Inc Amount |
Inc Count | Inc Amount |
| = esc($row['month'] ?? '') ?> |
= esc($h['count']) ?> | = esc($h['amount']) ?> |
= esc($o['count']) ?> | = esc($o['amount']) ?> |
= esc($t['count']) ?> | = esc($t['amount']) ?> |
| TOTAL |
= esc($mh['count']) ?> | = esc($mh['amount']) ?> |
= esc($mo['count']) ?> | = esc($mo['amount']) ?> |
= esc($mtt['count']) ?> | = esc($mtt['amount']) ?> |
12. Payout Ratio
| Claimed Amount | Settled Amount | Payout % |
| = esc($num($payout['claimed'] ?? 0)) ?> |
= esc($num($payout['settled'] ?? 0)) ?> |
= esc($pct($payout['payout_pct'] ?? 0)) ?> |