Interacting hospital departments and uncertain patient flows door