Edit Lab Report
{!! Form::model($labReport, ['route' => [$routePrefix . 'lab-patient-report.update', $labReport->id], 'method' => 'put', 'enctype' => 'multipart/form-data', 'id' => 'form-lab-report']) !!}
{!! Form::label('patient_id', 'Select Patient *') !!}
{!! Form::select(
'patient_id',
['' => '- Select Patient -'] + $patients->mapWithKeys(function ($patient) {
return [
$patient->id => trim($patient->first_name . ' ' . $patient->last_name)
];
})->toArray(),
$labReport->patient_id ?? null,
['class' => 'form-control select2']
) !!}
{{ $errors->first('patient_id') }}
{!! Form::label('doctor_id', __('Doctor') . ' *') !!}
{!! Form::select('doctor_id', $doctors->pluck('name', 'id')->prepend('- Select Doctor -', ''), $labReport->doctor_id, ['class' => 'form-control select2', 'required']) !!}
{{ $errors->first('doctor_id') }}
{!! Form::label('report_type', __('Report Type') . ' *') !!}
{!! Form::select('report_type', $reportTypesList->prepend('- Select Report Type -', ''), $labReport->report_type, ['class' => 'form-control select2', 'data-required' => 'true']) !!}
{{ $errors->first('report_type') }}
{!! Form::label('report_name', __('Report Name') . ' *') !!}
{!! Form::text('report_name', $labReport->report_name, ['class' => 'form-control', 'placeholder' => 'e.g., Blood Test, X-Ray, ECG', 'required']) !!}
{{ $errors->first('report_name') }}
{!! Form::label('test_date', __('Test Date') . ' *') !!}
{!! Form::text(
'test_date',
$labReport->test_date ? \Carbon\Carbon::parse($labReport->test_date)->format('d-m-Y') : null,
['class' => 'form-control datetimepicker', 'required']
) !!}
{{ $errors->first('test_date') }}
{!! Form::label('report_file', __('Update Report File')) !!}
{!! Form::file('report_file', ['class' => 'form-control', 'accept' => '.pdf,.doc,.docx,.jpg,.jpeg,.png']) !!}
Allowed formats: PDF, DOC, DOCX, JPG, PNG (Max 10 MB)
@if($labReport->report_file)
Current File: {{ basename($labReport->report_file) }}
@endif {{ $errors->first('report_file') }}
{!! Form::label('remarks', __('Remarks')) !!}
{!! Form::textarea('remarks', $labReport->remarks, ['class' => 'form-control', 'rows' => 4, 'placeholder' => 'Add any remarks about the report...']) !!}
{{ $errors->first('remarks') }}
{!! Form::label('status', __('Status')) !!}
{!! Form::select('status', ['1' => 'Active', '0' => 'Inactive'], $labReport->status, ['class' => 'form-control']) !!}
{!! Form::submit(__('Update Report'), ['class' => 'btn btn-primary']) !!}
Cancel
{!! Form::close() !!}