using FluentValidation;

public class OpenEncounterRequestValidator : AbstractValidator<OpenEncounterRequest>
{
    public OpenEncounterRequestValidator()
    {
        RuleFor(x => x.EncounterType).IsInEnum();
        RuleFor(x => x.Department).IsInEnum();
        RuleFor(x => x.AttendingPhysician).NotEmpty().MaximumLength(200);
        RuleFor(x => x.RoomBed).MaximumLength(20)
            .When(x => x.RoomBed is not null);
        RuleFor(x => x.AdmissionReason).MaximumLength(500)
            .When(x => x.AdmissionReason is not null);
    }
}