radfusion/app/Http/Requests/StudyMetadataUpdateRequest.php
2025-01-01 14:10:49 +06:00

40 lines
1.3 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StudyMetadataUpdateRequest extends FormRequest
{
public function rules(): array
{
return [
'patient_id' => ['nullable'],
'patient_name' => ['required'],
'patient_sex' => ['nullable'],
'patient_birthdate' => ['nullable', 'date'],
'study_id' => ['nullable'],
'accession_number' => ['nullable'],
'study_description' => ['nullable'],
'body_part_examined' => ['nullable'],
'station_name' => ['nullable'],
'operators_name' => ['nullable'],
'manufacturer' => ['nullable'],
'manufacturer_model_name' => ['nullable'],
'referring_physician_name' => ['nullable'],
'study_modality' => ['nullable'],
'study_date' => ['required', 'date'],
'receive_date' => ['required', 'date'],
'assigned_physician_id' => ['nullable', 'exists:users,id'],
'referring_physician_id' => ['nullable', 'exists:users,id'],
'access_flags' => ['required', 'integer'],
'access_password' => ['nullable'],
];
}
public function authorize(): bool
{
return true;
}
}