Our Sages, of blessed memory, said that regarding all these disqualifications that the Torah disqualified from entering the congregation—this is only when done by the hand of man, but if it occurred by the hand of Heaven, he is fit. And what is called "by the hand of Heaven," the Rambam, of blessed memory, wrote, and this is his wording: Every disqualification we mentioned in this matter applies when they were not by the hand of Heaven, such as if a person or a dog severed it, or a thorn struck it, and similar to these things. But if he was born with a severed duct or crushed testicles, or if he was born without testicles, or if he became ill due to his body and these organs ceased to function, or if boils developed in them and dissolved them or severed them—behold, he is fit to enter the congregation, for all these are by the hand of Heaven. Thus far his words. And there are some of our teachers who hold that it is not called "by the hand of Heaven" except through thunder and hail or from his mother's womb, but through illness, it is considered "by the hand of man" and he is disqualified. The Rosh, of blessed memory, wrote that this is the implication of the Yerushalmi. Many rule like the Rambam, and the Rambam explains the Yerushalmi such that in this very matter there is a dispute whether through illness it is called "by the hand of Heaven" or "by the hand of man," and he ruled like the one who holds that it is "by the hand of Heaven," and many of the great Acharonim agreed to rule like the Rambam. Not only that, but even if the testicles were ruined through illness and the doctor severed them—it is like "by the hand of Heaven," for since they were dissolved or ceased their function, it is as if they are not there, and the severing is nothing, and so they ruled the law in practice, even though there are those who have doubts about this—nevertheless, the actual practice is the authority. However, one must doubt regarding one who had a stone in the bladder and the doctors cut one testicle or both of them whether this is like "by the hand of Heaven," and it is close to saying that this is called "by the hand of man," since the testicles themselves were not ruined, and so it appears primary. However, if they cut his left testicle—one may rely on the previous opinion that with the left one, even by the hand of man, he is fit. And there are those who are even more lenient to say that according to that opinion, even if the right one was cut he is fit, for this opinion holds that as long as one testicle remains whole and healthy—he is fit. And it requires further study for the law whether one may rely on this opinion—for it is a great leniency, and nevertheless, if such a case occurred, it is difficult to compel him to divorce his wife.
אמרו חז"ל דזה שפסלה תורה כל פסולים אלו מלבא בקהל – זהו רק כשנעשה בידי אדם, אבל אם נתהוה בידי שמים – כשר. ומה נקרא בידי שמים כתב הרמב"ם ז"ל, וזה לשונו: כל פסול שאמרנו בענין זה – כשלא היו בידי שמים, כגון שכרתו אדם או כלב או הכהו קוץ, וכיוצא בדברים אלו. אבל אם נולד כרות שפכה או פצוע דכא, או שנולד בלא בצים או שחלה מחמת גופו ובטלו ממנו איברים אלו, או שנולד בהם שחין והמסה אותן, או כרתן – ה"ז כשר לבא בקהל, שכל אלו בידי שמים. עכ"ל. ויש מרבותינו דס"ל דלא מיקרי בידי שמים אלא ע"י רעמים וברד או ממעי אמו, אבל ע"י חולי – חשיב בידי אדם ופסול. וכתב הרא"ש ז"ל דכן משמע בירושלמי. ורבים פוסקים כהרמב"ם [ב"ח], ובירושלמי מפרש הרמב"ם דבזה גופה יש פלוגתא אם ע"י חולי מקרי בידי שמים או בידי אדם, ופסק כמאן דס"ל דהוי בידי שמים, והסכימו הרבה מגדולי האחרונים לפסוק כהרמב"ם. ולא עוד, אלא אפילו אם נתקלקלו הביצים ע"י מחלה וכרתן הרופא – הוי כבידי שמים, דכיון שנתמסמסו או שבתו ממלאכתן הוי כאלו אינם, והכריתה לאו כלום היא [ע' פ"ת], וכן פסקו הלכה למעשה אף שיש שמסתפקים בזה – אמנם מעשה רב. רק יש להסתפק במי שהיה לו אבן בכיס וחתכו הרופאים ביצה אחת או שניהם אם זהו כבידי שמים, וקרוב לומר שזהו נקרא בידי אדם, כיון שהביצים בעצמם לא נתקלקלו, וכן נראה עיקר. מיהו, בחתכו לו ביצה השמאלית – יש לסמוך על דיעה הקודמת דבשמאלית גם בידי אדם כשר. ויש מקילין עוד לומר דלאותה דיעה אף בנחתכה הימנית כשר, דס"ל לדיעה זו דכל שנשאר ביצה אחת שלימה ובריאה – כשר [יש"ש]. וצ"ע לדינא אם יש לסמוך על דיעה זו – שקולא גדולה היא, ומ"מ אם אירע כזה קשה לכופו לגרש אשתו.