Secure storage and sharing of patients^ aneuro medical data over the Internet are part of the challenges for emerging healthcare systems. The use of blockchain technology in medical Internet of Things systems can be considered a safe and novel solution to overcome such challenges. Patients with movement disorders require multi-disciplinary management and must continuously receive medical care from a specialist. Due to the increasing costs of face-to-face treatment, especially during the pandemic, patients would highly bene t from remote monitoring and management. The proposed work presents a model for blockchain- based remote management systems for patients with movement disorders, especially those with Parkinsona neuros disease. The model ensures a high level of integrity and decreases the security risks of medical data sharing. 1Preprint version of the work presented at the 31st International Conference on Electr ical Engineering (ICEE 2023), Teh ran, Iran. Towards Blockchain-based Remote Management Systems for Patients with Movement Disorders Behnaz Behara Department of Biomedical Engineering, Faculty of Electrical Engineering, K. N. Toosi University of Technology, Tehran, Iran b.behara@email.kntu.ac.irMehdi Delrobaei Department of Mechatronics Engineering, Faculty of Electrical Engineering, K. N. Toosi University of Technology, Tehran, Iran delrobaei@kntu.ac.ir Abstract —Secure storage and sharing of patients’ medical data over the Internet are part of the challenges for emerging healthcare systems. The use of blockchain technology in medical Internet of things systems can be considered a safe and novel solution to overcome such challenges. Patients with movement disorders require multi-disciplinary management and must be continuously receive medical care by a specialist. Due to the increasing costs of face-to-face treatment, especially during the pandemic, patients would highly beneﬁt from remote monitoring and management. The proposed work presents a model for blockchain-based remote management systems for patients with movement disorders, especially those with Parkinson’s disease. The model ensures a high level of integrity and decreases the security risks of medical data sharing. Index Terms—Blockchain, biomechatronic systems, Parkin- son’s disease, Internet of things, remote monitoring, secure data sharing. I. I NTRODUCTION Due to rapid technological developments, the Internet of things (IoT) signiﬁcantly makes various parts of human life smarter. The applications of the IoT in multiple ﬁelds, such as smart cities, smart agriculture, and smart healthcare systems, have made signiﬁcant progress. After the increase in healthcare costs and utilization, especially during the pandemic patients’ remote management development and improvement seem to be required now more than ever [1]. Therefore, patients’ homes and healthcare facilities can gradually be equipped with more IoT-based devices and decision-support algorithms to move faster toward real medical Internet of things technology (IoMT) [2]. Electronic healthcare record (EHR), an innovation introduced along with the emer- gence of wearable sensors, allows IoT platforms to remotely record patients’ information and increase interaction between patients and physicians [3]. The critical challenge in developing remote healthcare man- agement systems is to ensure security. The lack of security not only enables hackers to access personal data but may also lead to damages such as data loss or interruption of service [4]. Therefore, it is essential to develop remote patient management systems while ensuring the security of data transmission and users’ privacy [5]. Most of the systems developed for healthcare and remote monitoring of patients use a centralized architecture basedon client-server model. One of the signiﬁcant problems that client-server-based systems face is the lack of privacy and se- curity. This potentially causes cyber attacks and access patient data [6]. Due to the vulnerabilities of client-server systems to cyber-attacks and hacker penetrations, a blockchain-based system can be used for remote patient management and data storage. Blockchain is a distributed ledger technology that offers a transparent, shared, and smart ledger. In recent years, research related to blockchain has gained signiﬁcant importance [7], [8]. Blockchain organizes user transactions in the form of a block. Therefore, each block contains several transactions. These blocks are broadcasted to a peer-to-peer chain network, and each block is appended to the previous block so that each block stores the encrypted hash of the last block. Each peer in the blockchain can access a copy of the distributed ledger because the ledger is shared among all peers in the blockchain network [9]. Meanwhile, blockchain technology is used not only in cryp- tocurrency but also to implement various scenarios and ﬁelds, such as supply chains, multimedia, artiﬁcial intelligence, cloud computing, and healthcare systems [10], [11]. Among the many applications of blockchain, the use of blockchain tech- nology in health care has received much attention due to its capabilities in medical data security [12]. So far, many blockchain-based IoT healthcare monitoring systems have been designed and developed by various researchers [13]- [15]. Healthcare systems based on the IoT signiﬁcantly monitor patients who need medical care in real-time. Patients with movement disorders, especially those with Parkinson’s disease (PD), would highly beneﬁt from remote monitoring systems. This article generally introduces a remote monitoring system based on the IoT and blockchain for patients with movement disorders. It is worth noting that many systems have been built to monitor PD patients remotely, but the main limitation is that none guarantee data security over the Internet. Therefore, in order to maintain the security and integrity of data and their safe storage, the idea of blockchain was employed in this work to design such a system. © 2023 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.Preprint version of the work presented at the 31th International Conference on Electrical Engineering (ICEE), Tehran, Iran, May 2023. II. R ELATED WORK Various blockchain-based systems have been de- signed and developed in the healthcare sector [16]- [18]. Many studies have shown that the use of blockchain in the design of electronic healthcare record systems increases the security and integrity of patient data. In [19], researchers have used blockchain technology and privacy- preserving techniques to maintain the privacy and security of data shared on an IoT platform. Yanez et al. in [20] proposed a new context-aware data allocation method and designed a controller based on fuzzy logic. They calculated each data request allocation rating (RoA) value by considering parameters such as data and network and deciding its on-chain allocation and quality. The results of this mechanism have shown that using the proposed approach has increased network usage, latency, and blockchain storage and, thus, reduced energy consumption. In [21], Srivastava et al. presented a blockchain-based monitoring system for remote patient monitoring in the IoT platform. To ensure data security, encryption technologies have been used in the proposed IoT-based blockchain system. In [22], Novo et al. presented a new architecture for blockchain- based IoT systems that arbitrate roles and permissions in IoT. The results of this research indicate that blockchain can be used as an access management technology in various IoT scenarios. Jiaren Cai et al. used SSL and DSL protocols to authenticate and share healthcare data [23]. Liang et al. have proposed a blockchain-based system called Medshare to increase data security in the design of healthcare systems. In this work, blockchain manages access control, provenance, and security of medical records within cloud storage [24]. A secure healthcare electronic system was presented in [25] using blockchain technology and an attribute- based crypto-system approach. The proposed research employs a blockchain-based architecture to develop EHR systems to protect patients’ data and medical records against tamper and abuse by others [26]. In [27], researchers have used an end- to-end architecture designed based on a patient-centered agent (PCA) for continuous monitoring of patients. The simulation results indicate that the system increased the security and privacy of patients. III. P ROPOSED ARCHITECTURE This section represents a layered architecture for the pro- posed model. The model suggests a secure management system for remote monitoring of patients with movement disorders, especially PD patients. The layers of the proposed architecture are shown in Fig. 1. The key layers of the proposed architecture include: (1) the user layer, (2) the data processing layer, and (3) the data storage layer. The user layer is where the users interact with the system. The users include patients, caregivers, nurses, physicians, and IoT devices. The IoT devices collect the Parkinsons patients motion capture data and store them in the form of ﬁles. The ﬁles will then be uploaded to a remote server. The second layer is the core of the proposed system, implemented on theEthereum blockchain. The blockchain ensures the security of the users’ interactions with the remote monitoring system. The third layer, the storage layer, mainly includes the required smart contracts and the interplanetary ﬁle system storage (IPFS). Fig. 1. layers of the proposed architecture. Smart contract: Smart contracts are used to implement and monitor user tasks and implement various system operators. It assesses the authentication of users who are supposed to interact with this system, and in this case, it can cause secure data transfer and increase the system’s safety against unauthorized users. Smart contracts are re- sponsible for checking the data integration, data transfer, record creation, data sharing, data access level control, and access level creation for different users. Interplanetary ﬁle System (IPFS) storage: The IPFS is a peer-to-peer network to store and shares healthcare data. The data collected from users and the IoT devices are encrypted by the Advanced Encryption Standard (AES) algorithm and then uploaded to the IPFS network. Unlike the client-server model, IPFS uses a unique hash. When an encrypted ﬁle is stored in IPFS, a unique hash is created from each ﬁle to ensure secure data transfer, and the unique hash is stored on the blockchain network. Therefore, IPFS is an ideal and suitable storage system for the secure storage of healthcare data and the medical history of patients. According to Fig. 2, the proposed model for remote man- agement of patients with movement disorders consists of the following components: Smart Contract Interplanetary ﬁle system (IPFS) storage Administrator Users Decision support algorithm The administrator (admin) is one of the users of the system. Admin is generally responsible for authenticating and conﬁrm- ing users’ registration. The users of the system include: a) Patient with movement disorders: The patient sends their request for registration in the system along with their details, such as name, surname, national number, and medical records, to the administrator through a smart contract. After registering and conﬁrming the patient’s information, the ad- ministrator sends the patient’s login permission to the system © 2023 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. Fig. 2. The proposed model for remote management of patients with movement disorders. along with the user and password. Therefore, the patient can log in to the system and upload or download his medical ﬁle and prescriptions. Before uploading the ﬁle, the AES algorithm encrypts the data to maintain data security and then stores it in the IPFS. Finally, a unique hash ﬁle is given to the patient. In fact, with this hash ﬁle, the patient can share data with the physi- cian. By logging into the system and user panel, the patient can choose a physician from the list of available physicians and send his unique hash ﬁle to the physician. It is noteworthy that due to the use of the blockchain platform, all the patient’s information and history will be recorded as immutable in the system. b) Physicians: The process of registering and logging into the system for physicians is similar to registering patients. After logging into the system, the physician can view the list of patients who have sent their requests. The physician can then view the hash ﬁle sent by the patient. The physician prescribes the medication dose according to the patient’s current condition. This information is again encrypted by the AES algorithm and stored in IPFS. Eventually, the patient can receive the physician’s prescription by referring to their portal. c) Nurses: The process of registering and logging into the system for the nurse is similar to physicians. Nurses’ access level to patient information differs from physicians’ level of access. Physicians can access all patients data, and the physicians’ ﬁnal approval for injecting the drug dose is done. But in emergencies where the patients health is in danger, the patient can receive permission to inject a dose of medicine by sending an emergency request to the nurse.d) IoT devices: Registering IoT devices to the system is the same as registering other users. The IoT devices are mainly motion capture systems for patients with movement disorders. Motion capture systems send motion data (usually in the form of joints’ angles) to the system. The data transmitted by the IoT devices are encrypted by the AES encryption algorithm and then stored as a hash ﬁle in IPFS for the physician’s review or used by the decision sup port algorithm. e) Decision support algorithm: The decision support algorithm is a key component of any remote management system responsible for determining the required medication dose. This algorithm is designed to automatically determine the medication dose based on the data received from the patient as well as the patients history. The determined dose is added to the patients request ﬁle as a hashed ﬁle, and after being encrypted by the AES algorithm, it is stored in IPFS and sent to the physician. Therefore, the physician may either conﬁrm or override the determined dose by investigating the patient’s condition. The main advantage of the decision support al- gorithm is that if it detects that the patients current state is comparable with their previous state, it can directly suggest the last dose without waiting for the physicians approval. IV. I MPLEMENTATION REQUIREMENTS This section suggests the tools and requirements to imple- ment the architecture proposed in this work. Implementing the recommended model for remote management of movement disorders generally consists of two sides: the client side and the blockchain side. 1)The Client Side: On the client side, a distributed application (dApp) is required to connect the users to © 2023 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. the blockchain network. Considering the increasing pop- ularity of mobile devices, the dApp could be installed as a smartphone application. This application could potentially facilitate the use of the system on the client (patient) side. Therefore, HTML, CSS, and Javascript seem to be necessary tools to develop the user interface. 2)Blockchain Side: Developing and deploying smart con- tracts is required on the blockchain side. Smart contracts manage data sharing and allow to implement the sys- tem functions such as sending and receiving data and authentication. Ethereum seems to be the ﬁrst option for developing smart contracts on blockchain-based sys- tems. Solidity is a high-level object-oriented language for implementing smart contracts within Ethereum. It is worth mentioning that in the ﬁrst step, Remix IDE can be used as an online compiler for developing Etherium- based smart contracts. After developing and deploying a smart contract, Node JS is used to connect Ethereum with the IPFS. As mentioned earlier, various functions must be included in smart contracts to allow the User to communicate with the IPFS. According to Fig. 2, patients, physicians, and nurses form the Users set. Functions relevant to the Users set include: a) User Registration: The users initially send a registra- tion request to the system. At ﬁrst, the system checks whether the requesting User is already registered in the system or not. The Users request will be rejected if the User is already registered on the system. If a new user sends a registration request, after authentication, the new User will be registered in the system by the admin. After that, public and private keys are assigned to the registered User as the identity of system users Algorithm. 1. Algorithm 1 Registration Algorithm Require: Request registration user Ensure: Register user 1. Send a request as registration to the system ifuser authentication is valid then 1. admin generates the public and private key and sends them to the user 2. push the user to the system else print ”User is not authenticated” end if b) Upload and send ﬁles to IPFS: Only authenticated users registered with the system can upload ﬁles. Therefore, a physician, patient, or nurse as a user sends data in the form of a ﬁle. Then the information is encrypted by the AES algorithm and stored as a hash ﬁle in the IPFS Algorithm. 2. c) Access to ﬁles stored in IPFS: To access and down- load ﬁles from IPFS, the User must ﬁrst be authenticated so that the system can ensure that the User is valid. Then the User sends the request to access and download the ﬁle from IPFS to the system. Meanwhile, the blockchain fetches the requested ﬁle from IPFS and sends it to the user Algorithm. 3.Algorithm 2 Upload File Require: File hash Ensure: Upload ﬁle ifuser authentication is valid then 1. calculate hash ﬁle 2. store hash ﬁle on smart contract 3. encrypt the ﬁle using the AES algorithm 4. push the encrypted ﬁle on the IPFS else print ”User is not authenticated” end if Algorithm 3 Access ﬁle Require: request to access ﬁle Ensure: access ﬁle content the user request to share or access a ﬁle ifuser authentication is valid then 1. fetch the ﬁle from the IPFS 2. the user decrypted ﬁle and access ﬁle 4. push encrypted ﬁle on the IPFS else print ”User is not valid and cannot access ﬁle” end if d) Data integrity: According to what is shown in the ﬁgures (physician, patient, or nurse), when a user stores a ﬁle in IPFS, the ﬁle hash is stored in the smart contract. On the other hand, when users request access to ﬁles stored in IPFS, after receiving the ﬁle from IPFS, the smart contract recalculates its hash ﬁle and compares it with the previous hash ﬁle. The equality of both hash ﬁles indicates the medical data integrity stored in IPFS Algorithm. 4. Algorithm 4 Data integrity Require: request data integrity Ensure: check data integrity 1. user sends a request to check Integrity 2. Blockchain returns previous ﬁle hash 3. smart contract recalculates ﬁle hash as new ﬁle hash ifnew ﬁle hash is equal to previous ﬁle hash then 1. print Integrity completed 2. return true else print ”Integrity does not complete” end if After implementing the blockchain-based remote manage- ment system for the PD patients on the IoT platform, the PD patients managed from home should also have some necessary equipment to communicate with the proposed system. There- fore, the PD patients should be equipped with smartphones, the Internet, and motion sensors. Considering that this work focuses on movement disorders, wearable motion recording sensors should be used on the patients body. The choice of wearable motion capture sensors should make the patient © 2023 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. feel comfortable. In addition, motion capture sensors must be equipped with IoT to send the recorded data to the blockchain system in real-time. V. C ONCLUSION We proposed a blockchain-based remote management model to both monitor and administer the medication dose for pa- tients with movement disorders, especially Parkinson’s disease patients. The system will be deployed on an Internet of things platform. The proposed distributed architecture aims to ensure data integrity and secure data sharing between the patient and the physician. Due to the necessity of timely treatment of patients with movement disorders, medication dosage should be controlled remotely and securely. Therefore, unlike client- server-based systems, the patient’s data is stored securely and encrypted in the IPFS system in the proposed plan. We will implement the proposed system and evaluate its performance in our future work.