@extends('layouts.app') @section('title', 'Edit Surat Pemeriksaan Narkoba - MCU Klinik Mustika') @section('breadcrumb')

Edit Surat Pemeriksaan Narkoba

@endsection @section('content')
@canRoute ('drug-examination-letters.update')
@csrf @method ('PUT')
Data Pasien
@if ($letter->isManualPatient())
Edit Data Pasien Non-MCU
@include('_partials._manual_patient_fields', [ 'isEditing' => true, 'nameValue' => $letter->name_snapshot, 'birthDateValue' => optional($letter->birth_date_snapshot)->format('Y-m-d'), 'ageValue' => $letter->detailed_age_snapshot ?? ($letter->display_age ?? ''), 'genderValue' => $letter->gender_snapshot, 'birthPlaceValue' => $letter->birth_place_snapshot ?? '', 'jobValue' => $letter->job_position ?? ($letter->job_position_snapshot ?? ''), 'companyValue' => $letter->company_snapshot ?? '', 'addressValue' => $letter->address_snapshot ?? '', 'includeGender' => true, 'includeJob' => true, 'includeCompany' => true, 'includeBirthPlace' => true, 'birthDateErrorField' => 'manual_birth_date', 'referenceDateId' => 'examination_date', 'jobFieldName' => 'job_position_snapshot', 'jobErrorField' => 'job_position_snapshot', 'jobRequired' => true, 'companyFieldName' => 'company_snapshot' ])
@else
Data Pasien Terdaftar
Nama
{{ $letter->name_snapshot }}
NIK
{{ $letter->patient ? $letter->patient->nik : '-' }}
No. MR
{{ $letter->patient ? $letter->patient->medical_record_number : '-' }}
Tempat/Tgl Lahir
@if ($letter->birth_place_snapshot || $letter->birth_date_snapshot) {{ $letter->birth_place_snapshot ?? '' }}{{ $letter->birth_place_snapshot && $letter->birth_date_snapshot ? ', ' : '' }}{{ $letter->birth_date_snapshot ? $letter->birth_date_snapshot->format('d/m/Y') : '' }} @else - @endif
Jenis Kelamin
{{ $letter->gender_snapshot === 'male' ? 'Laki-laki' : ($letter->gender_snapshot === 'female' ? 'Perempuan' : '-') }}
Perusahaan
{{ $letter->company_snapshot ? $letter->company_snapshot : '-' }}
Pekerjaan
{{ $letter->job_position_snapshot ?? '-' }}
Alamat
{{ $letter->address_snapshot ?? '-' }}
Data pasien terdaftar tidak dapat diubah. Data yang ditampilkan adalah snapshot saat surat dibuat.
@endif
Detail Pemeriksaan
@error ('examination_date')
{{ $message }}
@enderror
@error ('company_snapshot')
{{ $message }}
@enderror
Wajib diisi minimal 3 huruf. @error ('job_position_snapshot')
{{ $message }}
@enderror
Pemeriksaan Narkoba
Drag jenis psikotropika ke bawah untuk menambahkannya ke daftar pemeriksaan
Daftar Pemeriksaan (Drag untuk mengubah urutan)

Belum ada jenis psikotropika yang dipilih

@canRoute ('drug-examination-letters.show') Batal @endcanRoute
@endcanRoute
@php $selectedPsychotropicsData = $letter->results ->map(function ($result) { return [ 'type' => $result->psychotropic_type, 'name' => $result->psychotropic_name, 'code' => $result->psychotropic_code, 'result' => $result->result, 'order' => $result->order, ]; }) ->values() ->toArray(); @endphp @endsection