@php $statuses = \App\Modules\Patients\Enums\ClinicalRecordStatus::class; /* | The severity enum reports a Bootstrap contextual name, because that is | what it was written against. Mapped here rather than changed there: the | same enum labels a badge on the day list and in the appointment banner, | and this screen's design language is not a reason to move it. */ $pill = fn (string $tone): string => match ($tone) { 'warning' => 'px-pill--amber', 'danger' => 'px-pill--red', default => 'px-pill--grey', }; @endphp {{-- Allergies ------------------------------------------------------------ --}} @can('manageClinical', $patient) @endcan @can('manageClinical', $patient)
{{-- Several allergies at once: they are taken in one conversation, not one per visit to this panel. --}}
@csrf
@endcan @forelse ($allergies as $allergy)
{{ $allergy->allergen }} {{ $allergy->severity->label() }} {{ $allergy->category->label() }} @if ($allergy->status !== $statuses::Active) {{ $allergy->status->label() }} @endif @if ($allergy->reaction)
{{ $allergy->reaction }}
@endif @if ($allergy->status_reason)
{{ $allergy->status_reason }}
@endif
{{ __('patients::messages.clinical.recorded_by') }}: {{ $allergy->recordedBy?->name ?? '—' }} · {{ $allergy->created_at->format('Y-m-d') }}
@include('patients::partials.clinical-entry-actions', [ 'type' => 'allergy', 'entry' => $allergy, 'resolveLabel' => __('patients::messages.clinical.mark_resolved'), ])
@empty

{{ __('patients::messages.clinical.no_allergies') }}

{{ __('patients::messages.clinical.no_allergies_text') }}

@endforelse