CN112559627B - Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain - Google Patents

Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain Download PDF

Info

Publication number
CN112559627B
CN112559627B CN202011449779.7A CN202011449779A CN112559627B CN 112559627 B CN112559627 B CN 112559627B CN 202011449779 A CN202011449779 A CN 202011449779A CN 112559627 B CN112559627 B CN 112559627B
Authority
CN
China
Prior art keywords
medical record
data
hospital
user
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011449779.7A
Other languages
Chinese (zh)
Other versions
CN112559627A (en
Inventor
王之琼
钟洁
王可馨
刘文兴
张川博
吕一鸣
Original Assignee
东北大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 东北大学 filed Critical 东北大学
Priority to CN202011449779.7A priority Critical patent/CN112559627B/en
Publication of CN112559627A publication Critical patent/CN112559627A/en
Application granted granted Critical
Publication of CN112559627B publication Critical patent/CN112559627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a coalition chain-based on-chain-off-chain collaborative electronic medical record data sharing method, and relates to the technical field of computer data sharing. The invention establishes a blockchain distributed super ledger Hyperledger Fabric blockchain network by constructing a blockchain platform; designing a writing medical record function of the electronic medical record system; selecting a MySQL database as a blockchain database for storing electronic medical records; the operation of inquiring, modifying and deleting the history medical record data of a certain patient is realized; uploading the medical duration uses the public keys of the patient and the doctor to digitally sign the abstract of the medical record to control the access authority of the user, protect the privacy of the patient and prevent the data from being tampered. The patent establishes a multi-alliance chain architecture, uses the channel technology of the alliance chain to realize cross-hospital safe data transmission, uses json texts as temporary carriers to realize medical data conversion among different hospital databases, and solves the problem of difficulty in sharing due to the data format at present.

Description

Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain
Technical Field
The invention relates to the technical field of computer data sharing, in particular to a method for sharing electronic medical record data in a coordinated manner on a chain-under-chain mode based on a alliance chain.
Background
In recent years, with the continuous development and utilization of computer functions, electronic medical records gradually step into eyes of people. The electronic medical record is widely used in the medical field due to the advantages of convenient circulation, lasting preservation, resource saving and the like. However, they inevitably have drawbacks such as easy tampering, and may cause medical disputes.
Blockchains are a new mode of application for computer technology, such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, etc., which is essentially a de-centralized database. Based on the three forms of the public, federation and private chains of blockchain technology, a federation chain remains essentially a private chain, except that it is larger than a private chain developed by a single small organization, but not on the scale of a public chain, it is understood to be a blockchain that is intermediate between a private chain and a public chain. Three major features of blockchain include decentralization, tamper resistance, and traceability. Decentralizing allows each node to be equal, and each node can modify and query information. The middle node and the root node of the Merkle tree in the block are obtained by carrying out hash operation on two child nodes of the Merkle tree, so that when the data of a leaf node is changed, the data is transmitted upwards step by step, the value of a parent node of the leaf node is changed until the hash value of the root node of the Merkle tree is changed, and thus, the nodes in the network can find that the data is changed, and tamper resistance is realized. Any manipulation of the medical data results in a transaction that is uploaded to the block and thus recorded by the blockchain, and the data information is unique and thus can be queried and traced. The alliance chain is commonly maintained by participating member authorities and provides a complete set of security management functions for the participating members, such as management, authentication, authorization, monitoring, auditing, etc.
Therefore, the electronic medical record based on the medical alliance chain can improve the defect of easy tampering and can improve the safety of the electronic medical record, so that the electronic medical record can reflect the information of a patient more accurately.
In fact, for blockchains, the state level has already mentioned blockchains in the "national institutes of affairs for the announcement of the printed" thirteen five "national informative programs" issued as early as 2016, 12. In recent years, provinces and cities are actively laying out blockchains and issuing corresponding incentive policies. At present, in the main projects of the global medical care industry, the usage amount of the traceability field is up to 38%. The "blockchain+medical" floor projects in China are mostly in the places such as Shanghai, beijing, zhejiang, jiangsu and the like, and mainly comprise application scenes such as medical equipment/medicine/vaccine anti-counterfeiting traceability, electronic prescription circulation, electronic medical records, hospital electronic notes, medical insurance and the like.
Because blockchains are an emerging shared ledger and database concept that was only proposed in the last decade, there are many areas that have not been developed and explored, and their properties of decentralization, distributed data storage, global marking, collective maintenance, etc. are well suited to the development needs of electronic medical records that currently have been gradually agreed as EHRs, i.e., between medical institutions, including personal-centric information integration between medical institutions. Therefore, the common point is taken as a starting point to integrate the blockchain technology and the electronic medical records.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a chain-on-chain-off-chain collaborative electronic medical record data sharing method based on a alliance chain.
A chain-chain downlink collaborative electronic medical record data sharing method based on a alliance chain comprises the following steps:
step 1: building a blockchain platform and building a blockchain distributed super ledger fabric blockchain network;
step 1-1: configuring an environment and setting a block data model by using an open source code of a HyperLedgerFabric platform;
step 1-2: designing a generating block function CreatBlock of the generating block, a calculating hash value function CalrulateHash and a checking function Examine for checking whether data are tampered;
the generated block function CreatBlock is as follows:
Newblock=CreateBlock(blockHeaders,blockBody)
wherein Newblock is the new block created; creatBlock is a block function created and executed by a peer node (intelligent contract) module in the super ledger; the block consists of a block header and a block body, wherein the block header (block heads) comprises the height (block height) of the block, the Hash value (Hash) of the block, the Hash value (prevBlockhash) of the previous block, the timeStamp (timeStamp) and the Hash value (merkleRoot) of the Merkle tree root; the block (blockBody) includes transactions (transactions) within the block and transaction numbers (numTransactions) of the block.
The calculated hash function calcultehsh is as follows:
Hash=SHA(h)
wherein SHA is a SHA256 function; h comprises a precursor block hash value (prevBlockHash), a Merkle root hash value (merkleRoot), and a timeStamp (timeStamp); hash is the current block Hash value.
The test function, examine, is as follows:
Consistent=Examine(thash(a),dhash(a))
the Examine is a function for checking whether the two parameters are equal, the return value is of a Boolean type, and the consistency return is True to indicate that the medical record data are Consistent and are not tampered; returning to False indicates that the medical record data is inconsistent and tampered. thash is the hash value stored in the leaf node where patient a is located; dhash is a hash value obtained by the SHA256 algorithm of patient a medical record data in a local database.
Step 1-3: using Hyperledger Fabric multichannel scheme, nodes of a medical organization are in the same channel, and all medical organization electing master nodes are added into one channel to realize data sharing;
step 2: designing a writing medical record function of the electronic medical record system; selecting a MySQL database as a blockchain database for storing electronic medical records; the storage of the electronic medical record is divided into on-chain storage and off-chain storage, and the content of the electronic medical record comprises basic information of a patient, a hospital admission and discharge record, a consultation record, an operation record, a death record and information of an informed consent;
the chain stores the electronic medical record input by the user, hashes the electronic medical record to form a digest, and digitally signs the digest by using public keys of the patient and the doctor, wherein the signature result is used for verifying the identity of the user and controlling the access right of the user; storing the abstract, the signed result, the identity information of the patient and the medical record uploading time as transaction contents on a blockchain;
the under-chain storage keeps original medical record information unprocessed by a user, stores the original medical record information into an under-chain MySQL database, calculates the medical record requested by the user to obtain a summary, and compares the summary with the summary stored in the blockchain to verify the integrity of data;
the on-chain storage includes the steps of:
step S1: the user stores the duration of the electronic illness on the chain, the client node sends the transaction content to the endorsement node, and the endorsement node performs signature verification;
step S2: after the signature is verified to be correct, the transaction is simulated and executed through the intelligent contract, and the transaction endorsement is returned;
step S3: the client node sends the transaction endorsement to an ordering node Orderer, the Orderer node orders and packages all transactions through an internal Kafka consensus mechanism, then broadcasts blocks to all nodes, and a master node stores the blocks and updates world states;
step 3: inquiring, modifying and deleting operation of a certain patient history data, and realizing data sharing and storage between two hospitals;
step 3-1: before inquiring, modifying and deleting medical record data, a user needs to send identity information and signature of a patient and the signature of a main doctor of the requested medical record to a collaboration network formed by verification nodes to verify the identity, the verification nodes traverse the transactions stored in the merck tree of all blocks and decrypt the signature results in the transactions by using the sent user signature and the main doctor signature, and whether the decrypted abstract and the uploaded abstract are consistent or not is compared to control the access authority of the user, if the decrypted abstract and the uploaded abstract are consistent, the identity verification is passed, otherwise, the identity verification is failed, and the user is refused to access;
step 3-2: the collaboration network selects a main node from all nodes, the main node replaces a user to perform query, modification and deletion operations on data in a database, each operation is divided into two cases of home and cross-home, wherein json texts are used as temporary storage carriers when all the cross-home operations are performed on data transmission, and data sharing and storage between two hospitals are realized through json resolvers and Map mapping functions;
the query data is home hospitals in which a user initiates a query request through a client and provides a signature of a patient, a signature of a main doctor, keywords of medical record information to be modified and medical record information, and as the selected main nodes of each hospital are located in the same channel, namely, all the main nodes perform data interaction through the channel, the medical record information of the patient required by cross-hospital query after the identity verification of the user is passed is realized; the main node of the local hospital judges whether the attribution of the medical record inquired by the main node is a home, if so, the main node inquires the home, and if not, the main node inquires the cross-home;
the hospital inquiry is carried out by verifying the identity information of a user in the step 3 and selecting a master node, after the user passes the identity verification, the master node inputs the name, the identity card, the diagnosis date and any keyword of the illness state provided by the user in an inquiry plate of a database to inquire and obtain corresponding data, after the integrity of the medical record passes the verification, the master node sends the medical record data to a client, and generates corresponding transaction and uploads the transaction to a block;
the cross-hospital query is characterized in that medical record keywords and signatures of patients and major doctors to which the medical record belongs are sent to a master node of a requested hospital through a channel by the master node of the hospital, the master node of the requested hospital verifies identities of the medical record keywords and the signatures through the two signatures, the master node obtains information to be queried from a database and verifies integrity after the verification is passed, the obtained data is saved in a db.json text through escaping after the integrity verification is passed, the data is sent to the master node of the hospital where a current user is located and deleted, query transaction is generated and uploaded to a block, and the master node of the hospital where the current user is located obtains the db.json text and then sends the db.json text to a client, and query transaction is generated and uploaded to the block.
The modification data is that a user initiates a modification request through a client and provides a signature of a patient, a signature of a main doctor, keywords of medical record information to be modified and a home hospital of the medical record, and as the selected main nodes of each hospital are located in the same channel, namely, each main node carries out data interaction through the channel, thus realizing that the user carries out cross-hospital modification on medical record information of the requested patient after passing identity verification, the main node of a local hospital judges whether the home location of the medical record modified by the user is a home or not, if the home location is the home location, the home location is modified, and if the home location is not the home location is modified;
the user identity information is verified and a master node is selected in the step 3, after the user identity verification is passed, the master node obtains the requested medical record data from the database, and returns data to the client for user modification after the data integrity verification is passed, the data after user modification is sent to the master node through the client to be stored in a local database module, and the master node uploads the generated transaction to a block;
the cross-hospital modification is that a master node of a local hospital sends a modification request, medical record keywords and two signatures to a master node of a requested hospital through a channel, the master node of the requested hospital verifies the identity of the master node through the two signatures, after the access right and the data integrity pass, required medical record data are saved in a db.json text after being converted, the text is sent to the requesting hospital through the channel, the data stored in the text are saved in a local database through a json analyzer and Map mapping function, the corresponding transaction is uploaded to a block, the db.json text is deleted, meanwhile, a successful writing signal is returned to the requested hospital, the requested hospital deletes the requested medical record from the local database after receiving the signal, and the generated transaction is uploaded to the block;
the deletion data is that a user initiates a deletion request through a client and provides a signature of a patient, a signature of a main doctor, keywords of medical record information to be deleted and a home hospital of the medical record, and as the selected main nodes of each hospital are positioned in the same channel, namely, each main node performs data interaction through the channel, so that the user performs cross-hospital deletion of medical record information of the requested patient after the identity verification is passed, the main node of a local hospital judges whether the home location of the medical record to be deleted is a home or not, if the home deletion is performed, the cross-hospital deletion is performed, and if the home location is not the home location;
and 3, verifying the identity information of the user and selecting a master node by the hospital deletion data, wherein after the user passes the identity verification, the master node inquires related medical record data of a patient by the key words provided by the master node, deletes the data after the data integrity verification passes, returns a successful deletion result to the client, and uploads the generated transaction to the block.
The cross-hospital deleting data is that a main node of a local hospital sends a deleting request, medical record keywords and two signatures to a main node of a requested hospital through a channel, the main node of the requested hospital verifies the identity of the main node through the two signatures, related data is deleted after the identity verification and the data integrity verification pass, the generated transaction is uploaded to a block, a successful deleting result is returned to the requesting hospital, the generated transaction is uploaded to the block by the requesting hospital, and a successful deleting signal is returned to a client.
The beneficial effects of adopting above-mentioned technical scheme to produce lie in:
the invention provides a method for sharing on-chain and off-chain collaborative electronic medical record data based on a alliance chain, which adopts a mode of storing medical information on the chain and storing original medical data under the chain to verify the integrity of the data during downloading and ensure the safety of the data. Uploading the medical duration uses the public keys of the patient and the doctor to digitally sign the abstract of the medical record to control the access authority of the user, protect the privacy of the patient and prevent the data from being tampered. The patent establishes a multi-alliance chain architecture, uses the channel technology of the alliance chain to realize cross-hospital safe data transmission, uses json texts as temporary carriers to realize medical data conversion among different hospital databases, and solves the problem of difficulty in sharing due to the data format at present.
Drawings
FIG. 1 is a general flow chart of a medical record data sharing method of the present invention;
FIG. 2 is a diagram of the overall architecture of a system in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of the medical record data storage according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating the operation of medical record data according to an embodiment of the present invention;
fig. 5 is a cross-hospital data sharing diagram for implementing database and json text conversion according to an embodiment of the present invention.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
The overall flow chart is shown in fig. 1, and the software platform in the embodiment is Hyperledger Fabric, which comprises the following steps:
step 1: building a blockchain platform and building a blockchain distributed super ledger Hyperledger Fabric blockchain network;
step 1-1: configuring an environment and setting a block data model by using an open source code of a Hyperledger Fabric platform;
the Go language is used in this embodiment to build the blockchain. After installing and configuring the development environment, a structure Block is defined as a data model of a Block, and data members thereof include a Block height (Block height), hash (Hash value), prevblock Hash (previous Block Hash value), timestamp (Timestamp), merkle root (transactions within a Block), and numtraction (number of transactions of a Block). A structure, chain, is defined to represent the entire blockchain.
Step 1-2: designing a generating block function CreatBlock of the generating block, a calculating hash value function CalrulateHash and a checking function Examine for checking whether data are tampered;
the generated block function CreatBlock is as follows:
Newblock=CreateBlock(blockHeaders,blockBody)
wherein Newblock is the new block created; creatBlock is a block function created and executed by a peer node (intelligent contract) module in the super ledger; the block consists of a block header and a block body, wherein the block header (block heads) comprises the height (block height) of the block, the Hash value (Hash) of the block, the Hash value (prevBlockhash) of the previous block, the timeStamp (timeStamp) and the Hash value (merkleRoot) of the Merkle tree root; the block (blockBody) includes transactions (transactions) within the block and transaction numbers (numTransactions) of the block.
The calculated hash function calcultehsh is as follows:
Hash=SHA(h)
wherein SHA is a SHA256 function; h comprises a precursor block hash value (prevBlockHash), a Merkle root hash value (merkleRoot), and a timeStamp (timeStamp); hash is the current block Hash value.
The test function, examine, is as follows:
Consistent=Examine(thash(a),dhash(a))
the Examine is a function for checking whether the two parameters are equal, the return value is of a Boolean type, and the consistency return is True to indicate that the medical record data are Consistent and are not tampered; returning to False indicates that the medical record data is inconsistent and tampered. thash is the hash value stored in the leaf node where patient a is located; dhash is a hash value obtained by the SHA256 algorithm of patient a medical record data in a local database.
Step 1-3: using a HyperledgerFabric multichannel scheme, wherein nodes of one medical organization are in the same channel, and all medical organization election master nodes are added into one channel to realize data sharing;
in this embodiment, a configtxgen tool is used to generate a configuration transaction file for the newly created channel using templates in the configtx.yaml configuration file. The anchor node configuration update file is used for configuring the anchor nodes of the organizations, and the newly-built channel file is generated based on the configtx.yaml configuration file, so that each organization needs to generate and pay attention to the corresponding organization name. The network is started, enters the docker container and creates a channel using peer channel create commands. The member node is added to the channel using the peer channel command to update the anchor node configuration. Repeating the above operation, and establishing a channel network of each medical institution. Thus, a multi-chain multi-channel blockchain network infrastructure covering multiple medical structures is built.
Step 2: designing a writing medical record function of the electronic medical record system; selecting a MySQL database as a blockchain database for storing electronic medical records; the storage of the electronic medical record is divided into on-chain storage and off-chain storage, wherein the content of the electronic medical record comprises basic information of a patient, a hospital admission and discharge record, a consultation record, an operation record, a death record and information of an informed consent, as shown in figure 3;
the chain stores the electronic medical record input by a user through an SHA256 algorithm to form a summary, and simultaneously uses public keys of a patient and a doctor to digitally sign the summary, and the signature result is used for verifying the identity of the user, controlling the access right of the user and ensuring the data security; storing the abstract, the signed result, the identity information of the patient and the medical record uploading time as transaction contents on a blockchain;
the under-chain storage keeps original medical record information unprocessed by a user, stores the original medical record information into an under-chain MySQL database, extracts medical records requested by the user from the database, carries out SHA256 operation on the medical records to obtain a summary, compares the summary with the summary stored in the blockchain to verify the integrity of data, and prevents the data from being tampered;
the on-chain storage includes the steps of:
step S1: the user stores the duration of the electronic illness on the chain, the client node sends the transaction content to the endorsement node, and the endorsement node performs signature verification;
step S2: after the signature is verified to be correct, the transaction is simulated and executed through the intelligent contract, and the transaction endorsement is returned;
step S3: the client node sends the transaction endorsement to an ordering node Orderer, the Orderer node orders and packages all transactions through an internal Kafka consensus mechanism, then broadcasts blocks to all nodes, and a master node stores the blocks and updates world states;
step 3: inquiring, modifying and deleting operation of a certain patient history data, and realizing data sharing and storage between two hospitals; as shown in fig. 4;
in this embodiment, taking the user n, the hospital A, B, the patients 1 and 2, and the master nodes a and B as examples, and assuming that the user n comes from the hospital a, the medical record information of the patient 1 is stored in the hospital a, and the medical record information of the patient 2 is stored in the hospital B. The first main node is the main node of the hospital A, and the second main node is the main node of the hospital B.
Step 3-1: before a user n requests to operate on certain medical record data, identity information and a signature of a patient and a signature of an attending doctor of the requested medical record need to be sent to a collaboration network formed by verification nodes of the collaboration network of the A hospital through a client node in hyperledger fabric to verify the identity. The verification node decrypts the signature result in the transaction by traversing the transactions stored in the merkle tree of all the blocks and using the sent user signature and the main doctor signature, and controls the access authority of the user by comparing whether the decrypted abstract is consistent with the uploaded abstract. If the identity is consistent, the identity verification is passed, and the required data can be accessed; otherwise, the authentication fails and the user is refused to access.
Step 3-2: and the hospital A selects the master node A from all the verification nodes. The election process is realized in the Gossip layer, when a node is started, the network is firstly stabilized and then the node starts to participate in the master node election, and the effective time of primary master node election is 10s. Therefore, the problem that the blocks cannot be distributed due to faults of the forced setting master node can be effectively avoided. The master node performs related operations according to the request of the user, wherein when all cross-hospital requests transmit medical data, the requested hospital extracts needed medical data from the database, converts the medical data into json language and stores the json language into db. After a hospital is requested to obtain a db.json text, the json analyzer is utilized to escape the data, the processed data is stored into the local data according to the Map mapping function, and the db.json text is deleted, and the architecture diagram is shown in figure 2.
The query data is that a user n initiates a query request through a client and provides a signature of a patient, a signature of a main doctor, keywords of medical record information to be queried and a home hospital of medical records. Because the selected main nodes of each hospital are located in the same channel, namely, the main nodes perform data interaction through the channel, the medical record information of the patient required by cross-hospital inquiry after the identity verification of the user n is passed is realized. And the master node of the local hospital judges whether the attribution of the medical record is a home or not, and if so, jumps to the home for inquiring. If not, jumping to cross-hospital query.
The home query is that the user n wants to query the medical record of the patient 1. And verifying the identity information of the user n and selecting a main node A through the step 3-1. After the authentication is passed, the main node A enters a local database, and inputs keywords of medical record information provided by a user at a query plate of the database for query to obtain a required electronic medical record, and verifies the integrity of the electronic medical record data. Under the condition of ensuring the integrity of the data, the main node A sends the electronic medical record data to the client, and generates a transaction of inquiring the patient 1 by the user n and uploads the transaction to the block;
the cross-hospital query is a record of medical history of the patient 2 that the user n wants to query. When cross-hospital inquiry is carried out, a master node A of a local hospital finds a medical record belonging hospital B provided by a user n through a channel, and sends two signatures, an inquiry request and medical record information keywords sent by the user n to a master node B of the hospital B. And after the identity verification is passed, the master node B enters a database to inquire the medical record information of the corresponding patient 2 and verify the integrity of the electronic medical record, and after the integrity verification is passed, the medical record information of the patient 2 is saved in a db.json text in an escape way, the text is transmitted to the master node A in a channel and then deleted, and meanwhile, the transaction of inquiring the patient 2 by the user n is generated and uploaded to a block. The master node A sends the obtained db.json text to the client, and simultaneously generates a transaction of the cross-hospital query patient 2 of the user n and uploads the transaction to the block.
The modification data is that a user n initiates a modification request through a client and provides a signature of a patient, a signature of a main doctor, keywords of medical record information to be modified and a home hospital of medical records. Because the selected main nodes of each hospital are located in the same channel, namely, the main nodes perform data interaction through the channel, the medical record information of the requested patient is modified across hospitals after the identity verification of the user n is passed. And the master node of the local hospital judges whether the attribution of the medical record modified by the master node is home, and if so, jumps to home modification. If not, jumping to cross-hospital modification.
The hospital is modified in that user n modifies the medical record of patient 1. And verifying the identity information of the user n and selecting a main node A through the step 3-1. After the identity verification of the user n is passed, the main node A accesses the data plate of the hospital in the database through the medical record keywords provided by the user n, after the integrity of the medical record is verified, the history data information of the patient 1 is returned to the client, the user n modifies the medical data to be modified through the client, after the modification is completed, the client sends the modified medical data to the main node to be stored in the data plate of the hospital A in the database, and meanwhile, the transaction of the patient 1 modified by the user n is generated and uploaded to the block, so that the patient medical record is effectively prevented from being tampered with the block;
the cross-hospital modification is that the user n modifies the medical record of the patient 2. When the cross-hospital modification is carried out, a master node A of the local hospital finds a medical record attribution hospital B provided by a user n through a channel, and sends two signatures, a modification request and medical record information keywords provided by the user n to a master node B of the hospital B. And the master node B verifies the identity information of the user n according to the two signatures, after the identity verification is passed, the master node B obtains the history medical record data of the patient 2 by inquiring the database, after the medical record integrity verification is passed, the medical record data is saved into a db.json text through an escape, and the text is transmitted to the master node A through a channel and then deleted. And the master node A writes the acquired db.json text information content into a local database through a json analyzer and a Map mapping function, and deletes the text after uploading corresponding transactions to the block according to the step 2-1-1, and returns a signal of successful writing to the master node B. After receiving the signal of successful writing, the master node B deletes the medical record data requested by the user n from the database, and generates the transaction of the user n for modifying the patient 2 across hospitals and uploads the transaction to the block. At this time, the user n modifies the data through the home;
the deleting data is that the family member n wants to delete the history medical record of the patient due to the death of the patient and the like, and can initiate a modifying request through a client and provide the signature of the patient, the signature of a main doctor, keywords of the medical record information to be deleted and the home hospital of the medical record. Because the selected main nodes of each hospital are located in the same channel, namely, the main nodes perform data interaction through the channel, the medical record information of the requested patient is deleted across hospitals after the identity verification of the user n is passed. Judging whether the attribution of the deleted medical records is a home or not by the main node of the local hospital, if so, deleting the home, and if not, deleting the medical records across the home;
the hospital deletion is that the user n deletes the medical record of the patient 1. And verifying the identity information of the user n and selecting a main node A through the step 3-1. After the authentication is passed, the master node A queries the database through the provided medical record keywords to acquire the requested medical record data of the patient 1, verifies the data integrity of the medical record data, deletes the data after the authentication is passed, generates a transaction that the user n deletes the patient 1, uploads the transaction to the block, and returns a successful deleting message to the client.
The cross-hospital deletion data is that a user n deletes a medical record of the patient 2. When cross-hospital deletion is carried out, the master node A finds the medical record attribution hospital B provided by the user n through the channel, and sends two signatures, a deletion request and medical record information keywords sent by the user n to the master node B of the hospital B. After the authentication is passed, the master node B inquires a local database plate block through the provided medical record keywords to acquire the requested electronic medical record, deletes the requested medical record data from the database after the data integrity is authenticated, uploads the transaction of the patient 2 deleted by the user n to the block, and returns a successful deleting message to the master node A through a channel. The main node A uploads the transaction generated by cross-hospital deletion data of the patient 2 to the block, and returns a successful deletion message to the client.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (6)

1. A chain-chain under cooperative electronic medical record data sharing method based on a alliance chain is characterized in that: the method comprises the following steps:
step 1: building a blockchain platform and building a blockchain distributed super ledger Hyperledger Fabric blockchain network;
step 1-1: configuring an environment and setting a block data model by using an open source code of a Hyperledger Fabric platform;
step 1-2: designing a generating block function CreatBlock of the generating block, a calculating hash value function CalrulateHash and a checking function Examine for checking whether data are tampered;
step 1-3: using Hyperledger Fabric multichannel scheme, nodes of a medical organization are in the same channel, and all medical organization electing master nodes are added into one channel to realize data sharing;
step 2: designing a writing medical record function of the electronic medical record system; selecting a MySQL database as a blockchain database for storing electronic medical records; the storage of the electronic medical record is divided into on-chain storage and off-chain storage, and the content of the electronic medical record comprises basic information of a patient, a hospital admission and discharge record, a consultation record, an operation record, a death record and information of an informed consent;
the chain stores the electronic medical record input by the user, hashes the electronic medical record to form a digest, and digitally signs the digest by using public keys of the patient and the doctor, wherein the signature result is used for verifying the identity of the user and controlling the access right of the user; storing the abstract, the signed result, the identity information of the patient and the medical record uploading time as transaction contents on a blockchain;
the under-chain storage keeps original medical record information unprocessed by a user, stores the original medical record information into an under-chain MySQL database, calculates the medical record requested by the user to obtain a summary, and compares the summary with the summary stored in the blockchain to verify the integrity of data;
step 3: inquiring, modifying and deleting operation of a certain patient history data, and realizing data sharing and storage between two hospitals;
step 3-1: before inquiring, modifying and deleting the medical record data, the user needs to send the identity information and signature of the patient and the signature of the main doctor of the requested medical record to a collaboration network formed by verification nodes to verify the identity, the verification nodes traverse the transaction transactions stored in the merck tree of all blocks, decrypt the signature results in the transaction transactions by using the sent user signature and the main doctor signature, and compare whether the decrypted abstract and the uploaded abstract are consistent to control the access right of the user, if the decrypted abstract and the uploaded abstract are consistent, the identity verification is passed, otherwise, the identity verification is failed, and the user is refused to access;
step 3-2: the collaboration network selects a main node from all nodes, the main node replaces a user to perform query, modification and deletion operations on data in a database, each operation is divided into two cases of home and cross-home, json texts are used as temporary storage carriers when all the cross-home operations are performed on data transmission, and data sharing and storage between two hospitals are achieved through json resolvers and Map mapping functions.
2. The method for sharing electronic medical record data in a federation chain based on-and-under-chain collaboration according to claim 1, wherein the generating block function CreatBlock in step 1-2 is as follows:
Newblock=CreateBlock(blockHeaders,blockBody)
wherein Newblock is the new block created; the CreatBlock is used for creating a block function and is executed by a peer node module in the super ledger; the block consists of a block header and a block body, wherein the block header (block heads) comprises the height (block height) of the block, the Hash value (Hash) of the block, the Hash value (prevBlockhash) of the previous block, the timeStamp (timeStamp) and the Hash value (merkleRoot) of the Merkle tree root; the block (blockBody) includes transactions (transactions) within the block and transaction numbers (numTransactions) of the block;
the calculated hash function calcultehsh is as follows:
Hash=SHA(h)
wherein SHA is a SHA256 function; h comprises a precursor block hash value (prevBlockHash), a Merkle Merker tree root hash value (merkleRootHash), and a timeStamp (timeStamp); hash is the current block Hash value;
the test function, examine, is as follows:
Consistent=Examine(thash(a),dhash(a))
the Examine is a function for checking whether the two parameters are equal, the return value is of a Boolean type, and the consistency return is True to indicate that the medical record data are Consistent and are not tampered; returning to False to indicate that the medical record data is inconsistent and tampered, wherein thash is a hash value stored in a leaf node where the patient a is located; dhash is a hash value obtained by the SHA256 algorithm of patient a medical record data in a local database.
3. The method for sharing electronic medical record data in a coordinated on-and-off-chain manner based on a federated chain according to claim 1, wherein the step 2 of storing the electronic medical record data in the chain includes the steps of:
step S1: the user stores the duration of the electronic illness on the chain, the client node sends the transaction content to the endorsement node, and the endorsement node performs signature verification;
step S2: after the signature is verified to be correct, the transaction is simulated and executed through the intelligent contract, and the transaction endorsement is returned;
step S3: the client node sends the transaction endorsement to the ordering node Orderer, the Orderer node orders and packages all transactions through an internal Kafka consensus mechanism, then broadcasts blocks to all nodes, and the master node saves the blocks and updates the world state.
4. The method for sharing the electronic medical record data under-chain collaboration based on the alliance chain according to claim 1, wherein the query data in the step 3 is that a user initiates a query request through a client and provides a signature of a patient, a signature of a main doctor and keywords of medical record information to be modified and a home hospital of the medical record, and as the selected main nodes of each hospital are positioned in the same channel, namely, each main node performs data interaction through the channel, thereby realizing that the user performs cross-hospital query on medical record information of the patient after the identity verification is passed; the main node of the local hospital judges whether the attribution of the medical record inquired by the main node is a home, if so, the main node inquires the home, and if not, the main node inquires the cross-home;
the hospital inquiry is carried out by verifying the identity information of a user in the step 3 and selecting a master node, after the user passes the identity verification, the master node inputs the name, the identity card, the diagnosis date and any keyword of the illness state provided by the user in an inquiry plate of a database to inquire and obtain corresponding data, after the integrity of the medical record passes the verification, the master node sends the medical record data to a client, and generates corresponding transaction and uploads the transaction to a block;
the cross-hospital query is characterized in that medical record keywords and signatures of patients and major doctors to which the medical record belongs are sent to a master node of a requested hospital through a channel by the master node of the hospital, the master node of the requested hospital verifies identities of the medical record keywords and the signatures through the two signatures, the master node obtains information to be queried from a database and verifies integrity after the verification is passed, the obtained data is saved in a db.json text through escaping after the integrity verification is passed, the data is sent to the master node of the hospital where a current user is located and deleted, query transaction is generated and uploaded to a block, and the master node of the hospital where the current user is located obtains the db.json text and then sends the db.json text to a client, and query transaction is generated and uploaded to the block.
5. The method for sharing the electronic medical record data under-chain collaboration based on the alliance chain according to claim 1, wherein the modification data in the step 3 is that a user initiates a modification request through a client and provides a signature of a patient, a signature of a main doctor and keywords of medical record information to be modified and a home hospital of the medical record, and as the selected main nodes of each hospital are positioned in the same channel, namely, each main node carries out data interaction through the channel, thereby realizing that the user carries out cross-hospital modification on the medical record information of the requested patient after the identity verification is passed, the main node of a local hospital judges whether the home location of the medical record to be modified is home or not, if the home location is modified, the cross-hospital modification is carried out, and if the home location is not;
the user identity information is verified and a master node is selected in the step 3, after the user identity verification is passed, the master node obtains the requested medical record data from the database, and returns data to the client for user modification after the data integrity verification is passed, the data after user modification is sent to the master node through the client to be stored in a local database module, and the master node uploads the generated transaction to a block;
the cross-hospital modification is that a master node of a local hospital sends a modification request, medical record keywords and two signatures to a master node of a requested hospital through a channel, the master node of the requested hospital verifies the identity of the master node through the two signatures, after the access right and the data integrity pass, required medical record data are stored in a db.json text after being converted, the text is sent to the requesting hospital through the channel, the data stored in the text are stored in a local database through a json analyzer and Map mapping function, the corresponding transaction is uploaded to a block, the db.json text is deleted, meanwhile, a successful writing signal is returned to the requested hospital, the requested hospital deletes the requested medical record from the local database after receiving the signal, and the generated transaction is uploaded to the block.
6. The method for sharing the electronic medical record data under-chain collaboration based on the alliance chain as claimed in claim 1, wherein the deleting data in the step 3 is that a user initiates a deleting request through a client and provides a signature of a patient, a signature of a main doctor and keywords of medical record information to be deleted and a home hospital of the medical record, and because the selected main nodes of each hospital are positioned in the same channel, namely, each main node carries out data interaction through the channel, thereby realizing that the user carries out cross-hospital deletion of the medical record information of the requested patient after the identity verification is passed, the main node of a local hospital judges whether the home location of the deleted medical record is a home or not, if the home deletion is carried out, if the home deletion is not carried out, the cross-hospital deletion is carried out;
the hospital deleting data passes through the step 3 of verifying the identity information of the user and selecting the master node, after the user passes the identity verification, the master node inquires the related medical record data of the patient through the keywords provided by the master node, after the data integrity verification passes, the data is deleted, a result of successful deletion is returned to the client, and meanwhile, the generated transaction is uploaded to the block;
the cross-hospital deleting data is that a main node of a local hospital sends a deleting request, medical record keywords and two signatures to a main node of a requested hospital through a channel, the main node of the requested hospital verifies the identity of the main node through the two signatures, related data is deleted after the identity verification and the data integrity verification pass, the generated transaction is uploaded to a block, a successful deleting result is returned to the requesting hospital, the generated transaction is uploaded to the block by the requesting hospital, and a successful deleting signal is returned to a client.
CN202011449779.7A 2020-12-11 2020-12-11 Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain Active CN112559627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011449779.7A CN112559627B (en) 2020-12-11 2020-12-11 Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011449779.7A CN112559627B (en) 2020-12-11 2020-12-11 Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain

Publications (2)

Publication Number Publication Date
CN112559627A CN112559627A (en) 2021-03-26
CN112559627B true CN112559627B (en) 2023-08-04

Family

ID=75061411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011449779.7A Active CN112559627B (en) 2020-12-11 2020-12-11 Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain

Country Status (1)

Country Link
CN (1) CN112559627B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113223706A (en) * 2021-05-31 2021-08-06 广东粤信智能科技有限公司 Alliance chain data building method, storage medium and system for multiple hospitals
CN113660206B (en) * 2021-07-12 2022-05-31 北京理工大学 Cross-organization access control method based on alliance chain and multiple signatures
CN113658649A (en) * 2021-07-22 2021-11-16 西安鹫一卓越软件科技有限公司 Block chain-based electronic medical record information tamper-proofing method and system
CN113793665A (en) * 2021-08-27 2021-12-14 汕头大学 Novel electronic medical record sharing method fusing block chains and real behavior characteristics
CN113821564B (en) * 2021-09-09 2023-08-18 湖南大学 Heterogeneous parallel blockchain and method for coordinating on-chain data and under-chain contracts thereof
CN114189526A (en) * 2021-11-01 2022-03-15 北京中合谷投资有限公司 Centralized scheduling algorithm of distributed network
CN114357081A (en) * 2022-01-05 2022-04-15 南昌航空大学 Block chain construction method of net structure
CN116168794A (en) * 2023-04-23 2023-05-26 成都本千医疗科技有限公司 Big data supervision's electronic medical record collection management platform
CN117037988A (en) * 2023-08-22 2023-11-10 广州视景医疗软件有限公司 Electronic medical record storage method and device based on blockchain
CN117540432B (en) * 2024-01-05 2024-03-19 河北数港科技有限公司 Data privacy protection method and system for Internet

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886027A (en) * 2019-01-14 2019-06-14 湘潭大学 A kind of medical data secure sharing method based on block chain
CN110135186A (en) * 2019-04-11 2019-08-16 浙江工业大学 Medical data transaction and sharing method based on block chain technology
CN110414203A (en) * 2019-07-26 2019-11-05 郑州大学 A kind of internet medical treatment identity identifying method based on block chain technology
CN110797099A (en) * 2019-10-28 2020-02-14 河北北方学院 Medical data sharing method and system based on block chain
WO2020141584A1 (en) * 2019-01-06 2020-07-09 株式会社フューチャーアイ Management system and program
CN111403009A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Hospital satisfaction investigation method and system based on block chain and computer readable storage medium
WO2020147478A1 (en) * 2019-01-14 2020-07-23 阿里巴巴集团控股有限公司 Block chain-based user feature value acquisition and application method and apparatus
CN111627542A (en) * 2020-05-29 2020-09-04 深圳市易链信息技术有限公司 Block chain-based medical information sharing method, system and readable storage medium
CN111816271A (en) * 2020-07-03 2020-10-23 深圳市易链信息技术有限公司 Block chain-based electronic medical record sharing method and system and readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111403009A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Hospital satisfaction investigation method and system based on block chain and computer readable storage medium
WO2020141584A1 (en) * 2019-01-06 2020-07-09 株式会社フューチャーアイ Management system and program
CN109886027A (en) * 2019-01-14 2019-06-14 湘潭大学 A kind of medical data secure sharing method based on block chain
WO2020147478A1 (en) * 2019-01-14 2020-07-23 阿里巴巴集团控股有限公司 Block chain-based user feature value acquisition and application method and apparatus
CN110135186A (en) * 2019-04-11 2019-08-16 浙江工业大学 Medical data transaction and sharing method based on block chain technology
CN110414203A (en) * 2019-07-26 2019-11-05 郑州大学 A kind of internet medical treatment identity identifying method based on block chain technology
CN110797099A (en) * 2019-10-28 2020-02-14 河北北方学院 Medical data sharing method and system based on block chain
CN111627542A (en) * 2020-05-29 2020-09-04 深圳市易链信息技术有限公司 Block chain-based medical information sharing method, system and readable storage medium
CN111816271A (en) * 2020-07-03 2020-10-23 深圳市易链信息技术有限公司 Block chain-based electronic medical record sharing method and system and readable storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Applications of blockchain in ensuring the security and privacy of electronic health record systems: A survey;Shuyun Shi 等;《Computers & Security》;1-15 *
Medical Chain:联盟式医疗区块链系统;张超 等;《自动化学报》;第45卷(第08期);1495-1510 *
一种病人可控的电子病历安全访问方案;潘恒 等;《应用科学学报》;第38卷(第01期);127-138 *
基于联盟区块链的电子病历系统模型研究;潘时清 等;《网络安全技术与应用》(第02期);32-34 *

Also Published As

Publication number Publication date
CN112559627A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN112559627B (en) Method for sharing electronic medical record data in cooperation with each other on chain and under chain based on alliance chain
CN109729168B (en) Data sharing exchange system and method based on block chain
CN110991622B (en) Machine learning model processing method based on block chain network and node
CN110532323B (en) Student identity information processing method and device in block chain network, electronic equipment and storage medium
CN109791591B (en) Method and system for identity and credential protection and verification via blockchain
CN110620810B (en) Non-linked ownership of continuous asset transfer over blockchain
US10490304B2 (en) Device-driven non-intermediated blockchain system over a social integrity network
US20190123889A1 (en) Document flow tracking using blockchain
Du et al. Research on the application of blockchain in smart healthcare: constructing a hierarchical framework
JP2021512416A (en) Systems, methods, and devices that enable intelligent consensus, smart consensus, and weighted consensus models for distributed ledger technology in a cloud-based computing environment.
DE102020125476A1 (en) METHODS AND DEVICES FOR DETERMINING AN ORIGIN FOR DATA SUPPLY CHAINS
CN110516474A (en) User information processing method, device, electronic equipment and storage medium in block chain network
CN112835612A (en) Electronic document version management method and device based on block chain
US20200168307A1 (en) Method and system for accessing electronic medical and health records by blockchain
CN108694189A (en) The management of the Database Systems of co-ownership
CN102073817B (en) Dynamic access control improvement method on basis of RBAC (Role-Based policies Access Control) model
CN107968763B (en) Group file management system and method
CN101763575A (en) License management apparatus, license management method, and computer readable medium
JP5469645B2 (en) Document management server system
CN112565289A (en) System and method for credible issuing and verifying of medical certificate based on block chain
US8695088B2 (en) Dynamically constructed capability for enforcing object access order
CN114092023A (en) Block chain-based medical data real-time auditing system and method
CN113037827B (en) Voting method based on block chain, self-organization management method and computer equipment
CN112733164B (en) Case sharing method, system and private key storage medium based on blockchain
CN110970120A (en) Family doctor management system and method based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant