Thank you for your query on Healthcare Magic.
Passing of hard stools with pain and bleeding is due to constipation which is mostly related to her diet intake.
It seems not related to her operation that is done for her imperforate anus
as it started recently and in between she was normal.
I advise you to give dietary fiber
rich foods to improve the constipation.
Dietary fiber is present in fruits, vegetables.
Give plenty of water to drink.
And still motions are hard you can give an oral stool softener
like lactulose in prescribed dose.
Hope I have answered your query.
Dr E Venkata Ramana,