@extends('layouts.app') @section('title', 'Patient Dashboard') @section('content')

My Dashboard

@if($patient)

Total Prescriptions

{{ $prescriptions->count() }}

Total Appointments

{{ $appointments->count() }}

Patient ID

{{ $patient->patient_id }}

Recent Prescriptions

@if($prescriptions->count() > 0)
@foreach($prescriptions->take(5) as $prescription)

#{{ $prescription->prescription_number }}

Dr. {{ $prescription->doctor->full_name }}

{{ $prescription->created_at->format('M d, Y') }}

View
@endforeach
@else

No prescriptions yet.

@endif

Recent Appointments

@if($appointments->count() > 0)
@foreach($appointments->take(5) as $appointment)

{{ $appointment->consultation_type }}

{{ $appointment->branch->name }}

{{ $appointment->appointment_date->format('M d, Y H:i') }}

{{ ucfirst($appointment->status) }}
@endforeach
@else

No appointments yet.

@endif
@else

Patient record not found. Please contact the pharmacy to link your account.

@endif
@endsection