Bloody mucus in babies poo

For the past 5 days my baby has had a bloody mucus in their nappies. Doctors think this is as a result of a viral infection. Has anyone had similar? What was it and how long did it take to clear?