Introduction

Antibiotic-resistant bacteria are the most commonly identified pathogens that often cause severe infections in both hospital and community settings1,2,3. As such, timely and appropriate antibiotic therapy administration is crucial for managing bacterial infections in the clinic4. However, patients are often treated with broad-spectrum antimicrobial drugs due to the lack of rapid identification methods for bacteria. Unfortunately, there is a frequent mismatch between infection severity and antibiotic prescription, leading to the overuse of antibiotics or/and inappropriate drug selection5,6,7. Moreover, exposure to broad-spectrum antibiotics may contribute to the emergence of “superbugs”, thereby resulting in therapeutic failure8. Effective antimicrobial drug management calls for reliable identification of antibiotic resistance in bacterial infections.

Antimicrobial susceptibility testing (AST) is the gold-standard method to guide the use of antimicrobial drugs9. However, AST relies on bacterial culture, which often takes 1-7 days, and thus physicians have to empirically prescribe broad-spectrum antibiotics to treat bacterial infections before obtaining the testing results (Fig. 1A). In clinical practice, the accuracy of empirical prescription of antibiotics is less than 50%10. Moreover, AST may occasionally produce false-negative results because some bacteria are difficult to culture. Diverse alternative methods have emerged to expedite the diagnostic process, encompassing RT-PCR11,12, gene sequencing13,14, next-generation sequencing15,16, mass spectrometry17,18, optical detection19,20,21,22,23,24,25,26, thermal measurement27, nanomechanical sensing28, and plasmonic nanosensors29. Nevertheless, these methods usually require expensive equipment, skilled personnel, and complex sample processing, thus limiting their use in laboratory settings. It is urgently needed to develop approaches that are sensitive, rapid, and straightforward for point-of-care testing (POCT) of bacterial resistance.

Fig. 1: Design of the BSV sensor for rapid detection of antibiotic resistance.
figure 1

A The management of antibiotic resistance by conventional strategies and the BSV sensor. In most countries, healthcare institutions are commonly categorized into primary (no AST), secondary, and tertiary levels. Typically, suspected infection cases are initially managed to control symptoms in clinical settings based on the physician’s experience, and the medication would be adjusted according to the bacterial culturing results several days later. By contrast, the BSV sensor can report the β-lactamase subtypes of various body fluid samples from suspected infection patients within 0.25–3 h. B Design of the BSV sensor and working principle of the six independent sample chambers. Chamber 1 is loaded with tartrazine to reflect the quality of the BSV sensor, while chamber 2 makes use of bromophenol blue to indicate the presence of proteins. Chambers 3 to 6 are loaded with the four as-synthesized β-lactamase chromogenic probes to respectively differentiate BSBL, ESBL, AmpC, and carbapenemases. C Hydrolysis properties of the four β-lactamase subtypes towards the chromogenic probes.

In the clinic, the second- and third-generation cephalosporins are commonly prescribed as the primary treatment for bacterial infections1,10. Unfortunately, the emergence and dissemination of β-lactamases have significantly reduced the efficacy of these antibiotics. Based on the spectrum of β-lactam hydrolysis, β-lactamases can be classified into four major groups: broad-spectrum β-lactamase (BSBL), extended-spectrum β-lactamase (ESBL), AmpC β-lactamase (AmpC), and carbapenemase30,31. Of particular concern, carbapenem antibiotics are the last resort in combating life-threatening infections32,33. The treatment regimen to combat antibiotic resistance is made according to the β-lactamase subtypes in bacteria strains. Hence, the accurate identification of β-lactamase subtypes could enable tailored antibiotic treatment regimens that align with the specific infection patterns exhibited by individual patients, thus reducing the abuse of antibiotics and ultimately improving patient outcomes.

