An electronic medical record system based on a dynamic knowledge graph
By constructing a knowledge graph of medical forms and utilizing a real-time rule engine and front-end validation module, the problem of insufficient electronic processing capabilities of medical forms in existing technologies has been solved, enabling efficient management and validation of medical data and improving the accuracy and consistency of electronic medical records.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 南京市医疗保障局
- Filing Date
- 2026-01-23
- Publication Date
- 2026-06-09
AI Technical Summary
Existing electronic medical form technologies struggle to handle mixed forms of structured and unstructured data and cannot effectively manage and validate complex data object constraints between different medical forms. This results in simplistic data structures, broken data chains, and poor overall accuracy, hindering the development of smart healthcare applications.
An electronic medical record system based on dynamic knowledge graphs is adopted. By constructing a knowledge graph of medical forms and utilizing a real-time rule engine and front-end validation module, the system deeply explores the dependencies, mutual exclusions, and triggering relationships between forms, enabling the validation of complex constraint relationships across forms and business processes.
It improves the accuracy of electronic medical records, enables intelligent and precise management of medical data and consistency with business logic, and supports more efficient data mining and interoperability.
Smart Images

Figure CN122177325A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an electronic medical record system based on dynamic knowledge graphs, belonging to the field of medical form filling technology. Background Technology
[0002] With the in-depth development of information technology and artificial intelligence, smart healthcare has become an important direction in the evolution of modern medical systems. In this process, the comprehensive electronic, structured, and intelligent management of medical data is the cornerstone of building a smart healthcare system. Hospitals generate a large number of medical forms in their daily clinical activities, such as outpatient medical records, inpatient medical records, blood test reports, imaging reports, pathology reports, and various payment receipts. These forms carry core information about the entire patient treatment process.
[0003] Current technologies for digitizing medical forms typically employ a method of designing corresponding spreadsheets or templates for each form and setting basic data rules for each data entry field. These rules mainly include data type validation (e.g., text, numeric), format validation (e.g., date format), and simple logical validation (e.g., age range, reasonable range of test values). For example, in an electronic medical record system, the "age" field is required to be numeric and within the range of 0-150; the "date of visit" must not be later than the current date. This method, to a certain extent, ensures the standardization and accuracy of individual data items.
[0004] However, existing electronic medical form technologies have significant limitations, making it difficult to meet the demands of smart healthcare for in-depth data mining and interoperability. Specifically, their shortcomings are reflected in the following two aspects:
[0005] First, current technologies are insufficient to handle the complexity of medical data. Medical data is not simply structured data, but rather a mixture of structured data (such as patient ID, age, and cost) and unstructured data (such as doctor's written descriptions of symptoms, diagnostic conclusions, and text annotations in imaging reports). Existing electronic solutions often focus on the former, while the latter is usually only processed through simple scanning and archiving or full-text storage. They fail to effectively extract, identify, and structure key medical entities (such as disease names, medications, and surgical procedures) and their attributes from unstructured text, resulting in a large amount of high-value information contained within the text that cannot be directly understood and utilized by computers.
[0006] Secondly, and more critically, the existing technology completely ignores the inherent and complex business logic and constraints between different medical forms. In the actual diagnosis and treatment process, various forms do not exist in isolation; they together form an interlocking data chain. There are strict logical relationships and state dependencies between the forms, such as the following relationships.
[0007] (1) Dependency relationship, such as the existence of a "blood test report" is based on the existence of a "blood test payment receipt". That is, if there is a blood test report, there must be a payment receipt, but if there is a payment receipt, there may not be a blood test report (the patient may not have had a blood test). This is a typical business rule constraint.
[0008] (2) Data consistency constraint: the same data object (such as "patient identifier") appearing in different forms must be consistent; for example, the conclusion drawn in a "pathology diagnosis report" should be consistent with the treatment measures to be taken in the subsequent "treatment plan" form in terms of medical logic.
[0009] Current rule validation technologies based on individual forms and data items are completely incapable of expressing and validating the complex constraints across forms and business processes. This directly leads to simplistic data structures, broken data chains, poor overall accuracy, and even data inconsistencies that violate basic medical logic in existing electronic systems. When this low-quality data is used for clinical decision support, research analysis, or hospital management, its reliability and value are greatly diminished, severely hindering the further development of smart healthcare applications. Summary of the Invention
[0010] The technical problem to be solved by this invention is to provide an electronic medical record system based on dynamic knowledge graphs, which can efficiently manage and verify the complex data object constraint relationships between different medical forms, thereby building a truly intelligent, accurate and business logic consistent electronic medical data system.
[0011] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The present invention designs an electronic medical record system based on dynamic knowledge graph, which is used to verify the filling of various target medical electronic forms and realize the filling of electronic medical records. Specifically, the electronic medical record system includes a dynamic knowledge graph module, a real-time rule engine module, and a real-time front-end verification module.
[0012] The dynamic knowledge graph module is used to construct the knowledge graph corresponding to each target medical form. The nodes are each target medical form, each field item in each target medical form, and the rule corresponding to each field item. The edges are the belonging relationship between the target medical form and each field item, the ownership rule relationship between each field item and its corresponding rule, and the dependency relationship between fields in the target medical form.
[0013] The real-time front-end verification module communicates with the real-time rule engine module. The real-time front-end verification module listens for the filling actions of each field item in each target medical electronic form, triggers a verification request to the real-time rule engine module for the filled data, and receives the verification results of the filled data returned by the real-time rule engine module, and updates the filling interface of the corresponding field item in the corresponding target medical electronic form according to the verification results.
[0014] The real-time rule engine module communicates with the dynamic knowledge graph module. The real-time rule engine module receives verification requests for the entered data initiated by the real-time front-end verification module, queries the rule nodes and other field items associated with the field item node corresponding to the verification request in the dynamic knowledge graph module, performs verification on the entered data, and returns the verification results of the entered data to the real-time front-end verification module.
[0015] As a preferred technical solution of the present invention: the knowledge graph constructed by the dynamic knowledge graph module also includes edges that represent the dependency relationship between field items of different target medical forms. Each edge of the dependency relationship in the knowledge graph has a directionality, and its direction is from the result field item node to the premise field item node. This is used to represent the logical relationship that the result field item node has valid data only on the basis that the premise field item node has valid data.
[0016] As a preferred technical solution of the present invention, it further includes an intelligent filling module that is communicatively connected to the dynamic knowledge graph module and the real-time rule engine module respectively;
[0017] The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data is a result field node connected by a dependency edge in the knowledge graph. If so, the real-time rule engine module initiates a request to the intelligent fill module to fill in the field node corresponding to the entered data as a result field node in the dependency relationship. The intelligent fill module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, fills in the prerequisite field node connected to the dependency edge of the result field node by the field node corresponding to the entered data. The system generates corresponding prompt data and feeds it back to the real-time rule engine module. The real-time rule engine module then returns the verification results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end verification module. The real-time front-end verification module updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the verification results of the entered data to the real-time front-end verification module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results.
[0018] When the verification result indicates that the entered data is invalid, the real-time rule engine module directly returns the verification result to the real-time front-end verification module, which then updates the entry interface of the corresponding field item in the target medical electronic form based on the verification result.
[0019] As a preferred technical solution of the present invention: the knowledge graph constructed by the dynamic knowledge graph module also includes edges indicating that there is a mutual exclusion relationship between field item nodes in the target medical form, and edges indicating that there is a mutual exclusion relationship between field item nodes across different target medical forms, and the valid data of the two field item nodes connected by the mutual exclusion relationship edge are mutually exclusive.
[0020] The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data belongs to one of the two field nodes connected by a mutual exclusion edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module to fill the field node corresponding to the entered data as a field node in a mutual exclusion relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, generates a corresponding prompt for the other field node in the mutual exclusion relationship to which the field node corresponding to the entered data belongs. The data is fed back to the real-time rule engine module, which then returns the validation results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end validation module. The real-time front-end validation module updates the entry interface of the corresponding fields in the target medical electronic form based on the validation results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the validation results of the entered data to the real-time front-end validation module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the validation results.
[0021] When the verification result indicates that the entered data is invalid, the real-time rule engine module directly returns the verification result to the real-time front-end verification module, which then updates the entry interface of the corresponding field item in the target medical electronic form based on the verification result.
[0022] As a preferred technical solution of the present invention: the knowledge graph constructed by the dynamic knowledge graph module also includes edges representing the triggering relationship between field item nodes in the target medical form, and edges representing the triggering relationship between field item nodes across different target medical forms. Each triggering relationship edge has directionality, and its direction is from the starting field item node to the ending field item node. When the valid data of the starting field item node changes, the valid data of the ending field item node is triggered to change.
[0023] The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data is the starting field node connected by the trigger relationship edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module regarding the field node corresponding to the entered data as the starting field node in the trigger relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, generates corresponding suggestions for the ending field node in the trigger relationship to which the field node corresponding to the entered data belongs. The system displays the data and feeds it back to the real-time rule engine module. The real-time rule engine module then returns the verification results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end verification module. The real-time front-end verification module updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the verification results of the entered data to the real-time front-end verification module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results.
[0024] When the verification result indicates that the entered data is invalid, the real-time rule engine module directly returns the verification result to the real-time front-end verification module, which then updates the entry interface of the corresponding field item in the target medical electronic form based on the verification result.
[0025] As a preferred technical solution of the present invention, it further includes a conflict detection module that is communicatively connected to the dynamic knowledge graph module and the real-time front-end verification module. The real-time front-end verification module listens for the submission action of each target medical electronic form and triggers a conflict detection request to the conflict detection module regarding the submitted target medical electronic form. The conflict detection module performs global reasoning on the submitted target medical electronic form based on the field item nodes in the knowledge graph constructed by the dynamic knowledge graph module, which are connected to the corresponding rule nodes and other field item nodes through logical relationship edges. It checks the conflict results of each field item in the target medical electronic form and feeds them back to the real-time front-end verification module. The real-time front-end verification module updates the submission interface of the target medical electronic form based on the conflict results.
[0026] As a preferred technical solution of the present invention, it also includes a visualization management module that is communicatively connected to the dynamic knowledge graph module. The administrator performs add, delete, and modify operations on the nodes and edges in the knowledge graph constructed by the dynamic knowledge graph module through the visualization management module to update the knowledge graph.
[0027] As a preferred technical solution of the present invention: it also includes a data extraction module, which performs the following steps a to d for the unstructured text of the medical record to obtain various structured data in the medical record. Then, the data extraction module fills the various structured data into the corresponding fields of the corresponding target medical electronic forms, and the real-time front-end verification module monitors the filling action.
[0028] Step a. Perform data cleaning on the unstructured text of the medical records, remove the pre-defined types of undisputed words, update the unstructured text of the medical records, and then proceed to step b.
[0029] Step b. Perform word segmentation on the unstructured text of the medical record except for the data values to obtain the word segmented text corresponding to the medical record, and obtain the Word2Vec vector corresponding to each word segmented text to form the word segmented text vector in the medical record, and then proceed to step c.
[0030] Step c. For each segmented text vector in the medical record, obtain the cosine distance between the segmented text vector and the vector of each medical term in the preset medical vocabulary library, and determine whether there is a cosine distance less than the preset distance threshold. If so, select the medical term corresponding to the smallest cosine distance to replace the position of the segmented text vector in the unstructured text of the medical record; otherwise, do not process it. After the judgment and processing of each segmented text vector in the medical record are completed, proceed to step d.
[0031] Step d. For each replaced medical term in the unstructured text of the medical record, determine whether there is a data value in the adjacent position after the medical term. If there is, associate the medical term with the data value in the adjacent position to form a medical entity. Otherwise, directly form a medical entity from the medical term. Then obtain each medical entity in the medical record and form each structured data in the medical record.
[0032] Corresponding to the above, the present invention designs a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements an electronic medical record system based on a dynamic knowledge graph.
[0033] Simultaneously, a computer-readable storage medium is designed, on which a computer program is stored, which, when executed by a processor, implements an electronic medical record system based on a dynamic knowledge graph.
[0034] The electronic medical record system based on dynamic knowledge graphs described in this invention, compared with existing technologies, has the following technical advantages:
[0035] This invention designs an electronic medical record system based on a dynamic knowledge graph. A dynamic knowledge graph module constructs a knowledge graph corresponding to each target medical form. A real-time front-end verification module listens for the filling actions of each field item in each target medical form, triggering a verification request to the real-time rule engine module regarding the filled data. The real-time rule engine module queries the dynamic knowledge graph module for rule nodes and other field item nodes associated with the field item node corresponding to the verification request, performing verification on the filled data. The constructed knowledge graph includes the belonging relationships between the target medical form and its fields, the rule relationships between each field item and its corresponding rule, and considers dependency relationships, mutual exclusion relationships, and trigger relationships between fields within the target medical form and between fields across different target medical forms. It deeply mines the various constraints in the medical forms as the basis for verification, ultimately realizing the completion of electronic medical records and effectively improving the accuracy of electronic medical records. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the architecture of the electronic medical record system based on dynamic knowledge graph designed in this invention. Detailed Implementation
[0037] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0038] This invention designs an electronic medical record system based on a dynamic knowledge graph, used to validate the completion of various target medical electronic forms, thereby enabling the completion of electronic medical records. In practical applications, such as... Figure 1 As shown, the specific design of the electronic medical record system includes a dynamic knowledge graph module, a real-time rule engine module, and a real-time front-end verification module.
[0039] The dynamic knowledge graph module is used to construct the knowledge graph corresponding to each target medical form. Nodes are defined as each target medical form, each field within each target medical form, and the rules corresponding to each field. Edges are defined as the membership relationships between the target medical form and its fields, and the ownership relationships between each field and its corresponding rules. The module also considers dependency, mutual exclusion, and triggering relationships between fields within the target medical forms and between fields across different target medical forms, constructing corresponding edges in the knowledge graph. Each dependency edge in the knowledge graph is directional, pointing from the result field node to the prerequisite field node, indicating the logical relationship that the result field node only has valid data if the prerequisite field node has valid data. Similarly, each triggering edge is directional, pointing from the starting field node to the ending field node; a change in the valid data of the starting field node triggers a change in the valid data of the ending field node.
[0040] The real-time front-end validation module communicates with the real-time rule engine module. The real-time front-end validation module listens for the filling actions of each field item in each target medical electronic form, triggers a validation request for the filled data to be sent to the real-time rule engine module, and receives the validation results of the filled data returned by the real-time rule engine module, and updates the filling interface of the corresponding field item in the target medical electronic form according to the validation results.
[0041] The real-time rule engine module communicates with the dynamic knowledge graph module. The real-time rule engine module receives verification requests for the entered data initiated by the real-time front-end verification module, queries the rule nodes and other field items associated with the field item node corresponding to the verification request in the dynamic knowledge graph module, performs verification on the entered data, and returns the verification results of the entered data to the real-time front-end verification module.
[0042] In the specific implementation process of the above design scheme, an intelligent filling module is further introduced, which is communicatively connected to the dynamic knowledge graph module and the real-time rule engine module. When faced with dependency constraints, in practical applications, such as... Figure 1As shown, the system's specific design and execution are as follows: The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data is a result field node connected by a dependency edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module to fill the field node corresponding to the entered data as a result field node in the dependency relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, fills the field node corresponding to the entered data as a result field node connected by a dependency edge. The system generates corresponding prompt data for each field item node and sends it back to the real-time rule engine module. The real-time rule engine module then returns the validation results of the entered data, along with the prompt data and the corresponding field items in the target medical electronic form, to the real-time front-end validation module. The real-time front-end validation module updates the entry interface for the corresponding field items in the target medical electronic form based on the validation results, and also updates the entry interface for the corresponding field items in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the validation results of the entered data to the real-time front-end validation module, which then updates the entry interface for the corresponding field items in the target medical electronic form based on the validation results.
[0043] The dependency relationship is such that the prerequisite field item node is the blood sampling payment voucher field item, and the result field item node is the blood sampling report field item. That is, the existence of a blood sampling report is only possible if the blood sampling payment voucher exists, but the existence of a blood sampling report necessarily implies the existence of the blood sampling payment voucher. In practical applications, the real-time rule engine module queries the dynamic knowledge graph module and verifies the blood sampling report according to the rules corresponding to the blood sampling report field item. When the verification result indicates that the blood sampling report is valid data, the real-time rule engine module further determines, based on the dynamic knowledge graph module, that the blood sampling report field item is a result field item node connected by the dependency relationship edge in the knowledge graph. Then, the real-time rule engine module initiates a request to the intelligent filling module to fill the blood sampling report field item as a result field item node in the dependency relationship. The intelligent filling module, based on the knowledge graph constructed by the blood sampling report and the dynamic knowledge graph module, fills the blood sampling report field item as a result field item node. The prerequisite field node connected by the dependency edge, i.e., the blood draw payment voucher field, generates corresponding prompt data and feeds it back to the real-time rule engine module. Since a blood draw report exists at this time, the prompt data for the blood draw payment voucher field is that the blood draw payment voucher field cannot be empty. The real-time rule engine module returns the verification result of the blood draw report and the prompt data for the blood draw payment voucher field to the real-time front-end verification module. The real-time front-end verification module updates the filling interface of the blood draw report field in the corresponding target medical electronic form according to the verification result, and updates the prompt data for the blood draw payment voucher field in the corresponding target medical electronic form. Otherwise, the real-time rule engine module directly returns the verification result of the blood draw report to the real-time front-end verification module, and the real-time front-end verification module updates the filling interface corresponding to the blood draw report field in the corresponding target medical electronic form according to the verification result.
[0044] When faced with mutually exclusive constraints, in practical applications, such as... Figure 1As shown, the system's specific design and execution are as follows: The real-time rule engine module queries the dynamic knowledge graph module for the entered data and performs validation on the rules corresponding to the field items. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field item node corresponding to the entered data belongs to two field item nodes connected by a mutual exclusion edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module regarding the field item node corresponding to the entered data as a field item node in a mutual exclusion relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, fills the other field item node in the mutual exclusion relationship to which the field item node corresponding to the entered data belongs. The system generates corresponding prompt data and sends it back to the real-time rule engine module. The real-time rule engine module then returns the verification results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end verification module. The real-time front-end verification module updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the verification results of the entered data to the real-time front-end verification module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results.
[0045] In mutually exclusive relationships, the two field nodes connected by a mutual exclusion relationship, such as a finger prick blood sampling field and a venous blood sampling field, mean that if a finger prick blood sampling has already been performed, a venous blood sampling is not required, and vice versa. In practical applications, for example, if a venous blood sampling result already exists, the real-time rule engine module queries the dynamic knowledge graph module to verify the venous blood sampling result according to the rules corresponding to the venous blood sampling field. If the verification result indicates that the venous blood sampling result is valid data, the real-time rule engine module further determines, based on the dynamic knowledge graph module, that the venous blood sampling field belongs to one of the two field nodes connected by a mutual exclusion relationship edge in the knowledge graph. The real-time rule engine module then sends a request to the intelligent filling module to fill the venous blood sampling field as a field node in the mutual exclusion relationship. The intelligent filling module then uses the venous blood sampling result and the knowledge graph constructed by the dynamic knowledge graph module... For the venous blood draw field, the system generates corresponding prompt data for the fingertip blood draw field, which is the other field in the mutually exclusive relationship. This prompt data is then fed back to the real-time rule engine module. Since venous blood draw has already been performed, the prompt data for the fingertip blood draw field is empty. The real-time rule engine module then returns the venous blood draw result and the fingertip blood draw prompt data to the real-time front-end verification module. The real-time front-end verification module updates the venous blood draw field's entry interface in the corresponding target medical electronic form based on the verification results, and also updates the fingertip blood draw prompt data to the corresponding fingertip blood draw field's entry interface in the target medical electronic form. Otherwise, the real-time rule engine module directly returns the venous blood draw result to the real-time front-end verification module, which then updates the venous blood draw field's entry interface in the corresponding target medical electronic form based on the verification results.
[0046] In practical applications, when faced with constraints related to triggering relationships, such as... Figure 1As shown, the system's specific design and execution are as follows: The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data is the starting field node connected by the trigger relationship edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module regarding the field node corresponding to the entered data as the starting field node in the trigger relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, selects the ending field node in the trigger relationship to which the field node corresponding to the entered data belongs. The system generates corresponding prompt data and feeds it back to the real-time rule engine module. The real-time rule engine module then returns the verification results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end verification module. The real-time front-end verification module updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the verification results of the entered data to the real-time front-end verification module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results.
[0047] Triggering relationships, such as in the case of a bacterial infection, might start with a white blood cell count and end with a neutrophil count. When the white blood cell count is higher than normal, the neutrophil count will also be higher. In this scenario, the real-time rule engine module queries the dynamic knowledge graph module and performs validation on the white blood cell count based on the rules corresponding to the white blood cell count. If the validation indicates a valid white blood cell count, the real-time rule engine module, based on the dynamic knowledge graph module, determines if the white blood cell count is the starting point node connected to the triggering relationship edge in the knowledge graph. Then, the real-time rule engine module sends a request to the intelligent fill module to fill the white blood cell count as the starting point node in the triggering relationship. The intelligent fill module, based on the white blood cell count and the knowledge graph constructed by the dynamic knowledge graph module, fills the neutrophil count as the ending point node in the triggering relationship to which the white blood cell count belongs. For the neutrophil count field, corresponding prompt data is generated and fed back to the real-time rule engine module. Since the body is currently experiencing a bacterial infection, the white blood cell count is higher than normal. Therefore, the prompt data for the neutrophil count field is that the neutrophil count is higher than normal. This is fed back to the real-time rule engine module, which then returns the white blood cell count verification result and the neutrophil count field prompt data to the real-time front-end verification module. The real-time front-end verification module updates the white blood cell count field's input interface in the corresponding target medical electronic form based on the verification result, and also updates the neutrophil count field's input interface in the corresponding target medical electronic form with the neutrophil count field prompt data. Otherwise, the real-time rule engine module directly returns the white blood cell count verification result to the real-time front-end verification module, which then updates the white blood cell count field's input interface in the corresponding target medical electronic form based on the verification result.
[0048] In the specific implementation of the above-mentioned dependency, mutual exclusion, and triggering relationships, when the verification result indicates that the entered data is invalid, in all three cases, the real-time rule engine module will directly return the verification result of the entered data to the real-time front-end verification module, and the real-time front-end verification module will update the filling interface of the corresponding field item in the target medical electronic form based on the verification result.
[0049] Based on the design and implementation of the above scheme, this invention further develops the system by adding a conflict detection module that is communicatively connected to the dynamic knowledge graph module and the real-time front-end verification module. The real-time front-end verification module listens for the submission actions of each target medical electronic form and triggers a conflict detection request to the conflict detection module regarding the submitted target medical electronic form. The conflict detection module, based on the knowledge graph constructed by the dynamic knowledge graph module, connects each field item node to the corresponding rule node and other field item nodes through logical relationship edges, performs global reasoning on the submitted target medical electronic form, checks for conflict results in each field item of the target medical electronic form, and feeds back to the real-time front-end verification module. The real-time front-end verification module updates the submission interface of the target medical electronic form based on the conflict results.
[0050] To improve the execution efficiency of the above technical solution in practical applications, a visualization management module that communicates with the dynamic knowledge graph module is further added. The administrator can use the visualization management module to perform add, delete, and modify operations on the nodes and edges in the knowledge graph constructed by the dynamic knowledge graph module to update the knowledge graph.
[0051] Applying the above design to practical applications, such as for medical records, a data extraction module is introduced. The data extraction module performs steps a to d on the unstructured text of the medical record to obtain the structured data in the medical record. Then, the data extraction module fills the structured data into the corresponding fields of the corresponding target medical electronic forms. The real-time front-end verification module listens to the filling action and triggers verification of the filling action based on the listening.
[0052] Step a. Perform data cleaning on the unstructured text of the medical records, remove pre-defined keywords of all types, update the unstructured text of the medical records, and then proceed to step b.
[0053] Step b. Perform word segmentation on the unstructured text of the medical record, excluding the data values, to obtain the word segmented text corresponding to the medical record, and obtain the Word2Vec vector corresponding to each word segmented text to form the word segmented text vector in the medical record, and then proceed to step c.
[0054] Step c. For each segmented text vector in the medical record, obtain the cosine distance between the segmented text vector and the vector of each medical term in the preset medical vocabulary library, and determine whether there is a cosine distance less than the preset distance threshold. If so, select the medical term corresponding to the smallest cosine distance to replace the position of the segmented text vector in the unstructured text of the medical record; otherwise, do not process it. After the judgment and processing of each segmented text vector in the medical record are completed, proceed to step d.
[0055] Step d. For each replaced medical term in the unstructured text of the medical record, determine whether there is a data value in the adjacent position after the medical term. If there is, associate the medical term with the data value in the adjacent position to form a medical entity. Otherwise, directly form a medical entity from the medical term. Then obtain each medical entity in the medical record and form each structured data in the medical record.
[0056] In practical applications, the above method is used to complete the filling of each target medical electronic form, which in turn constitutes the patient's electronic medical record.
[0057] The above design is implemented in hardware. Specifically, a computer device is designed, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements an electronic medical record system based on a dynamic knowledge graph. Simultaneously, a computer-readable storage medium is designed, on which the computer program is stored. When the computer program is executed by the processor, it implements the electronic medical record system based on a dynamic knowledge graph.
[0058] The electronic medical record system based on dynamic knowledge graphs designed in the above technical solution constructs a knowledge graph corresponding to each target medical form through a dynamic knowledge graph module. A real-time front-end verification module listens for the filling actions of each field item in each target medical form, triggering a verification request for the filled data to the real-time rule engine module. The real-time rule engine module queries the rule nodes and other field item nodes associated with the field item node corresponding to the verification request in the dynamic knowledge graph module, and performs verification on the filled data. The constructed knowledge graph includes the belonging relationship between the target medical form and its field items, the rule relationship between each field item and its corresponding rule, and considers the dependency relationship, mutual exclusion relationship, and trigger relationship between field items in the target medical form and between field items across different target medical forms, respectively. It deeply explores the various constraints in the medical forms as the basis for verification, and finally realizes the filling of electronic medical records, effectively improving the accuracy of electronic medical records.
[0059] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. An electronic medical record system based on dynamic knowledge graphs, used to validate the completion of various target medical electronic forms, thereby enabling the completion of electronic medical records, characterized in that: The electronic medical record system includes a dynamic knowledge graph module, a real-time rule engine module, and a real-time front-end validation module; The dynamic knowledge graph module is used to construct the knowledge graph corresponding to each target medical form. The nodes are each target medical form, each field item in each target medical form, and the rule corresponding to each field item. The edges are the belonging relationship between the target medical form and each field item, the ownership rule relationship between each field item and its corresponding rule, and the dependency relationship between fields in the target medical form. The real-time front-end verification module communicates with the real-time rule engine module. The real-time front-end verification module listens for the filling actions of each field item in each target medical electronic form, triggers a verification request to the real-time rule engine module for the filled data, and receives the verification results of the filled data returned by the real-time rule engine module, and updates the filling interface of the corresponding field item in the corresponding target medical electronic form according to the verification results. The real-time rule engine module communicates with the dynamic knowledge graph module. The real-time rule engine module receives verification requests for the entered data initiated by the real-time front-end verification module, queries the rule nodes and other field items associated with the field item node corresponding to the verification request in the dynamic knowledge graph module, performs verification on the entered data, and returns the verification results of the entered data to the real-time front-end verification module.
2. The electronic medical record system based on dynamic knowledge graph according to claim 1, characterized in that: The knowledge graph constructed by the dynamic knowledge graph module also includes edges that represent the dependency relationships between field items of different target medical forms. Each edge of the dependency relationship in the knowledge graph has a direction, which points from the result field item node to the premise field item node. This is used to indicate the logical relationship that the result field item node can only have valid data if the premise field item node has valid data.
3. The electronic medical record system based on dynamic knowledge graph according to claim 2, characterized in that: It also includes an intelligent fill module that is communicatively connected to the dynamic knowledge graph module and the real-time rule engine module, respectively. The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data is a result field node connected by a dependency edge in the knowledge graph. If so, the real-time rule engine module initiates a request to the intelligent fill module to fill in the field node corresponding to the entered data as a result field node in the dependency relationship. The intelligent fill module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, fills in the prerequisite field node connected to the dependency edge of the result field node by the field node corresponding to the entered data. The system generates corresponding prompt data and feeds it back to the real-time rule engine module. The real-time rule engine module then returns the verification results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end verification module. The real-time front-end verification module updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the verification results of the entered data to the real-time front-end verification module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results. When the verification result indicates that the entered data is invalid, the real-time rule engine module directly returns the verification result to the real-time front-end verification module, which then updates the entry interface of the corresponding field item in the target medical electronic form based on the verification result.
4. The electronic medical record system based on dynamic knowledge graph according to claim 3, characterized in that: The knowledge graph constructed by the dynamic knowledge graph module also includes edges that represent mutual exclusion between field item nodes in the target medical form, and edges that represent mutual exclusion between field item nodes across different target medical forms. The valid data of the two field item nodes connected by the mutual exclusion edge are mutually exclusive. The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data belongs to one of the two field nodes connected by a mutual exclusion edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module to fill the field node corresponding to the entered data as a field node in a mutual exclusion relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, generates a corresponding prompt for the other field node in the mutual exclusion relationship to which the field node corresponding to the entered data belongs. The data is fed back to the real-time rule engine module, which then returns the validation results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end validation module. The real-time front-end validation module updates the entry interface of the corresponding fields in the target medical electronic form based on the validation results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the validation results of the entered data to the real-time front-end validation module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the validation results. When the verification result indicates that the entered data is invalid, the real-time rule engine module directly returns the verification result to the real-time front-end verification module, which then updates the entry interface of the corresponding field item in the target medical electronic form based on the verification result.
5. The electronic medical record system based on dynamic knowledge graph according to claim 3, characterized in that: The knowledge graph constructed by the dynamic knowledge graph module also includes edges representing the triggering relationship between field item nodes in the target medical form, and edges representing the triggering relationship between field item nodes across different target medical forms. Each triggering relationship edge has directionality, with its direction pointing from the starting field item node to the ending field item node. When the valid data of the starting field item node changes, it triggers a change in the valid data of the ending field item node. The real-time rule engine module queries the dynamic knowledge graph module to perform rule validation on the fields corresponding to the entered data. When the validation result indicates that the entered data is valid, the real-time rule engine module, based on the dynamic knowledge graph module, determines whether the field node corresponding to the entered data is the starting field node connected by the trigger relationship edge in the knowledge graph. If so, the real-time rule engine module initiates a filling request to the intelligent filling module regarding the field node corresponding to the entered data as the starting field node in the trigger relationship. The intelligent filling module, based on the entered data and the knowledge graph constructed by the dynamic knowledge graph module, generates corresponding suggestions for the ending field node in the trigger relationship to which the field node corresponding to the entered data belongs. The system displays the data and feeds it back to the real-time rule engine module. The real-time rule engine module then returns the verification results of the entered data, along with the prompt data and the corresponding fields in the target medical electronic form, to the real-time front-end verification module. The real-time front-end verification module updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results, and also updates the entry interface of the corresponding fields in the target medical electronic form with the prompt data. Otherwise, the real-time rule engine module directly returns the verification results of the entered data to the real-time front-end verification module, which then updates the entry interface of the corresponding fields in the target medical electronic form based on the verification results. When the verification result indicates that the entered data is invalid, the real-time rule engine module directly returns the verification result to the real-time front-end verification module, which then updates the entry interface of the corresponding field item in the target medical electronic form based on the verification result.
6. An electronic medical record system based on dynamic knowledge graphs according to any one of claims 1-5, characterized in that: It also includes a conflict detection module that is communicatively connected to the dynamic knowledge graph module and the real-time front-end verification module. The real-time front-end verification module listens for the submission action of each target medical electronic form and triggers a conflict detection request to the conflict detection module regarding the submitted target medical electronic form. The conflict detection module performs global reasoning on the submitted target medical electronic form based on the field item nodes in the knowledge graph constructed by the dynamic knowledge graph module, which are connected to the corresponding rule nodes and other field item nodes through logical relationship edges. It checks for conflict results in each field item of the target medical electronic form and feeds them back to the real-time front-end verification module. The real-time front-end verification module updates the submission interface of the target medical electronic form based on the conflict results.
7. An electronic medical record system based on dynamic knowledge graphs according to any one of claims 1-5, characterized in that: It also includes a visualization management module that communicates with the dynamic knowledge graph module. The administrator can use the visualization management module to perform add, delete, and modify operations on the nodes and edges in the knowledge graph constructed by the dynamic knowledge graph module to update the knowledge graph.
8. An electronic medical record system based on dynamic knowledge graphs according to any one of claims 1-5, characterized in that: It also includes a data extraction module, which performs steps a to d on the unstructured text of the medical record to obtain various structured data in the medical record. Then, the data extraction module fills the various structured data into the corresponding fields of the corresponding target medical electronic forms, and the real-time front-end verification module monitors the filling action. Step a. Perform data cleaning on the unstructured text of the medical records, remove the pre-defined types of undisputed words, update the unstructured text of the medical records, and then proceed to step b. Step b. Perform word segmentation on the unstructured text of the medical record except for the data values to obtain the word segmented text corresponding to the medical record, and obtain the Word2Vec vector corresponding to each word segmented text to form the word segmented text vector in the medical record, and then proceed to step c. Step c. For each segmented text vector in the medical record, obtain the cosine distance between the segmented text vector and the vector of each medical term in the preset medical vocabulary library, and determine whether there is a cosine distance less than the preset distance threshold. If so, select the medical term corresponding to the smallest cosine distance to replace the position of the segmented text vector in the unstructured text of the medical record; otherwise, do not process it. After the judgment and processing of each segmented text vector in the medical record are completed, proceed to step d. Step d. For each replaced medical term in the unstructured text of the medical record, determine whether there is a data value in the adjacent position after the medical term. If there is, associate the medical term with the data value in the adjacent position to form a medical entity. Otherwise, directly form a medical entity from the medical term. Then obtain each medical entity in the medical record and form each structured data in the medical record.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the electronic medical record system based on dynamic knowledge graphs as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the electronic medical record system based on dynamic knowledge graph as described in any one of claims 1 to 7.