The shooter knew the doctor he shot outside Mercy Hospital, Chicago Police Superintendent Eddie Johnson said at a news conference, describing that initial killing as an act of domestic violence.
The gunman was the ex-fiance of the doctor, Chicago media outlets reported, with one witness saying he demanded a ring back.
The shooting sent doctors and patients streaming out of the facility, some with their hands up as heavily armed police officers sought to secure the hospital.
“The city of Chicago lost a doctor, a pharmaceutical assistant and a police officer, all going about their day, all doing what they love,” Chicago Mayor Rahm Emanuel told reporters.
The gunman, after killing the doctor, fired at arriving police officers with a single handgun, Johnson said.
The gunman, whose name has not been released, then burst into the hospital. Officers followed him inside and exchanged gunfire with him for several minutes, Johnson said.
Officer Samuel Jimenez, who joined the Chicago police force last year, died during the gun fight, officials said. The 28-year-old was married with children and the second Chicago officer killed in the line of duty this year.
“There’s no doubt in my mind that all of those officers who responded were heroes and they saved a lot of lives, because we just don’t know how much damage he (the gunman) was prepared to do,” Johnson said.
In a sign of the random nature of the rampage, the pharmacy assistant shot by the gunman just happened to be getting off an elevator, Johnson said. Her name has not been released.
Local media identified the doctor killed outside the hospital as Tamara O’Neal.
The gunman also died but it was not immediately clear if he shot himself or was struck by a police officer’s bullet, Johnson said.