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

Doctor Dashboard

Total Appointments

{{ $totalAppointments }}

+100%

Cancelled Appointments

{{ $totalCancelledAppointments }}

-100%

Total Patients

{{ $totalPatients }}

+100%
Upcoming Appointments
@if($appointment)
{{ $appointment->patient_name }}

Appoinment Id: {{ $appointment->appointment_id }}

@if($appointment->appointment_type === 'first_visit') First Visit @elseif($appointment->appointment_type === 'follow_up') Follow-up @else {{ ucfirst($appointment->appointment_type) }} @endif

{{ $appointment->appointment_date }}

@php $slots = json_decode($appointment->appointment_slot_time, true); @endphp @if(!empty($slots))

    @foreach($slots as $slot)
  • {{ $slot }}
  • @endforeach
@else

No slots available

@endif

Specialization

{{ $appointment->specialization }}

Type

{{ $appointment->appointment_status }}

@else

No appointment available

@endif
Appointments

Completed Appointments: {{ $totalCompleted }}

Cancelled Appointments: {{ $totalCancelled }}

Recent Appointments
@foreach ($appointments as $item) @endforeach
Appointment ID Patient Doctor Specialization Appointment Date Appointment Time (Slot) Consultation Fees Appointment Type Reason Status Action
{{ $item->appointment_id }} {{ $item->patient->name ?? 'N/A' }} {{ $item->doctor->name ?? 'N/A' }} {{ $item->specialization }} {{ \Carbon\Carbon::parse($item->appointment_date)->isoFormat('D, MMMM YYYY') }}
    @foreach (json_decode($item->appointment_slot_time) as $slot)
  • {{ $slot }}

  • @endforeach
@if ($item->fee_type === 'in_person_fee') In-Person @elseif ($item->fee_type === 'video_fee') Video @else {{ ucfirst(str_replace('_', ' ', $item->fee_type)) }} @endif - ${{ $item->appointment_fee }} @if ($item->appointment_type === 'first_visit') First Visit @elseif ($item->appointment_type === 'follow_up') Follow Up @else {{ ucfirst($item->appointment_type) }} @endif

{{ $item->reason }}

Read More
{{-- Appointment Status --}} @if($item->appointment_status == 'completed') Completed @elseif($item->appointment_status == 'cancelled') Cancelled @else @if ($item->fee_type === 'in_person_fee') @elseif ($item->fee_type === 'video_fee') @endif {{ ucfirst($item->appointment_status) }} @endif
@endsection