@extends('layouts.app') @section('title', 'Dashboard') @section('content')
{{ now()->format('l, j F Y') }}

Good {{ now()->hour < 12 ? 'morning' : (now()->hour < 17 ? 'afternoon' : 'evening') }}, Dr. {{ explode(' ', auth()->user()->name)[0] }}

New appointment
@php $tiles = [ ['Patients', $stats['patients'], 'patients.index'], ['Appointments today', $stats['appts_today'], 'appointments.index'], ['This week', $stats['appts_week'], 'appointments.index'], ['Lab reports this month', $stats['labs_this_month'], null], ]; @endphp @foreach($tiles as [$label, $num, $to])
{{ $label }}
{{ $num }}
@endforeach

Today's schedule

View all →
@forelse($todaysAppointments as $appt)
{{ $appt->scheduled_at->format('g:i') }} {{ $appt->scheduled_at->format('A') }}
{{ $appt->patient->initials }}
{{ $appt->patient->name }}
{{ $appt->reason ?: 'Consultation' }}
{{ ucfirst(str_replace('_',' ',$appt->status)) }}
@empty
No appointments today. Enjoy the calm.
@endforelse

Coming up

@forelse($upcoming as $appt)
{{ $appt->scheduled_at->format('D, M j') }}
{{ $appt->scheduled_at->format('g:i A') }}
{{ $appt->patient->name }}
@empty
Nothing scheduled ahead.
@endforelse

Recent lab reports

@forelse($recentLabs as $lab)
{{ $lab->panel ?: 'Lab report' }}
{{ $lab->patient->name }}
{{ $lab->report_date->format('M j') }}
@empty
No lab reports yet.
@endforelse
@endsection