An Open-system approach to evaluating the effectiveness of hospital emergency departments