when did patient 51977 last year for the first time leave the hospital?
select admissions.dischtime from admissions where admissions.subject_id = 51977 and datetime(admissions.dischtime,'start of year') = datetime(current_time,'start of year','-1 year') order by admissions.dischtime asc limit 1