@extends('layouts.app') @section('title', 'Worklist Pemeriksaan Fisik - MCU Klinik Mustika') @section('breadcrumb')
Antrian Menunggu
Sedang Diproses
Menunggu Verifikasi
Total Hari Ini
| No. | No. Registrasi & MR | @include('partials.tables.sort_link', ['column' => 'name', 'label' => 'Nama Pasien']) | @include('partials.tables.sort_link', ['column' => 'gender', 'label' => 'Jenis Kelamin']) | Umur | @include('partials.tables.sort_link', ['column' => 'appointment_date', 'label' => 'Tanggal MCU']) | Status | Pemeriksa | Waktu Diarahkan | MCU Ke | Aksi |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $pendingAppointments->firstItem() + $loop->index }} |
{{ $appointment->registration_number ?? '-' }}
{{ $appointment->patient->medical_record_number ?? '-' }}
|
{{ $appointment->patient->name }}
@php
$companyFromPatient = $appointment->patient && $appointment->patient->company ? $appointment->patient->company : null;
$company = $companyFromPatient ?: $appointment->company ?? null;
@endphp
@if ($company)
{{ $company->name }}
@if ($appointment->patient->job_position)
{{ $appointment->patient->job_position }}
@endif
@else
Individu
@endif
|
{{ $appointment->patient->gender == 'male' ? 'Laki-laki' : 'Perempuan' }} | {{ $appointment->patient->detailed_age ?: '-' }} | {{ $appointment->appointment_date ? $appointment->appointment_date->format('d/m/Y') : '-' }} | @php $physicalExamItem = $appointment->appointmentMcuItems ->where('mcuItem.department', 'physical_exam') ->whereIn('status', ['menunggu', 'antrian', 'sedang_diproses', 'menunggu_verifikasi']) ->first(); @endphp @if ($physicalExamItem) @if ($physicalExamItem->status === 'menunggu') Menunggu Pemeriksaan @elseif ($physicalExamItem->status === 'antrian') Siap Diperiksa @elseif ($physicalExamItem->status === 'sedang_diproses') @php $physicalExamResult = $appointment->physicalExamResult; @endphp @if ($physicalExamResult && $physicalExamResult->cancelled_at && $physicalExamResult->status !== 'rejected') Verifikasi Dibatalkan @elseif ($physicalExamResult && $physicalExamResult->status === 'rejected') Ditolak - Perlu Perbaikan @else Sedang Diproses @endif @elseif ($physicalExamItem->status === 'menunggu_verifikasi') @php $physicalExamResult = $appointment->physicalExamResult; @endphp @if ($physicalExamResult && $physicalExamResult->cancelled_at && $physicalExamResult->status !== 'rejected') Verifikasi Dibatalkan @elseif ($physicalExamResult && $physicalExamResult->status === 'rejected') Ditolak - Perlu Perbaikan @else Menunggu Verifikasi @endif @endif @elseif (!$physicalExamItem && $hasCancelledOrRejected) @php $physicalExamResult = $appointment->physicalExamResult; @endphp @if ($physicalExamResult && $physicalExamResult->cancelled_at && $physicalExamResult->status !== 'rejected') Verifikasi Dibatalkan @elseif ($physicalExamResult && $physicalExamResult->status === 'rejected') Ditolak - Perlu Perbaikan @endif @endif | {{ $appointment->physicalExamResult->examiner->name ?? '-' }} |
@php
$assignedTime =
$physicalExamItem && $physicalExamItem->assigned_at ? $physicalExamItem->assigned_at->format('d/m/Y H:i') : '';
$assignedBy = $physicalExamItem && $physicalExamItem->assignedBy ? $physicalExamItem->assignedBy->name : '';
@endphp
@if ($assignedTime)
{{ $assignedTime }}
@if ($assignedBy)
oleh: {{ $assignedBy }}
@endif
@else
-
@endif
|
@php
$mcuOrder = $appointment->patient->appointments
->filter(function ($apt) use ($appointment) {
return $apt->status !== 'cancelled' &&
($apt->appointment_date < $appointment->appointment_date ||
($apt->appointment_date->eq($appointment->appointment_date) && $apt->id <= $appointment->id));
})
->count();
$previousMcu = $appointment->patient->appointments
->filter(function ($apt) use ($appointment) {
return $apt->status !== 'cancelled' &&
($apt->appointment_date < $appointment->appointment_date ||
($apt->appointment_date->eq($appointment->appointment_date) && $apt->id < $appointment->id));
})
->sortByDesc('appointment_date')
->first();
@endphp
MCU ke-{{ $mcuOrder }}
@if ($previousMcu)
MCU Terakhir: {{ \App\Helpers\DateHelper::formatFull($previousMcu->appointment_date) }}
@else
Pertama kali
@endif
|
@if ($physicalExamItem && in_array($physicalExamItem->status, ['menunggu', 'antrian', 'sedang_diproses']))
@php
$physicalExamResult = $appointment->physicalExamResult;
@endphp
@if ($physicalExamResult && $physicalExamResult->cancelled_at && $physicalExamResult->status !== 'rejected')
@elseif ($physicalExamResult && $physicalExamResult->status === 'rejected')
@else
@canRoute ('physical_exam.process')
monitor_heart
@if ($physicalExamItem->status === 'sedang_diproses')
Lanjutkan
@else
Proses
@endif
@endcanRoute
@endif
@elseif ($physicalExamItem && $physicalExamItem->status === 'menunggu_verifikasi')
@php
$physicalExamResult = $appointment->physicalExamResult;
@endphp
@if ($physicalExamResult)
@canRoute ('physical_exam.edit')
@endcanRoute
@if ($physicalExamResult->cancelled_at)
Verifikasi Dibatalkan
@elseif ($physicalExamResult->status === 'rejected')
Ditolak - Perlu Perbaikan
@else
Menunggu Dokter
@endif
@else
Menunggu Dokter
@endif
@elseif (!$physicalExamItem && $hasCancelledOrRejected)
@php
$physicalExamResult = $appointment->physicalExamResult;
@endphp
@else
@canRoute ('appointments.assign-workstation')
@endcanRoute
@endif
|
| Tidak ada data yang cocok dengan pencarian. | ||||||||||