CHICAGO (CBS)–Monday’s fatal shooting at Mercy Hospital has raised new questions about whether an upcoming Illinois law would have prevented shooter Juan Lopez from having a firearm.

On Jan. 1, a new state law will go into effect that will allow family members or police to seek a court order–without an order of protection–to confiscate guns from a person showing threatening or unsafe behavior to themselves or others.

CBS 2’s Jim Williams examines how the so-called “red flag” bill is designed to help protect domestic violence victims.

Juan Lopez, 32, shot and killed three people at Mercy Hospital on Nov. 19, 2018. Chicago police said Lopez also was killed. (Source: Facebook)

Four years before Juan Lopez’s shooting spree at Mercy Hospital, his estranged wife was granted a two-week order of protection against him.

Court documents show she told the judge she feared for her safety, and that Lopez slept with a gun under his pillow.

Her order of protection included this provision: “Respondent should be ordered to surrender any and all firearms to the local law enforcement agency.”

But she never requested an extension of that order of protection, and it appears Lopez’s guns were never seized.

Police Superintendent Eddie Johnson said this week following the shooting that records show Lopez had legally purchased four guns during the past five years.

When an order of protection is granted by the court, it is entered into a police computer database, but only as long as it’s in effect.

Keli McGuire of Life Span, an anti-violence organization for women and children, explained that an order of protection makes it a crime for someone named in the court order to be anywhere near the victim.

The “red flag” bill would boost those protections, in a sense, by giving courts more authority over whether someone who could have violent intentions is able to have a gun.

State Rep. Kathleen Willis is the bill’s sponsor.

“Instead of being Monday morning quarterback, be able to (be) proactive ahead of time and protect people basically from themselves,” Willis said.

Under the new law, a judge would suspend a FOID card and would be able to ban the person from owning a gun for up to six months.

“My overall aim was to take what we’ve learned from mass shootings, from suicides where we see there are these warning signs ahead of time, where (we) see that people haven’t necessarily broken the law beforehand, but there’s something that makes you feel something is wrong and there’s a warning,” Willis said.

Richard Pearson of The Illinois Rifle Association told us his group supports the new legislation.

Pearson said Lopez would have been “the perfect case for this law.”