Study highlights complex needs of homeless patients