hospital management system flow diagram