“H.H.S. has been willing under this administration to test the limits of their authority, that would subject them to more litigation,” said Emily J. Cook , a health care lawyer in Los Angeles. While her firm is not representing any of the plaintiffs in the lawsuit, one of them is a client, she said.

At the heart of the administration’s efforts is an attempt to tackle rising hospital costs, which have outpaced the increase in physician prices, according to a recent study by health economists in Health Affairs. The economists estimated that hospital inpatient prices increased 42 percent from 2007 to 2014.

In an op-ed article published in The Chicago Tribune on Tuesday, Seema Verma, the administrator for the Centers for Medicaid and Medicare Services, promoted the administration’s efforts to benefit patients.

“The decades-long norm of price obscurity is just fine for those who get to set the prices with little accountability and reap the profits, but that stale and broken status quo is bleeding patients dry,” she wrote. “The price transparency delivered by these rules will put downward pressure on prices and restore patients to their rightful place at the center of American health care.”

The hospital groups, which also include the Association of American Medical Colleges , the National Association of Children’s Hospitals and the Federation of American Hospitals , which represents for-profit hospitals, argued in the lawsuit that the rule would not accomplish the administration’s aim of helping consumers avoid surprise bills. Three individual hospitals also joined the case.

“America’s hospitals and health systems remain committed to providing patients with the information they need to make informed health care decisions,” the lawsuit said. It contended that the rule “will generate confusion about patients’ financial obligations, not quell it.” The lawsuit was first reported by The Wall Street Journal.

The Trump administration has also proposed a rule requiring insurers to allow patients to get advanced estimates of their out-of-pocket costs before they see a doctor or go to the hospital. The industry’s major trade associations wrote a letter on Tuesday, requesting an additional 90 days to comment on the proposal, pushing the deadline to mid-April.