Files
ladill-care/resources/views/care/prescriptions/show.blade.php
T
isaaccladandCursor 6360035631
Deploy Ladill Care / deploy (push) Successful in 43s
Replace ghost destructive actions with shared btn components in Care.
Members, appointments, bills, prescriptions, and patients now use consistent warning/danger pill buttons.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 06:38:10 +00:00

41 lines
2.8 KiB
PHP

<x-app-layout :title="'Prescription · '.$prescription->patient->fullName()">
<div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
<div>
<p class="text-xs uppercase text-slate-500">{{ $statuses[$prescription->status] ?? $prescription->status }}</p>
<h1 class="text-2xl font-semibold text-slate-900">{{ $prescription->patient->fullName() }}</h1>
<p class="mt-1 text-sm text-slate-500">{{ $prescription->created_at->format('d M Y H:i') }}</p>
</div>
<div class="flex gap-2">
@if ($canManage && $prescription->status === \App\Models\Prescription::STATUS_DRAFT)
<form method="POST" action="{{ route('care.prescriptions.activate', $prescription) }}">@csrf<button class="btn-primary">Activate</button></form>
@endif
@if ($canDispense && $prescription->status === \App\Models\Prescription::STATUS_ACTIVE)
<form method="POST" action="{{ route('care.prescriptions.dispense', $prescription) }}">@csrf<button class="btn-primary">Dispense</button></form>
@endif
@if ($canManage && ! in_array($prescription->status, [\App\Models\Prescription::STATUS_DISPENSED, \App\Models\Prescription::STATUS_CANCELLED]))
<form method="POST" action="{{ route('care.prescriptions.cancel', $prescription) }}" onsubmit="return confirm('Cancel prescription?')">@csrf<x-btn type="submit" variant="danger">Cancel</x-btn></form>
@endif
</div>
</div>
<section class="mt-6 rounded-2xl border border-slate-200 bg-white p-6">
<h2 class="text-sm font-semibold uppercase text-slate-500">Items</h2>
<div class="mt-4 space-y-4">
@foreach ($prescription->items as $item)
<div class="rounded-xl border border-slate-100 bg-slate-50 p-4 text-sm">
<p class="font-medium text-slate-900">{{ $item->name }} @if ($item->is_procedure)<span class="text-amber-600">(procedure)</span>@endif</p>
<p class="mt-1 text-slate-600">
@if ($item->dosage) {{ $item->dosage }} @endif
@if ($item->frequency) · {{ $item->frequency }} @endif
@if ($item->duration) · {{ $item->duration }} @endif
@if ($item->route) · {{ $routes[$item->route] ?? $item->route }} @endif
@if ($item->quantity) · Qty: {{ $item->quantity }} @endif
</p>
@if ($item->instructions)<p class="mt-1 text-slate-500">{{ $item->instructions }}</p>@endif
</div>
@endforeach
</div>
@if ($prescription->notes)<p class="mt-4 text-sm text-slate-600">{{ $prescription->notes }}</p>@endif
</section>
</x-app-layout>