Disclosed is an apparatus for analyzing the composition of bodily fluid, the apparatus comprising a fluid handling network (10) including a patient end (12) configured to maintain fluid communication with a bodily fluid in a patient and at least one pump (203) intermittently operable to draw a sample (S) of bodily fluid from the patient; and a fluid analyzer (334) positioned to analyze at least a portion of the sample (S), wherein the fluid analyzer (334) is configured to (a) obtain a spectroscopic analysis measurement of at least the portion of the sample (S); (b) analyze the measurement to identify a possible interferent to an analyte, the spectroscopic features of the analyte overlapping with the spectroscopic features of the possible interferent; (c) generate a model for estimating the concentration of the analyte; and (d) estimate a concentration of the analyte in the at least the portion of the sample (S) using the model.