Files
ladill-care/resources/views/care/specialty/shell.blade.php
T
isaaccladandCursor a00a8249ad
Deploy Ladill Care / deploy (push) Successful in 40s
Improve specialty workspace actions and Call next handoff.
Move timeline into a workspace tab, surface Complete consultation and Call again in Actions, and make Call next end the current encounter then open the next called patient.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 16:12:30 +00:00

131 lines
7.0 KiB
PHP

@php
$pageTitle = match ($section) {
'workspace' => ($patientHeader['patient'] ?? null)?->fullName() ?: 'Workspace',
'history' => 'Visit history',
'billing' => 'Billing',
'visits' => 'Patient queue',
default => 'Patient queue',
};
@endphp
<x-app-layout :title="$pageTitle">
<div class="space-y-4">
@if ($section === 'workspace')
<div class="flex flex-wrap items-center justify-between gap-3">
<a href="{{ route('care.queue.index') }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800"> Back to queue</a>
<div class="flex flex-wrap gap-3 text-sm">
<a href="{{ route('care.specialty.history', $moduleKey) }}" class="text-slate-600 hover:text-slate-900">History</a>
<a href="{{ route('care.specialty.billing', $moduleKey) }}" class="text-slate-600 hover:text-slate-900">Billing</a>
</div>
</div>
<div class="lg:grid lg:grid-cols-[minmax(0,1fr)_16rem] lg:items-start lg:gap-6">
<div class="min-w-0 space-y-4">
@include('care.specialty.sections.workspace')
</div>
@include('care.partials.clinical-actions-panel', [
'actionsView' => 'care.specialty.partials.actions-menu',
'title' => 'Actions',
])
</div>
@include('care.partials.clinical-actions-mobile', [
'actionsView' => 'care.specialty.partials.actions-menu',
'title' => 'Actions',
])
@php
$completeConsultation = $workspaceVisit?->appointment?->consultation;
@endphp
@if ($completeConsultation && $completeConsultation->status !== \App\Models\Consultation::STATUS_COMPLETED)
<x-confirm-dialog
:name="'complete-consultation-'.$completeConsultation->id"
title="Complete this consultation?"
message="Mark the consultation as finished. You can still prescribe or generate a bill afterward."
:action="route('care.consultations.complete', $completeConsultation)"
confirm-label="Complete consultation"
variant="primary"
/>
@endif
@elseif ($section === 'history')
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h1 class="text-xl font-semibold text-slate-900">Visit history</h1>
<p class="mt-1 text-sm text-slate-500">Completed encounters for this service line.</p>
</div>
<a href="{{ route('care.queue.index') }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800"> Back to queue</a>
</div>
@include('care.specialty.sections.history')
@elseif ($section === 'billing')
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h1 class="text-xl font-semibold text-slate-900">Billing</h1>
<p class="mt-1 text-sm text-slate-500">Service catalog for this module.</p>
</div>
<a href="{{ route('care.queue.index') }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800"> Back to queue</a>
</div>
@include('care.specialty.sections.billing')
@else
{{-- Queue home (overview / visits) same UI as GP Queue --}}
<div class="lg:grid lg:grid-cols-[minmax(0,1fr)_16rem] lg:items-start lg:gap-6">
<div class="min-w-0 space-y-6">
<x-care.page-hero
badge="Waiting · In care · Call next"
title="Patient queue"
description="See who is waiting, start encounters, and keep patient flow moving."
:stats="[
['value' => number_format($kpis['waiting'] ?? $queue->count()), 'label' => 'Waiting'],
['value' => number_format($kpis['in_progress'] ?? $inConsultation->count()), 'label' => 'In care'],
['value' => number_format($kpis['completed_today'] ?? 0), 'label' => 'Today'],
]">
@if ($canManageQueue ?? false)
<x-slot name="actions">
<a href="{{ route('care.appointments.walk-in.create') }}" class="btn-primary">Walk-in</a>
</x-slot>
@endif
</x-care.page-hero>
<div class="flex flex-wrap gap-3 text-sm">
<a href="{{ route('care.specialty.history', $moduleKey) }}" class="rounded-lg border border-slate-200 bg-white px-3 py-1.5 font-medium text-slate-700 hover:bg-slate-50">History</a>
<a href="{{ route('care.specialty.billing', $moduleKey) }}" class="rounded-lg border border-slate-200 bg-white px-3 py-1.5 font-medium text-slate-700 hover:bg-slate-50">Billing</a>
</div>
@include('care.partials.queue-board', [
'queue' => $queue,
'inConsultation' => $inConsultation,
'queueIntegration' => $queueIntegration ?? null,
'branchId' => $branchId,
'branchLabel' => $branchLabel ?? null,
'canConsult' => $canConsult ?? false,
'lockToPractitioner' => $lockToPractitioner ?? false,
'showFilters' => true,
'queueCallNextRoute' => 'care.specialty.call-next',
'queueCallNextParams' => ['module' => $moduleKey],
'startRouteName' => 'care.queue.start',
'inCareLabel' => 'In care',
'openInCareUrl' => function ($appointment) use ($moduleKey) {
if ($appointment->visit) {
return route('care.specialty.workspace', [
'module' => $moduleKey,
'visit' => $appointment->visit,
]);
}
return $appointment->consultation
? route('care.consultations.show', $appointment->consultation)
: null;
},
])
</div>
@include('care.partials.clinical-actions-panel', [
'actionsView' => 'care.specialty.partials.actions-menu',
'title' => 'Actions',
])
</div>
@include('care.partials.clinical-actions-mobile', [
'actionsView' => 'care.specialty.partials.actions-menu',
'title' => 'Actions',
])
@endif
</div>
</x-app-layout>