what was the last ward id that patient 27739 went since 3 years ago?
select transfers.wardid from transfers where transfers.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 27739 ) and transfers.wardid is not null and datetime(transfers.intime) >= datetime(current_time,'-3 year') order by transfers.intime desc limit 1