first of all- did you check her for tinea capitis? (a fungal infection of the scalp, with round patches of
hair loss, breaking of
hair, and scaling?) it is easy to treat !
if it is not this and dermatologist did not find the answer, a biopsy of the scalp is reasonable.
connection between hair loss and bowel movement- maybe some nutrient deficiency- vitamins, iron, celiac disease, a pediatric dermatologist might help.