@extends('Admin.layout') @section('content') {{-- Header --}}
Details
{{-- Patient identity strip --}}
{{ strtoupper(substr($patient->patient_name, 0, 1)) }}
{{ $patient->patient_name }}
Patient ID · {{ $patient->sheet_no }}
{{-- Step navigation --}}
{{-- Form panel --}}
Allergy History
{{-- Allergy history record — collapsible accordion --}} @php $allergyYesCount = $allergyHistoryRecord->where('allergy', 'yes')->count(); @endphp
@forelse($allergyHistoryRecord as $entry) @if($entry->allergy == 'yes')
{{ $entry->created_at->format('d M Y') }} {{ $entry->created_at->format('h:i A') }}
{{ $entry->allergyType->allergy_name ?? 'N/A' }}

{{ $entry->allergy_details ?: 'No allergy details recorded.' }}

@endif @empty
No allergy history found.
@endforelse @if($allergyHistoryRecord->count() && $allergyYesCount === 0)
No allergy history found.
@endif
@csrf
@php $conditions = ['Allergy']; @endphp @foreach($conditions as $i => $condition)
{{ $condition }}
Yes
No
@endforeach
{{-- Sticky bottom action bar --}}
@endsection