A mathematical model for the admission process in intensive care units