Welcome to HealthcareMagic forum .
Usually stomach infections are associated with diarrhoea rather than hard stools.
is common in toddlers and more common in formula or cow milk fed babies than breasted babies. If there is a recent change in her milk or diet try to avoid it for a couple of days to look for any correlation ans self resolution .
can be due to various causes , inadequate hydration , infection, lethargy etc
If it persists do get your child evaluated by her pediatrician
Meanwhile you can try the following ,
Increase water intake .
Try diluted cows milk or preferably formula milk if breastfeeding
isnt an option.
Avoid apples , carrots etc which may aggravate constipation.
Try leafy green vegetables or fruits ( soups , mashed , juice etc) to increase fiber intake .
If nothing works ask your doctor for prescription laxatives and digestive suspension ( lactulose
, PEG etc) .
Wishing your child good health.