Files
ladill-care/resources/views/care/lab/requests/show.blade.php
T
isaaccladandCursor 6c9c742ed8
Deploy Ladill Care / deploy (push) Failing after 13s
Initial Ladill Care release.
Healthcare management app: patients, appointments, consultations, lab,
pharmacy inventory, billing, and reports at care.ladill.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 11:36:22 +00:00

73 lines
5.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<x-app-layout :title="$investigation->investigationType->name">
<div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
<div>
<p class="text-xs font-medium uppercase text-slate-500">{{ $statuses[$investigation->status] ?? $investigation->status }}</p>
<h1 class="text-2xl font-semibold text-slate-900">{{ $investigation->investigationType->name }}</h1>
<p class="mt-1 text-sm text-slate-500">{{ $investigation->patient->fullName() }} · {{ $investigation->patient->patient_number }}</p>
</div>
<div class="flex flex-wrap gap-2">
@if ($canManage && $investigation->status === \App\Models\InvestigationRequest::STATUS_PENDING)
<form method="POST" action="{{ route('care.lab.requests.collect-sample', $investigation) }}">@csrf<button class="btn-primary">Collect sample</button></form>
@endif
@if ($canManage && $investigation->status === \App\Models\InvestigationRequest::STATUS_SAMPLE_COLLECTED)
<form method="POST" action="{{ route('care.lab.requests.start', $investigation) }}">@csrf<button class="btn-primary">Start processing</button></form>
@endif
@if ($canManage && $investigation->status === \App\Models\InvestigationRequest::STATUS_AWAITING_REVIEW)
<form method="POST" action="{{ route('care.lab.requests.approve', $investigation) }}">@csrf<button class="btn-primary">Approve results</button></form>
@endif
@if ($canManage && $investigation->status === \App\Models\InvestigationRequest::STATUS_COMPLETED)
<form method="POST" action="{{ route('care.lab.requests.deliver', $investigation) }}">@csrf<button class="btn-primary">Deliver to record</button></form>
@endif
</div>
</div>
<div class="mt-6 grid gap-6 lg:grid-cols-2">
<section class="rounded-2xl border border-slate-200 bg-white p-6 text-sm">
<h2 class="font-semibold uppercase text-xs text-slate-500">Request details</h2>
<dl class="mt-4 space-y-2">
<div><dt class="text-slate-500">Priority</dt><dd class="font-medium capitalize">{{ $investigation->priority }}</dd></div>
<div><dt class="text-slate-500">Sample barcode</dt><dd class="font-medium font-mono">{{ $investigation->sample_barcode ?? '—' }}</dd></div>
<div><dt class="text-slate-500">Clinical notes</dt><dd class="font-medium">{{ $investigation->clinical_notes ?? '—' }}</dd></div>
</dl>
</section>
@if ($canManage && in_array($investigation->status, [\App\Models\InvestigationRequest::STATUS_IN_PROGRESS, \App\Models\InvestigationRequest::STATUS_AWAITING_REVIEW], true))
<section class="rounded-2xl border border-slate-200 bg-white p-6">
<h2 class="text-sm font-semibold uppercase text-slate-500">Enter results</h2>
<form method="POST" action="{{ route('care.lab.requests.results', $investigation) }}" enctype="multipart/form-data" class="mt-4 space-y-4">
@csrf
<div>
<label class="block text-sm text-slate-700">Value</label>
<input type="text" name="value" class="mt-1 w-full rounded-lg border-slate-300 text-sm" placeholder="e.g. 5.2">
<p class="mt-1 text-xs text-slate-400">Ref: {{ $investigation->investigationType->reference_text ?? ($investigation->investigationType->reference_low.''.$investigation->investigationType->reference_high) }} {{ $investigation->investigationType->unit }}</p>
</div>
<div>
<label class="block text-sm text-slate-700">Summary</label>
<textarea name="result_summary" rows="2" class="mt-1 w-full rounded-lg border-slate-300 text-sm"></textarea>
</div>
<div>
<label class="block text-sm text-slate-700">Interpretation</label>
<textarea name="interpretation" rows="2" class="mt-1 w-full rounded-lg border-slate-300 text-sm"></textarea>
</div>
<input type="file" name="attachments[]" multiple class="text-sm">
<button type="submit" class="btn-primary">Save results</button>
</form>
</section>
@endif
@if ($investigation->result && ($canViewResults || $canManage))
<section class="rounded-2xl border border-slate-200 bg-white p-6 lg:col-span-2">
<h2 class="text-sm font-semibold uppercase text-slate-500">Results @if ($investigation->result->is_abnormal)<span class="text-red-600">· Abnormal</span>@endif</h2>
@foreach ($investigation->result->values as $val)
<p class="mt-3 text-sm">
<span class="font-medium {{ $val->is_abnormal ? 'text-red-600' : '' }}">{{ $val->parameter }}: {{ $val->value }} {{ $val->unit }}</span>
@if ($val->reference_text || $val->reference_low) <span class="text-slate-400">(ref: {{ $val->reference_text ?? $val->reference_low.''.$val->reference_high }})</span> @endif
</p>
@endforeach
@if ($investigation->result->result_summary)<p class="mt-3 text-sm">{{ $investigation->result->result_summary }}</p>@endif
@if ($investigation->result->interpretation)<p class="mt-2 text-sm text-slate-600">{{ $investigation->result->interpretation }}</p>@endif
</section>
@endif
</div>
</x-app-layout>