Deploy Ladill Care / deploy (push) Successful in 37s
Remove Dentistry and other specialty modules from the sidebar; Queue now uses each doctor's specialty desk context for Call next, waiting lists, and Start into specialty clinical workspaces. Co-authored-by: Cursor <cursoragent@cursor.com>
61 lines
2.9 KiB
PHP
61 lines
2.9 KiB
PHP
@php
|
|
$specialtyLabel = $specialtyLabel ?? null;
|
|
$queueBridge = app(\App\Services\Care\CareQueueBridge::class);
|
|
@endphp
|
|
<x-app-layout title="Queue">
|
|
<div class="space-y-6">
|
|
<x-care.page-hero
|
|
:badge="$specialtyLabel
|
|
? $specialtyLabel.' · Waiting · Encounters'
|
|
: 'Waiting room · Consultations · Walk-ins'"
|
|
title="Patient queue"
|
|
:description="$specialtyLabel
|
|
? 'See who is waiting for '.$specialtyLabel.', start encounters, and keep patient flow moving.'
|
|
: 'See who is waiting, start consultations, and keep patient flow moving across your branch.'"
|
|
:stats="[
|
|
['value' => number_format($heroStats['waiting']), 'label' => 'Waiting'],
|
|
['value' => number_format($heroStats['in_consultation']), 'label' => $specialtyLabel ? 'In care' : 'In consultation'],
|
|
['value' => number_format($heroStats['today']), 'label' => 'Today'],
|
|
]">
|
|
@if ($canManageQueue)
|
|
<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>
|
|
|
|
@include('care.partials.queue-board', [
|
|
'queue' => $queue,
|
|
'inConsultation' => $inConsultation,
|
|
'queueIntegration' => $queueIntegration ?? null,
|
|
'branchId' => $branchId,
|
|
'canConsult' => $canConsult,
|
|
'lockToPractitioner' => $lockToPractitioner ?? false,
|
|
'canSwitchBranch' => $canSwitchBranch ?? false,
|
|
'branches' => $branches ?? collect(),
|
|
'practitioners' => $practitioners ?? collect(),
|
|
'practitionerId' => $practitionerId ?? null,
|
|
'queueCallNextRoute' => 'care.queue.call-next',
|
|
'queueCallNextParams' => array_filter(['practitioner_id' => $practitionerId]),
|
|
'startRouteName' => 'care.queue.start',
|
|
'inCareLabel' => $specialtyLabel ? 'In care' : 'In consultation',
|
|
'openInCareUrl' => function ($appointment) use ($queueBridge) {
|
|
$organization = $appointment->organization;
|
|
if ($organization && $appointment->visit) {
|
|
$context = $queueBridge->contextForAppointment($organization, $appointment);
|
|
if ($context !== \App\Services\Care\CareQueueContexts::CONSULTATION) {
|
|
return route('care.specialty.workspace', [
|
|
'module' => $context,
|
|
'visit' => $appointment->visit,
|
|
]);
|
|
}
|
|
}
|
|
|
|
return $appointment->consultation
|
|
? route('care.consultations.show', $appointment->consultation)
|
|
: null;
|
|
},
|
|
])
|
|
</div>
|
|
</x-app-layout>
|