System dynamics modelling of emergent and elective patient flows