Find the patient order by the date they underwent treatment. Recent first.
select patient from undergoes order by dateundergoes desc
Only show the first result.
select patient from undergoes order by dateundergoes desc limit 1