What does the hospital emergency department do?