| With the continuous improvement of medical information level,the hospital has gradually entered the era of paperless.Instead of the traditional paper prescriptions,electronic prescriptions carries the doctor’s guidance to the patient and serves as the voucher for the patient to take medicine.The emergence of electronic prescriptions has improved the level of medical services and brought convenience to hospitals and patients.However,there are some problems that cannot be ignored in electronic prescriptions.First,electronic prescriptions are stored in the centralized server of the hospital.When an attacker attacks the server,electronic prescriptions will be tampered with or deleted.Secondly,the control of electronic prescriptions does not belong to patients,and patients cannot effectively manage electronic prescriptions.Finally,electronic prescriptions can only be circulated within the hospital and cannot be shared with pharmacies outside the hospital to take medicine,which limits the development of medicine division.Blockchain technology has the characteristics of decentralization,anti-tampering,and traceability.It is suitable for data storage and sharing.This thesis combines blockchain technology with electronic prescriptions and uses the advantages of blockchain technology to solve the current problems of electronic prescriptions.The main work of this thesis is as follows:1.To solve the problem that storage and sharing of electronic prescriptions,a sharing scheme based on blockchain and conditional proxy re-encryption is proposed.First,the scheme proposes to encrypt the electronic prescription in the IPFS distributed file system and store the returned ciphertext IPFS index value in the blockchain,so that the electronic prescription cannot be tampered with.Secondly,in the aspect of key generation,the distributed key generation technology is used to solve the key escrow problem in the traditional identity-based encryption system.At the same time,conditional proxy reencryption is used to guarantee the trusted sharing of electronic prescriptions and to achieve fine-grained division of decryption rights.Finally,the scheme is analyzed from the aspects of correctness and safety.2.To solve the problem that electronic prescriptions can not be traced,this thesis proposes a scheme for the traceability of memory based on blockchain.First,the scheme proposes to store the operation records of electronic prescription to the blockchain,so as to realize the whole process of electronic prescription from the doctor’s prescription to the patient’s prescription.Secondly,the Po A consensus algorithm in the current consortium blockchain is improved in node selection to make it conform to the application scenarios of electronic prescriptions.Finally,the Po A consensus algorithm and Po W consensus algorithm are analyzed experimentally,and it is concluded that the Po A consensus algorithm is more efficient.3.Design and implement an electronic prescription tracing system based on blockchain.Using the ethereum platform to build an electronic prescription consortium blockchain based on the Po A consensus algorithm,and build an IPFS private cluster combined with the IPFS distributed file system to achieve secure storage of electronic prescriptions,and write ethereum smart contracts to realize data interaction between users and consortium blockchain,and ultimately guarantee the credible sharing of electronic prescriptions and the traceability of certificates. |