From e62cb24bfc71e52d7311cba0b29e8c83d832d4e3 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sat, 18 Jul 2026 06:16:50 +0000 Subject: [PATCH] Stack queue card hierarchy: ticket, patient, then room/doctor. Stops cramming ticket status, destination, and patient name onto one line across Patient, Pharmacy, Lab, and specialty queues. Co-authored-by: Cursor --- .../views/care/lab/queue/index.blade.php | 29 ++++---- .../care/partials/queue-ticket.blade.php | 35 +++++----- .../views/care/prescriptions/queue.blade.php | 24 +++---- resources/views/care/queue/index.blade.php | 69 ++++++++++--------- resources/views/care/specialty/show.blade.php | 27 ++++---- 5 files changed, 96 insertions(+), 88 deletions(-) diff --git a/resources/views/care/lab/queue/index.blade.php b/resources/views/care/lab/queue/index.blade.php index 2b69081..8e8c36e 100644 --- a/resources/views/care/lab/queue/index.blade.php +++ b/resources/views/care/lab/queue/index.blade.php @@ -40,27 +40,28 @@
@forelse ($queue as $item) -
-
-

- @if (! empty($queueIntegration['enabled']) && $item->queue_ticket_number) - @include('care.partials.queue-ticket', [ - 'ticketNumber' => $item->queue_ticket_number, - 'ticketStatus' => $item->queue_ticket_status, - ]) - @endif - {{ $item->patient->fullName() }} — {{ $item->investigationType->name }} -

-

{{ $statuses[$item->status] ?? $item->status }} · {{ $item->priority }} · {{ $item->created_at->diffForHumans() }}

+
+
+ @if (! empty($queueIntegration['enabled']) && $item->queue_ticket_number) + @include('care.partials.queue-ticket', [ + 'ticketNumber' => $item->queue_ticket_number, + 'ticketStatus' => $item->queue_ticket_status, + ]) + @endif +
+

{{ $item->patient->fullName() }}

+

{{ $item->investigationType->name }}

+

{{ $statuses[$item->status] ?? $item->status }} · {{ $item->priority }} · {{ $item->created_at->diffForHumans() }}

+
-
+
@if (! empty($queueIntegration['enabled']) && $item->queue_ticket_uuid && ($item->queue_ticket_status ?? '') !== 'serving')
@csrf
@endif - Open + Open
@empty diff --git a/resources/views/care/partials/queue-ticket.blade.php b/resources/views/care/partials/queue-ticket.blade.php index 7663b83..271a8da 100644 --- a/resources/views/care/partials/queue-ticket.blade.php +++ b/resources/views/care/partials/queue-ticket.blade.php @@ -3,25 +3,28 @@ $number = $ticketNumber ?? null; $destination = $destination ?? null; $staffDisplayName = $staffDisplayName ?? null; + $showAssignment = ($showAssignment ?? true) && ($destination || $staffDisplayName); @endphp @if ($number) - - {{ $number }} - @if ($status) - $status === 'waiting', - 'bg-indigo-100 text-indigo-800' => $status === 'called', - 'bg-emerald-100 text-emerald-800' => $status === 'serving', - 'bg-slate-100 text-slate-600' => ! in_array($status, ['waiting', 'called', 'serving'], true), - ])>{{ $status }} - @endif - @if ($destination || $staffDisplayName) - +
+
+ {{ $number }} + @if ($status) + $status === 'waiting', + 'bg-indigo-100 text-indigo-800' => $status === 'called', + 'bg-emerald-100 text-emerald-800' => $status === 'serving', + 'bg-slate-100 text-slate-600' => ! in_array($status, ['waiting', 'called', 'serving'], true), + ])>{{ $status }} + @endif +
+ @if ($showAssignment) +

@if ($destination){{ $destination }}@endif - @if ($destination && $staffDisplayName) · @endif + @if ($destination && $staffDisplayName) · @endif @if ($staffDisplayName){{ $staffDisplayName }}@endif - +

@endif - +
@endif diff --git a/resources/views/care/prescriptions/queue.blade.php b/resources/views/care/prescriptions/queue.blade.php index 08c6e98..e273d85 100644 --- a/resources/views/care/prescriptions/queue.blade.php +++ b/resources/views/care/prescriptions/queue.blade.php @@ -28,18 +28,18 @@ @forelse ($queue as $rx)
-
-

- @if (! empty($queueIntegration['enabled']) && $rx->queue_ticket_number) - @include('care.partials.queue-ticket', [ - 'ticketNumber' => $rx->queue_ticket_number, - 'ticketStatus' => $rx->queue_ticket_status, - ]) - @endif - {{ $rx->patient->fullName() }} -

-

{{ $rx->patient->patient_number }} · {{ $rx->visit->branch?->name }}

