I am on TB treatment can I take medicine for pinworm infection during TB treatment. Is it safe? Suggest a medicine.

Yes. There are many options and the medication should be taken once and repeated in 7 days. Discuss with the pharmacist. All the best. Also family should be treated together and it is weight based.