Is it illegal to refuse emergency service to someone without healthcare?

It is illegal to refuse emergency medical service, even if the person is an illegal immigrant