@if (Auth::user()->hasRole('Patient')) @else
{{ Form::label('patient_name', __('messages.case.patient') . ':', ['class' => 'form-label']) }} {{ Form::select('patient_id', $patients, null, ['class' => 'form-select', 'required', 'id' => 'appointmentPatientId', 'placeholder' => __('messages.document.select_patient'), 'data-control' => 'select2']) }}
@endif
{{ Form::label('department_name', __('messages.appointment.doctor_department') . ':', ['class' => 'form-label']) }} {{ Form::select('department_id', $departments, null, ['class' => 'form-select', 'required', 'id' => 'appointmentDepartmentId', 'placeholder' => __('messages.web_appointment.select_department'), 'data-control' => 'select2']) }}
{{ Form::label('doctor_name', __('messages.case.doctor') . ':', ['class' => 'form-label']) }} {{ Form::select('doctor_id', isset($doctors) ? $doctors : [], null, ['class' => 'form-select', 'required', 'id' => 'appointmentDoctorId', 'placeholder' => __('messages.web_home.select_doctor'), 'data-control' => 'select2']) }}
@if (!Auth::user()->hasRole('Patient'))
{{ Form::label('opd_date', __('messages.appointment.date') . ':', ['class' => 'form-label']) }} {{ Form::text('opd_date', isset($appointment) ? $appointment->opd_date->format('Y-m-d') : null, ['id' => 'appointmentOpdDate', 'class' => getLoggedInUser()->thememode ? 'bg-light opdDate form-control' : 'bg-white opdDate form-control', 'required', 'autocomplete' => 'off', 'placeholder' => __('messages.appointment.date')]) }}
{{-- Appointment Charge --}}
{{ Form::label('appointment_charge', __('messages.doctor.appointment_charge') . ':', ['class' => 'form-label']) }} {{ Form::text('appointment_charge', isset($doctorCharge) ? $doctorCharge : null, ['class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => __('messages.doctor.appointment_charge'), 'id' => 'appointmentCharge', 'readonly' => 'readonly']) }}
{{-- Appointment Charge --}} @if (isset($appointment))
{{ Form::label('payment_mode', __('messages.ipd_payments.payment_mode') . ':', ['class' => 'form-label']) }} {{ Form::select('payment_mode', getEditAppointmentPaymentTypes(), $appointment->payment_type ?? null, ['class' => 'form-select select2Selector', 'id' => 'appointmentPaymentModeId', 'placeholder' => __('messages.ipd_payments.payment_mode')]) }}
@else
{{ Form::label('payment_mode', __('messages.ipd_payments.payment_mode') . ':', ['class' => 'form-label']) }} {{ Form::select('payment_mode', getAppointmentPaymentTypes(), null, ['class' => 'form-select select2Selector', 'id' => 'appointmentPaymentModeId', 'placeholder' => __('messages.ipd_payments.payment_mode')]) }}
@endif
{{ Form::label('problem', __('messages.appointment.description') . ':', ['class' => 'form-label']) }} {{ Form::textarea('problem', null, ['class' => 'form-control', 'rows' => '4', 'placeholder' => __('messages.appointment.description')]) }}
{{ Form::label('timeslot', __('messages.appointment.time') . ':', ['class' => 'form-label']) }} {{ Form::text('timeslot', isset($appointment) ? $appointment->opd_date->format('H:i') : null, ['class' => 'form-control', 'id' => 'editTimeSlot', 'disabled' => 'disabled']) }}
{{ Form::label('status', __('messages.common.status') . ':', ['class' => 'form-label']) }}
is_completed == 0 ? '' : 'checked') : 'checked' }}>
@if (count($customField) >= 0) @foreach ($customField as $field) @php $field_values = explode(',', $field['values']); $dateType = $field['field_type'] == 6 ? 'customFieldDate' : 'customFieldDateTime'; $field_type = \App\Models\AddCustomFields::FIELD_TYPE_ARR[$field['field_type']]; $fieldName = 'field' . $field['id']; $fieldData = isset($appointment->custom_field[$fieldName]) ? $appointment->custom_field[$fieldName] : null; @endphp
{{ Form::label($field['field_name'], $field['field_name'] . ':', ['class' => $field['is_required'] == 1 ? 'form-label dynamic-field' : 'form-label']) }} @if ($field['is_required'] == 1) @endif @if ($field_type == 'date' || $field_type == 'date & Time') {{ Form::text($fieldName, $fieldData == 'y-m-d' ? $fieldData : null, ['id' => $dateType, 'class' => getLoggedInUser()->thememode || $field['is_required'] == 1 ? 'bg-light form-control dynamic-field' : 'bg-white form-control', 'autocomplete' => 'off', 'placeholder' => $field['field_name'], $field['is_required'] == 1 ? 'required' : '']) }} @elseif ($field_type == 'toggle')
@elseif ($field_type == 'select') {{ Form::select($fieldName, $field_values, isset($fieldData) ? $fieldData : null, ['class' => $field['is_required'] == 1 ? 'form-select dynamic-field' : 'form-select', 'placeholder' => $field['field_name'], 'data-control' => 'select2', $field['is_required'] == 1 ? 'required' : '']) }} @elseif ($field_type == 'multiSelect') {{ Form::select($fieldName . '[]', $field_values, isset($fieldData) ? $fieldData : 0, ['class' => $field['is_required'] == 1 ? 'form-select appointment-multi-select dynamic-field' : 'form-select appointment-multi-select', 'placeholder' => $field['field_name'], 'data-control' => 'select2', 'multiple' => true, $field['is_required'] == 1 ? 'required' : '']) }} @else {{ Form::$field_type($fieldName, $fieldData, ['class' => $field['is_required'] == 1 ? 'form-control dynamic-field' : 'form-control', 'placeholder' => $field['field_name'], $field['is_required'] == 1 ? 'required' : '', 'rows' => $field_type == 'textarea' ? 4 : '']) }} @endif
@endforeach @endif
{{ __('messages.appointment.no_available') }}
@endif @if (Auth::user()->hasRole('Patient')) {{-- Appointment Charge --}}
{{ Form::label('appointment_charge', __('messages.doctor.appointment_charge') . ':', ['class' => 'form-label']) }} {{ Form::text('appointment_charge', isset($doctorCharge) ? $doctorCharge : null, ['class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => __('messages.doctor.appointment_charge'), 'id' => 'appointmentCharge', 'readonly' => 'readonly']) }}
{{-- Appointment Charge --}}
{{ Form::label('payment_mode', __('messages.ipd_payments.payment_mode') . ':', ['class' => 'form-label']) }} {{ Form::select('payment_mode', getAppointmentPaymentTypes(), null, ['class' => 'form-select select2Selector', 'id' => 'appointmentPaymentModeId', 'placeholder' => __('messages.ipd_payments.payment_mode')]) }}
{{ Form::label('opd_date', __('messages.appointment.date') . ':', ['class' => 'form-label']) }} {{ Form::text('opd_date', null, ['id' => 'patientAppointmentOpdDate', 'class' => getLoggedInUser()->thememode ? 'bg-light opdDate form-control' : 'bg-white opdDate form-control', 'required', 'autocomplete' => 'off', 'placeholder' => __('messages.appointment.date')]) }}
{{ Form::label('problem', __('messages.appointment.description') . ':', ['class' => 'form-label']) }} {{ Form::textarea('problem', null, ['class' => 'form-control', 'rows' => '4', 'placeholder' => __('messages.appointment.description')]) }}
@if (count($customField) >= 0) @foreach ($customField as $field) @php $field_values = explode(',', $field['values']); $dateType = $field['field_type'] == 6 ? 'customFieldDate' : 'customFieldDateTime'; $field_type = \App\Models\AddCustomFields::FIELD_TYPE_ARR[$field['field_type']]; $fieldName = 'field' . $field['id']; $fieldData = isset($appointment->custom_field[$fieldName]) ? $appointment->custom_field[$fieldName] : null; @endphp
{{ Form::label($field['field_name'], $field['field_name'] . ':', ['class' => $field['is_required'] == 1 ? 'form-label dynamic-field' : 'form-label']) }} @if ($field['is_required'] == 1) @endif @if ($field_type == 'date' || $field_type == 'date & Time') {{ Form::text($fieldName, $fieldData, ['id' => $dateType, 'class' => getLoggedInUser()->thememode || $field['is_required'] == 1 ? 'bg-light form-control dynamic-field' : 'bg-white form-control', 'autocomplete' => 'off', 'placeholder' => $field['field_name'], $field['is_required'] == 1 ? 'required' : '']) }} @elseif ($field_type == 'toggle')
@elseif ($field_type == 'select') {{ Form::select($fieldName, $field_values, isset($fieldData) ? $fieldData : null, ['class' => $field['is_required'] == 1 ? 'form-select dynamic-field' : 'form-select', 'placeholder' => $field['field_name'], 'data-control' => 'select2', $field['is_required'] == 1 ? 'required' : '']) }} @elseif ($field_type == 'multiSelect') {{ Form::select($fieldName . '[]', $field_values, isset($fieldData) ? $fieldData : 0, ['class' => $field['is_required'] == 1 ? 'form-select appointment-multi-select dynamic-field' : 'form-select appointment-multi-select', 'placeholder' => $field['field_name'], 'data-control' => 'select2', 'multiple' => true, $field['is_required'] == 1 ? 'required' : '']) }} @else {{ Form::$field_type($fieldName, $fieldData, ['class' => $field['is_required'] == 1 ? 'form-control dynamic-field' : 'form-control', 'placeholder' => $field['field_name'], $field['is_required'] == 1 ? 'required' : '', 'rows' => $field_type == 'textarea' ? 4 : '']) }} @endif
@endforeach @endif
@endif
{{ Form::submit(__('messages.common.save'), ['class' => 'btn btn-primary me-3', 'id' => 'saveAppointment','data-turbo' => 'false']) }} {{ __('messages.common.cancel') }}