The following relates to an improved system and method for delivering medication to a patient through a syringe. A intravascular (IV) device may include a syringe, a temperature sensor, flow detector, and a reader such as a barcode reader or radiofrequency ID (RFID) reader. The reader may measure information that indicates a medication type. Information measured by the IV device may be used along with patient vital sign information to form a closed-loop feedback system to control the IV device.