when was the last time that patient 40435 was prescribed a medication via the vg route in the last hospital encounter?
select prescriptions.startdate from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 40435 and admissions.dischtime is not null order by admissions.admittime desc limit 1 ) and prescriptions.route = 'vg' order by prescriptions.startdate desc limit 1