{'fraction_non_alphanumeric': 0.017916497770571544, 'fraction_numerical': 0.008269152817186867, 'mean_word_length': 4.908045977011494, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and Realization of Monitoring and Alarm System for Intravenous Infusion

A real-time monitoring and alarm system for intravenous infusion in isolation wards is designed to reduce the number of contact between medical staff and patients during intravenous infusion. The system includes STM32L052K8 as lower computer to collect the speed and dosage of intravenous infusion, upper computer adopting LabVIEW to design the infusion monitoring interface and the communication via universal asynchronous receiver transmitter (UART). The experimental results show that the intravenous infusion monitoring system designed with STM32L052K8 and LabVIEW can realize real-time monitoring of drip, reduce the stay time of medical staff in isolation wards, and provide reference for hospital medical information.


INTRODUCTION
Since the outbreak of the new crown pneumonia, more and more intelligent devices have been applied to the medical system [1][2][3][4]. As a common treatment method in modern medical treatment, intravenous infusion has always played an important role in the treatment of patients [5]. In the process of intravenous infusion, different patients and different drugs have different requirements for the speed of intravenous infusion, and patients' adverse reactions to drugs caused by improper infusion speed selection often occur [6]. Currently, Murphy's infusion set is widely used in clinical medicine. It relies on the medical staff to observe the drip flow rate in the drip bucket with naked eyes during the infusion process to adjust the pulley on the infusion set to control the infusion speed [7]. This method of speed control based on experience lacks a quantitative basis, and it is difficult to make scientific judgments in the specific implementation process. In addition, due to the long time of intravenous infusion, medical resources have become the most precious resources in the sudden public health safety. In the unaccompanied process, it is easy to have blood backflow. Because the backflow of blood causes the backflow of blood to block the needle, the treatment is delayed, and what is more, because the backflow of blood forms a small thrombus on the wall of the infusion, and then the patient's embolism is formed in the patient's body, which will cause serious accidents [8][9]. Moreover, with the rapid development of hospital medical and nursing informatization, traditional treatment methods that rely on a large number of medical staff for observation and nursing can hardly meet the needs of modern medical systems. Especially during the outbreak of the epidemic, the lack of medical resources and the high-intensity work of medical staff have made hospital medical and nursing informatization even more important.
In this paper, the infusion speed is difficult to control during the intravenous infusion, the blood reflux caused by the failure to pull out the needle at the end of the infusion, and the lack of intravenous infusion information methods, a monitoring and alarm system for intravenous infusion is designed. The system design is divided into two parts: upper computer monitoring and lower computer data collection. It can realize the functions of real-time collection and alarm prompting of the infusion speed during intravenous infusion. When the system is applied to an isolation ward, it can reduce the number of medical personnel entering the isolation ward and the contact time between medical personnel and patients with infectious diseases. In addition, this can also increase the treatment rate of patients, reduce the infection rate of medical staff, and provide a reference for the medical informationization of the entire hospital.

2.
OVERALL SYSTEM DESIGN The intravenous infusion monitoring and alarm system can realize the functions of dripping speed display, sound and light alarm at the end of infusion, and monitoring interface display on the PC side. The overall design of the system is divided into two parts: the upper computer and the lower computer. Among them, the lower computer can realize data collection and transmission, and the upper computer can realize the interface monitoring on the PC side. The overall design is shown in Figure 1. The lower computer of the system uses STM32L052K8 as the control core. The photoelectric sensor acquisition circuit collects the speed of the dripping liquid in the drip hopper, and the signal conditioning circuit can change the output electrical signal of the photoelectric sensor into a voltage signal that can be recognized by the MCU. The button circuit is used to set the system alarm time interval and the start and stop of the system. The power management module can provide a stable power supply voltage for the system, and the display circuit uses OLED to display the dripping speed and the amount of dripping. The indicating alarm circuit provides sound and light alarm for the lower computer. The host computer uses LabVIEW to design and monitor the drip dosage and drip speed of each bed in the world, and set the light alarm indicator for each bed. The upper computer and the lower computer can communicate through the asynchronous serial interface.

HARDWARE DESIGN
The hardware circuit design of the venous infusion monitoring alarm system mainly includes the MCU system design and the asynchronous serial communication circuit design. The hardware circuit design of the system mainly involves photoelectric sensor acquisition circuit, sensor output signal conditioning circuit, button setting circuit, regulated power supply output circuit, OLED display circuit, sound and light alarm circuit, and asynchronous serial communication for communication between upper and lower computers circuit. Next, this article will describe the main circuits in the alarm system.

Sensor Detection Circuit
The size of the drip bucket in the disposable non-phthalic anti-acupuncture infusion set produced by Henan Shuguang Jianshi Medical Equipment Group Co., Ltd. used in the experiment is the H2010 slot-type direct photoelectric sensor. The groove width is 10mm, which can be clamped on the drip bucket. When the intravenous infusion starts, the drops will drip from the upper dropper, and the photoelectric switch will have high and low level outputs. In order to obtain a stable output signal, the voltage signal output by the photoelectric switch is amplified by the non-inverting input terminal of the operational amplifier LM358 [10] , and the operation of the same phase ratio shows that the voltage respectively. We can change the output voltage by adjusting the resistance of RW1. The voltage signal amplified by the operational amplifier is then used for a stable voltage output through a voltage comparator [11] , and the output signal is connected to the P3.2 port of the microcontroller.

Button Setting Circuit
The main function of the button circuit is to control the start and stop of the lower computer of the intravenous infusion monitoring and alarm system and to set the alarm when the sensor does not detect the drip. The circuit is shown in Figure 3. In the button setting circuit, K2 is used to start the STM32L052K8 to start counting, K3 is used to set the down count of the alarm time, K4 is used to set the up count of the alarm time, and K5 is the function key to set the alarm time.

Asynchronous Serial Communication Circuit
In order to realize the stable and reliable communication between the host computer and MCU, we can use CH340G as the main level conversion chip to realize USB to TTL [12], and the hardware circuit is shown in Figure 4. The RXD pin and TXD pin of CH340G are connected to the USART1_TX pin and USART1_RX pin of STM32L052K8 respectively, which can realize the reception and transmission of

Main Program Design of Lower Computer
The main program of the lower computer completes the reading, conversion and transmission functions of the bit data. The main program flow is shown in Figure 5. The system initialization mainly includes the setting of timer counter 0 and external interrupt 0 and the initialization of OLED. We need to read the last set value accessed in the EEPROM inside the MCU to determine whether the button K5 is pressed. If the button K5 is pressed, it will enter the alarm time setting subroutine, the button K3 can be used to subtract the alarm time, and the button K4 can be used to increase the alarm time. When we save the set new alarm time into EEPROM, we can update its set value. If the button K5 is not pressed, the button K2 is pressed, and the intravenous infusion monitoring alarm system is turned on. It reads the drip status through external interrupt 0, and then calculates the drip speed and the amount of drip. When the dripping speed is 0 and the duration exceeds the alarm time, the system will activate the alarm indicator and buzzer alarm circuit to send out an audible and visual alarm. When the system receives the read command from the host computer, the MCU will transmit the current drip speed and drip volume to the host computer via UART.

LabVIEW Programming
The upper computer mainly completes data reading and alarm display. The LabVIEW program is shown in Figure 6 and Figure 7. Figure 6 is the serial port initialization input program. It can use the drop-down list node to select the serial port, set the baud rate, set the data bit, parity bit, and stop bit. Then the system can process the input data according to the set value, and send the serial port data into the condition structure through the VISA configuration port and combined with the trigger condition. Figure 6.
Asynchronous Serial Communication Setting Procedure Figure 7 is the completion of the serial data write, read cycle and alarm indication diagram. The system reads the serial port received data through the VISA write configuration port, and the "reset button" initializes the initial transition of the intravenous infusion of each bed. Then, the system outputs the drip speed and dosage of different beds to the output box of the corresponding bed through the index array.  Figure 7.
Alarm Indication Program

Host Computer Display Interface
The upper computer display interface of the venous infusion monitoring alarm system mainly has two parts: serial port setting and bed information display. The overall interface is shown in Figure 8. In the serial port setting interface, the system will select the connected serial port and set it, and then turn on the corresponding indicator light of the serial port. The bed information display interface includes the remaining amount of infusion of each bed, the dripping speed and the indicator light for alarm.  Figure 8.
Display Interface of Host Computer for Intravenous Infusion Detection and Alarm System

Lower Computer Experiment Results
The lower computer of the venous infusion monitoring alarm system mainly includes the photoelectric sensor acquisition circuit and the MCU hardware circuit board. When it is working, the H2010 trough-type direct photoelectric sensor will be directly installed on the drip bucket of the disposable infusion set. When we press the start button, the OLED display shows the system start symbol "ON". The first line of the display shows the current drip speed, the unit is "drop/minute", the second line shows the amount of drip. When it is detected that the dripping speed is zero and the time exceeds the set alarm time, the alarm indicator on the left side of the circuit board will light up and the buzzer will beep.

CONCLUSION
The intravenous infusion monitoring alarm system designed based on STM32L052K8 realizes the functions of infusion speed monitoring, infusion volume acquisition and real-time monitoring and alarming of the host computer during intravenous infusion. It can meet the real-time monitoring requirements of intravenous infusion in isolation wards, and reduce the number of rounds of medical workers during intravenous infusion. This also reduces the contact time between medical staff and patients, and provides a reference for the transformation and upgrading of hospital medical information. The system development adopts modular design, which is easy to improve and upgrade later and the overall system cost is low. Moreover, the communication is safe and reliable and has a wide range of application values.