1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Repositories\Validators\TCM;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class PrescriptionValidator.
- *
- * @package namespace App\Repositories\Validators\TCM;
- */
- class PrescriptionValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- "medical_record_id" => "required|integer",
- "drug_type" => "required",
- "eat_type" => "required",
- "number" => "required",
- "advice_type" => "required",
- "advice_frequency" => "required",
- "one_consumption" => "required",
- "use_unit" => "required",
- "advice" => "sometimes",
- "drugs" => "required",
- "patient_id" => "required|integer",
- "status" => "required",
- ],
- ValidatorInterface::RULE_UPDATE => [
- "medical_record_id" => "required|integer",
- "drug_type" => "required",
- "eat_type" => "required",
- "number" => "required",
- "advice_type" => "required",
- "advice_frequency" => "required",
- "one_consumption" => "required",
- "use_unit" => "required",
- "advice" => "sometimes",
- "drugs" => "required",
- "patient_id" => "required|integer",
- "status" => "required",
- ],
- ];
- }
|