how has patient 6440 last visited the hospital until 3 years ago?
select admissions.admission_type from admissions where admissions.subject_id = 6440 and datetime(admissions.admittime) <= datetime(current_time,'-3 year') order by admissions.admittime desc limit 1