A federal judge yesterday urged the District of Columbia to settle a multimillion-dollar lawsuit brought by a dozen local hospitals for overdue Medicaid bills or risk losing millions more by going to trial.

"Lawyers ought to have some knowledge of economics," U.S. District Judge Stanley Sporkin told the attorneys from the Corporation Counsel's Office.

During an hour-long hearing, the judge sought to persuade the city's lawyers to consider the consequences for the District if they insist on going to trial over $46 million in disputed Medicaid bills. The hospitals have offered to forgo interest on the debt and attorney fees in exchange for a settlement.

But if the case is tried, the hospitals said, they will ask for interest and attorney fees that could amount to $25 million. They estimated that the city, in a worst-case scenario, could end up having to pay more than $70 million.

"Maybe the budget problems in the city aren't as bad as I've read," said Sporkin, shaking his head and rocking energetically in his big black chair as he pressed the city to negotiate an end to the case.

Yesterday's hearing marked the fourth time the Medicaid payment dispute has come before Sporkin since the hospitals sued the city in October. The judge has expressed anger at the city's response to his appeal for a settlement.

At a Dec. 20 hearing, when the city attorneys argued that the federal court had no jurisdiction over the dispute, Sporkin said:

"Are you saying that {the hospitals} are deprived a federal forum to get that money, and they must chase you like they would chase some other deadbeat? Is that what you want the District of Columbia to be considered? A deadbeat city?"

Cary Pollak, a city attorney, responded, "Well, for those who do not consider us a deadbeat right now, we wouldn't want to change their minds."

The hospitals are the latest group to run into difficulties involving payments by the District. When the city was late making some of its payments to support the Metro system recently, Metro had to borrow money to cover the gap.

The city also was late last year in making a $55 million payment to the D.C. retirement board, which oversees the pension fund for city employees.

At issue in the Medicaid case, filed for the hospitals by attorney Ronald Sutter, are city payments for medical treatment of poor patients. Under the city's Medicaid program, hospitals are to be reimbursed for Medicaid patient expenses according to a rate determined by the city.

During a three-year period ending in 1990, the city paid about $220 million to local hospitals for Medicaid patient care, according to Medicaid director Lee Partridge.

But that didn't cover all of the approved Medicaid bills owed the hospitals, Sutter said. He said the city owes them an additional $46 million for Medicaid care provided from 1984 to 1989.

Hospitals have made no estimate of what the city may owe them for Medicaid payments since 1989.

The city has argued that it has complied with its Medicaid payment plan.

"The dispute has to do with how and what we're paying under the state plan," Pollak told the court at the December hearing. But that defense triggered an even more pointed response from Sporkin.

"There is something that is basically rotten here, and that's what is bothering this court," Sporkin said.

The judge said that there had to be "an easy way" to solve the problem of the disputed bills. He said he would appoint an auditor, if necessary, to determine whether the city owed money to the hospitals as alleged.

When the two sides returned to court Jan. 16 and told Sporkin that they had made little progress toward a settlement, the judge said he might name a receiver for the Department of Human Services, which oversees the city's Medicaid payment plan.

Sporkin said the department, which has been without a director, appears to "be out of control" and unable to solve its dispute with the hospitals.

"This is just ridiculous," the judge said. "I mean, really it's an embarrassment on this government, and you people ought to realize it."

Vincent C. Gray, appointed by Mayor Sharon Pratt Dixon to head the Department of Human Services, is expected to take office within a few days.

Yesterday the court told the city's attorneys to consult with officials, including Gray, and decide if they want to risk losing $25 million by going to trial in this case. He told them to report back Feb. 25.