@extends('layouts.app') @section('title', 'Dashboard') @section('content') @php $kes = fn ($v) => 'KES ' . number_format((float) $v); $day = $shifts['day'] ?? ['cash'=>0,'mpesa'=>0,'insurance'=>0,'card'=>0,'total'=>0]; $night = $shifts['night'] ?? ['cash'=>0,'mpesa'=>0,'insurance'=>0,'card'=>0,'total'=>0]; $maxVisits = max(1, collect($visitsByDay)->max('total') ?? 1); @endphp
Today · {{ $today->format('l, d M Y') }}
Patients Today
{{ number_format($row1['patientsToday']) }}
Revenue Today
{{ $kes($row1['revenueToday']) }}
Collections Today
{{ $kes($row1['collectionsToday']) }}
ARPP
{{ $kes($row1['arpp']) }}
Avg revenue per patient
Cash
{{ $kes($row1['cashToday']) }}
Mobile / Bank
{{ $kes($row1['mobileToday']) }}
Insurance
{{ $kes($row1['insuranceToday']) }}
Appointments
{{ number_format($ops['appointments']) }}
Bed Occupancy
{{ number_format($ops['bedOccupancy']) }}%
{{ $ops['occupiedBeds'] }} of {{ $ops['totalBeds'] }} beds
Active ANC Clients
{{ number_format($ops['activeAnc']) }}
New vs Returning
{{ number_format($ops['newCount']) }} / {{ number_format($ops['returningCount']) }}
New / Returning today
| Cash | {{ $kes($s['cash']) }} |
| M-Pesa / Mobile | {{ $kes($s['mpesa']) }} |
| Insurance | {{ $kes($s['insurance']) }} |
| Card / Bank | {{ $kes($s['card']) }} |
| Shift Total | {{ $kes($s['total']) }} |