Files
ladill-care/resources/views/care/specialty/radiology/workspace-verification.blade.php
T
isaaccladandCursor 8e23cdeae3
Deploy Ladill Care / deploy (push) Successful in 49s
Add full Radiology, Cardiology, and Psychiatry specialty clinical suites.
Mirror the Ophthalmology/Maternity shell pattern with stages, stage_tabs,
workspace clinical records, reports/print, demo seeds, and suite tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 18:41:55 +00:00

71 lines
3.9 KiB
PHP

@php
$record = $radiologyVerification;
$payload = $record?->payload ?? [];
$canManage = $canManageClinical ?? $canConsult ?? false;
@endphp
<section class="rounded-2xl border border-slate-200 bg-white p-5">
<div class="flex flex-wrap items-start justify-between gap-3">
<div>
<h3 class="text-sm font-semibold text-slate-900">Verification</h3>
<p class="mt-0.5 text-xs text-slate-500">Final / verified reports can close the imaging episode.</p>
</div>
<a href="{{ route('care.specialty.radiology.print', $workspaceVisit) }}" target="_blank" class="text-sm font-medium text-indigo-600">Print summary</a>
</div>
@if ($canManage)
<form method="POST" action="{{ route('care.specialty.radiology.verification', $workspaceVisit) }}" class="mt-4 space-y-4">
@csrf
<input type="hidden" name="tab" value="verification">
<div class="grid gap-3 sm:grid-cols-2">
@foreach ($clinicalFields ?? [] as $field)
@php
$name = $field['name'];
$value = old('payload.'.$name, $payload[$name] ?? '');
$type = $field['type'] ?? 'text';
@endphp
<div @class(['sm:col-span-2' => in_array($type, ['textarea'], true)])>
<label class="block text-xs font-medium text-slate-600">
{{ $field['label'] }}
@if (! empty($field['required'])) <span class="text-rose-600">*</span> @endif
</label>
@if ($type === 'textarea')
<textarea name="payload[{{ $name }}]" rows="{{ $field['rows'] ?? 3 }}" @required(! empty($field['required']))
class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">{{ $value }}</textarea>
@elseif ($type === 'select')
<select name="payload[{{ $name }}]" @required(! empty($field['required']))
class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
<option value="">Select…</option>
@foreach ($field['options'] ?? [] as $option)
<option value="{{ $option }}" @selected((string) $value === (string) $option)>{{ $option }}</option>
@endforeach
</select>
@elseif ($type === 'boolean')
<label class="mt-2 inline-flex items-center gap-2 text-sm text-slate-700">
<input type="checkbox" name="payload[{{ $name }}]" value="1" @checked(old('payload.'.$name, ! empty($payload[$name])))>
Yes
</label>
@else
<input type="{{ $type === 'number' ? 'number' : 'text' }}" name="payload[{{ $name }}]" value="{{ $value }}"
@required(! empty($field['required']))
class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
@endif
</div>
@endforeach
</div>
<button type="submit" class="btn-primary">Save verification</button>
</form>
@elseif ($record)
<dl class="mt-4 grid gap-3 text-sm sm:grid-cols-2">
@foreach ($clinicalFields ?? [] as $field)
<div>
<dt class="text-slate-500">{{ $field['label'] }}</dt>
<dd class="font-medium text-slate-900">{{ $payload[$field['name']] ?? '—' }}</dd>
</div>
@endforeach
</dl>
@else
<p class="mt-4 text-sm text-slate-500">No verification recorded yet.</p>
@endif
</section>