Here, we report a POCT diagnostic sensor for rapid and visual identification of β-lactamase subtypes in diverse clinical samples. We show the sensor is able to discriminate the β-lactamase-producing bacteria in 100 real clinical samples with 100% accuracy within 0.25–3 h, enhancing the accuracy of antibiotic therapy from 48% to 83%, and further from 50.6% to 97.6% after eliminating fungal interference. We previously showed that the conjugation of -N+(CH3)3 to a chromogenic carbapenem substrate (CCS) could dramatically improve the sensitivity and specificity of the probe in detecting carbapenemases34. Inspired by this, here we design three -N+(CH3)3-bearing chromogenic cephalosporin substrates (CCepS-N+(CH3)3) to detect the remaining three β-lactamase subtypes, including BSBL, ESBL, and AmpC, incorporating with CCS-N+(CH3)3 on a sensor to achieve the visual classification of β-lactamase-associated bacterial resistance. This β-lactamase subtype visualization (BSV) sensor can detect clinical bacteria-resistant isolates with the lowest detectable concentration at 104 CFU/mL, 1–2 orders of magnitude lower than other visual β-lactamase probes35. The BSV sensor can provide results within 0.25–3 h, depending on the types of biofluids being screened, which is much faster than methods relying on cultivation (Fig. 1A), holding great promise for the timely administration of antibiotics.

Results

Rational design of the BSV sensor and synthesis of CCepSs

The BSV sensor is a transparent polyethylene device with six independent channels where the probe-loaded paper sheets are installed in the chambers. The paper sensor includes a negative control in chamber 1, which maintains a stable lemon-yellow color to ensure the stability of the sensor quality. Chamber 2 is loaded with bromophenol blue to act as a positive control, which undergoes a notable color change from yellow to blue upon binding to proteins in the samples. Detection chambers 3–6 were assigned to the molecular probes targeting BSBL, ESBL, AmpC, and carbapenemase sequentially, based on their β-lactamase hydrolysis ability (Fig. 1B). The samples (20 μL) are dropped into the central sampling hole and then quickly diffuse into the chambers via capillary siphoning. The result can be visually identified by the paper sheets after a short incubation.

As previously reported34, when the β-lactam ring of CCS-N+(CH3)3 is hydrolyzed by carbapenemase, the nitrogen atom in the amide converts into a secondary amine, resulting in a resonance change that elongates the conjugated system, thus leading to the redshift of absorption bands in the visible spectrum, accompanied by a significant color change from yellow to red. In this study, we wanted to expand the color-changing mechanism of CCS-N+(CH3)3 to the CCepS probes that can report the presence of BSBL, ESBL, and AmpC, respectively. The core structure of cephalosporins is 7-aminocephalosporanic acid (7-ACA)36,37, whose 3-position was conjugated with a -N+(CH3)3-bearing benzene derivative via a double bond to produce CCepS-N+(CH3)3−1, which can be hydrolyzed by all kinds of β-lactamases (Fig. 1C). When the C7-β position of CCepS-N+(CH3)3−1 was replaced with (E)−1-(2-aminothiazol-4-yl)ethan-1-one oxime, the resulting probe (namely CCepS-N+(CH3)3−2) can resist the hydrolysis of BSBL38,39, but can still be hydrolyzed by ESBL, AmpC, and carbapenemase. Further, when modified the C7-α position of CCepS-N+(CH3)3−1 with a methoxy group40,41, the resulting probe (namely CCepS-N+(CH3)3−3) can only be hydrolyzed by AmpC and carbapenemase. Finally, CCS-N+(CH3)3 can only be hydrolyzed by carbapenemase while maintaining silence in the presence of the lower-level β-lactamases (i.e., BSBL, ESBL, and AmpC). These four probes were incorporated into a BSV sensor to allow rapid and visual identification of BSBL, ESBL, AmpC, and carbapenemase.

