@if ($patientHeader)
@include('care.partials.patient-header', [
'patient' => $patientHeader['patient'],
'visit' => $patientHeader['visit'] ?? null,
'appointment' => $patientHeader['appointment'] ?? null,
'outstandingMinor' => $patientHeader['outstanding_minor'] ?? 0,
'allergies' => $patientHeader['allergies'] ?? [],
'insuranceSummary' => $patientHeader['insurance_summary'] ?? null,
'emergency' => $patientHeader['emergency'] ?? false,
'clinicalAlerts' => $patientHeader['clinical_alerts'] ?? ($clinicalAlerts ?? []),
'currency' => $currency ?? 'GHS',
])
@endif
@if (! $workspaceVisit)
No open visit selected
@if (! empty($canAccessPatientQueue))
Open a visit from the specialty list or GP queue, or call next from the waiting list.
@else
Open a patient from the specialty list to enter their workspace.
@endif
@if (! empty($canAccessPatientQueue))
Back to queue
@else
Specialty home
@endif
@else
{{-- Module tabs --}}
@if ($activeTab === 'timeline')
@include('care.partials.patient-timeline', ['events' => $timeline ?? []])
@elseif ($moduleKey === 'dentistry' && in_array($activeTab, ['odontogram', 'plan', 'treat', 'notes', 'imaging', 'overview', 'perio', 'lab', 'recalls'], true))
@include('care.specialty.dentistry.workspace-'.$activeTab)
@elseif ($moduleKey === 'emergency' && in_array($activeTab, ['overview', 'vitals', 'disposition'], true))
@include('care.specialty.emergency.workspace-'.$activeTab)
@elseif ($moduleKey === 'blood_bank' && in_array($activeTab, ['overview', 'issue', 'transfusion'], true))
@include('care.specialty.blood-bank.workspace-'.$activeTab)
@elseif ($moduleKey === 'ophthalmology' && in_array($activeTab, ['overview', 'treat'], true))
@include('care.specialty.ophthalmology.workspace-'.$activeTab)
@elseif ($moduleKey === 'physiotherapy' && in_array($activeTab, ['overview', 'session'], true))
@include('care.specialty.physiotherapy.workspace-'.$activeTab)
@elseif ($moduleKey === 'maternity' && in_array($activeTab, ['overview', 'postnatal'], true))
@include('care.specialty.maternity.workspace-'.$activeTab)
@elseif ($activeTab === 'billing')
{{ ($canManageClinical ?? $canManageSpecialty ?? true) ? 'Add specialty service' : 'Visit billing' }}
@if ($canManageClinical ?? $canManageSpecialty ?? true)
@endif
@if ($workspaceVisit->bill)
($canManageClinical ?? $canManageSpecialty ?? true), 'mt-3' => ! ($canManageClinical ?? $canManageSpecialty ?? true)])>
Current invoice {{ $workspaceVisit->bill->invoice_number }}
@forelse ($workspaceVisit->bill->lineItems as $line)
-
{{ $line->description }}
{{ number_format($line->total_minor / 100, 2) }}
@empty
- No line items yet.
@endforelse
Open bill
@elseif (! ($canManageClinical ?? $canManageSpecialty ?? true))
No invoice on this visit yet.
@endif
@elseif (! empty($clinicalFields))
@include('care.specialty.partials.clinical-form')
@elseif ($activeTab === 'orders')
@include('care.specialty.partials.orders')
@elseif ($activeTab === 'documents')
Documents
Specialty documents attach to the patient chart for this episode.
@if ($canManageClinical ?? $canManageSpecialty ?? false)
@endif
@forelse ($visitDocuments ?? [] as $doc)
-
{{ $doc->original_name }}
{{ $doc->document_type }} · {{ $doc->created_at?->format('d M Y H:i') }}
@if ($doc->file_path)
Open
@endif
@empty
- No documents yet.
@endforelse
@if ($workspaceVisit->patient)
Patient chart
@endif
@else
Overview
- Visit status
- {{ ucfirst(str_replace('_', ' ', $workspaceVisit->status)) }}
- Checked in
- {{ $workspaceVisit->checked_in_at?->format('d M Y H:i') ?? '—' }}
- Department
- {{ $workspaceVisit->appointment?->department?->name ?? '—' }}
- Queue
-
{{ $workspaceVisit->appointment?->queue_ticket_number ?? '—' }}
@if ($workspaceVisit->appointment?->queue_ticket_status)
({{ $workspaceVisit->appointment->queue_ticket_status }})
@endif
@if (! empty($clinicalAlerts))
Clinical alerts
@foreach ($clinicalAlerts as $alert)
{{ $alert['message'] ?? '' }}
@endforeach
@endif
@endif
@endif