instruction: when was the last time of hospital admission in which patient 006-77873 was admitted through the emergency department in 2104?
response: SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '006-77873' AND patient.hospitaladmitsource = 'emergency department' AND STRFTIME('%y', patient.hospitaladmittime) = '2104' ORDER BY patient.hospitaladmittime DESC LIMIT 1