@section('page-title', 'Analytics Dashboard')

Interactive Analytics Dashboard

Visual insights into claims, providers, benefits, and financials

Total Claims

{{ number_format($summaryStats['total_claims']) }}

@if($comparison) @php $diff = $summaryStats['total_claims'] - $comparison['total_claims']; @endphp

{{ $diff >= 0 ? '+' : '' }}{{ number_format($diff) }} vs comparison

@endif

Total Billed

${{ number_format($summaryStats['total_billed'], 2) }}

Total Awarded

${{ number_format($summaryStats['total_awarded'], 2) }}

Avg Claim

${{ number_format($summaryStats['avg_claim'], 2) }}

Approval Rate

{{ $summaryStats['approval_rate'] }}%

Active Members

{{ number_format($summaryStats['active_members']) }}

Claims Trend

@php $maxAwarded = $claimsTrend->max('awarded') ?: 1; @endphp @foreach($claimsTrend as $trend)
{{ $trend->month }}
${{ number_format($trend->awarded / 100, 0) }}
{{ $trend->count }} cl.
@endforeach @if($claimsTrend->isEmpty())

No data for selected period

@endif

Claim Type Distribution

@php $totalClaimTypes = $claimTypeDistribution->sum('count') ?: 1; $colors = ['bg-blue-500', 'bg-emerald-500', 'bg-amber-500', 'bg-purple-500', 'bg-rose-500', 'bg-cyan-500', 'bg-indigo-500']; $dotColors = ['bg-blue-500', 'bg-emerald-500', 'bg-amber-500', 'bg-purple-500', 'bg-rose-500', 'bg-cyan-500', 'bg-indigo-500']; @endphp
@php $offset = 0; @endphp @foreach($claimTypeDistribution as $i => $type) @php $pct = $type->count / $totalClaimTypes * 100; $strokeColors = ['#3b82f6', '#10b981', '#f59e0b', '#8b5cf6', '#f43f5e', '#06b6d4', '#6366f1']; $color = $strokeColors[$i % count($strokeColors)]; @endphp @php $offset += $pct; @endphp @endforeach

{{ $claimTypeDistribution->sum('count') }}

Claims

@foreach($claimTypeDistribution as $i => $type)
{{ str_replace('_', ' ', $type->claim_type ?? 'Unknown') }}
{{ $type->count }} ({{ round($type->count / $totalClaimTypes * 100, 1) }}%)
@endforeach
@if($claimTypeDistribution->isEmpty())

No data for selected period

@endif

Top 10 ICD-10 Codes

@php $maxIcd = $topIcd10->max('count') ?: 1; @endphp @foreach($topIcd10 as $icd)
{{ $icd->icd10_code }}
{{ $icd->count }} claims · ${{ number_format(($icd->total_awarded ?? 0) / 100, 0) }}
@endforeach @if($topIcd10->isEmpty())

No ICD-10 data for selected period

@endif

Provider Utilization Ranking

@foreach($providerUtilization as $i => $provider)
#{{ $i + 1 }}

{{ $provider->name }}

{{ $provider->claims_count }} claims · ${{ number_format(($provider->claims_sum_total_awarded_cents ?? 0) / 100, 2) }}

@php $maxProvClaims = $providerUtilization->max('claims_count') ?: 1; @endphp
@endforeach @if($providerUtilization->isEmpty())

No provider data for selected period

@endif

Benefit Exhaustion Forecast

@foreach($benefitExhaustion as $benefit)
{{ str_replace('_', ' ', $benefit->benefit_category) }} {{ round($benefit->avg_utilization, 1) }}% avg usage
{{ $benefit->total_members }} members {{ $benefit->exhausted }} exhausted {{ $benefit->near_exhaustion }} near limit (80%+)
@endforeach @if($benefitExhaustion->isEmpty())

No benefit usage data available

@endif

Monthly Premiums vs Claims

@php $maxVal = max($premiumsVsClaims->max('premiums'), $premiumsVsClaims->max('claims'), 1); @endphp @foreach($premiumsVsClaims as $pvc)
{{ $pvc['month'] }}
P
${{ number_format($pvc['premiums'], 0) }}
C
${{ number_format($pvc['claims'], 0) }}
@endforeach @if($premiumsVsClaims->isEmpty())

No premium/claims data available

@endif
Premiums
Claims

Claims by Status

@php $statusColors = [ 'received' => 'bg-gray-400', 'processing' => 'bg-blue-500', 'approved' => 'bg-emerald-500', 'rejected' => 'bg-red-500', 'paid' => 'bg-purple-500', 'reversed' => 'bg-amber-500', ]; $totalStatusClaims = array_sum($claimsByStatus) ?: 1; @endphp @foreach($claimsByStatus as $status => $count)
{{ $status }}

{{ number_format($count) }}

{{ round($count / $totalStatusClaims * 100, 1) }}%

@endforeach @if(empty($claimsByStatus))

No claims data for selected period

@endif