As you know, Leah was expecting, and she was expecting a boy. At The same time, Rochel was expecting a girl. Rachel asked HKB”H to switch things, since she wanted to have at least two shevatim, equal to the shefachos. Nowadays we have sonograms so a person can know the gender of the baby. People often ask, is it right to find out the gender of the baby when the baby is hidden? There are those who say, Hashem hid it, why are we trying to figure it out? I personally don’t understand that. The same Hashem who hid it gave us the ability to have a sonogram and take a look and see what is going on. We don’t say that if somebody has a stomach ache he shouldn’t take an X-ray because Hashem hid it and you shouldn’t see what is going on. Or you shouldn’t take a CT scan because Hashem hid it. Why is this any different?
I want to tell you something fascinating. Besides the fact that it appears at least from the Maharsha that Leah knew what gender her child would be, there is a Teshuvas Rav Akiva Eiger, siman tzaddik tes. He has there a specific shaila that has to do with an Even Ha’ezer inyan. What the shaila is, is not noge’a to us. What is noge’a is that he writes that a woman who was expecting went to an expert and brought her urine and R. Akiva Eiger cites the urine testing in regards to the baby’s gender. The expert said that yes, she is expecting, and she is in her third month of pregnancy, and she will have a son. That is what happened. It is difficult to know how they were able to test urine and be able to come to this conclusion. But Rav Akiva Eiger doesn’t say it as a chiddush or a peleh, it is part of the eidus of a woman about her pregnancy. Halo davar hu! We see b’feirush from this Rav Akiva Eiger that it was acceptable to know the gender of the child. It seems that it was something that people routinely did.
Derech agav, the Chazon Ish writes in Emunah Uvitachon that society today thinks that previous generations were backward and ignorant. The Chazon Ish writes that this is not so. They knew a lot. There are things previous generations knew that we do not know, specifically regarding medicine. Therefore, it should be no chiddush that there were things that might have been known – not davka to Rav Akiva Eiger personally, it is not talking about his knowledge – to an expert in previous generations; a person who was able to test urine to predict the outcome of a pregnancy. Such a thing existed, and derech agav we see that knowing the gender of a child ahead of time is perfectly okay.