Detection of inactivation of β-lactam antibiotics by infrared spectrophotometry