Deploy Ladill Care / deploy (push) Successful in 53s
Remove the standalone Service Queues nav so call-next/now-serving lives on clinical queue, appointments, pharmacy, lab, and specialty surfaces; Pro orgs can activate dentistry and related modules with branch departments and queue stubs. Co-authored-by: Cursor <cursoragent@cursor.com>
64 lines
4.3 KiB
PHP
64 lines
4.3 KiB
PHP
<x-app-layout title="Pharmacy queue">
|
|
<h1 class="text-xl font-semibold text-slate-900">Pharmacy queue</h1>
|
|
<p class="mt-1 text-sm text-slate-500">Active prescriptions awaiting dispensing</p>
|
|
<div class="mt-4 space-y-3">
|
|
@forelse ($queue as $rx)
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-4">
|
|
<div class="flex items-start justify-between gap-4">
|
|
<div class="min-w-0 flex-1">
|
|
<p class="font-medium text-slate-900">{{ $rx->patient->fullName() }}</p>
|
|
<p class="text-xs text-slate-500">{{ $rx->patient->patient_number }} · {{ $rx->visit->branch?->name }}</p>
|
|
<ul class="mt-2 space-y-1 text-sm text-slate-700">
|
|
@foreach ($rx->items as $item)
|
|
<li>{{ $item->is_procedure ? 'Procedure' : 'Med' }}: {{ $item->name }} {{ $item->dosage }} {{ $item->frequency }}</li>
|
|
@endforeach
|
|
</ul>
|
|
@if ($canDispense)
|
|
<form method="POST" action="{{ route('care.prescriptions.dispense', $rx) }}" class="mt-4 border-t border-slate-100 pt-4">
|
|
@csrf
|
|
@php $allocIndex = 0; @endphp
|
|
@foreach ($rx->items as $item)
|
|
@if (! $item->is_procedure)
|
|
<div class="mt-2 grid gap-2 sm:grid-cols-[1fr_auto_auto] sm:items-end">
|
|
<div>
|
|
<label class="text-xs text-slate-500">Stock for {{ $item->name }}</label>
|
|
<select name="allocations[{{ $allocIndex }}][drug_batch_id]" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
<option value="">Skip stock deduction</option>
|
|
@foreach ($drugs as $drug)
|
|
@foreach ($drug->batches as $batch)
|
|
<option value="{{ $batch->id }}">{{ $drug->name }} · {{ $batch->batch_number }} ({{ $batch->quantity_on_hand }} {{ $drug->unit }})</option>
|
|
@endforeach
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<input type="hidden" name="allocations[{{ $allocIndex }}][prescription_item_id]" value="{{ $item->id }}">
|
|
<div>
|
|
<label class="text-xs text-slate-500">Qty</label>
|
|
<input type="number" name="allocations[{{ $allocIndex }}][quantity]" value="1" min="1" class="mt-1 w-20 rounded-lg border-slate-300 text-sm">
|
|
</div>
|
|
@php $allocIndex++; @endphp
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
<div class="mt-3 flex gap-2">
|
|
<button type="submit" class="rounded-lg bg-emerald-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-700">Dispense</button>
|
|
<a href="{{ route('care.prescriptions.show', $rx) }}" class="text-sm text-sky-600">View details</a>
|
|
</div>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
@unless ($canDispense)
|
|
<a href="{{ route('care.prescriptions.show', $rx) }}" class="text-sm text-sky-600">View</a>
|
|
@endunless
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<p class="rounded-2xl border border-dashed border-slate-200 bg-white p-8 text-center text-sm text-slate-500">No prescriptions in queue.</p>
|
|
@endforelse
|
|
</div>
|
|
|
|
<div class="mt-6">
|
|
@include('care.service-queues._panel')
|
|
</div>
|
|
</x-app-layout>
|