Dr. Perez Pantoja has made house calls upstairs, especially when the generators were down. He has seen a lot of depression and anxiety.

Night comes with a chorus of frog song. On a recent evening, the woman with dementia wandered the halls and cried. Ms. Olivera, the administrator, hugged her. In the recreation room, a man with lung cancer and diabetes, Aurelio Hernandez Perez, 76, gave himself a breathing treatment, knowing the generators would soon be switched off.

Another man walked by, his arm in a cast. He said he had fallen in the dark and then waited days in pain before getting an X-ray. A man in a yellow shirt returned from visiting his wife in the hospital, where she was being treated for pneumonia, another disease that has claimed more lives after the storm this year than in the same months in previous years.

Jose Santiago Tanco, 63, a diabetic, slid into a cot in the hallway as he did each night, fearful of sleeping alone upstairs. “How am I going to ask for help?” he said.

Ms. Rodriguez de Jesus often spends evenings visiting her son and daughter-in-law, who live across the courtyard. Her home telephone stopped working after the power failed, and she did not have a cellphone.

So when she left them at night, she knew they would stare out their windows until she arrived home and waved a small lantern like a pendulum from her dark apartment to let them know. Then she closed the shutters and went to sleep.

When power returned to part of the Hill Brothers area last week, the company that administers Comunidad del Retiro finally had the chance to get service restored to the complex. It had to pay a private electrician to do the work. During the dark months, two of the complex’s most fragile residents had died; it was not clear, Ms. Olivera said, what role the loss of power might have played in hastening their deaths.