By Pam Zekman

CHICAGO (CBS)–While Juan Lopez was planning to marry Dr. Tamara O’Neal, he faced legal battles with his ex-wife.

She wanted him held in contempt for failing to pay child support for their 6 year old son– nearly $6,000.

In court documents she said Lopez told the boy his mom was ‘evil and dark.’

Her stated grounds for divorce: “constant infidelity and abuse.”

Those abuses were described in a requested protection order saying Lopez “slept with a pistol under his pillow” and that she feared her safety was in jeopardy.

On Monday at Mercy Hospital, Lopez killed Dr. O’Neal, and two others including a Chicago cop.

“He came over there because they had broken off their engagement and he wanted his engagement ring back, that’s what brought him over there,” said Chicago Police Superintendent Eddie Johnson.

Lopez once dreamed of becoming a Chicago firefighter, but he only lasted two months at the city’s fire training academy.

“He was fired for harassing individuals in there–I can confirm that,” Johnson said.

Lopez was also a student at DePaul University, where he earned a bachelor’s degree in public service in 2013. He was enrolled at DePaul seeking his master’s degree in the same program.

Lopez has also worked security at area hospitals, where he apparently met Dr. O’Neal.

Garth Walker, O’Neal’s co-worker, remembers meeting Lopez on several occasions.

“The story I remember (is) he was a security guard at either Mercy or Masonic while she was an attending and that’s essentially how they met,” Walker said. “But they loved each other, as much as I could gather.”

Meanwhile, authorities revealed Tuesday that Lopez had a concealed carry permit. Chicago police spokesman Tom Ahern said the gun used in the shooting, a 9 mm semi-automatic handgun, was purchased legally from a suburban gun shop. Ahern declined to name the store that sold the firearm.

Johnson said records show Lopez had purchased four weapons in the past five years.

Lopez’s cause of death, released by the Medical Examiner’s Office Tuesday, shows he died of a gunshot wound to abdomen with a self-inflicted gunshot wound to the head as a contributing factor.