Patients might be entitled by law to see their medical records, but a new study shows that is easier said than done.

Using a “secret shopper” approach to test 83 hospitals across the United States, researchers from Yale University found some that seemed indifferent to state and federal guidelines on access, timeliness and cost.

“There were startling differences … in terms of what can be requested, how much records cost, and how long it would take,” said Carolyn Lye, a Yale medical student who led the study, published Friday on the online JAMA Network.

Researchers made online and phone inquiries to each hospital, posing as adult children asking about records for elderly parents.

Responses varied wildly. Costs ranged from $0 to $541.50. The federal recommendation for an electronic records request is a flat $6.50. And while 29 hospitals listed fees online, only nine quoted the same amounts when Lye called.

Minnesota’s Allina and Mayo hospital systems were tested. Both offered records within the 30-day window required, with limited exceptions, under federal law.

Local malpractice attorneys said records access is a problem, even though most Minnesota hospitals have electronic records and are part of large integrated health systems.

Chris Messerly of the Robins Kaplan firm said he couldn’t recall one client in 30 years receiving a truly complete set of records from a hospital. “Maybe they think lay patients wouldn’t understand lab reports or wouldn’t understand a CT,” he said, “but this is almost a weekly occurrence.”

While online portals make it easier for patients to quickly view some of their records, Messerly said they don’t print out documents efficiently. A complete set of records could consist of thousands of pages, whether or not older records are kept in paper files.

Even attorneys with subpoena powers struggle. Messerly showed up at a hearing in a recent malpractice case to find that the hospital attorney had records that he hadn’t seen. But he also had records that the hospital attorney didn’t know about.

Lye said hospitals’ online forms were restrictive; she found more flexibility in requesting complete or specific records when she called.

In two maddening instances, she requested complete medical records, but the hospitals withheld nursing notes unless she also knew to ask for them.

“If you don’t include everything, that’s not the entire medical record,” she said.

Lye said hospitals need to become more consistent, especially in an era of shared costs and decisionmaking in which patients are bearing more responsibility for their health care.