@php $i = 1; $UserId = Session::get('UserId'); @endphp @foreach($data as $result) @php $isVaccination = ((int) ($result->queue_is_vaccination ?? 0) === 1) || ((int) ($result->patient_is_vaccination ?? 0) === 1) || (($result->queue_patient_category ?? '') === 'vaccination') || (($result->queue_type ?? '') === 'vaccine') || (isset($result->PatientType) && stripos((string) $result->PatientType, 'Vaccination') !== false) || (isset($result->patient_type_label) && stripos((string) $result->patient_type_label, 'vaccination') !== false); $categoryLabel = ! empty($result->queue_patient_category) ? ucfirst((string) $result->queue_patient_category) : '—'; if ($isVaccination) { $bgcolor = '#ffc0cb'; } else { $bgcolor = $result->Dilated ? 'rgb(133 198 205)' : ($result->Appointment ? '#e3e337' : ''); } $inTimeFormatted = $result->InTime ? \Carbon\Carbon::parse($result->InTime)->format('h:i a') : ''; if ((int) ($result->Checked ?? 0) === 1) { $queueStatusLabel = 'Completed / Out'; } elseif ((int) ($result->chkstatus ?? 0) === 1) { $queueStatusLabel = 'Seen'; } else { $queueStatusLabel = $inTimeFormatted !== '' ? 'Waiting (since ' . $inTimeFormatted . ')' : 'Waiting'; } $OpdTypeName = ($result->OpdType ?? null) == 1 ? 'OPD' : 'App'; $PayMode = ($result->PayMode ?? '') === 'Mobile Payment' ? 'Online' : ($result->PayMode ?? ''); $queueType = $result->queue_type ?? null; $queueLaneClass = ''; $queueLaneLabel = '—'; if ($queueType === 'vaccine') { $queueLaneClass = 'queue-lane-vaccine'; $queueLaneLabel = 'Vaccine'; } elseif ($queueType === 'investigation') { $queueLaneClass = 'queue-lane-investigation'; $queueLaneLabel = 'Investigation'; } elseif ($queueType === 'doctor') { $queueLaneClass = 'queue-lane-doctor'; $queueLaneLabel = 'Doctor'; } $patVacc = isset($result->patient_is_vaccination) ? (int) $result->patient_is_vaccination : null; $patNf = isset($result->patient_is_nf) ? (int) $result->patient_is_nf : null; $doctorDisplay = trim((string) ($result->ConsultantName ?? '')); if ($doctorDisplay === '') { $doctorDisplay = trim((string) ($result->ConsultName ?? '')); } @endphp @endforeach
Action Sr.No MRD No Patient Name Age Gender Patient category Doctor Queue Status In Time Visit Type Amount User Investigation Vaccination (visit) Queue lane Patient vacc. NF Sort Time
@if($UserId == 58)    @endif       {{ $i++ }} {{ $result->MrdNo }} {{ strtoupper(strtolower($result->PatientName)) }} {{ $result->Age }} {{ $result->Gender }} {{ $categoryLabel }} {{ $doctorDisplay }} {{ $queueStatusLabel }} {{ $inTimeFormatted }} {{ $result->PatientType }} - ({{ $OpdTypeName }}) @if($UserId == 58) {{ $result->Amount }} @if($PayMode !== '') - ({{ $PayMode }}) @endif @else {{ $result->Amount }} @if($PayMode !== '') - ({{ $PayMode }}) @endif @endif {{ strtoupper(strtolower($result->CreatedByName ?? '')) }} {{ strtoupper(strtolower($result->InvStName ?? '')) }} {{ $isVaccination ? 'Yes' : 'No' }} {{ $queueLaneLabel }} {{ $patVacc === null ? '—' : ($patVacc ? 'Yes' : 'No') }} {{ $patNf === null ? '—' : ($patNf ? 'Yes' : 'No') }} {{ $result->InTime }}