My daughter is 4 years old and every so often

Patient: My daughter is 4 years old and every so often really struggles going to the toilet. After an hour of trying she finally passes poo but it is diarrhoea and green? I have been to the doctors and the prescribed her a lite laxative ? But why would she be struggling to pass diarrhoea ? Thanks

Doctor: