@php $age = ''; if (isset($user)) { $get_age = Util::age($user->birth_date); $year = $get_age['year']; $month = $get_age['month']; $day = $get_age['day']; $age = $year . ' Year, ' . $month . ' Month, ' . $day . ' Day'; } $user_id = isset($user) ? $user->id : ''; $mcu_note = isset($employee_mcu) ? $employee_mcu->note : ''; $redirect_url = $update_profile == 1 ? route('employee.detail', ['id' => encrypt($user->id)]) : null; $mcu_number = isset($employee_mcu) && $employee_mcu->mcu_number != null ? $employee_mcu->mcu_number : $generate_code_mcu; $grid_column = !empty($employee_mcu->mcu_result) && $employee_mcu->mcu_result == 'Fit' ? 'is-12' : 'is-6'; // hitung umur $dob = new DateTime($user->birth_date); $now = new DateTime(); $umur = $now->diff($dob)->y; // ambil selisih tahun $sqlMcu = $user->employeeMcu ?? null; @endphp @push("styles") @endpush

@lang('app.medical_checkup')

@php $nomor = 1; $mcuFiles = collect(optional($user->employeeMcu)->fileMcu ?? []) ->sortByDesc('created_at') ->unique('document_name') ->values(); @endphp @foreach ($mcuFiles as $item) @include('components.util.show-file', [ 'file' => $item->document_hash_name, 'file_name' => $item->document_name, 'employee_name' => $user->name, 'note_mcu' => $item->note_mcu, 'valid_until' => $item->valid_until, 'approved' => $item->approved, 'nomor' => $nomor, "file_id" => $item->id ?? null, 'sub_folder' => 'mcu-document', 'size' => 'small', 'statusMcu' => $statusMcu ?? null, 'created_at' => date('d F Y', strtotime($item->created_at)) ]) @break @php $nomor++; @endphp @endforeach
Framingham Risk Score (FRS)
@php $total_cholesterol = $sqlMcu->cholesterol_value ?? ''; // ganti koma jadi titik $total_cholesterol = str_replace(',', '.', $total_cholesterol); // ubah ke float $kadar_cholesterol = (float) $total_cholesterol; // buang .00 kalau desimalnya nol if (fmod($kadar_cholesterol, 1) == 0) { $cholesterol = (int) $kadar_cholesterol; // 534 } else { $cholesterol = $kadar_cholesterol; // 534.25 } @endphp
@php $total_hdl = $sqlMcu->hdl_value ?? ''; // ganti koma jadi titik $total_hdl = str_replace(',', '.', $total_hdl); // ubah ke float $kadar_hdl = (float) $total_hdl; // buang .00 kalau desimalnya nol if (fmod($kadar_hdl, 1) == 0) { $hdl = (int) $kadar_hdl; // 534 } else { $hdl = $kadar_hdl; // 534.25 } @endphp
@php $total_systolic = $sqlMcu->systolic_value ?? ''; // ganti koma jadi titik $total_systolic = str_replace(',', '.', $total_systolic); // ubah ke float $kadar_systolic = (float) $total_systolic; // buang .00 kalau desimalnya nol if (fmod($kadar_systolic, 1) == 0) { $systolic = (int) $kadar_systolic; // 534 } else { $systolic = $kadar_systolic; // 534.25 } @endphp

@php $valueMcuResult = [ 'Fit', 'Fit With Note', 'Fit With Recommendation', 'Currently Unfit', 'Unfit', ]; @endphp
@include('components.button.card-button-next-prev', [ 'prev' => $update_profile === 1 ? false : true, 'next' => $update_profile === 1 ? false : true, 'save' => $update_profile === 1 ? true : false, 'id' => 'medical_checkup', ])

Medical History

@php $nomorTwo = 1; $mcuFiles = collect(optional($user->employeeMcu)->fileMcu ?? []) ->sortByDesc('created_at') ->unique('document_name') ->values(); @endphp

Document Mcu

@foreach ($mcuFiles as $item) @if($nomorTwo != 1) @include('components.util.show-file-three', [ 'file' => $item->document_hash_name, 'file_name' => $item->document_name, 'employee_name' => $user->name, 'note_mcu' => $item->note_mcu, 'valid_until' => $item->valid_until, 'approved' => $item->approved, 'nomor' => $nomorTwo, "file_id" => $item->id ?? null, 'sub_folder' => 'mcu-document', 'size' => 'small', 'created_at' => date('d F Y', strtotime($item->created_at)) ]) @endif @php $nomorTwo++; @endphp @endforeach
@forelse($mcu_history ?? collect() as $mcuData)

{{ $mcuData->mcu_number }}

{{ $mcuData->mcu_date ? \Carbon\Carbon::parse($mcuData->mcu_date)->format('d M Y') : '—' }} @php $cls = "is-info"; $res = $mcuData->mcu_result; switch($res){ case "Fit": case "Fit With Note": case "Fit With Recommendation": default: $cls= "is-info"; break; case "Currently Unfit": case "Unfit": $cls = "is-danger"; break; } @endphp {{ $mcuData->mcu_result }}
Total Cholesterol: {{ $mcuData->cholesterol_value ?? '-' }} mg/dL
HDL Cholesterol: {{ $mcuData->hdl_value ?? '-' }} mg/dL
Systolic BP: {{ $mcuData->systolic_value ?? '-' }} mmHg
Hypertensive: {{ $mcuData->hypertensive ?? '-' }}
Smoking Habit: {{ $mcuData->smoking_habit ?? '-' }}
Diabetes: {{ $mcuData->diabetes ?? '-' }}
FRS: {{ $mcuData->framingham_risk_score ?? '-' }}
{!! $mcuData->note !!}
@empty @if($nomorTwo == 1)

No MCU history available.

@endif @endforelse
@include('components.modal.modal-alert-save', [ 'id' => 'modal-alert-save-mcu', 'title' => __('app.alert_save_title'), 'subtitle' => 'Please ensure that the data you have entered is accurate and valid?', 'btn_submit' => 'btn_submit_mcu', ]) @include('components.modal.modal-alert-mcu-approval',[ 'id' => 'modal-alert-save-mcu', 'btn_submit' => 'btn_submit_mcu_approval', 'UrluserSegment' => $UrluserSegment ?? 'javascript:history.back()' ]) @push('scripts') @endpush