President Trump touted a "big victory" after a federal judge rejected the American Hospital Association's challenge to a Trump administration rule forcing them to disclose prices negotiated with insurers.

"BIG VICTORY for patients – Federal court UPHOLDS hospital price transparency," Trump wrote on Twitter on Tuesday. "Patients deserve to know the price of care BEFORE they enter the hospital. Because of my action, they will. This may very well be bigger than healthcare itself. Congratulations America!"

CORONAVIRUS IN THE US: STATE-BY-STATE BREAKDOWN 

Judge Carl Nichols, a Trump appointee, granted the administration's motion for summary judgment on Tuesday, meaning it did not go to trial. The AHA said it will appeal.

In this May 26, 2020, file photo Administrator of the Centers for Medicare and Medicaid Services Seema Verma speaks at an event on protecting seniors with diabetes in the Rose Garden White House in Washington. (AP Photo/Evan Vucci, File)

In this May 26, 2020, file photo Administrator of the Centers for Medicare and Medicaid Services Seema Verma speaks at an event on protecting seniors with diabetes in the Rose Garden White House in Washington. (AP Photo/Evan Vucci, File)

The hospital industry argued that the rule will not help patients understand their out-of-pocket costs after the Centers for Medicare and Medicaid Services proposed the rule in 2019.

"We are disappointed in today’s decision in favor of the administration’s flawed proposal to mandate disclosure of privately negotiated rates," the AHA said in a statement. "It also imposes significant burdens on hospitals at a time when resources are stretched thin and need to be devoted to patient care. Hospitals and health systems have consistently supported efforts to provide patients with information about the costs of their medical care. This is not the right way to achieve this important goal."

Several pro-free-market groups filed an amicus brief supporting the administration in February. The founder of one of those groups, Cynthia Fisher of Patient Rights Advocate, said the rule will reduce "rampant price gouging."

CLICK HERE FOR THE FOX NEWS APP

"The judge's stinging rebuke of the hospital lobby's claim that posting prices violates their First Amendment rights and would confuse patients confirms what economists, patient advocates, and healthcare consumers have long argued: Real prices are the key to lowering America's devastating healthcare costs," Fisher said in a statement.