what was patient 5310's first id of the ward?
select transfers.wardid from transfers where transfers.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 5310 ) and transfers.wardid is not null order by transfers.intime asc limit 1