# Bluetooth-Based Healthcare Information and Medical Resource Management System
## 3 Materials and Methods
### Service Module
#### 3.2.2 Positioning Information of Medical Personnel and Equipment  
This type of information is mainly generated from the location tracking of medical devices, equipment, or medical personnel. In addition to collecting physiological information, Bluetooth broadcasting signals from Bluetooth beacons placed on medical devices and equipment can also be collected through the Bluetooth Hub equipment deployed in medical institutions [38; 39; 40]. This will reduce the inconvenience of device management and improve management efficiency. In addition to the tracking of medical devices and equipment, the Bluetooth Beacon can also be used to track the location of medical personnel. The Bluetooth Hub device is widely deployed in the medical facility, and the area of the medical facility is coordinatized (red dots as shown in Figure 16), and the location is tracked by the coordinates of the Bluetooth Hub device and the RSSI signal strength value in the Beacon broadcast packet. A positioning algorithm based on the circle-circle intersection points was developed. The RSSI signal strength value is obtained from the Bluetooth Beacon packets collected from medical personnel or medical devices. This value is converted into the distance and used as the radius of a circle, and the coordinates of the medical device (point G in Figure 17) are calculated based on the intersection of the circles, as shown in Figure 17. In this study, instead of finding the intersection points of two circles, a different calculation method is used to find the centroids of these two intersection points. Circle \(A\) and circle \(B\) are first taken out (as in Figure 18), and according to the Pythagorean theorem, the following Equations (1)-(3) can be derived, where \(\overline{AB}\) represents the distance between \(A\) and \(B\). Line \(\overline{QP}\) is perpendicular to Line \(\overline{AB}\) and the intersection point is point \(E\); therefore, Equations (2) and (3) hold. \[\overline{AB}=\overline{BE}+\overline{AE} \tag{1}\]  
\[\overline{AQ}^{2}=\overline{AE}^{2}+\overline{QE}^{2} \tag{2}\]  
\[\overline{BQ}^{2}=\overline{BE}^{2}+\overline{QE}^{2} \tag{3}\]  
Figure 15: Push message data transmission process. Subtract Equation (2) from Equation (3) and use Equation (1) to solve for \(\overline{BE}\), yielding  
\[\overline{BQ}^{2}-\overline{AQ}^{2}=\overline{BE}^{2}-\overline{AE}^{2}= \overline{BE}^{2}-\left(\overline{AB}-\overline{BE}\right)^{2}\rightarrow \overline{BE}=\frac{\overline{AB}}{2}+\frac{\overline{BQ}^{2}-\overline{AQ}^{ 2}}{2\overline{AB}}. \tag{4}\]  
The coordinates of point \(E\), \(x_{E}\) and \(y_{E}\), are found according to the proportional relationship. \[ \begin{cases}x_{E}=x_{B}+\frac{(x_{A}-x_{B})\overline{BE}}{\overline{AB}}\\ y_{E}=y_{B}+\frac{(x_{B}-y_{B})\overline{BE}}{\overline{AB}}\end{cases}  \tag{5}\]  
Figure 16: Conceptual diagram for deployment of Bluetooth Hub. Figure 17: Intersection points of three circles for centroid. Figure 18: Intersection points of two circles. The calculation method for finding the midpoint \(E\) of the intersection of circle A and circle B is then used to find points \(D\) and \(F\) (as shown in Figure 17). The coordinates of points \(D\), \(E\), and \(F\) are then averaged to obtain the coordinates of point \(G\), which are the coordinates of the medical device. \[ \begin{cases}x_{\rm{C}}=(x_{D}+x_{E}+x_{F})/3\\ y_{\rm{C}}=(y_{D}+y_{E}+y_{F})/3\end{cases}  \tag{6}\]  
The above indoor positioning function [20; 21; 22; 23] of the presented system is mainly to locate medical resources such as medical equipment and devices, medical personnel, and patients or care recipients to solve the difficulties in renting, searching, and managing medical equipment. At the same time, the positioning of medical personnel provides the function of finding personnel in case of emergencies, as well as the ability to send warning notifications when patients or care recipients enter dangerous areas and to notify caregivers to intervene for protection and treatment.