It seems to be such a simple question but the longer I think about it the more possible solutions come up. I have a hard time to tell which one is the DRYest. The quick and dirty solution would be to add a hidden boolean field xyz
in the doctor's form. You'd have to add that attribute on the bottom of your controller if you are using Rails 4. With that you could do something like this in your model:
validates :name, presence: true
validates :email, presence: true, unless: ->(patient){patient.xyz.present?}