private bool ValidateLettersOnly(MedicalRecordDto dto)
 {
     if (!BasicValidation.ValidateString(dto.Patient.Name, lettersOnlyRegex) ||
         !BasicValidation.ValidateString(dto.Patient.ParentName, lettersOnlyRegex) ||
         !BasicValidation.ValidateString(dto.Patient.Surname, lettersOnlyRegex))
     {
         return(false);
     }
     return(true);
 }
 private bool EmptyAddress(MedicalRecordDto medicalRecordDto)
 {
     if (!BasicValidation.CheckIfStringIsEmptyOrNull(medicalRecordDto.Patient.City.Name) ||
         !BasicValidation.CheckIfStringIsEmptyOrNull(medicalRecordDto.Patient.City.PostCode.ToString()) ||
         !BasicValidation.CheckIfStringIsEmptyOrNull(medicalRecordDto.Patient.City.Address) ||
         !BasicValidation.CheckIfStringIsEmptyOrNull(medicalRecordDto.Patient.City.Country.Name))
     {
         return(false);
     }
     return(true);
 }
 private bool ValidatePassword(string password, string confirmedPassword)
 {
     if (!BasicValidation.CheckIfStringIsEmptyOrNull(password) || !BasicValidation.CheckIfStringIsEmptyOrNull(confirmedPassword))
     {
         return(false);
     }
     else if (!password.Equals(confirmedPassword))
     {
         return(false);
     }
     return(true);
 }
 private bool ValidateUsername(string username)
 {
     if (!BasicValidation.ValidateString(username, usernameRegex))
     {
         return(false);
     }
     else if (App.Instance().PatientService.DoesUsernameExist(username))
     {
         return(false);
     }
     return(true);
 }
 private bool ValidateEMail(string eMail)
 {
     return(BasicValidation.ValidateString(eMail, eMailRegex));
 }
 private bool ValidateContactNumber(string contactNumber)
 {
     return(BasicValidation.ValidateString(contactNumber, contactNumberRegex));
 }
 private bool ValidateHealthInsuranceCard(string healthInsuranceCard)
 {
     return(BasicValidation.ValidateString(healthInsuranceCard, healthInsuranceCardRegex));
 }
 private bool ValidateIdentityCard(string identityCard)
 {
     return(BasicValidation.ValidateString(identityCard, personalCardRegex));
 }
 private bool ValidateJmbg(string jmbg)
 {
     return(BasicValidation.ValidateString(jmbg, jmbgRegex));
 }
 private bool ValidateDateOfBirth(DateTime dateOfBirth)
 {
     return(BasicValidation.CheckIfStringIsEmptyOrNull(dateOfBirth.ToString()));
 }