This study was set out by preparing the probes. CCepS-N+(CH3)3−1 was synthesized from a 7-ACA derivative (1) whose carboxylic acid was protected by a benzyl ether (Supplementary Fig. 1). Firstly, 2-(2-aminothiazol-4-yl)acetyl chloride was conjugated to the C7-β position of 7-ACA in the presence of bis-trimethylsilylacetamide (BSA) to yield compound 2. Next, compound 2 underwent nucleophilic substitution of the chlorine with sodium iodide, which was then protected with triphenylphosphine (PPh3) to give compound 3. Compound 3 was cross-coupled with compound 4 under the catalysis of potassium trimethylsilanolate to produce compound 5. Finally, the carboxylic acid group in compound 5 was removed using trifluoroacetic acid and anisole to yield CCepS-N+(CH3)3−1. CCepS-N+(CH3)3−2 was synthesized from cefdinir (compound 6, a classical 3rd-generation cephalosporin antibiotic), which was directly conjugated with compound 7 via the Heck coupling reaction (Supplementary Fig. 2). CCepS-N+(CH3)3−3 was generated by modifying the C7-α position of cefdinir with a methoxy group, followed by the Heck coupling reaction with compound 7 (Supplementary Fig. 3). These products and related intermediates were characterized by nuclear magnetic resonance (NMR) and mass spectroscopy (MS), as shown in Supplementary Fig. 427, Supporting Information.

Analytical features of CCepS-N+(CH3)3−1, CCepS-N+(CH3)3−2, CCepS-N+(CH3)3−3, and CCS-N+(CH3)3

To evaluate the coverage and specificity of CCepSs for the four subtypes of β-lactamases, we prepared 11 β-lactamases, including five carbapenemases (NDM-1, KPC-3, VIM-27, IMP-4, and OXA-48), 2 AmpCs (MOX-1 and CMY-4), 3 ESBLs (SHV-5, TEM-7, and CTX-M-3), and 1 BSBL (TEM-1). These β-lactamases were synthesized using genetic engineering techniques based on their respective gene sequences. The resulting β-lactamases were purified using HisTrap Ni columns and identified using SDS-PAGE34.

We attempted to investigate the color and UV spectral changes caused by the rupture of the lactam ring when the three CCepS-N+(CH3)3 and CCS-N+(CH3)3 (10 μM) were incubated with the most broad-spectrum carbapenemase–NDM-1 (3 nM) at 37 °C in phosphate-buffered saline (PBS, pH 7.4). All the solution color of CCepS-N+(CH3)3 and CCS-N+(CH3)3 changed immediately from pale yellow to red, with a shift in the maximum absorption bands (λmax) of CCepS-N+(CH3)3−1 from 443 nm to 481 nm, CCepS-N+(CH3)3−2 from 436 nm to 512 nm, CCepS-N+(CH3)3−3 from 438 nm to 518 nm, and CCS-N+(CH3)3 from 417 nm to 591 nm (Fig. 2A, i: CCepS-N+(CH3)3−1, ii: CCepS-N+(CH3)3−2, iii: CCepS-N+(CH3)3−3, and iv: CCS-N+(CH3)3). The intensity was dependent on the incubation time. To confirm whether the probes were effectively cleaved by NDM-1, liquid chromatograph-mass spectrometer (LC-MS) analysis was performed on the four substrates as well as their corresponding hydrolysis products, as shown in Supplementary Fig. 28-31. The LC retention times of all the hydrolysis products were shorter than their corresponding substrates, and no other LC peaks were observed. These results suggest that the β-lactam rings in all CCepS-N+(CH3)3 and CCS-N+(CH3)3 can be completely cleaved without any intermediate compounds produced during the hydrolysis.

Fig. 2: Analytical features of CCepS-N+(CH3)3−1 (i), CCepS-N+(CH3)3−2 (ii), CCepS-N+(CH3)3−3 (iii), and CCS-N+(CH3)3 (iV) towards 11 β-lactamase subtypes.
figure 2

