Deploy Ladill Care / deploy (push) Failing after 13s
Healthcare management app: patients, appointments, consultations, lab, pharmacy inventory, billing, and reports at care.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
63 lines
3.4 KiB
PHP
63 lines
3.4 KiB
PHP
<x-app-layout title="Patients">
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div>
|
|
<h1 class="text-xl font-semibold text-slate-900">Patients</h1>
|
|
<p class="mt-1 text-sm text-slate-500">Search and manage patient records</p>
|
|
</div>
|
|
@if (app(\App\Services\Care\CarePermissions::class)->can(auth()->user() ? app(\App\Services\Care\OrganizationResolver::class)->memberFor(auth()->user(), $organization) : null, 'patients.manage'))
|
|
<a href="{{ route('care.patients.create') }}" class="btn-primary">Register patient</a>
|
|
@endif
|
|
</div>
|
|
|
|
<form method="GET" class="mt-4 flex flex-wrap gap-3 rounded-2xl border border-slate-200 bg-white p-4">
|
|
<input type="search" name="q" value="{{ request('q') }}" placeholder="Name, phone, patient ID, national ID…"
|
|
class="min-w-[200px] flex-1 rounded-lg border-slate-300 text-sm">
|
|
<input type="date" name="date_of_birth" value="{{ request('date_of_birth') }}"
|
|
class="rounded-lg border-slate-300 text-sm" title="Date of birth">
|
|
<button type="submit" class="btn-primary">Search</button>
|
|
@if (request()->hasAny(['q', 'date_of_birth', 'phone', 'national_id', 'patient_number']))
|
|
<a href="{{ route('care.patients.index') }}" class="rounded-lg border border-slate-200 px-4 py-2 text-sm text-slate-600">Clear</a>
|
|
@endif
|
|
</form>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="bg-slate-50 text-left text-xs uppercase text-slate-500">
|
|
<tr>
|
|
<th class="px-4 py-3">Patient</th>
|
|
<th class="px-4 py-3">Patient ID</th>
|
|
<th class="px-4 py-3">Phone</th>
|
|
<th class="px-4 py-3">DOB</th>
|
|
<th class="px-4 py-3">Branch</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@forelse ($patients as $patient)
|
|
<tr>
|
|
<td class="px-4 py-3">
|
|
<p class="font-medium text-slate-900">{{ $patient->fullName() }}</p>
|
|
@if ($patient->national_id)
|
|
<p class="text-xs text-slate-500">NID: {{ $patient->national_id }}</p>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 font-mono text-xs">{{ $patient->patient_number }}</td>
|
|
<td class="px-4 py-3">{{ $patient->phone ?? '—' }}</td>
|
|
<td class="px-4 py-3">{{ $patient->date_of_birth?->format('Y-m-d') ?? '—' }}</td>
|
|
<td class="px-4 py-3">{{ $patient->branch?->name ?? '—' }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<a href="{{ route('care.patients.show', $patient) }}" class="text-sky-600 hover:text-sky-700">View</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="px-4 py-8 text-center text-slate-500">No patients found.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mt-4">{{ $patients->links() }}</div>
|
|
</x-app-layout>
|