“You catch yourself thinking about it for no good reason,” Mr. Kennedy said. “Just out of nowhere.”

All 22 patients who arrived at the emergency room for treatment survived — “Everyone who came in with a pulse left with a pulse,” said Becky Davis, the emergency room charge nurse. Only one, Caleb Medley, 23, who was shot in the head and lost an eye, remains in the hospital, in critical but stable condition. Three other local hospitals received smaller numbers of injured patients from the shootings.

Dr. Sasson arrived for her shift at 11 p.m. that Thursday. Filling in for another doctor at the last minute, she had skipped the two-hour nap she usually takes before a night shift. As her colleague ran through the list of patients, she thought, “I can just power through till 8 a.m.”

Avery MacKenzie, 28, remembers that she was focused “on increasing my efficiency and being able to clearly communicate my plan to the patients and the other doctors.” Fresh out of medical school, she had begun the first year of her residency only three weeks before and was still getting used to introducing herself as “Dr. MacKenzie.” In the first hour and a half of her shift, she examined a man with chest pain, a woman with pulmonary hypertension and another patient with a bloodstream infection. “It was typical emergency medicine,” she said.

But soon afterward, with the E.R. already full to capacity, news of a shooting began to filter in.

Ms. Davis, the charge nurse, thought it was probably a gang shooting — they had happened before at the theater — and she began preparing for one to three new patients, the usual number from such an event. But at 12:45 a.m., she got a call from a police officer at the scene telling her of “multiple wounded,” and that the victims were being transported by police car.