All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If the situation is as you mentioned in the question that this hormone is extracted from a pregnant woman’s urine, then the urine of a human being is impure according to the agreement of the jurists . It is Islamically impermissible to seek treatment with what is forbidden as it is confirmed that Abu Ad-Dardaa’ narrated that the Prophet said: “Indeed, Allaah has sent down the disease and the cure, and He has appointed a cure for every disease, so seek medical treatment, but do not seek it with what is forbidden.” [Abu Daawood]
However, if it is confirmed that this impurity is completely transformed in a way that it became another substance and it did not remain in its original state, then many jurists hold the opinion that it becomes pure; in which case, it is permissible to use it in treatment and other cases.
If we presume that the impurity remained unchanged, and it is needed for treatment while there is no other permissible alternative, then it is permissible to use it. Al-‘Izz Ibn Abdus-Salaam said: “It is permissible to seek treatment with impurities if a person does not find something pure instead of it, because the benefit of being in good health and safe is more important than the benefit of avoiding an impurity.”
Allaah Knows best.