A Spectral and color change of CCepS-N+(CH3)3 and CCS-N+(CH3)3 (10 μM in PBS, pH 7.4) after incubating with NDM-1 (3 nM) over time. B Absorbance change of CCepS-N+(CH3)3 (10 μM) at 518 nm (A518) and CCS-N+(CH3)3 (10 μM) at 591 nm (A591) after incubating with 3 nM of carbapenemases (NDM-1, KPC-3, IMP-4, VIM-27, and OXA-48), AmpC (MOX-1 and CYM-4), ESBL (CTX-M-3, SHV-5, and TEM-7), and BSBL (TEM-1) over time. Data represent mean ± s.d., n = 3, three technical replicates. C A518 of CCepS-N+(CH3)3 and A591 of CCS-N+(CH3)3 at 40 min after incubating with the β-lactamases. Data represent mean ± s.d., n = 3, three technical replicates. D Michaelis–Menten kinetic plots of the selected β-lactamases towards CCepS-N+(CH3)3 and CCS-N+(CH3)3. Data represent mean ± s.d., n = 3, three technical replicates. E A518 of CCepS-N+(CH3)3 and A591 of CCS-N+(CH3)3 (10 μM in PBS, pH 7.4) at 40 min after incubating with various concentrations of the selected β-lactamases. Data represent mean ± s.d., n = 3, three technical replicates.

As seen from the spectral changes before and after hydrolysis of the three CCepS-N+(CH3)3, the absorbance at 518 nm (A518) is greatly improved (~60 folds) within 5 min. Thus, the changes in A518 can be indicative of the presence of BSBL, ESBL, and AmpC. In the context of CCS-N+(CH3)3 before and after hydrolysis, the most exciting finding is that the two bands at 417 and 591 nm were resolved without any spectral overlap. Upon the introduction of NDM-1, more than 120-fold enhancement of the absorbance at 591 nm (A591) was achieved within 5 min (Fig. 2A, iv), which can be utilized to sensitively detect carbapenemases.

Subsequently, we evaluated the dynamic interactions of the four visual probes towards BSBLs, ESBLs, AmpCs, and carbapenemases. A518 and A591 were respectively monitored after incubating the three CCepS-N+(CH3)3 and CCS-N+(CH3)3 (10 μM) with the 11 β-lactamases subtypes (3 nM). In the case of CCepS-N+(CH3)3−1, the A518 values increased under the treatment of all the 11 β-lactamases, in which ESBLs (TEM-7, SHV-5, and CTX-M-3) showed a slightly weaker enhancement and BSBL (TEM-1) was the weakest strain but still was able to increase the A518 value by 20 folds (Fig. 2B, i). For CCepS-N+(CH3)3−2, the A518 values were enhanced by ESBLs, AmpCs, and carbapenemases while BSBL was ineffective (Fig. 2B, ii). Neither ESBLs nor BSBLs significantly increased the A518 values for CCepS-N+(CH3)3−3 (Fig. 2B, iii). Only the five subtypes of carbapenemases increased the A591 values for CCS-N+(CH3)3 (Fig. 2B, iv), whereas the six non-carbapenemases had minimal effect.

To investigate the specificity of CCepS-N+(CH3)3 and CCS-N+(CH3)3 towards the 11 β-lactamase subtypes, the corresponding A518 and A591 values were collected after incubation for 40 min (Fig. 2C). The results showed that CCepS-N+(CH3)3−1 exhibited no specificity towards the 11 subtypes of β-lactamases, while CCepS-N+(CH3)3−2 demonstrated high specificity towards carbapenemases, AmpC, and ESBL. CCepS-N+(CH3)3−3 showed specificity towards carbapenemases and AmpC, while CCS-N+(CH3)3 displayed specificity only towards carbapenemases. Based on these results, we believe the combinational analysis of these four probes can enable the visual identification of β-lactamase subtypes.

