@extends('layouts.app') @section('title', 'Corporate Eligibility Check') @section('content')

Corporate Eligibility Check

Verify a patient's corporate scheme status before billing.

{{-- ============ Search form ============ --}}
@if (!empty($searchResults))
@foreach ($searchResults as $p) {{ $p->mrn }} · {{ trim($p->first_name . ' ' . $p->last_name) }} · {{ $p->phone ?? $p->id_number ?? '' }} @endforeach
@endif
{{-- ============ Result card ============ --}} @if ($patient)
Patient
{{ trim($patient->first_name . ' ' . $patient->last_name) }}
MRN: {{ $patient->mrn }} · DOB: {{ optional($patient->date_of_birth)->format('d M Y') ?? '—' }} · ID: {{ $patient->id_number ?? '—' }}
@php $status = $eligibility['status']; @endphp @php $statusClass = match ($status) { 'Compliant' => 'bg-green-50 border-green-300 text-green-900', 'Grace Period' => 'bg-amber-50 border-amber-300 text-amber-900', 'Premium Due', 'Suspended', 'Scheme Closed' => 'bg-red-50 border-red-300 text-red-900', 'Not Corporate' => 'bg-gray-50 border-gray-300 text-gray-700', default => 'bg-gray-50 border-gray-300 text-gray-700', }; @endphp
{{ $eligibility['header_label'] }}
{{ $eligibility['instruction'] }}
@if (!empty($eligibility['alert']))
{{ $eligibility['alert'] }}
@endif
@if ($eligibility['is_corporate'] && $eligibility['member'])
Scheme
{{ $eligibility['account']->name }} ({{ $eligibility['account']->code }})
Member #
{{ $eligibility['member']->member_number }}
Member Type
{{ ucfirst($eligibility['member']->member_type) }}
Last Paid Month
{{ $eligibility['member']->last_paid_month ?? '—' }}
Next Due
{{ $eligibility['member']->next_due_date?->format('d M Y') ?? '—' }}
Member Status
{{ $eligibility['member']->status }}
Bill To
{{ $eligibility['bill_to_pool'] ? 'Corporate Pool' : 'Patient (Cash)' }}
{{-- Override section --}} @if (!$eligibility['bill_to_pool'] && in_array($eligibility['status'], ['Premium Due','Grace Period']))

Authorized Override

Authorize this encounter to be billed to the corporate pool despite non-compliance. Use only when there is documented approval. A mandatory audit entry is created.

@csrf
@endif @endif
@endif @endsection