thanks for writing to healthcare magic
from your history it appears that he is voluntarily withholding stools after that painful experience and consequently developed habitual constipation
your doctor rightly prescribed a laxative syrup. but he needs toilet training.
you have to encourage him to pass motion regularly even though it is somewhat painful. you have to take time to explain him the benefits of passing motion regularly and also explain to him this discomfort is temporary and passes off in due course and reward him if he obeys your request. never threaten or punish him if he disobeys
the key to success is peristance and perseverence both on the part of parents as well as the treating doctor
hope i am clear to you
any further querrys are sincerely invited.
please take care
Dr.MV Subrahmanyam MD;DCH