what was the name of the drug prescribed for the last time during the last hospital encounter for patient 29971?
select prescriptions.drug from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 29971 and admissions.dischtime is not null order by admissions.admittime desc limit 1 ) order by prescriptions.startdate desc limit 1