To better understand the process of β-lactamase hydrolyzing CCepS-N+(CH3)3 and CCS-N+(CH3)3, we measured the Michaelis-Menten kinetic parameters, including Michaelis constant (Km) and catalytic constant (kcat), by creating a set of Lineweaver-Burk plots. The results showed that β-lactamases could rapidly degrade their corresponding substrate probes (Fig. 2D). Based on the plots, the kinetic efficiencies (kcat/Km) of the enzymes were determined (Supplementary Tables 14). The kcat/Km values of all the CCepS-N+(CH3)3 hydrolyzed by their corresponding β-lactamases are comparable to the kcat/Km values of CCS-N+(CH3)3 hydrolyzed by carbapenemases. These visual probes show 1–2 orders of magnitude higher sensitivity than the reported optical probes for β-lactamase detection6B), after which the accuracy of antibiotic therapy was enhanced from 50.6% empirically to an astounding 97.6%, yet there were still 2 cases misdiagnosed (patients NO.77 and NO.87 labeled with yellow background). A careful examination revealed that patient NO.77 was infected by Staphylococcus aureus, a Gram-positive bacterium that Sulbactam/Cefoperazone was ineffective. The infectious bacteria in patient NO. 87 was Stenotrophomonas maltophilia, which was naturally resistant to carbapenem antibiotics, making the ESBL-positive result offered by the BSV sensor helpless to physicians. For patient NO. 77, a Gram stain test can be used to identify the Gram-positive/negative bacteria, which could be combined with the sensor results to help physicians make effective prescription. In clinical practice, the cases infected by Gram-positive bacteria that simultaneously overexpress AmpC enzymes should be prescribed with vancomycin49. The expression of Stenotrophomonas maltophilia in the infectious bacteria of patient NO. 87 can be identified by a qPCR kit. Since even carbapenem antibiotics are ineffective to this infection, patient NO. 87 could be given non-β-lactamase antibiotics such as levofloxacin, minocycline, or cotrimoxazole50.

Discussion

In this study, we devised and synthesized a series of small-molecule chromogenic probes with high sensitivity and specificity against the corresponding β-lactamase subtypes, including BSBL, ESBL, AmpC, and carbapenemases. The probes were loaded onto filter paper sheets and then incorporated into a BSV sensor, enabling visual identification and semi-quantitative detection of β-lactamase variants. A wide range of body fluid samples, including sputum, blood, urine, organ drainage fluid, and tissue lavage fluid, were used to test the efficacy of this sensor, which was confirmed by AST and RT-PCR. As a developed POC diagnostic device that can quickly screen and categorize β-lactamase-producing bacteria, this sensor overcomes the bottlenecks of slow bacterial culture testing, cumbersome operation, and inability to monitor bacterial resistance in real-time, potentially revolutionizing the way of antibiotic treatment.

The BSV sensor we developed is specifically made for patients who are confined to an intensive care unit (ICU) or who are facing life-threatening medical emergencies brought on by bacterial infections. At present, primary antibiotic therapy mainly depends on the physicians’ empirical assessment of the infection situation and medication knowledge, by which the accuracy of antibiotic therapy is overall less than 50%10. With this sensor, the β-lactamase-producing bacteria in real clinical samples were identified within 0.25–3 h, which dramatically enhanced the accuracy of antibiotic therapy from 48% to 83%, and further from 50.6% to 97.6% after eliminating fungal interference. The BSV sensor thus provides possibilities for precision antibiotic therapy, especially in resource-poor regions where expensive facilities and skilled personnel are lacking for microbial culture. In addition to assisting antibiotic therapy, this sensor may help to reduce the overuse and dissemination of antibiotics in both hospital and community settings. In the future, we believe the BSV sensor can be extended to home testing for directing antibiotic uses.

While the BSV sensor is effective in the diagnosis of bacterial infections, they are unable to detect fungal infections. Fungi also pose a significant threat to the health of infected patients, and the initial medication for urgent fungal infections relies on the physician’s experience. Urgent fungal testing can only be performed using RT-PCR or test kits that correlate with the source of the infections; otherwise, the physician must wait for the results of the microbiological identification from the laboratory before administering treatment. Pulmonary fungal infections, specifically those caused by Aspergillus niger, can be identified through the presence of D-glucosamine51. The diagnosis of invasive fungal infections (IFIs) relies on detecting serum markers such as 1,3-β-D-glucan (BDG), mannan (Man), and galactomannan52. To enable the rapid detection of fungal infections, we need to develop sensitive molecular probes that can specifically respond to these markers. Moving forward, we will develop fungal probes to couple with this BSV sensor for comprehensive analysis of microbial infections, fostering practical applications in guiding timely antimicrobial therapeutics.

Methods

Ethical statement

