San Francisco’s politicians spend a lot of time arguing about what to do about the city’s homeless problem, but not a lot of time evaluating after the fact whether their ideas actually worked.

Remember the big fights over banning sitting or lying on sidewalks and aggressive panhandling? Those measures arguably didn’t do much, but the politicians who were so sure they’d help have long moved on to other potentially pointless debates.

Well, believe it or not, there’s actual evidence to show that one proposal that was fought over for years is making a difference. Laura’s Law, which allows for the compelled treatment of mentally ill people, has proved in its first year in San Francisco to be a small but helpful step toward addressing a problem obvious to anyone who walks around the city.

After four years of on-and-off bickering, the Board of Supervisors finally passed Laura’s Law in 2014. It took effect in November 2015, and new statistics show that in the following year, many of those referred to the city for help under the law wound up voluntarily accepting it. Just three of the 108 people who came into the system had to be ordered by a judge to receive treatment.

“It helps people get on their own two feet and out of their mental health crisis,” said Supervisor Mark Farrell, who pushed the 2014 version. “That’s the outcome we want.”

Laura’s Law was named for Laura Wilcox, a college sophomore who was working as a receptionist at the Nevada County Department of Behavioral Health when she was slain on Jan. 10, 2001, by a man who suffered from paranoid delusions but had refused his family’s pleas to get treatment.

California adopted Laura’s Law in 2002, but it is up to individual counties to decide whether to participate. The law allows a relative, roommate, mental health provider, or police or probation officer to petition the courts to compel outpatient treatment of a person with mental illness. The person must have been jailed or hospitalized twice in the previous five years because of mental health issues or have had a violent outburst within the previous four years. The law does not provide for a patient to be forcibly medicated.

Some advocates for the homeless argued that Laura’s Law would criminalize the mentally ill, and some medical experts said it wouldn’t work without forced medication. After San Francisco finally adopted it, several counties followed suit, including Alameda, Contra Costa and San Mateo.

Almost all of the 108 people referred to San Francisco’s Department of Public Health in the law’s first year were flagged by relatives or mental health providers, according to a new report from the health department. Forty percent had been homeless in the previous three years.

Sixty percent accepted voluntary services. Of the remaining 40 percent, some didn’t meet the criteria for Laura’s Law, and nothing much could be done.

The Public Health Department opted to take just seven cases — the most severe — to court. Three people settled by agreeing to treatment and the department withdrew one case, leaving just the remaining three who had to be ordered into treatment by a judge.

“We’ve had great initial success in engaging people in voluntary services,” said Angelica Almeida, director of assisted outpatient treatment for the Public Health Department. “We’re using the court petition as a last resort.”

Almeida was especially proud of one success story, involving a homeless man who had been taken to the psychiatric emergency room at San Francisco General Hospital 50 times in 2015 — an average of nearly once a week. Under Laura’s Law, he’s averaging less than one visit per month, Almeida said, and is housed and working with a mental health provider.

“This is a program that’s based in recovery and wellness,” Almeida said. “We believe people can get better, and this is one of the pathways to do that.”

In more good news related to homelessness in San Francisco (say what?), the city’s Department of Homelessness and Supportive Housing finally has the long-sought data system that will store all information related to the city’s homeless.

The city controller called for such a system 15 years ago, and in the incredibly slow, bureaucratic world of City Hall, it’s finally ready. It will replace the 15 separate data systems that city workers and nonprofits now use — a frustrating setup that has meant homeless people having to tell their same harrowing story over and over again.

The department put out a request for proposals in March and had a panel of experts winnow the eight responses down to three. Engineers from Google, Airbnb and Foursquare then helped the department choose the winner: a product called Clarity Human Services made by the company Bitfocus.

Nonprofit workers, city employees and yours truly saw a demonstration of the product the other day, and it appeared to be an easy, intuitive system. It stores a host of information: names, birthdays, Social Security numbers, gender, race, ethnicity, photographs, where in the city homeless people have been encountered by outreach workers, the benefits they receive and more. It also shows which housing they qualify for and where they are on the waiting list.

Google is giving $1 million to San Francisco to pay for tailored improvements to the Clarity system, which is used in cities around the country. The company is donating another $1 million in staff time to help train people to use it.

Justin Steele, who leads Bay Area giving efforts for Google.org, the company’s charitable arm, said the database will “provide real-time client data to help allocate resources, make better policy decisions and more effectively address homelessness.”

Google and other tech companies are also working on an app for future homeless counts, so the volunteers and officials who go out on the city’s streets won’t have to use pencil and paper. This year’s count is Thursday, and we hear San Francisco is likely to start counting the homeless every year rather than every other year, which is all the federal government requires for a city to be eligible for assistance.

Jeff Kositsky, director of the city’s homeless department, said it would have been possible decades ago for the city to create a shared database of such information — they were called index cards. But hey, better late than never.

“For the first time ever, we’ve got the technology and leadership in the city and the resources to actually build this system,” Kositsky said. “I don’t think it’s going to solve homelessness, but it’s going to make homeless people’s ability to access services much easier and more efficient.”

San Francisco Chronicle columnist Heather Knight appears Tuesday and Friday. Email: hknight@sfchronicle.com Twitter: @hknighsf