CN110197708B - Block chain migration and storage method for electronic medical record - Google Patents

Block chain migration and storage method for electronic medical record Download PDF

Info

Publication number
CN110197708B
CN110197708B CN201910486535.7A CN201910486535A CN110197708B CN 110197708 B CN110197708 B CN 110197708B CN 201910486535 A CN201910486535 A CN 201910486535A CN 110197708 B CN110197708 B CN 110197708B
Authority
CN
China
Prior art keywords
data
block chain
information
transaction
branch tree
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
CN201910486535.7A
Other languages
Chinese (zh)
Other versions
CN110197708A (en
Inventor
付蔚
杨鑫宇
谢昊飞
李克宇
张继柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN201910486535.7A priority Critical patent/CN110197708B/en
Publication of CN110197708A publication Critical patent/CN110197708A/en
Application granted granted Critical
Publication of CN110197708B publication Critical patent/CN110197708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/81Indexing, e.g. XML tags; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Computing Systems (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a block chain migration and storage method for electronic medical records, which belongs to the technical field of block chains. By constructing a multi-branch tree data model for a traditional medical database, a hospital-department-centric centralized database system is converted into a patient-centric distributed database system. The invention guarantees the integrity and robustness of data in the migration of the old database and the new database. On the other hand, efficient persistent data migration is guaranteed by the construction of the model tree.

Description

Block chain migration and storage method for electronic medical record
Technical Field
The invention belongs to the technical field of block chains, and relates to a block chain migration and storage method for electronic medical records.
Background
Blockchain was originally traced back to 1991, and Haber and Bayer et proposed the use of encrypted hash functions and the Merck tree in distributed systems to efficiently and securely record data with time stamps and to link the encrypted data blocks into chains. The block chain technology is a distributed storage account book system which is programmed and processed by matching an intelligent contract formed by automatic script codes through technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like.
As the block chain technology is continuously applied and implemented in the recent years, the combination of the block chain and the traditional medical industry becomes a mainstream trend. Since a centralized relational database System such as a Hospital Information System HIS (Hospital Information System) that has been used by a conventional medical institution stores patient Information, when a non-relational storage System such as a medical blockchain is constructed, valuable data stored in a relational database cannot be seamlessly migrated to the non-relational blockchain storage System.
In the existing technology related to the medical blockchain, most of the technologies or patents are started from the overall process of constructing the medical blockchain, and the technologies are explained and applied in the aspects of designing storage nodes for distributing medical information, the overall function of the medical blockchain, privacy access control strategies of electronic medical record information and the like. The data migration technology of the blockchain is mostly to migrate data of an old blockchain into a blockchain of a new version, or to provide a technology of migrating a general relational database into a non-relational database system. Therefore, in the aspect of blockchain medical treatment, it is difficult to migrate the old electronic medical record information of the traditional hospital database to the blockchain database by adopting the existing method. Therefore, the invention provides a block chain migration and storage method facing to electronic medical record.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method for migrating and storing a blockchain oriented to an electronic medical record, which can automatically construct a multi-way tree model from existing electronic medical record information in a hospital database, convert relational data into semi-structured data through the constructed multi-way tree model, store the semi-structured data, match user information on an existing blockchain, automatically issue an intelligent contract, and migrate the intelligent contract into an existing blockchain storage system.
In order to achieve the purpose, the invention provides the following technical scheme:
a block chain migration and storage method for electronic medical records comprises the steps of extracting an electronic medical record relation table from a traditional medical data system to construct a multi-branch tree information model, carrying out data conversion on relation phenotype data of the traditional electronic medical record through the constructed multi-branch tree information model, and carrying out information matching on generated non-relation medical record data and existing user information on a migration block chain. And when the related user information is matched, establishing an intelligent contract according to information parameters sent by the multi-branch tree information model and the non-relational medical record data, and performing block chain transaction broadcasting on the non-relational medical record data which is successfully converted according to the meta-transaction data structure and the new transaction data structure of the new block chain to finish the migration process from the traditional medical data system to the block chain data system.
And according to the metadata transaction data content of the new block chain, sequentially integrating the non-relational medical record data information corresponding to the metadata transaction into a new transaction data structure with a chain sequence, and solidifying the new transaction data structure in the whole block to form block chain data.
Further, the construction of the multi-branch tree information model comprises the following steps:
s11: for electronic medical record data with a plurality of mutually nested relation tables, a multi-branch tree model is used for mapping the structured data relation table step by step, a root node or a child node of the multi-branch tree corresponds to a main key and an external key in the relation table, and a multi-branch tree leaf node corresponds to a field (attribute) in the relation table.
S12: and acquiring a Patient information table in the electronic medical record relation table, and taking a primary key of the Patient information table as a root node of the whole multi-branch tree model.
S13: and mapping the fields in the relational table to child nodes of the multi-way tree.
S14: and judging whether the child node is the foreign key attribute, if the current node is the foreign key attribute, starting a new thread, jumping to a main table execution program to which the foreign key belongs, and repeating the steps S12-S14 until no foreign key attribute of the multi-branch tree node is added in the table.
S15: and traversing all the relation nodes, and ending the program if all the fields in the relation table are added into the mapped multi-branch tree. Otherwise, the field value not added to the multi-branch tree node is read, and step S13 is repeated.
Further, the data conversion is performed on the relational phenotype data of the traditional electronic medical record by constructing the generated multi-branch tree information model, and the information matching is performed on the generated non-relational medical record data and the existing user information on the migration block chain, which specifically comprises the following steps:
s21: and acquiring the packet relation table field data mapped by the root node of the multi-branch tree model.
S22: and generating a multi-branch tree data instance according to a structural model of the multi-branch tree model, and sequentially reading each tuple data in the table from the parent relation table until the last tuple to be migrated in the relation table.
S23: for each read tuple data, gradually migrating the tuple data to leaf nodes and child nodes instantiated by a multi-branch tree model from the data content corresponding to the first field of each tuple until the data content corresponding to the last field of the read tuple data is migrated completely.
S24: and for each foreign key field (attribute) corresponding to each tuple data in the read relation table, jumping to the data relation table to which the primary key field corresponding to the foreign key field belongs according to the previously generated node relation of the multi-branch tree model, and sequentially reading the tuple data mapped to the relation table corresponding to the foreign key field by the multi-branch tree model until the data are migrated to the leaf node at the bottom.
S25: for an independent data relation table which is not directly or indirectly connected with the parent relation table, acquiring a main key in the relation table as a root node of the whole multi-branch tree model according to a multi-branch tree modeling method, and migrating data in sequence.
S26: and matching the generated non-relational user medical record data with the related user information existing in the block chain.
Furthermore, the related user information includes personal information of the Patient, such as the name, the identification number, the sex, the date of birth and the like of the Patient in the Patient relationship table; patient unique identification data in the traditional medical data system, namely primary key information in a Patient relationship table; and the relation network information formed by guardians or other family members in the parent relation table.
Further, the step of migrating the successfully converted non-relational medical record data to the block chain comprises the following steps:
s31: and acquiring a non-relational data root node to match with the existing user information on the block chain.
S32: if the user information is successfully matched, the return value successfully matched is used as a parameter to be transmitted to the intelligent contract, and the nodes endorse and begin to issue transaction contents.
S33: if the user information is unsuccessfully matched, a return value which is unsuccessfully matched and a set validity period value are used as parameters to be transmitted to the intelligent contract, the node endorses but does not issue, and whether the user information is matched within the contract period is detected.
S34: if the relevant user information is matched within the contract term, step S32 is executed.
S35: and if the relevant user information is not matched within the contract deadline, performing transaction rollback operation, storing the transaction rollback operation back to the non-relational database, and waiting for executing the step S31.
S36: and storing the medical record data of the issued transaction according to the metadata transaction data structure of the new block chain and the new transaction data structure.
Further, the blockchain storage data format includes the following information:
the whole data structure of the block chain is divided into a block head part and a block body part. The block header includes the block hash and the previous block hash. The tile body contains two different kinds of transaction information, namely, meta transaction data and new transaction data.
The metadata transaction data is used for describing information of data attributes, and comprises block chain version information, multi-branch tree model load and load length and import log information. Wherein the version information identifies the version in the block chain that is currently being imported. The load length identifies the size of the data volume of the generated multi-way tree model. The model load identifies a multi-way tree model of the generated semi-structured data. The import log records information such as the storage location and data load of the relational database side of the imported data. The new transaction data is used for storing converted medical record data, and comprises metadata of an electronic medical record relation table corresponding to the blockchain transaction data, logic time, transaction load and an import log. The metadata represents metadata information of a relational database side and comprises functions of storage positions, historical data, file records and the like. And the logic time represents the time of the data generating data on the relational database side, but not the lead-in time of the blockchain, and the logic time represents the medical record result of the patient in the blockchain at the normal visit time.
Furthermore, the node comprises a block chain index module, a chain table module and a state storage module;
after the intelligent contract is issued, the block chain frame module calls the chain table module to receive the transaction content achieving consensus, indexes are built on the transaction content by calling the index module, the logic time state is added, and the transaction content is stored by calling the state storage module. When the state storage module finishes storage, a transaction receipt is generated, and the data conversion module is informed to carry out data marking. And the data conversion module feeds the storage completion state back to the electronic medical record relation table to complete the migration process of the whole block chain.
The invention has the beneficial effects that: the invention ensures the integrity and robustness of data in the migration of the old database and the new database on the one hand. On the other hand, efficient persistent data migration is guaranteed by the construction of the model tree.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flowchart of the overall process of the method for migrating and storing the electronic medical record-oriented blockchain according to the present invention;
FIG. 2 is a flow chart of modeling a multi-way tree in the method for migrating and storing a blockchain for electronic medical records according to the present invention;
FIG. 3 is a data structure diagram of block chain storage in the method for migrating and storing the block chain of the electronic medical record according to the present invention;
FIG. 4 is a meta-transaction structure diagram in a block chain storage data structure diagram in the method for migrating and storing a block chain for an electronic medical record according to the present invention;
FIG. 5 is a new transaction structure diagram in the block chain storage data structure diagram in the method for migrating and storing the block chain of the electronic medical record according to the present invention;
FIG. 6 is a general block diagram of the method for migrating and storing the blockchain of electronic medical records according to the present invention.
Detailed Description
The following embodiments of the present invention are provided by way of specific examples, and other advantages and effects of the present invention will be readily apparent to those skilled in the art from the disclosure herein. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustrating the invention only and not for the purpose of limiting the same, and in which there is shown by way of illustration only and not in the drawings in which there is no intention to limit the invention thereto; for a better explanation of the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
The blockchain system is a tamper-resistant, shared, digital distributed accounting system, which can be classified into public, private, and alliance chains according to the size and operation mode of the blockchain. Each blockchain system includes a number of nodes between which different transactions can occur, and thus transaction data is generated. The block chain system carries out consistency determination on each transaction data through an endorsement mechanism and a consensus algorithm, so that the transaction data are processed to form account book data, namely block data. When the blockchain technology is combined with the medical electronic medical record system, the blockchain technology adopts a non-relational database NoSQL, and the traditional medical electronic medical record system usually adopts a relational database. Relational databases refer to databases that use relational models to organize data. The relational model refers to a two-dimensional table model, and a relational database is a data organization consisting of two-dimensional tables and the relations between the two-dimensional tables. The relational database follows the standardized design, the minimum data redundancy of the design is ensured, and the relational structure is compact. While a non-relational database refers to a data storage system that is not designed following a paradigm structure, is distributed, and generally does not guarantee the ACID principle. NoSQL is a storage mode in which key-value pairs are stored and the structure is not fixed. The original medical electronic medical record system can not be directly accessed into the medical block system to obtain medical record information, and the medical record information is transferred from the medical system to the block chain by means of the data transfer middleware. The technical scheme of each embodiment of the invention relates to a relational database, a non-relational database and a block chain storage technology.
Fig. 1 is a flowchart of a block chain migration and storage method for electronic medical records according to an embodiment of the present invention, which is capable of automatically constructing an existing electronic medical record information in a hospital database into a multi-branch tree model, converting relational data into semi-structured data through the constructed multi-branch tree model, storing the semi-structured data, matching user information on an existing block chain, automatically issuing an intelligent contract, and transferring the intelligent contract to an existing block chain storage system.
In order to achieve the above object, the present invention provides a data migration method, the content of which includes that an electronic medical record relation table is extracted from a traditional medical data system to construct a multi-branch tree information model, data conversion is performed on the relation table type data of the traditional electronic medical record through the constructed multi-branch tree information model, and information matching is performed on the generated semi-structured data and the existing user information on a migration block chain.
And when the relevant user information is matched, establishing an intelligent contract according to information parameters sent by the multi-branch tree information model and the non-relational medical record data, and performing block chain transaction broadcasting on the non-relational medical record data which is successfully converted according to a meta transaction data structure and a new transaction data structure of the new block chain to finish the migration process from the traditional medical data system to the block chain data system.
And according to the metadata transaction data content of the new block chain, sequentially integrating non-relational medical record data information corresponding to metadata transaction into a new transaction data structure with a chain sequence, and solidifying the new transaction data structure in the whole block to form block chain data.
The relational database system according to the embodiment of the present invention refers to a database software entity conforming to a relational model and applied to a hospital electronic medical record system, and includes but is not limited to a common relational database, such as: database systems such as Oracle, DB2, microsoft SQL Server and MySQL.
The non-relational database system according to the embodiment of the present invention refers to a non-relational database software entity suitable for a federation chain, including but not limited to common non-relational databases, such as: mongoDB, redis, HBase, couchDB, and the like.
Optionally, fig. 2 is a flowchart for establishing a multi-way tree model according to an embodiment of the present invention. The operation steps are as follows:
a Patient information table in the electronic medical record relation table is obtained (S201), and a primary key of the Patient information table is used as a root node of the whole multi-branch tree model. (S202)
And mapping the fields in the relation table to child nodes of the multi-branch tree to obtain the nodes in the relation table. (S203)
And judging whether the child node is the foreign key attribute (S204), if the current node is the foreign key attribute, starting a new thread, jumping to a main table executive program (S207) to which the foreign key belongs, and repeating S202-S204 until no foreign key attribute of the multi-branch tree node is added in the table.
And judging the next node (S205), traversing all the relationship nodes (S206), and if all the fields in the relationship table are added into the mapped multi-branch tree, ending the program. Otherwise, the field value not added to the multi-branch tree node is read, and S203 is repeated.
Optionally, with respect to the data migration method, the step of matching data conversion with the user includes:
and acquiring the packet relation table field data mapped by the root node of the multi-branch tree model.
And generating a multi-branch tree data instance according to a structural model of the multi-branch tree model, and sequentially reading each tuple data in the table from the parent relation table until the last tuple to be migrated in the relation table. The tree traversal algorithm for reading the multi-way tree data includes, but is not limited to, common algorithms, such as: a pre-order traversal algorithm, a middle-order traversal algorithm, a subsequent traversal algorithm and the like.
For each read tuple data, gradually migrating the tuple data to leaf nodes and child nodes instantiated by a multi-fork tree model from the data content corresponding to the first field of each tuple until the data content corresponding to the last field of the read tuple data is migrated completely.
And for each foreign key field (attribute) corresponding to each meta-group data in the read relation table, jumping to a data relation table to which a main key field corresponding to the foreign key field belongs according to the previously generated node relation of the multi-branch tree model, and sequentially reading the meta-group data mapped to the relation table corresponding to the foreign key field by the multi-branch tree model until the meta-group data is migrated to a leaf node at the bottom.
For an independent data relation table which is not directly or indirectly connected with the parent relation table, acquiring a main key in the relation table as a root node of the whole multi-branch tree model according to a multi-branch tree modeling method, and migrating data in sequence.
And matching the generated non-relational user medical record data with the related user information existing in the block chain.
Optionally, the matched related user information at least comprises the following information:
the Patient name, identification card number, sex, date of birth and other personal information in the Patient relationship table. The Patient unique identification data in the traditional medical data system is primary key information in a Patient relation table. And the relation network information formed by guardians or other family members in the parent relation table. The personal information of the patient, such as name, gender and identification number, is used as a strict matching condition, and the matching cannot be performed if any condition which is not consistent with the personal information exists. The relationship network information composed of guardians or other family members in the parent relationship table can be used as weak condition matching by setting a threshold matching degree, for example, user information with the threshold matching degree being more than 80% can be matched. Matching and pushing are carried out on users on the block chain by matching strong conditions which accord with personal information with weak conditions of relationship network information, and formal migration of data is carried out after the patients agree to match through a web end or an app end.
Optionally, as shown in fig. 1, the step of migrating the non-relational medical record data after the conversion to the blockchain includes:
and acquiring a non-relational data root node and matching the non-relational data root node with the existing user information on the block chain (S103).
If the user information is matched successfully, the return value matched successfully is transmitted to the intelligent contract as a parameter, the intelligent contract starts to be generated and executed (S104), and the nodes endorse and start to issue transaction contents (S109).
If the user information fails to be matched, a return value failing to be matched and a set validity period value are used as parameters to be transmitted to the intelligent contract (S105), the node endorses but does not issue (S106), and whether the user information is matched within the contract period is detected (S108).
If the relevant user information is matched within the contract term, transaction endorsement is executed, and each node is broadcasted to issue the message (S109).
If the relevant user information is not matched within the contract term, a transaction rollback operation is performed (S107), and the transaction rollback operation is stored back in the non-relational database buffer to wait for execution of S103.
And storing the medical record data of the issued transaction according to the metadata transaction data structure of the new block chain and the new transaction data structure.
Alternatively, as shown in fig. 3, the block chain data structure diagram is shown. The format of the block chain storage data comprises the following information:
the whole data structure of the block chain is divided into a block head part and a block body part. The chunk header includes the chunk hash (S301) and the previous chunk hash (S302). The block body contains two different transaction information, i.e., meta transaction data (S303) and new transaction data (S304).
Alternatively, as shown in fig. 4, a structure diagram of the meta transaction data is shown. The metadata transaction data is used to describe data attribute information, including block chain version information (S401), multi-way tree model load (S403) and load length (S402), and import log information (S404). Wherein the version information identifies the version in the current lead-in block chain. The load length identifies the size of the data volume of the generated multi-way tree model. The model load identifies a multi-way tree model of the generated semi-structured data. The import log records information such as the storage location and data load of the relational database side of the imported data.
Alternatively, as shown in FIG. 5, a new transaction data structure diagram is shown. The new transaction data is used for storing converted medical record data, including metadata of an electronic medical record relation table corresponding to the blockchain transaction data (S501), logic time (S502), transaction load (S503) and import log (S504). The metadata represents metadata information of a relational database side and comprises functions of storage positions, historical data, file records and the like. And the logic time represents the time of the data generating data on the relational database side, but not the lead-in time of the blockchain, and the logic time represents the medical record result of the patient in the blockchain at the normal visit time. The import log records information such as a storage location and a data load of the relational database side of the imported data.
Alternatively, as shown in fig. 6, the overall structure of the data migration system is shown. The blockchain architecture for the migration and storage method includes, but is not limited to, the common alliance-chain blockchain platform. For example: hyperhedger Fabric, ripple, and Openchain, among others. The storage node module comprises a block chain index module, a linked list module and a state storage module.
After the intelligent contract is issued, the block chain frame module calls the chain table module to receive the transaction content achieving consensus, indexes are built for the transaction content by calling the index module, the logic time state is added, and the state storage module is called to store the transaction content.
When the state storage module finishes storage, a transaction receipt is generated, and the data conversion module is informed to carry out data marking. And the data conversion module feeds the storage completion state back to the electronic medical record relation table to complete the migration process of the whole block chain.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.

Claims (3)

1. A block chain migration and storage method facing electronic medical record is characterized in that: extracting an electronic medical record relation table from a traditional medical data system to construct a multi-branch tree information model, performing data conversion on the relation table type data of the traditional electronic medical record through the constructed multi-branch tree information model, and performing information matching on the generated non-relation medical record data and the existing user information on the migration block chain; when the relevant user information is matched, establishing an intelligent contract according to information parameters sent by a multi-branch tree information model and non-relational medical record data, and performing block chain transaction broadcasting on the non-relational medical record data which is successfully converted according to a meta transaction data structure and a new transaction data structure of a new block chain to finish the migration process from a traditional medical data system to a block chain data system;
according to the metadata transaction data content of the new block chain, sequentially integrating non-relational medical record data information corresponding to metadata transaction into a new transaction data structure with a chain sequence, and solidifying the new transaction data structure in the whole block to form block chain data;
the construction of the multi-branch tree information model comprises the following steps:
s11: for electronic medical record data with a plurality of relationship tables nested with each other, a multi-branch tree model is used for mapping a structured data relationship table step by step, a root node or a child node of a multi-branch tree corresponds to a main key and an external key in the relationship table, and a leaf node of the multi-branch tree corresponds to a field, namely an attribute, in the relationship table;
s12: acquiring Patient information table Patient in an electronic medical record relational table, and taking a primary key of the Patient table as a root node of the whole multi-branch tree model;
s13: mapping fields in the relation table into child nodes of the multi-branch tree;
s14: judging whether the child node is the foreign key attribute, if the current node is the foreign key attribute, starting a new thread, jumping to a main table execution program to which the foreign key belongs, and repeating the steps S12-S14 until no foreign key attribute of the multi-branch tree node is added in the table;
s15: traversing all the relation nodes, and if all the fields in the relation table are added into the mapped multi-branch tree, ending the program; otherwise, reading the field value which is not added into the multi-branch tree node, and repeating the step S13;
the method specifically comprises the following steps of performing data conversion on relational phenotype data of the traditional electronic medical record by constructing a generated multi-branch tree information model, and performing information matching on the generated non-relational medical record data and the existing user information on the migration block chain:
s21: acquiring the packet relation table field data mapped by the root node of the multi-branch tree model;
s22: generating a multi-branch tree data instance according to a structure model of a multi-branch tree model, and sequentially reading each tuple data in a cache relational table from the cache relational table until the last tuple to be migrated in the cache relational table;
s23: for each read tuple data, gradually migrating the tuple data to leaf nodes and child nodes instantiated by a multi-branch tree model from the data content corresponding to the first field of each tuple until the data content corresponding to the last field of the read tuple data is migrated;
s24: for each foreign key field, namely attribute, corresponding to each element group data in the read relation table, jumping to a data relation table to which a main key field corresponding to the foreign key field belongs according to a previously generated node relation of the multi-branch tree model, and sequentially reading element group data mapped to the element group data in the relation table corresponding to the foreign key field by the multi-branch tree model until the element group data are migrated to a leaf node at the bottom end;
s25: for an independent data relation table which is not directly or indirectly connected with the parent relation table, acquiring a main key in the relation table as a root node of the whole multi-branch tree model according to a multi-branch tree modeling method, and migrating data in sequence;
s26: matching the generated non-relational user medical record data with the related user information existing in the block chain
The related user information comprises the personal information of the Patient in the Patient relationship table, namely the name, the identification card number, the sex and the birth date of the Patient; the system also comprises unique Patient identification data in the traditional medical data system, namely primary key information in a Patient relation table; and the relation network information formed by guardians or other family members in the parent relation table;
the step of migrating the successfully converted non-relational medical record data to the block chain comprises the following steps:
s31: acquiring a non-relational data root node and matching the non-relational data root node with the existing user information on the block chain;
s32: if the user information is successfully matched, the return value successfully matched is used as a parameter to be transmitted to the intelligent contract, and the nodes endorse and begin to issue transaction contents;
s33: if the user information matching fails, transmitting a return value of the matching failure and a set validity period value as parameters to an intelligent contract, endorsing the node but not issuing the node, and detecting whether the user information is matched within the contract period;
s34: if the relevant user information is matched within the contract time limit, executing the step S32;
s35: if the relevant user information is not matched within the contract time limit, transaction rollback operation is carried out, the transaction rollback operation is stored back to the non-relational database, and the step S31 is waited to be executed;
s36: and storing the medical record data of the issued transaction according to the metadata transaction data structure of the new block chain and the new transaction data structure.
2. The method for migrating and storing a blockchain oriented to electronic medical records according to claim 1, wherein: the blockchain storage data format includes the following information:
the block chain integral data structure comprises a block head and a block body, wherein the block head comprises a block hash and a previous block hash, and the block body comprises two different transaction information, namely meta transaction data and new transaction data;
the metadata transaction data is used for describing information of data attributes, and comprises block chain version information, multi-branch tree model load, load length and import log information; wherein the version information identifies the version in the current import block chain; the load length identifies the size of the data volume of the generated multi-branch tree model; the model load identifies a multi-branch tree model of the generated semi-structured data; the import log records the storage position and the data load of the relational database side of the import data; the new transaction data is used for storing converted medical record data, and comprises metadata of an electronic medical record relation table corresponding to the block chain transaction data, logic time, transaction load and import logs; the metadata represent metadata information of a relational database side and comprise a storage position, historical data and file records; the logic time represents the time of generating data on the relational database side corresponding to the data and the lead-in time of the non-block chain, and the logic time represents the medical record result of the patient in the block chain at the normal diagnosis time.
3. The method for migrating and storing a blockchain oriented to electronic medical records according to claim 1, wherein: the nodes comprise a block chain index module, a chain table module and a state storage module;
after the intelligent contract is issued, the block chain frame module calls the linked list module to receive the transaction content achieving consensus, indexes are built for the transaction content by calling the index module, the logic time state is added, and the state storage module is called to store the transaction content; when the state storage module finishes storage and generates a transaction receipt, the data conversion module is informed to carry out data marking; and the data conversion module feeds the storage completion state back to the electronic medical record relation table to complete the migration process of the whole block chain.
CN201910486535.7A 2019-06-05 2019-06-05 Block chain migration and storage method for electronic medical record Active CN110197708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910486535.7A CN110197708B (en) 2019-06-05 2019-06-05 Block chain migration and storage method for electronic medical record

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910486535.7A CN110197708B (en) 2019-06-05 2019-06-05 Block chain migration and storage method for electronic medical record

Publications (2)

Publication Number Publication Date
CN110197708A CN110197708A (en) 2019-09-03
CN110197708B true CN110197708B (en) 2023-01-24

Family

ID=67754006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910486535.7A Active CN110197708B (en) 2019-06-05 2019-06-05 Block chain migration and storage method for electronic medical record

Country Status (1)

Country Link
CN (1) CN110197708B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311283B (en) * 2020-02-20 2021-02-05 宁波甜宝生物信息技术有限公司 Cosmetic source tracing production process method based on block chain and cloud computing
CN112632080B (en) * 2020-12-29 2023-01-13 杭州趣链科技有限公司 Data storage method, device and equipment based on block chain
CN113157723B (en) * 2021-04-06 2022-06-03 福州大学 SQL access method for Hyperridge Fabric
CN116483808B (en) * 2023-06-16 2023-09-12 北京国电通网络技术有限公司 Data migration method, device, electronic equipment and computer readable medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529194A (en) * 2016-12-02 2017-03-22 深圳市前海安测信息技术有限公司 Medical informatization electronic medical record data migration system and method
CN107040510A (en) * 2016-11-30 2017-08-11 华侨大学 A kind of medical big data processing method based on body area network and cloud computing
CN107820690A (en) * 2017-08-21 2018-03-20 达闼科技成都有限公司 Information choosing method, device, electronic equipment and computer-readable recording medium
WO2018126077A1 (en) * 2016-12-30 2018-07-05 Intel Corporation Service provision to iot devices
CN108648784A (en) * 2018-03-15 2018-10-12 西安电子科技大学 Medical data storage method, information data processing terminal based on block chain technology
CN109191003A (en) * 2018-09-25 2019-01-11 仲恺农业工程学院 Fruit and vegetable agricultural product quality safety traceability system based on block chain
WO2019018776A1 (en) * 2017-07-21 2019-01-24 Patientory, Inc. Blockchain network for secure exchange of healthcare information
CN109670334A (en) * 2018-12-19 2019-04-23 平安科技(深圳)有限公司 Electronic health record sharing method, device, computer equipment and storage medium
CN109830285A (en) * 2019-01-07 2019-05-31 东软医疗系统股份有限公司 A kind of medical image document handling method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040510A (en) * 2016-11-30 2017-08-11 华侨大学 A kind of medical big data processing method based on body area network and cloud computing
CN106529194A (en) * 2016-12-02 2017-03-22 深圳市前海安测信息技术有限公司 Medical informatization electronic medical record data migration system and method
WO2018126077A1 (en) * 2016-12-30 2018-07-05 Intel Corporation Service provision to iot devices
WO2019018776A1 (en) * 2017-07-21 2019-01-24 Patientory, Inc. Blockchain network for secure exchange of healthcare information
CN107820690A (en) * 2017-08-21 2018-03-20 达闼科技成都有限公司 Information choosing method, device, electronic equipment and computer-readable recording medium
CN108648784A (en) * 2018-03-15 2018-10-12 西安电子科技大学 Medical data storage method, information data processing terminal based on block chain technology
CN109191003A (en) * 2018-09-25 2019-01-11 仲恺农业工程学院 Fruit and vegetable agricultural product quality safety traceability system based on block chain
CN109670334A (en) * 2018-12-19 2019-04-23 平安科技(深圳)有限公司 Electronic health record sharing method, device, computer equipment and storage medium
CN109830285A (en) * 2019-01-07 2019-05-31 东软医疗系统股份有限公司 A kind of medical image document handling method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Block-Based Access Control for Blockchain-Based Electronic Medical Records (EMRs) Query in eHealth;Xiaoshuai Zhang;《IEEE》;20190221;全文 *
基于区块链的大数据共享模型与关键机制研究与实现;苏雄业;《中国优秀硕士论文电子期刊网》;20190515;全文 *

Also Published As

Publication number Publication date
CN110197708A (en) 2019-09-03

Similar Documents

Publication Publication Date Title
CN110197708B (en) Block chain migration and storage method for electronic medical record
US8832020B2 (en) Method and system for safely transporting legacy data to an object semantic form data grid
US8510344B1 (en) Optimistically consistent arbitrary data blob transactions
EP3798861A1 (en) Blockchain node and transaction method
US9020949B2 (en) Method and system for centralized issue tracking
JP5387757B2 (en) Parallel data processing system, parallel data processing method and program
US20090150439A1 (en) Common extensible data exchange format
US11822572B2 (en) Computing system providing blockchain-facilitated semantic interoperability between multiple disparate systems of record (SORs) and related methods
US10754854B2 (en) Consistent query of local indexes
Dey et al. Efficient techniques for online record linkage
US20170039227A1 (en) Data Archive Vault in Big Data Platform
CN112559627A (en) Alliance chain-based on-chain-under-chain collaborative electronic medical record data sharing method
CN106227800A (en) The storage method of the big data of a kind of highlights correlations and management system
CN105118003A (en) Intelligent auditing system and auditing algorithm for serious illness medical insurance
Cheng et al. Healthcare services across China–on implementing an extensible universally unique patient identifier system
CN105117396A (en) Processes and systems for collaborative manipulation of data
CN104991785A (en) Standardized clinical data service support system and method
CN113032393A (en) Method and device for binding associated object
US20180046779A1 (en) Caching technology for clinical data sources
CN112181950B (en) Construction method of distributed object database
CN109992585A (en) Data lead-in method for office management system
CN104794567A (en) HBase-based infectious disease data management methods
US20200409939A1 (en) Systems and methods for scalable database technology
Satti et al. Resolving data interoperability in ubiquitous health profile using semi-structured storage and processing
CN114822880B (en) Hospital diagnosis and treatment information system based on domestic autonomous control

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