Imagine getting the bill for an ordinary dinner and noticing, in tiny print, that the restaurant charged you $40 for coffee. Surely you'd be upset.

It turns out that hospitals inflate specific prices all the time in ways that aren't transparent to the patient, according to a new study that appeared Sept. 7 in the journal Health Affairs.

Researchers at Johns Hopkins University in Baltimore found that many hospitals charged more than 20 times the cost of some services, particularly for certain services like CT scans and anesthesiology. The researchers said that the pattern of charging suggests that hospitals strategically look for surreptitious ways to boost revenue.

"Hospitals apparently mark up higher in the departments with more complex services, because it is more difficult for patients to compare prices in these departments," Ge Bai, who led the study and is an assistant professor at the Johns Hopkins Carey Business School, said in a statement.

Other high-tech services with exorbitant markups include MRI, electrocardiology (tests of the heart's electrical patterns) and electroencephalography (tests of the brain's impulse patterns), according to the findings. The services that had fees that were more in line with their actual costs to hospitals included "old-school" physical therapy and nursing, the researchers found.

The markups occurred in all types of hospitals, both private and nonprofit, the researchers said. Yet hospitals with the highest markups, on average, tended to be for-profit hospitals with strong power within their markets, because of either their system affiliations or their dominance of regional markets. In other words, those hospitals that can mark up prices, do mark up prices, according to the researchers.

The pricing can have serious consequences for the payer, the researchers said. For example, hospitals whose costs for a CT scan run at about $100 may charge a patient $2,850 for a CT scan, the study found.

"[The markups] affect uninsured and out-of-network patients, auto insurers and casualty and workers' compensation insurers," said Gerard Anderson, a professor at the Johns Hopkins Bloomberg School of Public Health and a co-author on the study. "The high charges have led to personal bankruptcy, avoidance of needed medical services and much higher insurance premiums."

In their study, based on 2013 Medicare and other data from nearly 2,500 U.S. hospitals, the researchers compared a hospital's overall charge-to-cost ratio, which is the ratio of what the hospital charged compared to the hospital's actual medical expense. The charge is recorded on a document called a chargemaster, which is an exhaustive list of the prices for all hospital procedures and supplies.

In 2013, the average hospital with more than 50 beds had an overall charge-to-cost ratio of 4.32 ? that is, the hospital charged $4.32 for every $1 of its own costs. However, at most hospitals that they examined, the researchers found that the charge-to-cost ratio was far higher in departments that were technologically advanced. The highest was in the CT department, with an average ratio of 28.5.

While understanding that hospitals need to generate revenue, the researchers recommend a cap on markups and consistency from department to department. They also suggest more transparency, by requiring hospitals to provide patients with examples in clear language of rates from area hospitals or what Medicare would pay.

"There is no regulation that prohibits hospitals from increasing revenues," Bai told Live Science. "The problem is when they raise rates on people that have no ability to say no because they have an emergency and cannot compare prices." This includes uninsured and out-of-network patients, "because they don’t have bargaining power against hospitals," Bai added.

"We realize that any policy proposal to limit hospital markups would face a very strong challenge from the hospital lobby," Anderson said. "But we believe the markup should be held to a point that's fair to all concerned ? hospitals, insurers and patients alike."

The researchers noted that Johns Hopkins Hospital has a charge-to-cost ratio of 1.3, among the lowest 1 percent of the sample studied. Maryland, the state in which the hospital is located, in general has the lowest ratios of any other state, they said.

Copyright 2016 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.