@extends('layouts.admin') @section('page_kicker', 'Overview') @section('page_title', 'Doctor dashboard') @section('content')

Total assigned

{{ $stats['assigned_patients'] }}

Waiting

{{ $stats['waiting'] }}

In consultation

{{ $stats['in_consultation'] }}

Completed

{{ $stats['completed'] }}

Emergency on caseload

{{ $stats['emergency_alerts'] }}

Triage-tagged emergency assigned to you (approval + audit rules apply in the visit record).

Upcoming appointments

{{ $stats['appointments'] }}

Progress notes written

{{ $stats['internal_notes'] }}

Your OP queue (emergency > urgent > routine, then FIFO)

Patients appear here after registration payment is verified, triage, and assignment to you. Start consultation only when you are ready — billing is blocked until service payment is verified later in the workflow.

@if($visitQueue->isEmpty())

No patients waiting in your queue.

@else
@foreach($visitQueue as $v) $v->triage_priority === 'emergency'])> @endforeach
MRN Patient Priority Queued
{{ $v->mrn }} {{ $v->patient?->name }} @if($v->triage_priority === 'emergency') {{ $v->triage_priority }} @else {{ $v->triage_priority ?? '—' }} @endif {{ $v->queued_at?->diffForHumans() ?? '—' }} Open visit
@endif

Create Medical Note

@csrf

Quick prescription (ad-hoc)

For walk-in OP visits, prefer workspace → open visit so the order is tied to the encounter and EMR. This form still sends a valid pharmacy queue entry when you know the patient and medicine IDs.

@csrf
@endsection