Taking care of yourself is a mitzvah, so follow the medical advice of your doctor.