a Fabrication of a temperature-responsive imprinted hydrogel with β-lactamase as the template. b Bacteria could express β-lactamases to hydrolyze β-lactam antibiotics. The imprinted hydrogel bound β-lactamase and protected antibiotics from enzymatic degradation. After bactericidal treatment, the β-lactamase trapped in the hydrogel was released by a temperature stimulus and could then degrade antibiotic residues. The residual β-lactamase in solution could be rebound by the IP hydrogel to decrease their health risk.