GPs will work more closely with specialists to support patients closer to home, the government says.