A federal appeals court on Tuesday upheld a White House-backed rule to require hospitals to disclose the prices they negotiate with insurers for an array of common tests and procedures.

The 2-0 decision by the U.S. Court of Appeals for the District of Columbia Circuit is a victory for President Donald Trump’s effort to make health care pricing more transparent so patients can be better informed when deciding on treatment.

The American Hospital Association and other hospital groups had challenged the rule, which was issued in November 2019 and is scheduled to take effect on Jan. 1, 2021.

They said it would require them to divert scarce resources, including to fight COVID-19, to the “herculean” and costly task of compiling health care costs, while reducing competition and causing confusion about patients’ out-of-pocket expenses.

Circuit Judge David Tatel, however, said concerns about the burdens “miss the mark,” and pointed to Health and Human Services Secretary Alex Azar’s findings that greater disclosures would benefit the “vast majority” of consumers and likely result in lower - not higher - prices.

“The Secretary weighed the rule’s costs and benefits and made a reasonable judgment that the benefits of easing the burden for consumers justified the added burdens imposed on hospitals,” Tatel wrote.

Melinda Hatton, the American Hospital Association’s general counsel, said the group was disappointed, and hopes the incoming Biden administration will revise the rule and exercise “enforcement discretion” until the pandemic runs its course.

Azar praised the decision. “Big win for American patients,” he wrote on Twitter. “Starting January 1, Americans will have access to the actual prices paid for the most common hospital services.”

Patients have long complained about getting surprise medical bills following treatment.

Tuesday’s decision upheld a June 23 ruling by U.S. District Judge Carl Nichols in Washington.

The U.S. Chamber of Commerce supported the hospital groups, saying the rule could cause hospitals to demand higher prices for their services if they saw other hospitals charging more.