ATLANTA  Efforts to force the public hospital here to continue providing free dialysis treatment to a group of immigrants, most of them illegal, suffered a setback on Tuesday when a judge dismissed a lawsuit challenging the recent closing of the hospital’s outpatient renal clinic.

A lawyer for the roughly 50 patients said he would appeal. But the ruling for Grady Memorial Hospital brings the patients closer to a Jan. 3 deadline for finding new sources of the life-sustaining dialysis treatment.

When the struggling hospital closed the clinic for fiscal reasons in early October, it agreed to pay for three months of dialysis for the patients at private clinics, either in the United States or in their home countries. That reprieve has nearly expired, and most of the patients have not taken steps to seek treatment elsewhere.

A hospital spokesman disclosed Tuesday that three of the patients had died since the clinic’s closing, two of them in Mexico and one in Atlanta. None of the deaths, he said, appeared related to inadequate access to dialysis.