I am concerned regarding the use of haram substances medicines for medical purposes like in cough syrups we have alcohol, in some capsules the companies use animal gelatine. My question is what is the view of Islam on consumption of these medicines?

Regarding gelatine, if you do the research and find that it goes through complete transformation in the manufacturing process then it’s ok to consume

This is the answer of Ayatollah Sistani re alcohol in medicines

It is permissible to consume if the amount is very minute, e.g. 2%
If the amount of alcohol is more than 2%, then one may dilute the medication with water, so that the amount of alcohol becomes very minute, e.g. 2% or less and then consume it.