| With the establishment of the hospital information system,the Electronic Medical Record System(EMR)has become the main method to record.The centralized data architecture of EMR may cause problems which includes record loss or accidental deletion.And the patient record data can not sharing among hospitals.As a technology of distrubted ledger,the blockchain has advantages of data rights management,easy sharing and disaster recovery backup.However,there is still problem of degrade performance caused by decentralized mechanism.the thesis combines the blockchain with EMR to design the system based on the Hyperledger Fabric blockchain.Major work summed up as follows:1.The thesis optimizes raft consensus algorithm in two aspects: Log Replication and Leader Election which solve the problem of degrade performance caused by decentralized mechanism and satisfy the requirement for high throughput and low latency based on EMR.In Log Replication phase,the improvement based on the sharing messages aims to reduce the communication complexity of Leader node by involving the Peer nodes in distributing log information.In Leader Election phase,the improvement which based on algorithm changes the ticket owner of Peer node by the comparison of Candidate node votes,and strives to reach consensus in one round elections to reduce used time.2.According to the requirements of EMR to protect privacy and to share data,the patient medical record data is stored in the blockchain network through an anonymous way which used in encryption algorithm.In the meantime,user related data is stored in the local database of medical institution,which includes personal message and medical record relationship information.For the Fabric network,two chaincodes are designed to implement the function of storing the patient’s medical record data and authority management to control viewing record.Under the EMR business requirements,the three web platforms of doctor,patient and management are designed through node.js technology to provide users with functions such as medical record review,authority management,registration application and personal information.3.The thesis test the features of the business logic of EMR and the performance of the advanced algorithm.The EMR system based on Fabric implement the function which includes controllable permission of patient records,data shareing,tracing and tamper resistance.The Ad Raft algorithm is 5.8% higher in throughout than Raft,and 1.3% shorter in delay.The application in the field of EMR provides good references. |