The study was approved by Nankai University Institutional Review Board (NKU IRB). All human samples were acquired and handled according to the protocols approved by the Scientific Ethical Committee of the First Central Hospital of Tian** (Approval No. 2023DZX12). All patients’ age, sex, disease details and medications are published with the patients’ written consent. Informed consent was obtained, and no compensation was provided for all research participants.

General information

All chemical reagents were purchased from commercial suppliers and used without further purification. The chemical reactions were carried out in dry glassware under an argon atmosphere. Analytical reagent (AR)-grade solvents were used throughout all the reactions. All the dry and absolute solvents were prepared according to standard laboratory procedures and were stored over proper drying agents under an argon atmosphere. Analytical thin-layer chromatography (TLC) was performed using Yantai Huanghai HSGF 254 silica gel plate (0.2 mm silica layer with fluorescent indicator). All the glass instruments used in organic synthesis experiments were purchased from Synthware. Luria-Bertani (LB) culture media and dishes were purchased from Sangon Biotech and sterilized by high-pressure steam prior to use. Some strains were obtained from Prof. Kui Zu at China Agricultural University, including Escherichia coli (NDM-1), and Escherichia coli (ATCC 25922); the others were purchased from commercial sources (Nan**g Lezhen Biotechnology Co Ltd), including Escherichia coli (TEM-1, ATCC 35218), Klebsiella pneumoniae (SHV-18, ATCC 700603) and Morganella morganii (DHA-1, ATCC 25830). Bacteria culture was completed in a Thermo Scientific Heratherm constant temperature incubator. UV-vis absorption spectra were recorded by a Shimadzu UV-vis spectrophotometer. LC-MS determination was performed on a Shimadzu LC-MS/MS system equipped with a LC-20AT gradient pump and an online diode UV-vis detector. The structures of the compounds were determined by nuclear magnetic resonance (NMR) and mass spectrometry (MS). The NMR shift (δ) is given in units of 10−6 (ppm). NMR was measured on a Bruker AscendTM 400 nuclear magnetic instrument in deuterated dimethyl sulfoxide (DMSO-d6), deuterated chloroform (CDCl3), and deuterated methanol (CD3OD). Tetramethylsilane (TMS) was used as the internal standard. The following abbreviations are used for the multiplicity of the NMR signal: s (singlet), brs (broad), d (doublet), t (triplet), m (multiplet). The coupling constants are listed in J values and measured in Hz.

Fabrication of the BSV sensor

The production process of the sensor involves four essential steps: structural design, micro/nano fabrication, production of test paper, and sensor assembly. The initial step entails designing the sensor in a hexagonal shape using L-Edit software. The sensor design incorporates six independent diamond-shaped chambers, which are connected to the inlet through dedicated channels. The chambers have ventilation holes that ensure smooth sample delivery. Specific dimensions for the chambers are illustrated in Supplementary Fig. 33. For micro/nano fabrication, transparent polyethylene plastic is preferred due to its excellent properties. Next, tartrazine (0.1 mM, 5 μL), bromophenol blue (1 mM, 5 μL), CCepS-N+(CH3)3−1 (1.8 mM, 5 μL), CCepS-N+(CH3)3−2 (1.8 mM, 5 μL), CCepS-N+(CH3)3−3 (1.8 mM, 5 μL), and CCS-N+(CH3)3 (2 mM, 5 μL) were dissolved in chloroform, which were respectively dropped onto the diamond-shaped filter paper sheets. Finally, the paper sheets were assembled onto the sensor, completing the process of BSV sensor production.

LC-MS analysis of CCepS-N+(CH3)3−1, CCepS-N+(CH3)3−2, CCepS-N+(CH3)3−3, CCS-N+(CH3)3 and their hydrolyzed products

The molecular weights of the compounds were determined using a Shimadzu LC-MS system equipped with an LC-20AT gradient pump and an online diode UV-vis detector. A ShimNex WR C18 column (4.6 i.d. ×250 mm length, 5 μm particle size) was used for chromatography that was operated at 25 °C. The samples were prepared at a concentration of 1 μM, with an injection volume of 50 μL and a flow rate of 1.2 mL/min. Detection was carried out at a wavelength of 254 nm. The mobile phase consisted of MeCN and 0.1% trifluoroacetic acid solution. The entire procedure was completed within a running time of 25 min.

