34 weeks and pain

I am 34 weeks exactly and i have severe pain on the right side somewhere near the kidney. Went to er yesterday the test was all clear they gave the medication and it went away what could be the possible reason? Is it a cause for concern for the baby’s well being?