@php $currency = config('care.billing.currency'); $operationalCards = []; if ($permissions->can($member, 'patients.view')) { $operationalCards[] = [ 'label' => 'Patients today', 'value' => number_format($operational['patients_today']), 'href' => route('care.patients.index'), 'icon' => '', ]; } if ($permissions->can($member, 'appointments.view')) { $operationalCards[] = [ 'label' => 'Appointments today', 'value' => number_format($operational['appointments_today']), 'href' => route('care.appointments.index'), 'icon' => '', ]; } if ($canBills) { $operationalCards[] = [ 'label' => 'Open bills', 'value' => number_format($operational['open_bills']), 'href' => route('care.bills.index'), 'icon' => '', ]; } if ($canFinance) { $operationalCards[] = [ 'label' => 'Revenue today', 'value' => $currency.' '.number_format($operational['revenue_today_minor'] / 100, 2), 'href' => route('care.bills.index'), 'icon' => '', 'valueClass' => 'text-emerald-700', ]; } if ($permissions->can($member, 'lab.view')) { $operationalCards[] = [ 'label' => 'Pending lab', 'value' => number_format($operational['pending_lab']), 'href' => route('care.lab.queue.index'), 'icon' => '', ]; } $organizationCards = []; if ($canBranches) { $organizationCards[] = [ 'label' => 'Active branches', 'value' => number_format($stats['branches']), 'href' => route('care.branches.index'), 'icon' => '', ]; } if ($canMembers) { $organizationCards[] = [ 'label' => 'Team members', 'value' => number_format($stats['team_members']), 'href' => route('care.members.index'), 'icon' => '', ]; } if ($canDepartments) { $organizationCards[] = [ 'label' => 'Departments', 'value' => number_format($stats['departments']), 'href' => route('care.departments.index'), 'icon' => '', ]; } @endphp

{{ $organization->name }}

@if ($permissions->can($member, 'patients.manage')) @include('partials.mobile-header-btn', [ 'href' => route('care.patients.create'), 'label' => 'Register patient', 'desktopLabel' => 'Register patient', 'variant' => 'outline', 'showDesktopIcon' => false, ]) @endif @if ($permissions->can($member, 'appointments.manage')) @include('partials.mobile-header-btn', [ 'href' => route('care.appointments.create'), 'label' => 'Book appointment', 'desktopLabel' => 'Book appointment', 'variant' => 'primary', ]) @endif
@include('partials.upgrade-banner') @if (count($operationalCards) > 0) @php $opCols = match (count($operationalCards)) { 1 => 'lg:grid-cols-1', 2 => 'lg:grid-cols-2', 3 => 'lg:grid-cols-3', 4 => 'lg:grid-cols-4', default => 'lg:grid-cols-5', }; @endphp
@foreach ($operationalCards as $card)
{!! $card['icon'] !!}

{{ $card['label'] }}

{{ $card['value'] }}

@endforeach
@endif @if (! empty($showPatientQueue))

Patients in queue

{{ $patientQueue->count() }} waiting · {{ $inConsultation->count() }} in consultation

Open full queue

Waiting

@forelse ($patientQueue->take(8) as $appointment)

@if ($appointment->queue_position) {{ $appointment->queue_position }} @endif {{ $appointment->patient?->fullName() ?? 'Patient' }}

{{ $appointment->patient?->patient_number }} · {{ $appointment->reason ?? 'No reason noted' }}

@if (! empty($canConsult))
@csrf
@endif
@empty

No patients waiting right now.

@endforelse

In consultation

@forelse ($inConsultation->take(8) as $appointment)

{{ $appointment->patient?->fullName() ?? 'Patient' }}

{{ $appointment->practitioner?->name ?? 'Unassigned' }}

@if ($appointment->consultation) Open @endif
@empty

No active consultations.

@endforelse
@endif @if (count($organizationCards) > 0) @php $orgCols = match (count($organizationCards)) { 1 => 'lg:grid-cols-1', 2 => 'lg:grid-cols-2', default => 'lg:grid-cols-3', }; @endphp
@foreach ($organizationCards as $card)
{!! $card['icon'] !!}

{{ $card['label'] }}

{{ $card['value'] }}

@endforeach
@endif @if ($canBranches)

Branches

@include('partials.mobile-icon-link', [ 'href' => route('care.branches.index'), 'label' => 'Manage branches', 'icon' => 'arrow', ])
@forelse ($branches as $branch)

{{ $branch->name }}

{{ $branch->departments_count }} department(s) · {{ $branch->address ?? 'No address' }}

@unless ($branch->is_active) Inactive @endunless
@empty

No branches configured yet.

@endforelse
@endif