# Efficient and Secure Management of Medical Data Sharing Based on Blockchain Technology
## 3 Medical Data Management Platform  
In order to manage medical data, operational behaviors, authorized data, and access records in a trustworthy manner, this study designed and implemented a data management platform based on Fabric according to the actual business process. The process of medical data management is shown in Figure 1. The process can be divided into four stages. 1. Patients authorize the hospital to use the medical data. Since medical data involve personal privacy, these medical data recorded in the system must be authorized by patients. 2. Data processing. Medical data have are multi-source, heterogeneous, and unstructured. In order to better mine the value of medical data, it is necessary to process the tables and files that store medical data through manual or software processing so that the processed data can better serve medical research, drug development, health assessment, etc. 3. The data managers of hospitals upload the summary of original data, operational behavior (human/software), and processing results to the blockchain system. The operational behaviors are linked to the original data and newly generated data, which is the key to tracing the data. 4. Users can query and trace data through the interface provided by the platform. At the application layer of the platform, we designed interfaces for query and provenance, and users can trace data according to query conditions. On the platform, we provide two types of data traceability: forward tracking and backward tracing. For forward tracking, users can find out what new data are generated after any data are processed. For backward tracing, users can find out which data and operational behaviors are used to obtain any data. In this study, we do not focus on the authorization process in the first stage and the concrete processing methods in the second stage. In the first stage, we can obtain the original data. In the second stage, we obtain the newly generated data, operational behaviors, and processing results. In the third stage, we store the original data, intermediate data, and processing results in a database or file system and store the hash value, storage location, and operational behaviors of the data on the blockchain. In the fourth stage, we query and trace medical data based on the data stored on the blockchain. The core of building a medical data management platform lies in the construction of a blockchain network. We implemented the blockchain network based on Hyperledger Fabric. The structure of the blockchain network is shown in Figure 2. To meet regulatory requirements, we created a regulatory organization based on the method in [49]. Whenever a new channel is created, the platform automatically adds the regulatory organization to the channel. Peers in the regulatory organization can only query and trace data through chaincode to complete supervision. Next, we introduce several key concepts in blockchain networks. Figure 1: Medical data management process. In Figure 2, organizations represent entities such as enterprises and institutions. In this paper, organizations mainly refer to hospitals, regulatory agencies, or platforms. In each organization, there are several peer nodes, which refer to logical nodes that provide transaction endorsement, transaction verification, and ledger submission services. The Orderer node is mainly responsible for ordering transactions. It provides a pluggable consensus protocol, and in this platform, the Raft protocol is used to achieve consensus between Orderers. Channel is used to store blockchain ledgers, and only nodes within the channel can access the ledger data. Multiple channels can be established in a network to achieve data isolation. Client is mainly used for transaction submission and provenance queries, and does not require the storage of all transaction data.