A Long Beach hospital failed to comply with California law in January when it discharged an 84-year-old dementia patient who got into a cab and was dumped in the middle of the night outside a locked Alzheimer’s treatment facility, according to a state investigation.