@extends('layouts.app') @section('title', __('appointments::messages.appointments.title')) @php use App\Modules\Appointments\Enums\AppointmentStatus; use App\Modules\Appointments\Models\Appointment; $isToday = $date->isSameDay($today); $cards = [ [ 'key' => 'total', 'label' => __('appointments::messages.appointments.card_total'), 'icon' => 'bi-calendar-week-fill', 'tone' => 'violet', ], [ 'key' => 'completed', 'label' => __('appointments::messages.appointments.card_completed'), 'icon' => 'bi-check-circle-fill', 'tone' => 'green', ], [ 'key' => 'pending', 'label' => __('appointments::messages.appointments.card_pending'), 'icon' => 'bi-clock-fill', 'tone' => 'blue', ], [ 'key' => 'cancelled', 'label' => __('appointments::messages.appointments.card_cancelled'), 'icon' => 'bi-x-circle-fill', 'tone' => 'pink', ], ]; $pillFor = static fn (AppointmentStatus $status): string => match ($status) { AppointmentStatus::Scheduled => 'px-pill--grey', AppointmentStatus::Confirmed => 'px-pill--blue', AppointmentStatus::CheckedIn => 'px-pill--violet', AppointmentStatus::InProgress => 'px-pill--amber', AppointmentStatus::Completed => 'px-pill--green', AppointmentStatus::Cancelled, AppointmentStatus::NoShow => 'px-pill--red', }; /* | Cancelling and marking a no-show both require a written reason, so they | are not offered as one-click menu items — those two go to the record | where the reason can actually be given. The rest are safe to fire from | the list, which is where reception works from. */ $reasonRequired = [AppointmentStatus::Cancelled, AppointmentStatus::NoShow]; @endphp @section('content') {{-- ── Page head ──────────────────────────────────────────────────────── --}}
{{ __('appointments::messages.appointments.subtitle') }}
{{ $card['label'] }}
{{ number_format($value) }}
@if ($delta !== 0) @endif {{ __('appointments::messages.appointments.vs_previous', [ 'delta' => $delta > 0 ? '+'.$delta : (string) $delta, ]) }}
{{ $date->isoFormat('dddd, D MMMM YYYY') }}
{{ trans_choice('appointments::messages.appointments.count', $appointments->count(), ['count' => $appointments->count()]) }}
{{ __('appointments::messages.appointments.empty_title') }}
{{ __('appointments::messages.appointments.empty_text') }}
| {{ __('appointments::messages.appointments.time') }} | {{ __('appointments::messages.appointments.patient') }} | {{ __('appointments::messages.appointments.doctor') }} | {{ __('appointments::messages.appointments.department') }} | {{ __('appointments::messages.appointments.visit_type') }} | {{ __('common.status') }} | {{ __('common.actions') }} |
|---|---|---|---|---|---|---|
| {{ $appointment->localStart()->format('H:i') }} @if ($appointment->queue_number) #{{ $appointment->queue_number }} @endif |
{{ $name }}
@if ($patient?->mrn)
{{ $patient->mrn }}
@endif
{{-- The allergy marker travels with the patient summary.
Reception seeing it while working the day list is a
cheap safety cue and does not require them to have
sight of the clinical record. --}}
@if (($patient?->activeAllergyCount ?? 0) > 0)
{{ $patient->activeAllergyCount }}
@endif
{{-- Check-in observations. The red flag is the reason
this column exists: reception needs to see, without
opening anything, who should not be left waiting. --}}
@if ($checkIn?->hasRedFlag)
{{ __('consultations::messages.red_flags.short') }}
@elseif ($checkIn?->recorded)
@endif
|
{{ $doctorSummary?->name ?? '—' }} | {{ $doctorSummary?->specialty ?? '—' }} | {{ $appointment->source->label() }} | {{ $appointment->status->label() }} |
|