Praise be to Allah
The saheeh Sunnah indicates that the soul is breathed into the foetus after 120 days, as al-Bukhaari (3208) and Muslim (2643) narrated that ‘Abdullah ibn Mas‘ood (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him), who is the most truthful one, told us: “The creation of any one of you is put together in his mother’s womb for forty days, then he becomes a ‘alaqah (a piece of thick coagulated blood) for a similar period, then he becomes like a chewed piece of flesh (mudghah) for a similar period, then Allah sends to him an angel who is commanded to write down four things, and it is said to him: Write down his deeds, his provision, his lifespan and whether he is wretched or blessed. Then the soul is breathed into him.”
Hence the scholars stated that it is not permissible to abort the foetus after the soul is breathed into it, unless a group of trustworthy, specialist doctors have determined that leaving the foetus in the mother’s uterus will cause her death; this decision is only to be taken after exhausting all possible means of saving the life of the foetus.
End quote from a statement by the Council of Senior scholars.
See also the answer to question no. 42321
But before the soul is breathed into the foetus, if the foetus is deformed or affected by this disease that you mention, namely thalassaemia, and trustworthy doctors have confirmed that, then it is permissible to abort it in that case.
The Islamic Fiqh Council belonging to the Muslim World League, in its twelfth session, held in Makkah al-Mukarramah from 15 Rajab 1410AH/10-2-1990 CE, stated the following:
Before the passage of one hundred and twenty days from the beginning of the pregnancy, if it is proven and confirmed by a medical committee composed of trustworthy specialist doctors, and based on tests with diagnostic equipment and methods, that the foetus is severely deformed in a way that is not receptive to medical treatment, and that if the pregnancy continues to term and the child is born, his life will be difficult and painful for him and his family, then in that case it is permissible to abort the pregnancy, in response to the parents’ wishes. Having stated that, the committee advises doctors and parents to fear Allah and base their decision on certain knowledge and verified facts. And Allah is the source of strength.
End quote from Fiqh an-Nawaazil (4/25) by Dr. Muhammad Husayn al-Jeezaani
We ask Allah, may He be exalted, to grant you healing, well-being and righteous offspring.
And Allah knows best.