A riddle: George Hahn had two echocardiograms, a year apart. His insurance plan remained the same and both tests, scans of his heart, were done at the same hospital.

The first cost him $170, the second $3,101.

"In my wildest dreams I would never have thought this would be allowed," said the 61-year-old Malvern resident.

So, how did this beyond-wildest-dreams scenario become reality?

The answer is infuriating, seemingly arbitrary, and all too common in our health system.

Hahn's first scan was done by an independent cardiology group with offices at Paoli Hospital with whom Hahn's insurer, Independence Blue Cross, negotiated a heavy discount. The second scan was performed by the hospital, also in the insurer's network, but for a far heftier fee that wasn't slashed nearly as much by insurer bargaining.

Prices for even basic medical procedures vary widely from one provider to the next, in part because of the complex — and largely proprietary — negotiations between insurers and providers. Hospitals are notorious for charging many times more than independent doctors, and insurers negotiate deep discounts with certain providers to steer members toward lower cost options.

Quality and patient experience can also skew prices. But those arguments don't hold water for a patient such as Hahn, who received identical procedures under one roof, albeit by two different providers.

"This situation is, unfortunately, too easy for patients to fall into," said Jeffrey Kullgren, an assistant professor of internal medicine at the University of Michigan. "A tenfold difference in price would be surprising to nearly anyone when you're getting the same service."

>>READ MORE: When medication prices are unaffordable, patients travel abroad for a better deal

Hahn certainly wasn't expecting it.

In February 2017, Cardiology Consultants of Philadelphia's office at Paoli, which is part of Main Line Health, billed Hahn's insurance plan $1,335 for an echocardiogram, a procedure his doctor had ordered to test for a heart defect. Cardiology Consultants has its own ultrasound machines within its office at the hospital.

Independence reduced the rate to $339 and because Hahn had met his deductible, the insurance plan paid half. Hahn paid $170.

The scan revealed a small hole in his heart, so Hahn was referred to a specialist at Lankenau Medical Center, also part of Main Line. After surgery, the Lankenau surgeon told Hahn to schedule a second echocardiogram at Paoli, the hospital closest to his home, to confirm that the procedure was successful.

Paoli billed Independence $3,484 for the scan in April, which the insurer reduced to $3,101. Because he had not yet met his deductible, Hahn got a bill for the full $3,101.

Hospitals generally charge more than doctor groups because they have more administration and operating expenses, such as operating rooms and an emergency department, said Bonnie Graham, vice president of finance for Main Line.

"Understanding that this is complicated, we try to work with the individual," she said.

Hahn still had questions. Even if the hospital wanted to charge that much, why didn't his insurer negotiate a better rate, the way it did with the independent cardiology group?

"I'd love to sit across from someone who negotiated this and say, 'How in the heck did that happen?'" Hahn said.

>>READ MORE: When insurers drop medications for cheaper alternatives, the effects can be devastating for some patients

Often, wide variations in price stem from who has the upper hand in negotiations, Kullgren said.

Health systems with lots of patients may have more power to negotiate a higher payment for their services, whereas independent doctor groups may need to bend to insurers' lower rates in order to be included in the network, he said.

Independence acknowledged that the range of prices for any given procedure can be confusing and frustrating.

"We want to give our members options by providing a broad network of participating providers, and the ability to go to different sites for services. At the same time, we try to make our members aware that it almost always costs more for non-complex, routine procedures to be done at a hospital," Anthony Coletta, president of Facilitated Health Networks at Independence Blue Cross and a physician, said in a statement.

"We are addressing this issue head on," Coletta said, with initiatives such as Facilitated Health Networks, which aims to reduce members' costs by paying doctors and hospitals based on the quality of care they provide rather than the number of procedures they perform. Independence introduced the program in 2017.

In September, Independence plans to update its cost estimator tool, available online so members can find out what a test or procedure will cost beforehand, to offer prices based on members' specific plans, rather than generic estimates.

Over the past year and a half, Main Line has also taken steps to make prices more transparent, with itemized bills that spell out every charge and a website button to request a customized quote in advance of a procedure.

Still, Kullgren said,"it remains all too difficult for most people, when they're having to pay for care to find out how much it's going to cost. Health systems have to do a lot more to help people."

Main Line's price tool, for example, is not on its homepage, but rather on the billing department's page, where many patients don't turn until they've already received a bill.

Hahn said he knows now to do his research before agreeing to any procedure, though that won't help with his outstanding bill.

But now, with reminders from Paoli piling up, Hahn recently paid $500 toward the $3,101 he owes. But he's waiting for a better explanation for the charge before paying the rest.