Emma Raducanu had to be assessed by a doctor on court as she fell to defeat against Jessica Pegula in the Miami Open quarter-finals.