what was the last value of an sodium lab test in patient 1798 in the first hospital visit?
select labevents.valuenum from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 1798 and admissions.dischtime is not null order by admissions.admittime asc limit 1 ) and labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'sodium' ) order by labevents.charttime desc limit 1