@forelse($pastHistoryRecord as $entry)
@php
$tags = [];
$details = [];
if ($entry->hypertension == 'yes') {
$tags[] = 'Hypertension';
if ($entry->hypertension_details) {
$details[] = $entry->hypertension_details;
}
}
if ($entry->dm == 'yes') {
$tags[] = 'DM';
if ($entry->dm_details) {
$details[] = $entry->dm_details;
}
}
if ($entry->cad == 'yes') {
$tags[] = 'CAD';
if ($entry->cad_details) {
$details[] = $entry->cad_details;
}
}
if ($entry->thyroid == 'yes') {
$tags[] = 'Thyroid';
if ($entry->thyroid_details) {
$details[] = $entry->thyroid_details;
}
}
if ($entry->ckd == 'yes') {
$tags[] = 'CKD';
if ($entry->ckd_details) {
$details[] = $entry->ckd_details;
}
}
if ($entry->cva == 'yes') {
$tags[] = 'CVA';
if ($entry->cva_details) {
$details[] = $entry->cva_details;
}
}
@endphp
{{ $entry->created_at->format('d M Y') }}
{{ $entry->created_at->format('h:i A') }}
@foreach($tags as $tag)
{{ $tag }}
@endforeach
{{ count($details) ? implode(' | ', $details) : 'No additional notes recorded.' }}
@empty
No past history found.
@endforelse