How pregnant mothers use drugs to be safe for the fetus?

Despite trying very hard to limit, but there are still cases where pregnant mothers are forced to use drugs to treat health conditions. However, you can still limit the drug's effect on the fetus if you know how to use it.