Determination of the detection limits of CCepS-N+(CH3)3−1, CCepS-N+(CH3)3−2, CCepS-N+(CH3)3−3 and CCS-N+(CH3)3

Aliquots of the four different probes (CCepS-N+(CH3)3−1, CCepS-N+(CH3)3−2, CCepS-N+(CH3)3−3, and CCS-N+(CH3)3) were mixed with varying concentrations (0, 10, 25, 50, 100, 200, and 300 pM) of β-lactamases in pH 7.4 PBS buffer at 37 °C for 30 min. The incubation was performed in a sterile 96-well microplate, and the absorbance values at 518 nm (A518) and 591 nm (A591) were measured using a microplate reader during the incubation. Specific calibration curves were constructed by plotting A518 and A591 values against the concentrations of β-lactamases, by which the slopes (k) were obtained. The detection limits of β-lactamases were determined using 3-fold standard deviations (S) of six parallel blank samples divided by the slope (k). This allowed for the accurate determination of the minimum concentration of β-lactamases that could be detected in the samples.

β-lactamases kinetics

We determined the kinetics data of β-lactamases by the Michaelis-Menten model. Aliquots of the 11 β-lactamases (0.2 nM) were incubated at 37 °C with 1 mL the serially diluted CCepS-N+(CH3)3−1, CCepS-N+(CH3)3−2, CCepS-N+(CH3)3−3 and CCS-N+(CH3)3, whose final concentrations were set to be 0, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, and 8 μM in pH 7.4 PBS. The A518 of (CCepS-N+(CH3)3−1, CCepS-N+(CH3)3−2, and CCepS-N+(CH3)3−3), and A591 of (CCS-N+(CH3)3) were determined every 30 s, and the initial rates (\(\upsilon\)) were determined by the Michaelis-Menten equation.

$$\upsilon=\frac{{V}_{\max }[S]}{{K}_{{{{{{\rm{m}}}}}}}+[S]}$$
(1)

Where Vmax is the maximal reaction rate at which the β-lactamase is sufficient to hydrolyze the substrate; [S] values are the substrate concentration. Based on the Michaelis-Menten equation, kinetic curves were obtained. To accurately determine the Km values, Lineweaver-Burk diagrams were drawn by using the double reciprocal method, where their Km value was determined according to the y-axis intercept. Finally, the kcat and kcat/Km values were calculated based on the Vmax and enzyme concentrations (kcat = Vmax/0.2). To guarantee the reliability of the outcomes, three separate replications were carried out.

Visual detection of the clinical isolates

We selected five clinical isolates, including E. coli (no β-lactamase), E. coli (TEM-1), K. pneumoniae (SHV-18), M. morganii (DHA-1), and E. coli (NDM-1), to evaluate the performance of the sensor. The strains were cultured in 20 mL of LB medium at 37 °C until the optical density (OD600) reached 0.8–0.9. Then, 100 μL of 0.5% Triton X-100 was added to 1 mL of bacterial solution and incubated for 10 min. The mixture was quickly frozen in liquid nitrogen and sonicated for 2 min. 1 μL of each sonicated bacteria lysate was diluted to be 20 μL, which was then pipetted onto the sensor and incubated at 37 °C for 5 min. To further investigate the sensitivity of the sensor, the sonicated bacterial lysates were serially diluted in a 96-well plate to final concentrations of 1 × 103, 1 × 104, 1 × 105, and 1 × 106 CFU/mL.

Rapid POC detection of diverse body fluid samples

