Research and Design of STM32 and Qt based Medical Smart Cockpit Convenient Medical Care System

: In order to simplify the process of patients' medical treatment and realise contactless and efficient medical treatment in the post-epidemic era, a convenient medical treatment system oriented to medical smart cockpit is designed to facilitate patients' medical treatment. The system is based on STM32F103RCT6 as the main controller chip, and the peripheral circuit consists of MAX30102 sensor, DS18B20 sensor, and Bluetooth module, which can realise the transmission of basic physiological data collected from patients to the doctor's end. The system uses Qt Creator to design the application interface, and eventually the patient can complete the relevant medical process in the cockpit. This design reduces the contact between the patient and the healthcare personnel and improves the efficiency of hospital visits.


Introduction
In the wake of the outbreak of New Crown Pneumonia, there is an increasing demand for contact-free access to healthcare.In the new situation of the post epidemic era, the outpatient clinic, as the first window of contact between the patient and the hospital, often leads to an increase in the gathering of people and thus cross infection due to the problems of high flow of people and inefficiency of consultation.Therefore, it is particularly important to design a convenient medical system for medical intelligent cockpit in this paper [1].This design can provide patients with more convenient and safer medical services, enable patients to complete the basic medical process in the cockpit, thus reducing their stay time in the waiting area of the outpatient clinic, reducing the risk of infection, and improving the efficiency of the clinic.

Design Options
In this paper, we design a convenient medical system for medical intelligent cockpit, the main function is to transfer the corresponding data collected by sensors to the microcontroller and process them, in order to realise the function of user self-help to choose medical treatment and convenient medical treatment.

Design of the Cockpit
The design of the Medical Intelligent Cockpit is based on functionality, ergonomics, aesthetics and user experience.In terms of functionality, the appearance of the cockpit is improved and upgraded on the basis of traditional electric wheelchairs, and the interior of the cockpit can accommodate all basic medical equipment and instruments, including basic physiological signal monitoring equipment.At the same time, it is designed to be easy to clean and maintain on a daily basis.The shape and dimensions of the cockpit are suitable for a wide range of heights and sizes, ensuring comfort and safety.The internal seating is ergonomically designed to provide good support and postural support.The design also takes into account the needs and expectations of the user, making it simple and intuitive to operate, while providing a comfortable environment with more possibilities for subsequent system control panel layouts and ease of use.The cockpit design is shown in Figure 1.

System Design
The convenient medical system is based on the STM32F103RCT6 microcontroller minimum system (including 1.44-inch TFT display), through the MAX30102 sensors, DS18B20 sensors and the processing of physiological signals, using HC-05 to establish communication with the microcontroller, and ultimately, the collected results will be displayed on the display.Patients can register for medical treatment through online interaction in the cabin.The overall block diagram of the whole system is shown in Figure 2.

Main Control Chip Selection
Based on the analysis of performance requirements, STM32F103RCT6 is selected as the core controller, which is a 32-bit microcontroller with 512KB flash memory based on Cortex-M3 core for complex data processing [2].The STM32F103RCT6 consists of three 12-bit ADCs, four general-purpose 16-bit timers, two PWM timers, and 13 communication interfaces.and 13 communication interfaces, and the physical object is shown in Figure 3.

Heart rate and Blood Oxygen Detection Module
MAX30102 is a module for integrated heart rate oximeter biosensor, i.e., as shown in Fig. 4 for its schematic diagram.The principle of operation lies in the fact that the LED light source irradiates the skin of the finger and the human tissue reflects the light to the photoelectric sensor.The photoelectric sensor converts the light signal into an electrical signal and undergoes amplification and output processing of the electrical signal.Subsequently, it is then converted to a digital signal by an analogue-to-digital converter, and the final data results are obtained after computational processing [3].

Temperature Detection Module
The DS18B20 is a commonly used digital temperature sensor that uses the 1-Wire communication protocol to provide highly accurate temperature measurement.It provides a temperature measurement range of -55°C to +125°C with an accuracy of ±0.5°C and can support multiple sensors connected to the same 1-Wire bus.

Bluetooth Module
The HC-05 Bluetooth module has been chosen for this design to achieve remote communication.Through this module, the microcontroller is able to establish a communication connection with the host computer so that the body temperature, oxygen saturation and heart rate data collected from the sensors are sent to the HC-05 module through the serial port.Subsequently, the HC-05 module transmits these data to the host computer to achieve remote transmission and monitoring of the data [4], and to realise the function of physiological signals collected by the patient in the cockpit.

Software Design
The lower computer software system selects Keil 5, and the current design uses C language for code writing.Based on this design, selected STM32F103 series chip, STMF103 belongs to ARM's chip architecture, Cortex-M3 core series chips, and Keil for the development of the STM32 high degree of adaptability and outstanding advantages.The flow chart of the main software programme is shown in Figure 5.The main programme is mainly responsible for controlling the operation of the whole system, including the data acquisition of heart rate, blood oxygen and body temperature, data processing, data display and alarm processing modules.

Cockpit Access System Interface Design
According to the functional requirements of the system, the system can be decomposed into several modules to design the application interface separately, as shown in Figure 6.This part of the production with Qt Creator (C++), patients, doctors, pharmacies can register accounts to log in to the medical intelligent cockpit medical system, patients can log in to register and select the doctor, the doctor logged in to the system to be able to select the patient to diagnose and prescribe medication for them, the patient can be online to complete the visit to the doctor to pay the bill.Pharmacies can manage drug inventory, including adding new drugs, increasing inventory, decreasing inventory, deleting drugs, and changing pricing.

Testing
System testing, through the MAX30102 sensor on the simulation of physiological signal input, as well as heatsensitive resistor heating DS18B20 sensor to obtain the question data, compared with a market oximeter, thermometer to verify the system function and stability, test data results as shown in Table 1 and Table 2.The measured data is displayed as shown in Figure 7.The test results show that the system is able to accurately and in real time collect, process and display physiological signals and transmission data, and issue alarm prompts when necessary.The data from the host computer software was also able to be displayed properly during the test.The measured data has a small relative error within a certain range, which meets the system design requirements [5].
Run the designed application interface in Qt Creator to see if the interface can be displayed normally.Part of the running interface is shown in Figure 8.After testing, the Convenient Access System interface was able to operate and fulfil the pre-functional requirements.

Conclusion
Through the above scheme design, the feasibility of the medical smart cockpit convenient medical system based on STM32 and Qt has been verified, and the test data is fast and accurate, and the interface operates normally, which is able to meet the basic medical needs of patients.The design can optimise the patient consultation process, effectively improve the patient's satisfaction of medical treatment, and provide a development direction for the efficient and convenient digital medical service model.

Fig 2 .
Fig 2. Overall block diagram design of the system 3. System Hardware, Software Selection

Fig 4 .
Fig 4. Schematic diagram of heart rate and blood oxygen detection module

Fig 5 .
Fig 5. Flowchart of the main software programme

Fig 6 .
Fig 6.Functional module diagram of medical intelligent cockpit medical consultation system

Table 1 .
Comparison of measurement results

Table 2 .
Measurement error analysis