Bacterial infection

HOPE
So I was having pain in my right side the other day went to the hospital and they ran some tests said that I did not have a UTI but I had a bacterial infection. they did a pregnancy test it they said it was negative. my period should have started two days ago after talking to my roommate she told me that her doctor told her that with a bacterial infection can cause a negative pregnancy test when you actually are pregnant what should I do and has this happened to anyone else?