If the murder had happened in Los Angeles, we might know whether the accused 12-year-old boy had a history of violence.

If it was in Michigan, we might find out if the 2-year-old he allegedly beat to death was repeatedly abused.

If the foster parents lived in Illinois, we might be able to sit in court and hear whether the family realized that their 12-year-old son was a danger to the foster child they were supposed to shelter, protect and nurture.

But the foster parents of Aniyah Batchelor, a toddler who was killed in their home last week, live in Fort Washington.

And in Maryland, the courts, documents, records and lips of everyone who has any say in the lives of nearly 7,000 children who have been taken from their homes are sealed.

You know that a lot probably went wrong here.

Aniyah was put into foster care because of alleged abuse of another child in her home. And no, we don’t know the details of that abuse and probably never will. It’s all a big secret.

And that’s why it is worth looking at the way child dependency courts are open to the public in Los Angeles, Michigan, Illinois and a handful of other places where legislators believe transparency leads to a more accountable child welfare system.

In California, Judge Michael Nash, the chief presiding judge of Los Angeles County’s children’s court, simply ruled this year that all courtrooms would be open unless an individual judge can prove a child would be harmed by this.

Has it harmed anyone?

“Confidentiality tends to protect the system, rather than the children in the system,” Nash told me.

He’s seen more scrutiny, attention and discussion of the way child welfare cases are decided since he opened the courts.

Vivek Sanakaran saw the difference right away when he moved to Michigan.

“I practiced in D.C. for five years,” said Sanakaran, a clinical assistant professor of law in the Child Advocacy Law Clinic at the University of Michigan. “When a system is beyond scrutiny, there is a certain amount of lawlessness that pervades.”

“You’ll see lawyers who never talked to their clients, social workers who didn’t have time to make visits,” and yet, he couldn’t talk about it to anyone.

Until a child is dead, we rarely get the full story when it comes to child welfare cases. And sometimes, even then, the details remain murky.

We don’t know whether the foster family in Fort Washington was in trouble before. We don’t know the history of the child. Maryland won’t even tell us whether the family was certified as suitable foster parents by an embattled government contractor — Contemporary Family Services — that was pinpointed in a recent Baltimore Sun investigation.

“Is there a systemic problem? We can’t find out,” said Matthew Fraidin, a professor at the University of the District of Columbia law school and longtime advocate of transparency. “Would Maryland do better at this if they knew their decision-making process would be visible to outsiders? Of course they would, just like the rest of us. The psychology research says decision-makers are more careful and deliberate, and seek out more information, if they know they’ll have to justify their decision later.”

This is the same state that thought Shelby Lewis, a Temple Hills 45-year-old, would make a great foster dad. Turns out he was a pimp who was convicted in 2009 of sexually abusing and pimping out his 13-year-old foster daughter, alongside his other workers — 14 and 16-year-olds.

Sounds a bit like the case of Renee Bowman, who was convicted of beating and abusing one of her adopted daughters and killing the other two, then storing them in her freezer. She was arrested in 2008, convicted in 2010 and has carried her silence with her into prison.

We never really learned why the D.C. government — in this case represented by an independent contractor that got paid by the investigation into prospective foster families — thought it was OK for this woman to adopt three children.

It’s a complex issue.

Melissa Rock, the child welfare director at the Maryland nonprofit Advocates for Children and Youth, doesn’t want to subject children to the trauma of testifying in open court about abuse or neglect. “So we shouldn’t necessarily have open courtrooms,” she said.

But Rock’s group is actively fighting for more transparency and more data in these cases. “It’s not that hard to just redact the names of the family involved,” she said.

That’s right. As for the adults who are making these decisions, they don’t need the protection of secrecy. They need to step into the light.

For past columns by Petula Dvorak, go to postlocal.com