IoT-Based Medical Image Monitoring System Using HL7 in a Hospital Database
Abstract
:1. Introduction
Related Works
2. Materials and Methods
- Ultrasound Machine to Raspberry Pi HL7 messaging process;
- Result data stored in LIS (Lab Information System);
- Raspberry Pi to FTP server image transfer;
- Transfer of files from FTP server to MLLP and MQTT protocol with the help of a Raspberry Pi 3 (RSPI3).
2.1. Ultrasound Machine to Raspberry Pi HL7 Messaging Process
- (i).
- Connection Message
- (ii).
- Connection Acknowledgement
- (iii).
- Order Message
- (iv).
- Order Acknowledgement
- (v).
- Result Message
- (vi).
- Result Acknowledgement
2.1.1. HL7 Block Formation and Messages
- On startup, try to connect to the listening or passive system’s set IP address and port.
- If the connection fails, wait a brief time before retrying the connection. Once all possible retries have been used up, the connection will either be deactivated at the operator’s request, or the instrument will be switched off.
- Maintain the connection at all times, even if there are no further messages to send.
- Retry the connection if a disconnection is detected outside of a data exchange.
- A message transmission fault is displayed if a disconnection is detected during a data exchange (for example, while waiting for a response), and the ULSM stops the HL7 connection.
Algorithm 1: Ultrasound Machine to RSPI3 Message Transfer | |
1 | Start |
2 | while UltrasoundMachineWantsToSendMessage do |
3 | if is ConnectionIsActive then |
4 | Send HL7 Message to RSPI3 [SB EB CR] |
5 | else |
6 | while! isConnectionIsActive do |
7 | isConnectionIsActive = Established A Socket or TCP/ IP [IP + PORT] Connection With RSPI3 |
8 | SLEEP(Few Seconds) |
9 | End |
- Try to connect only when a message is ready to be sent.
- When a message is ready to be sent, connect to the listening or passive system’s preset IP address and port.
- If the connection fails, it needs to wait a few moments before attempting it again, as in the Persistent method.
- Only keep the connection open if there are further messages to send. Close the connection if this is not the case.
- A message transmission fault is displayed if a disconnection is detected during a data exchange (for example, while waiting for a response), and the ULSM stops the HL7 connection.
Algorithm 2: RSPI3 to Ultrasound Machine Message Transfer | |
1 | Start |
2 | while UltrasoundMachineWantsToSendMessage do |
3 | if isConnectionIsActive then |
4 | Send HL7 Message to Ultrasound Machine [SB EB CR] |
5 | else |
6 | while! isConnectionIsActive do |
7 | isConnectionIsActive = Established A Socket or TCP/ IP [IP + PORT] Connection With Ultrasound Machine |
8 | SLEEP(Few Seconds) |
9 | End |
Algorithm 3: Listener | |
1 | Start |
2 | while ConnectionIsOpenForListning do |
3 | Receive HL7 Message in byte code and Convert it to Readable format |
4 | End |
2.2. Result Data Extraction
Result Data Stored in the LIS (Lab Information System)
- (a)
- Raw data of the results are stored in the LIS (Laboratory Information System) via API (Application Programming Interface).
- (b)
- Extracted data are:
- (i).
- Patient’s info
- (ii).
- Sample ID
- (iii).
- Extracted Result data stored in the database.
2.3. Raspberry Pi to FTP Server Image Transfer
- (i).
- Convert the image from Base64 to JPG, or get the image from HL7 or the direct Base64 image.
- (ii).
- Construct the GUID (Globally Unique Identifier) for the image.
- (iii).
- Rename this image with the GUID send it to FTP server.
- (iv).
- From the FTP server generate a unique image link and send it back to the Raspberry Pi. After getting the response message from the FTP server the RSPI3 encrypts the image link via RSA public key and then sends the link to the IoT server (Figure 7).
- (a)
- Generate the GUID.
- (b)
- Transfer Base64 image data using the GUID to the FTP server.
- (c)
- Get Base64 image links from the FTP server.
- (d)
- Encrypt the image link via public key.
- (e)
- Transfer the encrypted image link to the IoT server.
Encryption Process
Algorithm 4: RSPI3 to IoT Server Image Transfer | |
Input: Image data from Ultrasound Machine Output: boolean:true/false | |
1 | Start |
2 | IoTServerResponse = false |
3 | while GetImageDataFromUltrasoundMachine do |
4 | if ImageDataIsValid then |
5 | ftpResponse = FTPServer(imageData) |
6 | if ftpResponse == IsValidImageLink then |
7 | imageLink = ftpResponse[‘imageLink’] encryptedImageLink = ENCRYPT(imageLink, publicKey) IoTServerResponse = TransferImageToIoTServer (encryptedImageLink) |
8 | return IoTServerResponse |
9 | End |
2.4. RSPI3 to IoT Server Image Transfer
- (i).
- Get the encrypted image link from the FTP server.
- (ii).
- Transfer the encrypted image link to the IoT server using the IoT client username and password.
- (iii).
- Get the IoT response for image link transfer, if yes then step 4 else step 1.
- (iv).
- Then, decrypt the image link and display it in the IoT server based on the client.
Algorithm 5: RSPI3 to IoT Server Image Link Transfer | |
Input: encryptedImagelink, patientInfo encryptedImagelink is a string and patientInfo finite set patientInfo = {patientInfo1, patientInfo2, …, patientInfon} of JSON Output: boolean info true or false | |
1 | Start |
2 | while EncryptedImageLinkIsValid do |
3 | IoTServerResponse = IoTServer(encryptedImagelink,patientInfo) |
4 | if IotServerResponse == false then |
5 | IoTServer(encryptedImage,patientInfo) |
6 | Function IoTServer(encryptedImagelink,patientInfo): |
7 | ecryptedImageLink = DECRYPT(encryptedImagelink,privateKey) isDisplayed = displayInfo(decryptedImageLink,patientInfo) |
8 | return isDisplayed |
9 | Function displayInfo(decryptedImageLink,patientInfo): |
10 | isDisplayed ← false |
11 | if decryptedImageLinkisanImage And patientInfo then |
12 | Display Image to assign Dashboard in IoT Server |
13 | isDisplayed ← false |
14 | return isDisplayed |
15 | End |
3. Results and Discussion
4. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
Appendix A
ARCHITECT-Initiated Connection Test: |
---|
MSH|^~\&|ARCHITECT|12345|||20091215153540+0000||NMD^N02^NMD_N02|d36bb8b2-8297-4372-be8a-87f38a86e739|P|2.5.1||||||UNICODE UTF-8SFT|ADD|8.0|ARCHITECT|”“ NST|N |
The following message is an example of an Acknowledgement to ARCHITECT initiated Connection Test: |
MSH|^~\&|||||20091215153541||ACK^N02^ACK|Ad36bb8b2-8297-4372-be8a-87f38a86e739|P|2.5.1||||||UNICODE UTF-8 MSA|AA|d36bb8b2-8297-4372-be8a-87f38a86e739 |
Order Message |
---|
<SB> MSH|^~\&|Machine Name |Machine Model| Source | Destination| Date Time||Order Code | Machine Model |P|2.3.1||||||UNI CODE PID| Patient Type|Patient Name|Patient ID|Sample ID|Test Type||Patient Date of Birth| Patient Gender<CR> ORC|1|Requist ID|Sample ID|MachineName^Machine Model||Sample Time| Start Time||||Test_Code |||||Li||<CR> ORC|2|Requist ID|Sample ID|MachineName^Machine Model||Sample Time| Start Time||||Test_Code |||||Li||<CR> ……. ORC|ORDER_SERIAL|Requist_ID|Sample ID|MachineName^Machine Model||Sample Time| Start Time||||Test_Code |||||Li||<CR> <EB><CR> |
Result Message |
---|
<SB> MSH|^~\&|Machine Name |Machine Model| Source | Destination| Date Time||Order Code | Machine Model |P|2.3.1||||||UNI CODE PID| Patient Type|Patient Name|Patient ID|Sample ID|Test Type||Patient Date of Birth| Patient Gender<CR> OBR|1|Requist ID|Sample ID|MachineName^Machine Model||Sample Time| Start Time||||||Test Name || |Li||011<CR> OBX|1|ED|IMG1|Image1|Machine Model^Image^JPEG^Base64^……Base64_Code||||||F|||Item Result Time|011|Doctor Name|<CR> <EB> <CR> |
The Following Message Is an Example of an Acknowledgement to ARCHITECT Initiated Connection Test: |
---|
MSH|^~\&|||||20091215153541||ACK^N02^ACK|Ad36bb8b2-8297-4372-be8a-87f38a86e739|P|2.5.1||||||UNICODE UTF-8 MSA|AA|d36bb8b2-8297-4372-be8a-87f38a86e739 |
Appendix B
Private Key |
---|
MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAnXeCBmYdiea+ DFVtFIPOEZYGdnozXJhSyMnhynYScbk1rVGyZYcWHStjRlmmra2h1Y7APmYqKljcnUgei+GzewIDAQABAkArkYZraNOhdTN+ TCCbPYDFwuHU5CjT5N166sjLcPHXfvyFWu7I3SVHw3h1jOYdsMF4pJWGrq65KWQiWpbKXgRhAiEA381fUq9LaBxevvOwRaVGKeszA2jxXd5qfrXrB31awusCIQC0HwFLZihHl9YVaDNUbmwGtmO52eaDFVXnQq6iD/ENsQIhAKcTzRwPXb4ln93yUyBLWGwm+ HiNOdQYHWznJsT6om1tAiBB8/xoXF6xYFJ+ gioRZ2Fcz9oSSkxSgTR0OoFxS/8K8QIhAKjeIKNR3zUsPDj4JK/XVlFXD5/vV0eI8gCO4x1dLPJl |
Public Key |
---|
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ13ggZmHYnmvgxVbRSDzhGWBnZ6M1yYUsjJ4cp2EnG5Na1RsmWHFh0rY0ZZpq2todWOwD5mKipY3J1IHovhs3sCAwEAAQ== |
Message to Be Encrypted |
---|
http://FTP_DOMAIN_NAME/PATH/UUID.IMAGE_EXTENTION |
Output/Message to be Decrypt: [Encrypted Output on Base64] |
---|
XHcVipE1xGw7291Kj9jJksm5xMbzQDxYhWb/IPXgyC3bjEEKzCPZr60ChsoPN2E/+HKD3i9/fIb5VmrJRUrt7w== |
Decrypted Output |
---|
shttp://FTP_DOMAIN_NAME/PATH/UUID.IMAGE_EXTENTION |
References
- Khan, I.I.; Ahmed, M.; Ahmad, K.U. Towards A Smart Hospital: Automated Non-Invasive Patient’s Discomfort Detection in Ward Using Overhead Camera. In Proceedings of the 2018 9th IEEE Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON), Columbia University, NY, USA, 8–10 November 2018; pp. 872–878. [Google Scholar]
- Andriole, K.P.; Wolfe, J.M.; Khorasani, R.; Treves, S.T.; Getty, D.J.; Jacobson, F.L.; Steigner, M.L.; Pan, J.J.; Sitek, A.; Seltzer, S.E. Optimizing analysis, visualization, and navigation of large image data sets: One 5000-section CT scan can ruin your whole day. Radiology 2011, 259, 346–362. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Muhammad, G.; Hossain, M.S. COVID-19 and Non-COVID-19 Classification using Multi-layers Fusion From Lung Ultrasound Images. Inf. Fusion 2021, 72, 80–88. [Google Scholar] [CrossRef] [PubMed]
- Krishna, K.D.; Akkala, V.; Bharath, R.; Rajalakshmi, P.; Mohammed, A.M.; Merchant, S.N.; Desai, U.B. Computer aided abnormality detection for kidney on FPGA based IoT enabled portable ultrasound imaging system. Irbm 2016, 37, 189–197. [Google Scholar] [CrossRef]
- Said, O.; Tolba, A. SEAIoT: Scalable e-health architecture based on Internet of things. Int. J. Comput. Appl. 2012, 59, 44–48. [Google Scholar] [CrossRef]
- Liteplo, A.S.; Noble, V.E.; Attwood, B. Real-time video transmission of ultrasound images to an iPhone. Crit. Ultrasound J. 2010, 1, 105. [Google Scholar] [CrossRef] [Green Version]
- Khairi, T.W.; Al-zubidi, A.F.; Ahmed, E.Q. Modified Multipath Routing Protocol Applied On Ns3 Dcell Network Simulation System. Int. J. Interact. Mob. Technol. 2021, 15, 208. [Google Scholar] [CrossRef]
- Maygua-Marcillo, L.; Urquiza-Aguiar, L.; Paredes-Paredes, M. Creating a new model in NS3 Network Simulator. Preprints 2019, 2019010106. [Google Scholar] [CrossRef] [Green Version]
- Jonveaux, L. Arduino-like development kit for single-element ultrasound imaging. J. Open Hardw. 2017, 1, 3. [Google Scholar] [CrossRef] [Green Version]
- Muhammad, G.; Hossain, M.S.; Kumar, N. EEG-Based Pathology Detection for Home Health Monitoring. IEEE J. Sel. Areas Commun. 2021, 39, 603–610. [Google Scholar] [CrossRef]
- Alshehri, F.; Muhammad, G. A Comprehensive Survey of the Internet of Things (IoT) and AI-Based Smart Healthcare. IEEE Access 2021, 9, 3660–3678. [Google Scholar] [CrossRef]
- Srinivasan, C.R.; Charan, G.; Babu, P.C.S. An IoT based SMART patient health monitoring system. Indones. J. Electr. Eng. Comput. Sci. 2020, 18, 1657–1664. [Google Scholar] [CrossRef]
- Ru, L.; Zhang, B.; Duan, J.; Ru, G.; Sharma, A.; Dhiman, G.; Gaba, G.S.; Jaha, E.S.; Masud, M. A detailed research on human health monitoring system based on internet of things. Wirel. Commun. Mob. Comput. 2021, 2021, 5592454. [Google Scholar] [CrossRef]
- Ali, Z.; Muhammad, G.; Alhamid, M.F. An automatic health monitoring system for patients suffering from voice complications in smart cities. IEEE Access 2017, 5, 3900–3908. [Google Scholar] [CrossRef]
- Anand, L.V.; Kotha, M.K.; Kannan, N.S.; Kumar, S.; Meera, M.R.; Shawl, R.Q.; Ray, A.P. Design and development of IoT based health monitoring system for military applications. Mater. Today Proc. 2020. [Google Scholar] [CrossRef]
- Deepa, V. Analysis on E Healthcare Monitoring System with Iot and Big Patient Data. Int. J. 2021, 5, 97–102. [Google Scholar] [CrossRef]
- Garbhapu, V.V.; Gopalan, S. IoT based low cost single sensor node remote health monitoring system. Procedia Comput. Sci. 2017, 113, 408–415. [Google Scholar] [CrossRef]
- Hadidi, R.; Cao, J.; Woodward, M.; Ryoo, M.S.; Kim, H. Real-time image recognition using collaborative iot devices. In Proceedings of the 1st on Reproducible Quality-Efficient Systems Tournament on Co-designing Pareto-efficient Deep Learning, Williamsburg, VA, USA, 24 March 2018; p. 1. [Google Scholar]
- Available online: https://thingsboard.io/docs/user-guide/install/rhel/ (accessed on 27 July 2022).
- Tobias, R.J. Wireless communication of real-time ultrasound data and control. In Medical Imaging 2015: Ultrasonic Imaging and Tomography. Int. Soc. Opt. Photonics 2015, 9419, 94190M. [Google Scholar]
- Dong, M.; Sun, Z.; Yu, H.; Zhang, L.; Sui, Y.; Zhao, R. Performance Evaluation of the Transmission Quality of the Internet of Things in Farmland Environmental Monitoring Based on ns-3. Mob. Inf. Syst. 2022, 2022, 3148348. [Google Scholar] [CrossRef]
- Islam, M.; Rahaman, A. Development of smart healthcare monitoring system in IoT environment. SN Comput. Sci. 2020, 1, 185. [Google Scholar] [CrossRef]
- Hossain, M.S.; Muhammad, G. Emotion-Aware Connected Healthcare Big Data Towards 5G. IEEE Internet Things J. 2018, 5, 2399–2406. [Google Scholar] [CrossRef]
- Masud, M.; Gaba, G.S.; Choudhary, K.; Hossain, M.S.; Alhamid, M.F.; Muhammad, G. Lightweight and Anonymity-Preserving User Authentication Scheme for IoT-based Healthcare. IEEE Internet Things J. 2022, 9, 2649–2656. [Google Scholar] [CrossRef]
- Gaur, L.; Bhatia, U.; Jhanjhi, N.Z.; Muhammad, G.; Masud, M. Medical Image-based Detection of COVID-19 using Deep Convolution Neural Networks. Multimed. Syst. 2022, 1–10. [Google Scholar] [CrossRef] [PubMed]
- Swaroop, K.N.; Chandu, K.; Gorrepotu, R.; Deb, S. A health monitoring system for vital signs using IoT. Internet Things 2019, 5, 116–129. [Google Scholar] [CrossRef]
Figure | Type | Feature List | Description |
---|---|---|---|
(a) Thingsboard Dashboard (Main) | Widget | Rule Chains | Signifies the data type, whether they are telemetry data or patient data |
Customer Management | Assign/Monitor customer roles in dashboard | ||
Assets | The type of device that will be directly connected to the IoT server i.e., ULSM, RSPI3 | ||
Devices | Shows the list of device type and connections | ||
Device Profiles | |||
OTA Updates | Installs and deploys system updates over-the-air (OTA) to devices | ||
(a) Ultrasound Machine-based Dashboard | Summary Table | Action Buttons (View, Edit, Download, Share, Delete) | Organize and control the data |
(c) Custom Widget for image display | Source Code | Custom Modification | Makes sure to decrypt the generated encrypted link by using RSA private key to display patient image data |
(d) User-Based Dashboard Assign | Popup Module | User Roles | Data entry for customer info and role assignment |
Image Category (2D) Total Image per 30 s | Data Size | Network | Delay Minimum (s) | Display Medical Image Correctly (s) | Patient Information Found (s) |
---|---|---|---|---|---|
5 > image | Image < 1 MB | 2G | 15 | 10 | 5 |
5 < image < 10 | 1 MB < Image < 3 MB | 3G | 10 | 5 | 3 |
15 < image < 20 | 3 MB < Image < 5 MB | 4G (LTE) | 5 | 2 | 2 |
Image > 20 | Image > 5 MB | Broadband above 5 Mbps | 3 | 2 | 2 |
Data/Packet Size (MB) | Bandwidth (Mbps) | Response Time (s) |
---|---|---|
5 | 1 | 43.3442083 |
5 | 12.40370939 | |
10 | 8.816277328 | |
15 | 7.366890492 | |
20 | 3.967757723 | |
10 | 1 | 84.60675146 |
5 | 17.92090079 | |
10 | 10.41828778 | |
15 | 8.005866191 | |
20 | 5.078943865 | |
15 | 1 | 123.7062426 |
5 | 25.7373848 | |
10 | 15.89119732 | |
15 | 9.30444808 | |
20 | 7.922080678 |
Data/Packet Size (MB) | Bandwidth (Mbps) | (S) Response Time (s) |
---|---|---|
5 | 1 | 41.64960943 |
5 | 10.92773353 | |
10 | 5.634109647 | |
15 | 3.674797321 | |
20 | 4.611541816 | |
10 | 1 | 81.17746564 |
5 | 17.22091601 | |
10 | 10.01965412 | |
15 | 8.12423431 | |
20 | 6.908335693 | |
15 | 1 | 122.5305769 |
5 | 25.36579175 | |
10 | 14.6547472 | |
15 | 9.84765541 | |
20 | 7.490648534 |
Data/Packet Size (Byte) | Bandwidth (Mbps) | (S) Response Time (s) |
---|---|---|
93.2324224 | 1 | 1.252205553 |
89.36158621 | 5 | 1.726590514 |
94.16620009 | 10 | 1.217828047 |
94.49036105 | 15 | 0.5540504 |
89.44453449 | 20 | 0.738210043 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Harun-Ar-Rashid, M.; Chowdhury, O.; Hossain, M.M.; Rahman, M.M.; Muhammad, G.; AlQahtani, S.A.; Alrashoud, M.; Yassine, A.; Hossain, M.S. IoT-Based Medical Image Monitoring System Using HL7 in a Hospital Database. Healthcare 2023, 11, 139. https://doi.org/10.3390/healthcare11010139
Harun-Ar-Rashid M, Chowdhury O, Hossain MM, Rahman MM, Muhammad G, AlQahtani SA, Alrashoud M, Yassine A, Hossain MS. IoT-Based Medical Image Monitoring System Using HL7 in a Hospital Database. Healthcare. 2023; 11(1):139. https://doi.org/10.3390/healthcare11010139
Chicago/Turabian StyleHarun-Ar-Rashid, Md., Oindrila Chowdhury, Muhammad Minoar Hossain, Mohammad Motiur Rahman, Ghulam Muhammad, Salman A. AlQahtani, Mubarak Alrashoud, Abdulsalam Yassine, and M. Shamim Hossain. 2023. "IoT-Based Medical Image Monitoring System Using HL7 in a Hospital Database" Healthcare 11, no. 1: 139. https://doi.org/10.3390/healthcare11010139
APA StyleHarun-Ar-Rashid, M., Chowdhury, O., Hossain, M. M., Rahman, M. M., Muhammad, G., AlQahtani, S. A., Alrashoud, M., Yassine, A., & Hossain, M. S. (2023). IoT-Based Medical Image Monitoring System Using HL7 in a Hospital Database. Healthcare, 11(1), 139. https://doi.org/10.3390/healthcare11010139