The didn't do ultrasound in the ER, did they?
Nether they did on my first trip to ER, so they didn't find anything wrong with me either the first time.
What alarms me is what you describe as a back pain.
Here is a quote from the gallstones symptoms:
"The pain may:
Start suddenly in the center of the upper belly (epigastric area) and spread to the right upper back or shoulder blade area. It is usually hard to get comfortable."
And here is a full link:
http://www.webmd.com/digestive-disorders/tc/gallstones-sy...
The only way to positively confirm that is to do a gallbladder ultrasound.
They only caught that on my second trip to ER when I was wheeled in with a pancreatitis. 4 doctors before that told me - heartburn, or blood pressure, or that the pregnancy was causing it or just a random chest pain from inflammation, but mostly all said heartburn - without even doing any tests. Well they all were wrong.
I think: chest pain, back pain, heartburn medicine does not help - this is not heartburn.
Especially if this will suddenly occur again, like chest pain spells, off an on, with a week or a month intervals, or even as rare as several times a year.
Don't let doctors intimidate you by telling you it's heartburn, when they don't want to trust your symptoms and do a test. They kind of assume people exaggerate pain and also they tell you the symptoms may vary. Don't listen to that.
There is a definitive reason for you pain, and they just did not find it.