Improve specialty workspace actions and Call next handoff.
Deploy Ladill Care / deploy (push) Successful in 40s
Deploy Ladill Care / deploy (push) Successful in 40s
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>
This commit is contained in:
@@ -33,128 +33,124 @@
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="grid gap-4 lg:grid-cols-5">
|
||||
<div class="space-y-4 lg:col-span-3">
|
||||
@if ($activeTab === 'billing')
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Add specialty service</h3>
|
||||
<form method="POST" action="{{ route('care.specialty.services.add', ['module' => $moduleKey, 'visit' => $workspaceVisit]) }}" class="mt-3 space-y-3">
|
||||
@csrf
|
||||
<select name="service_code" required class="w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
|
||||
<option value="">Select service…</option>
|
||||
@foreach ($services as $service)
|
||||
<option value="{{ $service['code'] }}">
|
||||
{{ $service['label'] }} — {{ $currency ?? 'GHS' }} {{ number_format(((int) $service['amount_minor']) / 100, 2) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<button type="submit" class="btn-primary">{{ $actions['invoice'] ?? 'Add to invoice' }}</button>
|
||||
</form>
|
||||
|
||||
@if ($workspaceVisit->bill)
|
||||
<div class="mt-6 border-t border-slate-100 pt-4">
|
||||
<p class="text-xs font-semibold uppercase tracking-wide text-slate-500">Current invoice {{ $workspaceVisit->bill->invoice_number }}</p>
|
||||
<ul class="mt-2 space-y-1 text-sm">
|
||||
@forelse ($workspaceVisit->bill->lineItems as $line)
|
||||
<li class="flex justify-between gap-3">
|
||||
<span>{{ $line->description }}</span>
|
||||
<span class="tabular-nums">{{ number_format($line->total_minor / 100, 2) }}</span>
|
||||
</li>
|
||||
@empty
|
||||
<li class="text-slate-500">No line items yet.</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
<a href="{{ route('care.bills.show', $workspaceVisit->bill) }}" class="mt-3 inline-flex text-sm font-medium text-indigo-600">Open bill</a>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@elseif (! empty($clinicalFields))
|
||||
@include('care.specialty.partials.clinical-form')
|
||||
@elseif ($activeTab === 'orders')
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Orders</h3>
|
||||
<p class="mt-2 text-sm text-slate-500">Order lab / imaging from the consultation flow. Specialty order sets can extend this later.</p>
|
||||
<div class="mt-3 flex flex-wrap gap-3">
|
||||
<a href="{{ route('care.lab.requests.index') }}" class="text-sm font-medium text-indigo-600">Lab requests</a>
|
||||
@if ($workspaceVisit->appointment)
|
||||
<a href="{{ route('care.appointments.show', $workspaceVisit->appointment) }}" class="text-sm font-medium text-indigo-600">Appointment</a>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
@elseif ($activeTab === 'documents')
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Documents</h3>
|
||||
<p class="mt-1 text-xs text-slate-500">Specialty documents attach to the patient chart for this episode.</p>
|
||||
|
||||
<form method="POST" action="{{ route('care.specialty.documents.upload', ['module' => $moduleKey, 'visit' => $workspaceVisit]) }}" enctype="multipart/form-data" class="mt-4 space-y-3">
|
||||
@csrf
|
||||
<input type="file" name="attachment" required accept=".pdf,.jpg,.jpeg,.png,.webp" class="block w-full text-sm">
|
||||
<button type="submit" class="btn-primary">Upload document</button>
|
||||
</form>
|
||||
|
||||
<ul class="mt-4 space-y-2 text-sm">
|
||||
@forelse ($visitDocuments ?? [] as $doc)
|
||||
<li class="flex items-center justify-between gap-3 rounded-xl border border-slate-100 bg-slate-50 px-3 py-2">
|
||||
<div class="min-w-0">
|
||||
<p class="truncate font-medium text-slate-800">{{ $doc->original_name }}</p>
|
||||
<p class="text-xs text-slate-500">{{ $doc->document_type }} · {{ $doc->created_at?->format('d M Y H:i') }}</p>
|
||||
</div>
|
||||
@if ($doc->file_path)
|
||||
<a href="{{ \Illuminate\Support\Facades\Storage::disk('public')->url($doc->file_path) }}" target="_blank" class="shrink-0 text-xs font-medium text-sky-600">Open</a>
|
||||
@endif
|
||||
</li>
|
||||
@empty
|
||||
<li class="text-slate-500">No documents yet.</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
|
||||
@if ($workspaceVisit->patient)
|
||||
<a href="{{ route('care.patients.show', $workspaceVisit->patient) }}" class="mt-3 inline-flex text-sm font-medium text-indigo-600">Patient chart</a>
|
||||
@endif
|
||||
</section>
|
||||
@else
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Overview</h3>
|
||||
<dl class="mt-3 grid gap-3 text-sm sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-slate-500">Visit status</dt>
|
||||
<dd class="font-medium text-slate-900">{{ ucfirst(str_replace('_', ' ', $workspaceVisit->status)) }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Checked in</dt>
|
||||
<dd class="font-medium text-slate-900">{{ $workspaceVisit->checked_in_at?->format('d M Y H:i') ?? '—' }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Department</dt>
|
||||
<dd class="font-medium text-slate-900">{{ $workspaceVisit->appointment?->department?->name ?? '—' }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Queue</dt>
|
||||
<dd class="font-medium text-slate-900">
|
||||
{{ $workspaceVisit->appointment?->queue_ticket_number ?? '—' }}
|
||||
@if ($workspaceVisit->appointment?->queue_ticket_status)
|
||||
<span class="text-slate-500">({{ $workspaceVisit->appointment->queue_ticket_status }})</span>
|
||||
@endif
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
@if (! empty($clinicalAlerts))
|
||||
<div class="mt-4 space-y-1.5 border-t border-slate-100 pt-4">
|
||||
<p class="text-xs font-semibold uppercase tracking-wide text-slate-500">Clinical alerts</p>
|
||||
@foreach ($clinicalAlerts as $alert)
|
||||
<p class="text-sm {{ ($alert['severity'] ?? '') === 'critical' ? 'text-rose-700' : 'text-amber-800' }}">
|
||||
{{ $alert['message'] ?? '' }}
|
||||
</p>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="lg:col-span-2">
|
||||
<div class="space-y-4">
|
||||
@if ($activeTab === 'timeline')
|
||||
@include('care.partials.patient-timeline', ['events' => $timeline ?? []])
|
||||
</div>
|
||||
@elseif ($activeTab === 'billing')
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Add specialty service</h3>
|
||||
<form method="POST" action="{{ route('care.specialty.services.add', ['module' => $moduleKey, 'visit' => $workspaceVisit]) }}" class="mt-3 space-y-3">
|
||||
@csrf
|
||||
<select name="service_code" required class="w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
|
||||
<option value="">Select service…</option>
|
||||
@foreach ($services as $service)
|
||||
<option value="{{ $service['code'] }}">
|
||||
{{ $service['label'] }} — {{ $currency ?? 'GHS' }} {{ number_format(((int) $service['amount_minor']) / 100, 2) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<button type="submit" class="btn-primary">{{ $actions['invoice'] ?? 'Add to invoice' }}</button>
|
||||
</form>
|
||||
|
||||
@if ($workspaceVisit->bill)
|
||||
<div class="mt-6 border-t border-slate-100 pt-4">
|
||||
<p class="text-xs font-semibold uppercase tracking-wide text-slate-500">Current invoice {{ $workspaceVisit->bill->invoice_number }}</p>
|
||||
<ul class="mt-2 space-y-1 text-sm">
|
||||
@forelse ($workspaceVisit->bill->lineItems as $line)
|
||||
<li class="flex justify-between gap-3">
|
||||
<span>{{ $line->description }}</span>
|
||||
<span class="tabular-nums">{{ number_format($line->total_minor / 100, 2) }}</span>
|
||||
</li>
|
||||
@empty
|
||||
<li class="text-slate-500">No line items yet.</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
<a href="{{ route('care.bills.show', $workspaceVisit->bill) }}" class="mt-3 inline-flex text-sm font-medium text-indigo-600">Open bill</a>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@elseif (! empty($clinicalFields))
|
||||
@include('care.specialty.partials.clinical-form')
|
||||
@elseif ($activeTab === 'orders')
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Orders</h3>
|
||||
<p class="mt-2 text-sm text-slate-500">Order lab / imaging from the consultation flow. Specialty order sets can extend this later.</p>
|
||||
<div class="mt-3 flex flex-wrap gap-3">
|
||||
<a href="{{ route('care.lab.requests.index') }}" class="text-sm font-medium text-indigo-600">Lab requests</a>
|
||||
@if ($workspaceVisit->appointment)
|
||||
<a href="{{ route('care.appointments.show', $workspaceVisit->appointment) }}" class="text-sm font-medium text-indigo-600">Appointment</a>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
@elseif ($activeTab === 'documents')
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Documents</h3>
|
||||
<p class="mt-1 text-xs text-slate-500">Specialty documents attach to the patient chart for this episode.</p>
|
||||
|
||||
<form method="POST" action="{{ route('care.specialty.documents.upload', ['module' => $moduleKey, 'visit' => $workspaceVisit]) }}" enctype="multipart/form-data" class="mt-4 space-y-3">
|
||||
@csrf
|
||||
<input type="file" name="attachment" required accept=".pdf,.jpg,.jpeg,.png,.webp" class="block w-full text-sm">
|
||||
<button type="submit" class="btn-primary">Upload document</button>
|
||||
</form>
|
||||
|
||||
<ul class="mt-4 space-y-2 text-sm">
|
||||
@forelse ($visitDocuments ?? [] as $doc)
|
||||
<li class="flex items-center justify-between gap-3 rounded-xl border border-slate-100 bg-slate-50 px-3 py-2">
|
||||
<div class="min-w-0">
|
||||
<p class="truncate font-medium text-slate-800">{{ $doc->original_name }}</p>
|
||||
<p class="text-xs text-slate-500">{{ $doc->document_type }} · {{ $doc->created_at?->format('d M Y H:i') }}</p>
|
||||
</div>
|
||||
@if ($doc->file_path)
|
||||
<a href="{{ \Illuminate\Support\Facades\Storage::disk('public')->url($doc->file_path) }}" target="_blank" class="shrink-0 text-xs font-medium text-sky-600">Open</a>
|
||||
@endif
|
||||
</li>
|
||||
@empty
|
||||
<li class="text-slate-500">No documents yet.</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
|
||||
@if ($workspaceVisit->patient)
|
||||
<a href="{{ route('care.patients.show', $workspaceVisit->patient) }}" class="mt-3 inline-flex text-sm font-medium text-indigo-600">Patient chart</a>
|
||||
@endif
|
||||
</section>
|
||||
@else
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<h3 class="text-sm font-semibold text-slate-900">Overview</h3>
|
||||
<dl class="mt-3 grid gap-3 text-sm sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-slate-500">Visit status</dt>
|
||||
<dd class="font-medium text-slate-900">{{ ucfirst(str_replace('_', ' ', $workspaceVisit->status)) }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Checked in</dt>
|
||||
<dd class="font-medium text-slate-900">{{ $workspaceVisit->checked_in_at?->format('d M Y H:i') ?? '—' }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Department</dt>
|
||||
<dd class="font-medium text-slate-900">{{ $workspaceVisit->appointment?->department?->name ?? '—' }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Queue</dt>
|
||||
<dd class="font-medium text-slate-900">
|
||||
{{ $workspaceVisit->appointment?->queue_ticket_number ?? '—' }}
|
||||
@if ($workspaceVisit->appointment?->queue_ticket_status)
|
||||
<span class="text-slate-500">({{ $workspaceVisit->appointment->queue_ticket_status }})</span>
|
||||
@endif
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
@if (! empty($clinicalAlerts))
|
||||
<div class="mt-4 space-y-1.5 border-t border-slate-100 pt-4">
|
||||
<p class="text-xs font-semibold uppercase tracking-wide text-slate-500">Clinical alerts</p>
|
||||
@foreach ($clinicalAlerts as $alert)
|
||||
<p class="text-sm {{ ($alert['severity'] ?? '') === 'critical' ? 'text-rose-700' : 'text-amber-800' }}">
|
||||
{{ $alert['message'] ?? '' }}
|
||||
</p>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user