The gunman, identified to the ABC7 I-Team as Juan Lopez, 32, was also killed.
The victims were identified as Dr. Tamara O'Neal and Chicago police officer Samuel Jimenez. A pharmaceutical assistant was also shot and killed, Mayor Rahm Emanuel said during a press conference.
Gunfire erupted inside and outside the hospital after 3 p.m. at the main hospital, located at South Michigan Avenue and West 25th Street.
Chicago Police Superintendent Eddie Johnson said late Monday that the shooting began in the parking lot outside Mercy Hospital as part of a domestic dispute between O'Neal and Lopez.
During the argument, Lopez pulled out a gun and shot O'Neal.
Relatives said O'Neal had been set to marry Lopez in October, but called off the wedding in September. Hospital officials said she was dedicated to caring for her community, and was also dedicated to her church and never worked on Sundays. In a news conference officials described her as, "The best person ever, really."
After shooting his former fiancee, Lopez ran into Mercy Hospital and continued firing as initial responding officers gave chase. Inside the hospital police exchanged gunfire with Lopez, Johnson said.
Hospital officials said inside the hospital Lopez shot a 25-year-old first-year pharmaceutical resident Dayna Less. She was taken to the hospital in critical condition where she later died.
Less was a graduate of Purdue University and was planning to go home to Indiana on Tuesday to spend Thanksgiving with her family. She was planning to get married in Indiana in 2019.
Johnson said during the exchange of gunfire inside the hospital, the shooter was fatally struck, though it was not immediately clear if he was struck by police fire or if it was a self-inflicted gunshot.
Officer Jimenez was taken in critical condition to the University of Chicago Hospital, where he died just after 7:30 p.m., CPD spokesman Anthony Guglielmi said.
Jimenez, a married father of three, had been with CPD for just 18 months. His body was taken by ambulance from University of Chicago Hospital to the Cook County morgue, saluted along the way by dozens of police officers standing at solemn attention along the side of the road.
"Today the Fraternal Order of Police lost a valued brother, a courageous police officer who got up this morning went to work and wanted to protect the city of Chicago," said Kevin Graham, president of the Fraternal Order of Police. "He did just that, but he did so with his life."
Jimenez joined the force in February 2017, and had only been a full-fledged officer for a few months. He served at the 2nd Police District on the city's South Side.
"Lot of shootings going on here and police are there. I wanted to be here," said Roxanna Blake, resident, who came out to watch the procession.
"Every one of us will celebrate time with our family in the holidays," said Mayor Rahm Emanuel. "We have a member of the Chicago family who, on this holiday and other milestones of their family, will not be there."
A second officer was also shot at, but the bullet struck his holster and embedded itself in his gun. The officer was not injured.
"IT WAS CHAOS"
Employees said the shooting took place in an outpatient area of the hospital that is relatively open. The hospital was partially evacuated.
Witnesses described a frenzied scene.
"It was chaos, mass chaos," said James Gray, witness.
Gray said he saw a man and a woman who looked like they were walking towards the parking lot.
"The gentleman turned around and shot three times in the chest," Gray said. "Once she fell to the ground, he turned around and shot her three more times."
Gray described the shooting as surreal, "like a movie scene."
Workers from the hospital's pharmacy, which is just inside the lobby, said the shooter was arguing with people and attempting to get into the pharmacy. They said they followed the hospital's active shooter training, closed their shutters, locked the door and hid.
"He was trying to get in the pharmacy at one point," said Jennifer Eldridge, pharmacy worker.
"He was jiggling on the door, trying to come in, we was inside the office but we could still hear that jiggling, trying to come into the pharmacy," said Monique Hubbard, pharmacy worker.
Eldridge and Hubbard said the gunman shot through the pharmacy window, where co-worker Leneice Donaldson had been standing before she left to get a soda.
"Blood was everywhere, and it was just... had I not went to get the Pepsi, I would have been right in the window when it all happened," she said.
"We were trying to figure out our escape plan out of there if he was trying to come in," said Eldridge.
The Chicago Office of Emergency Management and Communications said a Family Assistance Center has been set up at Dunbar High School at 3000 South Martin Luther King Boulevard for those affected by the shooting.
National Teachers Academy was placed on hard lockdown at 3:55 p.m. as a precaution due to the shooting. The elementary school is a few blocks away from the hospital. The lockdown was lifted shortly after 5 p.m.