Here is some information about Santa Barbara County Mental Health
My place of work is a few miles from where the shooting took place. I work for the alcohol, drug and mental health dept of the county. I am not on the medical side but I know of our programs because I do reporting that pays for it.
First off we don't have enough beds to put everyone in a hospital. The hospitals are locked facilities. We try to keep people out of locked facilities if possible. Only severe cases are in locked facilities. Police do have the ability to send someone to the hospital if they are a threat to themselves or society. This decision is in conjunction with clinicians on a mobile crisis team. They are available 24/7 as are doctors.
We have 24/7 mobile crisis teams, crisis residential homes for crisis intervention.
We use drugs. All our clients do not become suicidal because of drugs. We do not give them out like candy and they are not an alternative to hospitalization.
You cannot predict when someone with mental illness will act out as this shooter has done.
Mentally ill people still retain their civil rights.
As in any shooting the shooter was a good guy before becoming a bad guy.
The common denominator here is the guns.