The police and the judge together can decide. In the past, you had to have a mental health professional testify that the person was a danger to themselves or others. The standard of proof has also been greatly lowered to just a reasonable belief.
I meant will the police be included in the psychoanalysis? Can we demand a cop face the same rules and interrogation they want to put on us?