Cost accounting system for an emergency department