In one hospital in Bayonne, N.J., a patient treated for chronic obstructive pulmonary disease, a respiratory ailment, could get a bill for $99,690. Just across the state line in New York, at another hospital in the Bronx, a patient with the same disease would be charged only $7,044. In the Los Angeles area, comparable joint replacement surgeries can cost $297,000 or $84,000, depending on the facility.

Such wild disparities in health care costs are driven, in large part, by the different rates insurance companies negotiate with hospitals. That is why 18 states have passed laws that tell companies to provide data on patient claims, information that is otherwise hidden. It is a valuable attempt to track out-of-control health care costs and improve treatment. Yet in early December members of the U.S. Supreme Court took some serious swipes at the effort. “Burdensome and costly,” Justice Ruth Bader Ginsburg called it. “Purely for bureaucratic reasons,” said Justice Stephen Breyer.

The court was hearing arguments in a case challenging Vermont's version of the law. Companies have claimed that such requirements are excessive—that 50 states might put in 50 different requests for this claims information and that an existing federal law already covers it. But that law does not, and the court should support efforts like Vermont's when it issues a decision later this spring.

The case, Gobeille v. Liberty Mutual, began because Vermont passed a law requiring health insurance plans to turn data about claims over to a state health analysis and regulation unit, the Green Mountain Care Board. Those included Medicare and Medicaid, national plans such as Blue Cross, and those that companies run for their employees, known as self-funded plans. This last category, which covers more than 90 million Americans across the country, caused some trouble. Private companies complained, arguing that they already disclose this kind of information under a federal law called ERISA, which requires firms to submit health plan data to the U.S. Department of Labor. A lower court agreed, saying that state laws duplicate that effort.

They do not. The Labor Department collects information about the financial state of health plans. It does not collect information about the actual costs of care, however, nor does it track the outcomes of that care. Without a new federal statute, which is a political nonstarter, the state laws do ask for such data, and that is why the U.S. solicitor general is supporting Vermont's case. So are many other states and the American Medical Association.

The issue boils down to how to gather the best evidence. Insurance companies negotiate different rates with different hospitals and doctors, and patients get care for a single ailment from multiple providers. “For decades, the prices that hospitals and physicians charge private insurers have been treated as trade secrets,” said a recent commentary on the case in the New England Journal of Medicine. To understand the actual costs of treatment and the benefits, health care researchers need to be able to see what is happening to an entire population so the data are not biased and to track a patient through an entire course of care. A person with a neck injury from a car accident might be treated first by one hospital, then get follow-up from a doctor in another town, then see a physical therapist for rehabilitation. One provider never has all the information. Yet the patient's insurance company gets all the claims related to the accident. It has the best—sometimes the only—overall view.

Failure to gather this information from the maximum number of patients would result in a skewed picture. For instance, people in self-insured plans tend to be younger and healthier than people in other types of plans. Without laws such as the one Vermont passed, if you want to understand what it costs to treat asthma, you are limited to data about a relatively older and sicker population. That will not help you understand the costs and care of children with this disease.

The U.S. spends more than twice as much on health care, per person, as does the typical developed country. Yet Americans die years sooner than people do in France, Japan or similar nations. The Supreme Court is the legal guardian of the Constitution, whose first sentence instructs government to “promote the general Welfare,” so the court should stand with states as they try and rectify this imbalance.