@extends('layouts.app') @section('title', 'Direct Encounters') @section('content') @php // Merge into one filterable collection so the per-status tabs work // from a single tbody (matches the OPD queue's pattern). $allRows = collect(); foreach ($atLab as $v) { $v->_stage = 'lab'; $allRows->push($v); } foreach ($atRadiology as $v) { $v->_stage = 'imaging'; $allRows->push($v); } foreach ($completed as $v) { $v->_stage = 'done'; $allRows->push($v); } @endphp @section('styles') @endsection {{-- Page Header --}}
Walk-in lab & imaging encounters · {{ now()->format('l, d M Y') }}
At Lab
{{ $stats['at_lab'] }}
At Radiology
{{ $stats['at_radiology'] }}
Awaiting Payment
{{ $stats['awaiting_payment'] }}
Completed Today
{{ $stats['completed_today'] }}
| Visit # | Patient | Type | Orders | Payer | Bill (KES) | Check-in | |
|---|---|---|---|---|---|---|---|
| {{ $v->visit_number }} |
{{ $v->patient->full_name ?? '—' }} {{ $v->patient->mrn ?? '' }} |
@if($v->visit_type === 'direct_lab') Direct Lab @else Direct Imaging @endif | @php $orderCount = $v->visit_type === 'direct_lab' ? $v->labOrders->count() : $v->imagingRequests->count(); @endphp {{ $orderCount }} {{ $orderCount === 1 ? 'order' : 'orders' }} | {{ $v->payment_mode }} | @if($v->invoice) {{ number_format($v->invoice->total_amount) }} @if($v->invoice->balance > 0) · KES {{ number_format($v->invoice->balance) }} due @endif @else — @endif | {{ optional($v->check_in_at)->format('d M, H:i') }} | View → |
| No direct encounters in scope. | |||||||