Marko Arnautovic has passed a medical ahead of a proposed move to Shanghai SIPG from West Ham after a 25 million euro (£22.4m) deal was agreed.