Just sharing some snapshots of a brochure on taking medicines while fasting I got from the hospital during my recent pregnancy check-up. Well, I'm a Christian and I have never fasted so am not able to comment anything on this other than just sharing for information and knowledge purposes since July is a fasting month.
Please note that the brochures are in Malay language, so I will try my best to translate it to my best understanding... hope I got it right and did not leave out any vital information...
Below snapshot showing the type of medicines which will not void your fasting: Medicines such as eye drops, nose or ear drops (provided not extending to ear drums), tablets to be placed under tongue and as long as you don't swallow them, all forms on injections, ointments and plaster, gargle medicine, nasal sprays, and local or half body anesthesia forms of medicines.
Below snapshot showing the type of medicines which will void your fasting: Pills (as you need to swallow them), liquid medicines that you will need to drink/swallow, inhaler, medicines which you will need to insert vaginally, suppositories, enema, whole body anesthesia form of medicines.
Hope the above helps! Happy fasting to my fellow Muslim followers!