Diverse body fluid samples were collected from 100 infected patients, including 56 sputum specimens, 14 urine specimens, 9 bronchoalveolar lavage fluids, 7 peritoneal drainage fluids, 4 hepatic drainage fluids, 2 gallbladder drainage fluids, 2 blood specimens, 1 pleural effusion specimen, 1 neck abscess fluid, 1 pelvic effusion specimen, 1 nasal sinus lavage fluid, 1 pancreatic drainage fluid, and 1 leg abscess fluid. Except for sputum samples that could be directly tested, the other samples were cultured for 1–3 h to increase the bacterial concentrations above the detection sensitivity of the sensor before testing. Then, 100 μL of 0.5% Triton X-100 was mixed with 1 mL of the patient sample and incubated for 10 min. The mixture was quickly frozen in liquid nitrogen and sonicated for 2 min. Then, 20 μL of each sonicated bacterial lysate was spotted onto the sensor and incubated at 37 °C for 5 min. The photos of the sensor were taken by a smartphone under a shadowless lamp. The color recognition software was used to process the images by converting the color into the Lab color model, resulting in a quantifiable a* value. We chose the a* channel because green is the complementary color of red and red is the endpoint color of the reaction (green to red, −128 to 127).

Kirby-Bauer paper dispersion method

The 100 diversified body fluid samples were cultured on LB media overnight to produce pure colonies. The colonies were then picked up with an inoculated loop and transferred into 2 mL of Tryptic Soy Broth (TSB) for overnight culture. Subsequently, 1 μL of the cultured colonies were added to another 2 mL of TSB and mixed for 10–15 s to produce bacterial suspensions. Sterile paper disks containing 30 μg cephalothin, 40 μg cephalothin/clavulanic acid, 30 μg cefoxitin, and 10 μg meropenem were dipped into the bacterial suspensions and incubated at 37 °C for 4 h. In parallel, a suspension of Escherichia coli (ATCC 25922) was prepared using normal saline at 0.5 Maxwellian turbidity. The freshly-prepared Escherichia coli suspension was sprayed on Mueller-Hinton Agar (MHA) solid media within 15 min and dried for 10 min. After that, the sample-treated sterile papers were placed on the Escherichia coli-covered culture media and incubated at 37 °C for 24 h. Finally, the diameter of inhibition zones was measured to assess the antibiotic level.

β-Lactamase gene profiling with RT-PCR

We first searched the standard sequences of BSBL genes (blaTEM-1, blaTEM-2, and blaSHV-1), ESBL genes (blaTEM, blaSHV, blaCTX-M, blaVEB, and blaOXA), AmpC genes (blaDHA, blaCMY, blaFOX, blaMOX, blaMIR, blaACC, blaCIT, and blaEBC), and carbapenem-resistant genes (blaNDM, blaIMP, blaKPC, blaVIM, blaGES, blaSME, and blaOXA-48) from GenBank (https://www.ncbi.nlm.nih.gov/) and designed the primers by Primer 6.0 software. The sequences of the designed primers are shown in Supplementary Tables 6-9. Then, the primers were synthesized by Sangon Biotech, a commercial supplier. The bacterial DNA was extracted by the boiling template method. The 100 diversified body fluid samples were smeared on LB solid medium and cultured for 24 h at 37 °C. Two inoculate ring bacterial lawns were scraped and added into 150 μL PBS (pH 7.8), evenly mixed and boiled for 10 min at 100 °C, then centrifuged at 13800 g for another 10 min. The supernatants containing bacterial DNA were collected and stored at −20 °C. The bacterial DNA and primers were mixed with SGExcel FastSYBR (Thermo Scientific) Mixture consulting the SGExcel FastSYBR qPCR Mixture instructions (Supplementary Table 10). RT-PCR was set according to Supplementary Table 11 and performed by the LightCycler 96 instrument (Roche, Switzerland).

Statistical analysis

All experiments and assays were repeated at least three times. The data were expressed as mean ± s.d. and compared by two-tailed Student’s t test. The GraphPad Prism 8 and Origin 8 were used for data analysis.

Statistics and reproducibility

The SD data are presented in Fig. 2B–E and Supplementary Figs. 32A–D; 34A–F were repeated three times independently with similar results. The SD data presented in Figs. 3C; 4A–F were repeated three times independently. Repeated measurements were analyzed by paired, two-tailed student’s t test using Graphpad Prism 8 where appropriate, as indicated in each figure legend. No statistical method was used to predetermine sample size and no data were excluded from the analysis.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.