Client Health Report

Insurance Company Assignment Volume Trends

Generated: {{ now()->format('M d, Y \a\t g:i A') }}
@if (session()->has('error'))
{{ session('error') }}
@endif @if ($errorMessage)
{{ $errorMessage }}
@endif
Showing {{ count($this->filteredCompanies) }} of {{ count($insuranceCompanies) }} insurance companies @if($searchTerm)
Filtered by: "{{ $searchTerm }}" @endif @if($filterTrend)
Trend filter: {{ ucfirst($filterTrend) }} @endif
@if($isLoading)
Loading...

Loading data...

@else @forelse($this->paginatedCompanies as $company) @php $tData = $trendData[$company->id] ?? []; $mData = $monthlyData[$company->id] ?? []; $lastfile = $lastfileData[$company->id]->created_date ?? null; @endphp @empty @endforelse
Insurance Company @if($sortBy === 'company_name') @else @endif Total Assignments @if($sortBy === 'total_assignments') @else @endif Date ( Last File Submitted ) Trend Change % Monthly Breakdown
{{ $company->company_name ?? 'Unknown Company' }} {{ $tData['total_assignments'] ?? 0 }} {{ $lastfile ? \Carbon\Carbon::parse($lastfile)->format('m-d-Y') : '' }} @if(isset($tData['trend'])) @if($tData['trend'] === 'increasing') Increasing @elseif($tData['trend'] === 'decreasing') Decreasing @else Stable @endif
{{-- Month: {{ $tData['current_month_progress'] ?? 0 }}% complete ({{ $tData['days_passed'] ?? 0 }}/{{ $tData['days_in_month'] ?? 30 }} days) --}} @else N/A @endif
@if(isset($tData['percentage'])) @if($tData['percentage'] > 0) +{{ $tData['percentage'] }}% @elseif($tData['percentage'] < 0) {{ $tData['percentage'] }}% @else {{ $tData['percentage'] }}% @endif
Compared to same date last month. @else N/A @endif
@for($month = 1; $month <= 12; $month++) @php $count = $mData[$month] ?? 0; $monthName = date('M', mktime(0, 0, 0, $month, 1)); @endphp
{{ $monthName }}
{{ $count }}
@endfor
No insurance companies found.
@endif
{{ $this->paginatedCompanies->links() }}
@if(count($this->filteredCompanies) > 0)
Growing Companies

{{ collect($trendData)->where('trend', 'increasing')->count() }}

Declining Companies

{{ collect($trendData)->where('trend', 'decreasing')->count() }}

Stable Companies

{{ collect($trendData)->where('trend', 'stable')->count() }}

@endif
@push('scripts') @endpush