Thanks for posting your query.
Greenish stools and abdominal pain
usually indicate an infective gastroenteritis
most probably viral if it resolved on it's own .If it needed medications then it could be a bacterial infection causing travellers diarrhoea
or a worm infestation.This greenish colour is due to inappropriate digestion and absorption of bile fluid in gut which is green.
In any case these infections do spread through sharing common toilets, and in cohabiting family members.So most probably she has passed it on to you.
Please do not worry as if minor viral infection it may subside on its own within 3_5 days but if it worsens or you develop any new symptoms like blood in stools, vomiting
, severe pain
, fever etc then you should consult your doctor for apropriate antibiotic treatment.
Meanwhile you should drink plenty of water to maintain your hydration, practice adequate hygiene and frequent hand washing.Sometimes probiotics and zinc supplements help in faster resolution.
Wishing you a speedy recovery.