My trapped gallstone was fobbed off twice, as "a panic attack" (Paramedics / A&E triage nurse / SHO) and "bad posture" (my GP) respectively. After a week of constant agony, I eventually became jaundiced and dehydrated enough that I was able to convince a walk-in centre doctor that I was actually ill. They then spent a couple of days giving me IV fluids and looking for pancreatitis and other zebras before I found myself on the business end of an ultrasound scanner.
After discussing it with the consultant, I came to the conclusion that the lesson here is to google your condition, and if one of the symptoms is agonising pain, make sure that you scream a bit for the benefit of those examining you (rather than saying that you're in pain, being quietly uncommunicative, and concentrating on breathing). Also, it's probably best not to be female and in your 20s if you happen to have the wrong kind of GP.
On the other hand, sometimes shit happens. Doctors aren't magic. They're just as fallible as engineers. Probably moreso where maths is involved.