# IoT-Based Medical Image Monitoring System Using HL7 in a Hospital Database
## 2 Materials and Methods
### Ultrasound Machine to Raspberry Pi HL7 Messaging Process
#### 2.1.1 HL7 Block Formation and Messages
3. Get the IoT response for image link transfer, if yes then step 4 else step 1. 4. Then, decrypt the image link and display it in the IoT server based on the client. These steps are based on Algorithm 5. Algorithm 5 describes the Raspberry Pi to IoT server encrypted link transfer process. ## 3 Results and Discussion

Data collected directly from hospital experiment machines show that ultrasound equipment is not practicable since the observed data are in a raw format and require preprocessing as well as a LIS (lab information system). However, a large number of devices send data to several patients at the same time. Managing and monitoring such operations in real time is thus more challenging and time intensive. Finally, the proposed model was able to reach an overall situation where this model could calculate data response times based on bandwidth and data packet size. The proposed model also measured the patient information sent, the data transmitted each time, and the total data sent each time for the given criterion. The result was created based on the minimum time it took to send the data to the IoT server. The LIS and RSPI3 connection is shown in Figure 8. The patient information is sent using an HL7 message after extraction. They are connected using socket programming via an ethernet cable. Figure 8: LIS to RSPI3 connection. Patient information results are shown in the IoT server where the proposed model uses thingsboard.io in a demo server. In this part, the proposed model needs to configure the IoT server to display that information. In Figure 9, the thingsboard configuration is shown. Figure 9a shows the possible thingsboard options for configuration and Figure 9b shows a machine-to-machine based dashboard (for the proposed model only one dashboard was used). Figure 9c shows the most important part of the image display, a custom widget which is customized for image viewing only. This widget is customized for image link decryption using the RSA private key and displays the image which is linked with the dashboard. User-based dashboard access control for the proposed model is shown in Figure 9d, where access to specific dashboards can easily be assigned to users. A summary of the overall configuration of the thingsboard is explained in Table 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Figure** & **Type** & **Feature List** & **Description** \\ \hline \multirow{6}{*}{(a) Thingsboard (Main)} & \multirow{6}{*}{Widget} & Rule Chains & Signifies the data type, whether they are telemetry data or patient data \\ \cline{3-4}  & & Customer Management & Assign/Monitor customer roles in dashboard \\ \cline{3-4}  & & & Assets & The type of device that will be directly connected to the IoT server i.e., ULSM, RSPI3 \\ \cline{3-4}  & & Devices & Shows the list of device type and connections \\ \cline{3-4}  & & Device Profiles & \\ \cline{3-4}  & & & OTA Updates & Installs and deploys system updates over-the-air (OTA) to devices \\ \hline \multicolumn{4}{c}{(a) Ultrasound} \\ \multicolumn{4}{c}{Machine-based} & \multirow{2}{*}{Summary Table} & Action Buttons (View, Edit, Download, Share, Delete) & Organize and control the data \\ \multicolumn{4}{c}{Dashboard} \\ \hline \multicolumn{4}{c}{(c) Custom Widget} \\ \multicolumn{4}{c}{for image display} & \multirow{2}{*}{Source Code} & \multirow{2}{*}{Custom Modification} & Makes sure to decrypt the generated encrypted link by using RSA private key to display patient image data \\ \hline \multicolumn{4}{c}{(d) User-Based} \\ \multicolumn{4}{c}{Dashboard Assign} & \multirow{2}{*}{Popup Module} & User Roles & Data entry for customer info and role assignment \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Thingsboard configuration summary (based on Figure 10). Figure 9: _Cont._

Figure 10: Ultrasound image view with patient information. Figure 9: Thingsboard configuration: (**a**) Thingsboard dashboard (Main); (**b**) ultrasound machine dashboard. (**c**) Displaying images using a custom widget; (**d**) assigning user-based dashboards (access control).