I have gallstones and IBS but i have not had problems with my feet or any type of swelling at all. You might consider if it is the both of you that have this problem, then it is probably environmental. IBS and gallstones, althoe can be genetic are not contageous. Perhaps next time it happens you should get a second opinion or go to an emergency room. But i know , my doctor has put me through 8 different IBS medication and the side effects were so sever i am scared now of just 'trying' more. I have still not found one i can tolerate.
So get a second opinion, ( but dont mention what the previous dr. perscribed until the end.) and if a second unrelated dr. says thats what he reccomends then i would try it.Good luck, i am haveing surgery in a month to get my gallbladder out so if you figure out what is wrong, post it on here if you can. thanks.