It sounds like you have little insight into why your family and the medical team thought you were a danger to yourself and others. Section 5150 of the California Code enables institutions in that State to hold you involuntarily. Whether medical records are public (which I doubt) and if so how to expunge them, is a question that should be directed to a mental health lawyer in that State. Your inquiry shows a Farmington NM location.
A weekly guide with tips and legal advice for each stage of the process.