AI could be used to reduce waiting times in A&E, research suggests