-
    +
    + @if (! empty($queueIntegration['enabled']) && $rx->queue_ticket_number) + @include('care.partials.queue-ticket', [ + 'ticketNumber' => $rx->queue_ticket_number, + 'ticketStatus' => $rx->queue_ticket_status, + ]) + @endif +
    +

    {{ $rx->patient->fullName() }}

    +

    {{ $rx->patient->patient_number }} · {{ $rx->visit->branch?->name }}

    +
    +
      @foreach ($rx->items as $item)
    • {{ $item->is_procedure ? 'Procedure' : 'Med' }}: {{ $item->name }} {{ $item->dosage }} {{ $item->frequency }}
    • @endforeach diff --git a/resources/views/care/queue/index.blade.php b/resources/views/care/queue/index.blade.php index 74c8c4f..60e3d8b 100644 --- a/resources/views/care/queue/index.blade.php +++ b/resources/views/care/queue/index.blade.php @@ -44,30 +44,32 @@
      @forelse ($queue as $appointment)
      ($appointment->queue_ticket_status ?? null) === 'called', 'border-emerald-200 bg-emerald-50' => ($appointment->queue_ticket_status ?? null) === 'serving', 'border-slate-100 bg-slate-50' => ! in_array($appointment->queue_ticket_status ?? null, ['called', 'serving'], true), ])> -
      -

      - @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) - @include('care.partials.queue-ticket', [ - 'ticketNumber' => $appointment->queue_ticket_number, - 'ticketStatus' => $appointment->queue_ticket_status, - 'destination' => $appointment->queue_destination, - 'staffDisplayName' => $appointment->queue_staff_display_name, - ]) - @elseif (! empty($queueIntegration['enabled']) && ($appointment->queue_routing_status ?? '') === 'unresolved') - Unassigned - @elseif ($appointment->queue_position) - {{ $appointment->queue_position }} - @endif - {{ $appointment->patient->fullName() }} -

      -

      {{ $appointment->patient->patient_number }} · {{ $appointment->reason ?? '—' }}

      +
      + @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) + @include('care.partials.queue-ticket', [ + 'ticketNumber' => $appointment->queue_ticket_number, + 'ticketStatus' => $appointment->queue_ticket_status, + 'destination' => $appointment->queue_destination, + 'staffDisplayName' => $appointment->queue_staff_display_name, + ]) + @elseif (! empty($queueIntegration['enabled']) && ($appointment->queue_routing_status ?? '') === 'unresolved') + Unassigned + @elseif ($appointment->queue_position) + {{ $appointment->queue_position }} + @endif + +
      +

      {{ $appointment->patient->fullName() }}

      +

      {{ $appointment->patient->patient_number }} · {{ $appointment->reason ?? '—' }}

      +
      -
      + +
      @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_uuid && in_array($appointment->queue_ticket_status ?? '', ['called', 'serving'], true) && $canConsult)
      @csrf @@ -94,20 +96,21 @@

      In consultation ({{ $inConsultation->count() }})

      @forelse ($inConsultation as $appointment) -
      -
      -

      - @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) - @include('care.partials.queue-ticket', [ - 'ticketNumber' => $appointment->queue_ticket_number, - 'ticketStatus' => $appointment->queue_ticket_status, - ]) - @endif - {{ $appointment->patient->fullName() }} -

      -

      {{ $appointment->practitioner?->name ?? 'Unassigned' }}

      +
      +
      + @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) + @include('care.partials.queue-ticket', [ + 'ticketNumber' => $appointment->queue_ticket_number, + 'ticketStatus' => $appointment->queue_ticket_status, + 'showAssignment' => false, + ]) + @endif +
      +

      {{ $appointment->patient->fullName() }}

      +

      {{ $appointment->practitioner?->name ?? 'Unassigned' }}

      +
      -
      +
      @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_uuid && in_array($appointment->queue_ticket_status ?? '', ['called', 'serving'], true) && $canConsult) @csrf @@ -115,7 +118,7 @@ @endif @if ($appointment->consultation) - Open + Open @endif
      diff --git a/resources/views/care/specialty/show.blade.php b/resources/views/care/specialty/show.blade.php index bc138af..f43ae35 100644 --- a/resources/views/care/specialty/show.blade.php +++ b/resources/views/care/specialty/show.blade.php @@ -56,20 +56,21 @@
      @forelse ($waiting as $appointment) -
      -
      -

      - @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) - @include('care.partials.queue-ticket', [ - 'ticketNumber' => $appointment->queue_ticket_number, - 'ticketStatus' => $appointment->queue_ticket_status, - ]) - @endif - {{ $appointment->patient?->fullName() }} -

      -

      {{ $appointment->department?->name }} · {{ $appointment->practitioner?->name ?? 'Unassigned' }}

      +
      +
      + @if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number) + @include('care.partials.queue-ticket', [ + 'ticketNumber' => $appointment->queue_ticket_number, + 'ticketStatus' => $appointment->queue_ticket_status, + 'showAssignment' => false, + ]) + @endif +
      +

      {{ $appointment->patient?->fullName() }}

      +

      {{ $appointment->department?->name }} · {{ $appointment->practitioner?->name ?? 'Unassigned' }}

      +
      - View + View
      @empty

      No patients waiting in this specialty.