Thank you for your query on Healthcare Magic.
The cause of vomiting
in your child is due to:
1. Posttussive vomiting which usually occurs in children after cough
2. Gastric irritation by the mucus he swallowed
because of the infection and due to drugs.
First two are because of cough and they usually doesn't require treatment. Once the cough is being treated these vomitings will subside.
Gastritis caused by the drugs or infection can be treated with antacids and tablets like lanzole in prescribed dosage.
Consult your Pediatrician
if the vomitings persist.
Hope I have answered your query.