have patient 3118 been to the er since 3 years ago?
select count(*)>0 from admissions where admissions.subject_id = 3118 and admissions.admission_location = 'emergency room admit' and datetime(admissions.admittime) >= datetime(current_time,'-3 year')