A 60-year-old woman with a history of heart failure, substernal chest pain that awoke her from sleep, dysphagia when swallowing solids, odynophagia when swallowing both solids and liquids, a previous history of chest pain, and sharp pain occurring only after swallowing is seeking a diagnosis. Given her medication list, including metoprolol succinate, furosemide, potassium chloride, simvastatin, isosorbide dinitrate, and levothyroxine, which diagnostic approach or test is most likely to lead to the correct diagnosis?