Tributes have been paid to three people shot dead in a Chicago hospital by a gunman who targeted his former fiancée.
The suspect killed a doctor, a pharmacist and a police officer at Mercy Hospital on Monday afternoon.
Dr Tamara O'Neal, who had been in a relationship with the suspect, had worked all her life to save the lives of fellow Chicagoans, colleagues say.
Officer Samuel Jimenez, who also died, is being praised as a hero by hospital and city officials.
Dr John Purakal, a professor of emergency medicine at the University of Chicago, said he had tried in vain to save Dr O'Neal's life.
"I knew her, trained with her, saved lives with her and tonight, tried to save her life," he wrote on Twitter.
The shootings began with an argument in the Mercy Hospital car park between the gunman, 32-year-old Juan Lopez, and Dr O'Neal at about 15:00 local time on Monday.
The gunman shot Dr O'Neal, 38, several times in the chest before standing over her and firing three more times, witnesses said.
He and Dr O'Neal had been engaged to marry in October, but she called it off a month beforehand, according to local media.
Chicago Police Superintendent Eddie Johnson said that killing was an act of domestic violence.
The suspect then entered the hospital, shooting at random and killing newly graduated pharmacist Dayna Less, who was getting out of a lift at the time.
In an exchange of fire with the gunman, policeman Samuel Jimenez was killed.
A second officer avoided injury after a bullet fired in his direction became lodged in his gun in his holster.
The suspect was shot in the chest before he shot himself, according to police spokesman Anthony Guglielmi. He fired his gun at least 30 times, he added.
Shots were fired at a 2nd CPD officer in the Mercy Hospital Shooting, but he wasn't injured. Instead, the bullet struck his holster and embedded itself in his gun: https://t.co/hVPwgbrkXv pic.twitter.com/OvMI0ln3l6— ABC 7 Chicago (@ABC7Chicago) November 20, 2018
Lopez was dismissed from Chicago's Fire Academy in 2014 after he went AWOL and faced disciplinary action for bullying and "inappropriate contact with fellow female cadets", fire department spokesman Larry Langford said on Tuesday.
Lopez had a permit to carry a concealed weapon, and had legally purchased several weapons in recent years, it is unclear if officials had been aware of his 2014 complaint when he was granted the permit.
Less than 24 hours after the hospital attack, another Chicago police officer was shot in the chest during a traffic stop on city's South Side.
Police said the bullet struck the officer's ballistics vest, which probably saved his life.
Who were the victims?
Dr O'Neal was an emergency physician at Mercy Hospital on Chicago's south side.
Dr Patrick Connor, director of the hospital's emergency department, said she had been "dedicated to caring for her community - a wonderful individual".
Dr O'Neal worked two jobs before starting medical college in Chicago, passing her doctorate in 2016.
She had been raising money for disadvantaged children while also leading her church choir.
Dayna Less, 25, joined the hospital in July as a first-year pharmacy resident. She was planning to marry her childhood sweetheart next June.
Her family said she had overcome a rare medical condition that caused her debilitating headaches throughout high school.
Her father, Brian Less, told reporters on Tuesday: "She was forged in her own adversity, which made her the strongest person I will ever know."
Police officer Samuel Jimenez was a 28-year-old married father of three young children.
"We cannot thank him enough for his courage and bravery today," Dr Connor said.
His body was transported by a police honour cordon to the Cook County Medical Center on Tuesday.
Memorial bunting has been installed in his honour at the Chicago police headquarters.