Electronic medical record data governance method based on agent mechanism and related device

By iteratively calling the large language model through an agent mechanism, the chapters and fields of electronic medical records are managed step by step, which solves the problems of garbled characters and duplicate content in electronic medical records and improves the efficiency and quality of data governance.

CN119864117BActive Publication Date: 2025-11-11TSINGHUA UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411968423.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-11
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing electronic medical record data governance methods are ineffective in handling garbled characters and duplicate content errors. Furthermore, text generation methods based on large language models are inefficient and of low quality, affecting the uniformity and accuracy of data governance.

Method used

An agent mechanism is used to iteratively call the large language model. First, chapter governance is performed on each chapter of the electronic medical record to handle garbled characters and duplicate content errors. Then, the fields in the chapter are governed to ensure the consistency between field names and content.

Benefits of technology

It improved the efficiency and quality of electronic medical record data governance, ensured the accuracy and consistency of data, reduced duplicate generation and illusion phenomena, and enhanced the overall effectiveness of data governance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119864117B_ABST
    Figure CN119864117B_ABST
Patent Text Reader

Abstract

This application discloses an agent-based electronic medical record (EMR) data governance method and related apparatus, relating to the field of data processing technology. After acquiring the EMR to be governed, the method first processes each chapter of the EMR by removing garbled characters and duplicate content errors, obtaining the chapter governance result, thus obtaining the chapter-governed EMR. Then, for each chapter in the chapter-governed EMR, consecutive error-free EMR text in each field is copied, and EMR text with inconsistencies between field names and content is generated, obtaining the chapter's field governance result. The field governance results of all chapters are combined to obtain the field-governed EMR, which is the data-governed EMR. This solution can both handle errors in EMR data and improve the efficiency and quality of EMR data governance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to an electronic medical record data governance method and related apparatus based on an agent mechanism. Background Technology

[0002] With the development of information technology, electronic medical records have been promoted and popularized. Unlike traditional paper medical records, electronic medical records record patients' medical information in digital form, bringing many conveniences such as easy storage, management, and sharing. However, current electronic medical records still suffer from problems such as inconsistent formats between different hospitals, hindering standardized use and impeding subsequent medical reviews and scientific research. To address this issue, electronic medical record data governance has emerged.

[0003] Electronic medical record (EMR) data governance refers to standardizing electronic medical records of different formats onto a unified data interface, while resolving errors such as garbled characters and duplicate content. EMR data governance generally includes two stages: chapter governance and field governance. Chapter governance involves standardizing a patient's entire medical record onto a predefined chapter interface; field governance involves standardizing each chapter of the medical record, after chapter governance, onto the corresponding chapter's field interface.

[0004] Electronic medical record (EMR) data governance can be achieved through sequence labeling methods, but these methods lack the ability to handle errors such as garbled text and duplicate content. With the development of large language model technology, utilizing the text generation capabilities of large language models to address errors in EMR data governance has become a feasible solution. However, EMRs are often lengthy, and relying solely on text generation can lead to efficiency issues. Furthermore, large language models are susceptible to illusion, resulting in generated results that may not accurately reflect the original medical record.

[0005] Therefore, how to provide an electronic medical record data governance solution that can both process errors in electronic medical record data and improve the efficiency and quality of electronic medical record data governance has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] In view of the above problems, this application provides an agent-based electronic medical record data governance method and related apparatus to achieve both error handling in electronic medical record data and improvement of electronic medical record data governance efficiency and quality. The specific solution is as follows:

[0007] The first aspect of this application provides an agent-based electronic medical record data governance method, including:

[0008] Obtain electronic medical records for data governance.

[0009] For each chapter in the electronic medical record, the garbled characters and duplicate content errors in the chapter are processed based on the Agent mechanism to obtain the chapter governance result of the chapter. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record.

[0010] For each chapter in the electronic medical record after chapter governance, the Agent mechanism is used to copy the continuous error-free medical record text in each field of the chapter and generate the medical record text with the error of inconsistent field name and field content to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

[0011] In one possible implementation, the agent-based mechanism for processing garbled characters and duplicate content errors in the chapter to obtain the chapter governance result includes:

[0012] The large language model is iteratively invoked based on the Agent mechanism to process garbled characters and duplicate content errors in the chapter, thereby obtaining the chapter governance result.

[0013] In one possible implementation, based on the Agent mechanism, each call to the large language model handles garbled characters and duplicate content errors in the aforementioned chapters, including:

[0014] Determine the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter management result of the chapter;

[0015] Based on the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter governance result of the chapter, a range judgment instruction is generated;

[0016] Input the range judgment instruction into the large language model to obtain the range judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model;

[0017] Based on the judgment result of the range of continuous medical record text without garbled characters and content duplication errors output by the large language model, the current chapter governance result of the chapter is determined.

[0018] In one possible implementation, the step of generating a range determination instruction based on the original medical record text of the chapter, the chapter tag of the chapter, and the current treatment result of the chapter includes:

[0019] Obtain a pre-configured scope judgment prompt template, which includes preset scope judgment task description information, medical record text filling slots, chapter tag filling slots, and current governance result filling slots;

[0020] The original medical record text of the chapter is filled into the medical record text filling slot, the chapter label of the chapter is filled into the chapter label filling slot, and the current chapter governance result of the chapter is filled into the current governance result filling slot to obtain the range judgment instruction.

[0021] In one possible implementation, the determination of the current chapter governance result based on the judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model includes:

[0022] If the range judgment result of the next continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, then based on the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, an index is performed in the original medical record text of the chapter to obtain the next continuous medical record text without garbled characters and content duplication errors; the next continuous medical record text without garbled characters and content duplication errors is merged with the current chapter governance result of the chapter to obtain the latest chapter governance result of the chapter;

[0023] If the judgment result of the next segment of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the termination of the judgment, then the current chapter governance result of the chapter is taken as the chapter governance result of the chapter.

[0024] In one possible implementation, the agent-based mechanism copies consecutive error-free medical record texts from each field of the chapter and generates new texts for those with discrepancies between field names and content, resulting in the field governance result of the chapter, including:

[0025] Based on the agent mechanism, the large language model is iteratively invoked to copy the continuous error-free medical record text in each field of the chapter, and generate medical record text with errors in field name and field content, so as to obtain the governance result of the field.

[0026] In one possible implementation, based on the Agent mechanism, each time the large language model is invoked, the consecutive error-free medical record text in each field of the aforementioned chapter is copied, and medical record text with errors in field names and field contents is generated, including:

[0027] Determine the chapter governance result, the field labels to be governed in the chapter, and the current field governance result of the chapter;

[0028] Based on the chapter governance results of the chapter, the field tags to be governed in the chapter and the current field governance results of the chapter, an action judgment instruction is generated;

[0029] The action judgment instruction is input into the large language model to obtain the action judgment result output by the large language model;

[0030] Based on the action judgment results output by the large language model, the current field governance result of the chapter is determined.

[0031] In one possible implementation, the generation of action judgment instructions based on the chapter governance results of the chapter, the field tags to be governed in the chapter, and the current field governance results of the chapter includes:

[0032] Obtain a pre-configured action judgment prompt template, which includes preset action judgment task description information, medical record text filling slots, field label filling slots, and current governance result filling slots.

[0033] The chapter management results of the chapter are filled into the medical record text filling slot, the field labels to be managed of the chapter are filled into the field label filling slot, and the current field management results of the chapter are filled into the current management result filling slot to obtain the action judgment instruction.

[0034] In one possible implementation, determining the current field governance result of the chapter based on the action judgment result output by the large language model includes:

[0035] If the action judgment result output by the large language model is used to indicate the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed, then the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed are indexed in the chapter governance result of the chapter to obtain the continuous error-free medical record text in the field corresponding to the field label to be governed. The continuous error-free medical record text in the field corresponding to the field label to be governed is merged with the current field governance result of the chapter to obtain the latest field governance result of the chapter.

[0036] If the action judgment result output by the large language model is used to indicate the generated result after correcting the medical record text with the error of inconsistent field name and field content in the field corresponding to the field to be governed, then the generated result is merged with the current field governance result of the chapter as the latest field governance result of the chapter;

[0037] If the action judgment result output by the large language model is used to indicate the termination of the judgment, then the current field governance result of the chapter is taken as the field governance result of the chapter.

[0038] A second aspect of this application provides an electronic medical record data governance device based on an agent mechanism, comprising:

[0039] The acquisition unit is used to acquire electronic medical records that need to undergo data governance.

[0040] The chapter governance unit is used to process garbled characters and duplicate content errors in each chapter of the electronic medical record based on the Agent mechanism, and obtain the chapter governance result of the chapter. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record.

[0041] The field governance unit is used to copy consecutive error-free medical record texts in each field of the chapter in the electronic medical record after the chapter governance, based on the Agent mechanism, and generate medical record texts with errors in field names and field contents, to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

[0042] In one possible implementation, the chapter governance unit is specifically used for:

[0043] The large language model is iteratively invoked based on the Agent mechanism to process garbled characters and duplicate content errors in the chapter, thereby obtaining the chapter governance result.

[0044] In one possible implementation, the chapter governance unit includes:

[0045] The chapter governance information determination unit is used to determine the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter governance result of the chapter;

[0046] The scope judgment instruction generation unit is used to generate a scope judgment instruction based on the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter management result of the chapter.

[0047] The range judgment instruction execution unit is used to input the range judgment instruction into the large language model and obtain the range judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model.

[0048] The chapter governance result determination unit is used to determine the current chapter governance result of the chapter based on the judgment result of the range of continuous medical record text without garbled characters and content duplication errors output by the large language model.

[0049] In one possible implementation, the range determination instruction generation unit is specifically used for:

[0050] Obtain a pre-configured scope judgment prompt template, which includes preset scope judgment task description information, medical record text filling slots, chapter tag filling slots, and current governance result filling slots;

[0051] The original medical record text of the chapter is filled into the medical record text filling slot, the chapter label of the chapter is filled into the chapter label filling slot, and the current chapter governance result of the chapter is filled into the current governance result filling slot to obtain the range judgment instruction.

[0052] In one possible implementation, the chapter governance result determination unit is specifically used for:

[0053] If the range judgment result of the next continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, then based on the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, an index is performed in the original medical record text of the chapter to obtain the next continuous medical record text without garbled characters and content duplication errors; the next continuous medical record text without garbled characters and content duplication errors is merged with the current chapter governance result of the chapter to obtain the latest chapter governance result of the chapter;

[0054] If the judgment result of the next segment of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the termination of the judgment, then the current chapter governance result of the chapter is taken as the chapter governance result of the chapter.

[0055] In one possible implementation, the field governance unit is specifically used for:

[0056] Based on the agent mechanism, the large language model is iteratively invoked to copy the continuous error-free medical record text in each field of the chapter, and generate medical record text with errors in field name and field content, so as to obtain the governance result of the field.

[0057] In one possible implementation, the field governance unit includes:

[0058] A field governance information determination unit is used to determine the chapter governance result of the chapter, the field tags to be governed in the chapter, and the current field governance result of the chapter;

[0059] An action judgment instruction generation unit is used to generate action judgment instructions based on the chapter governance results of the chapter, the field tags to be governed in the chapter, and the current field governance results of the chapter.

[0060] An action judgment instruction execution unit is used to input the action judgment instruction into a large language model and obtain the action judgment result output by the large language model.

[0061] The field governance result determination unit is used to determine the current field governance result of the chapter based on the action judgment result output by the large language model.

[0062] In one possible implementation, the action judgment instruction generation unit is specifically used for:

[0063] Obtain a pre-configured action judgment prompt template, which includes preset action judgment task description information, medical record text filling slots, field label filling slots, and current governance result filling slots.

[0064] The chapter management results of the chapter are filled into the medical record text filling slot, the field labels to be managed of the chapter are filled into the field label filling slot, and the current field management results of the chapter are filled into the current management result filling slot to obtain the action judgment instruction.

[0065] In one possible implementation, the field governance result determination unit is specifically used for:

[0066] If the action judgment result output by the large language model is used to indicate the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed, then the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed are indexed in the chapter governance result of the chapter to obtain the continuous error-free medical record text in the field corresponding to the field label to be governed. The continuous error-free medical record text in the field corresponding to the field label to be governed is merged with the current field governance result of the chapter to obtain the latest field governance result of the chapter.

[0067] If the action judgment result output by the large language model is used to indicate the generated result after correcting the medical record text with the error of inconsistent field name and field content in the field corresponding to the field to be governed, then the generated result is merged with the current field governance result of the chapter as the latest field governance result of the chapter;

[0068] If the action judgment result output by the large language model is used to indicate the termination of the judgment, then the current field governance result of the chapter is taken as the field governance result of the chapter.

[0069] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the agent-based electronic medical record data governance method described in the first aspect or any implementation thereof.

[0070] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0071] The memory is used to store computer programs;

[0072] The processor is used to execute the computer program so that the electronic device can implement the agent-based electronic medical record data governance method of the first aspect or any implementation thereof.

[0073] The fifth aspect of this application provides a computer-readable storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the agent-based electronic medical record data governance method described in the first aspect or any implementation thereof.

[0074] By employing the above technical solution, the agent-based electronic medical record data governance method and related apparatus provided in this application, after acquiring the electronic medical record to be governed, firstly process garbled characters and duplicate content errors in each chapter of the electronic medical record to obtain the chapter governance result. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record. Then, for each chapter in the chapter-governed electronic medical record, the consecutive error-free medical record text in each field of the chapter is copied, and medical record text with errors in field names and field contents are generated to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the field-governed electronic medical record. The field-governed electronic medical record is the data-governed electronic medical record. This solution can both handle errors in electronic medical record data and improve the efficiency and quality of electronic medical record data governance. Attached Figure Description

[0075] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0076] Figure 1A flowchart illustrating an agent-based electronic medical record data governance method provided in this application embodiment;

[0077] Figure 2 This application provides a schematic diagram comparing the formats of electronic medical records after chapter management;

[0078] Figure 3 This application provides a comparative diagram of the format of chapters in an electronic medical record after field management.

[0079] Figure 4 This is a flowchart illustrating a method for handling garbled characters and content duplication errors in chapters based on an Agent mechanism that calls a large language model each time, as provided in an embodiment of this application.

[0080] Figure 5 This is a flowchart illustrating the specific implementation method provided in this application embodiment for copying consecutive error-free medical record texts in each field of a chapter and generating medical record texts with inconsistencies between field names and field contents for each call to the large language model based on the Agent mechanism.

[0081] Figure 6 A schematic diagram of the structure of an electronic medical record data governance device based on an agent mechanism provided in this application embodiment;

[0082] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0083] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0084] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0085] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0086] With the development of information technology, electronic medical records have been promoted and popularized. Unlike traditional paper medical records, electronic medical records record patients' medical information in digital form, bringing many conveniences such as easy storage, management, and sharing. However, current electronic medical records still suffer from problems such as inconsistent formats between different hospitals, hindering standardized use and impeding subsequent medical reviews and scientific research. To address this issue, electronic medical record data governance has emerged.

[0087] Electronic medical record (EMR) data governance refers to standardizing electronic medical records of different formats onto a unified data interface, while resolving errors such as garbled characters and duplicate content. EMR data governance generally includes two stages: chapter governance and field governance. Chapter governance involves standardizing a patient's entire medical record onto a predefined chapter interface; field governance involves standardizing each chapter of the medical record, after chapter governance, onto the corresponding chapter's field interface.

[0088] Existing electronic medical record (EMR) data governance solutions mainly fall into two categories: The first category is deep learning-based sequence labeling methods. These methods first encode the ungoverned EMRs using a deep learning model, then identify chapter or field boundaries in the records through sequence labeling patterns, and simultaneously assign corresponding categories. The second category is text generation methods based on large language models. These methods first input the ungoverned EMRs into a large language model, which then directly outputs the data according to predefined chapter and field interface formats, thus achieving EMR data governance.

[0089] Among them, deep learning-based sequence labeling methods essentially segment and classify the input electronic medical record text, and the resulting data governance completely follows the original medical record text. Therefore, they lack the ability to handle errors such as garbled characters and duplicate content that often occur in electronic medical records. In addition, electronic medical records are often quite long, and sequence labeling methods tend to perform poorly when processing long sequences.

[0090] While text generation methods based on large language models have the ability to handle errors, this method requires regenerating the entire medical record. However, in actual data processing, the proportion of text that needs to be followed exactly as written is far higher than the proportion of text that needs to be corrected through generation. Therefore, this method itself is an over-modeling approach and also brings the following two problems: ① Medical records are often quite long, and regenerating the entire text will cause serious decoding efficiency issues; ② Although the errors in the input medical record are corrected, due to the uncontrollability of the generation process, the parts that originally needed to follow the original medical record will be repeatedly generated and there will be illusion problems, which will affect the final data governance quality.

[0091] An agent mechanism is an autonomous software system capable of sensing its environment, making decisions, and taking actions. It possesses the capabilities of perception, reasoning, learning, and execution, and can autonomously react and make decisions based on environmental changes. Considering that electronic medical records contain numerous chapters and fields, the governance of each chapter and field needs to be performed separately.

[0092] In order to solve the above problems, this application provides an agent-based electronic medical record data governance method, which can not only handle errors in electronic medical record data, but also improve the efficiency and quality of electronic medical record data governance.

[0093] The agent-based electronic medical record data governance method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0094] Reference Figure 1 , Figure 1 A flowchart illustrating an agent-based electronic medical record data governance method provided in this application embodiment is shown below. Figure 1 As shown in the embodiments of this application, an electronic medical record data governance method based on an agent mechanism may include the following steps, which are described in detail below.

[0095] S101: Obtain electronic medical records for data governance;

[0096] In this application, the electronic medical record to be data-processed is a complete electronic medical record. The format of the electronic medical record to be data-processed can be any format, and this application does not impose any restrictions.

[0097] S102: For each chapter in the electronic medical record, the garbled characters and content duplication errors in the chapter are processed based on the Agent mechanism to obtain the chapter governance result of the chapter. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record.

[0098] In this application, a large language model can be used to process the electronic medical record into chapters. However, the length of a complete electronic medical record often exceeds the upper limit of the text length that the large language model can process. Therefore, in this application, the electronic medical record can be processed into chapters separately to handle garbled characters and duplicate content errors in each chapter. After the chapter processing of all chapters is completed, the processed chapters are combined to obtain the processed electronic medical record.

[0099] For ease of understanding, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating a comparison of the format of electronic medical records after chapter management, as provided in an embodiment of this application. For example... Figure 2 As shown, the left side is an example of an electronic medical record to be processed according to an embodiment of this application, and the right side is an electronic medical record after chapter processing. By comparison, it can be found that after chapter processing of the electronic medical record on the left, the garbled characters and duplicate chapter content errors in the electronic medical record are resolved.

[0100] S103: For each chapter in the electronic medical record after chapter governance, based on the Agent mechanism, the continuous error-free medical record text in each field of the chapter is copied, and the medical record text with the error of inconsistent field name and field content is generated to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

[0101] In this application, similar to chapter governance, after completing the chapter governance of the electronic medical record, the electronic medical record after chapter governance can be divided into chapters for field governance, and the error of inconsistency between field name and field content can be handled. After completing the field governance of all chapters, the chapters after field governance are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

[0102] For ease of understanding, please refer to Figure 3 , Figure 3 This is a comparative illustration of the format of chapters in an electronic medical record after field management, provided as an embodiment of this application. For example... Figure 3 As shown, the left side is an example of an electronic medical record chapter to be processed according to an embodiment of this application, and the right side is an electronic medical record chapter after field processing. By comparison, it can be found that after field processing of the electronic medical record chapter on the left, the error of inconsistent field name and field content in the field "Physical Examination" ("body temperature 19 beats / min, pulse 36℃, respiration 120 / 68 mmHg, blood pressure 94 beats / min") has been corrected to "body temperature 36℃, pulse 94 beats / min, respiration 19 beats / min, blood pressure 120 / 68 mmHg").

[0103] The agent-based electronic medical record (EMR) data governance method provided in this embodiment, after acquiring the EMR to be governed, first processes garbled characters and duplicate content errors in each chapter of the EMR, obtaining the chapter governance result. The chapter governance results are combined to obtain the chapter-governed EMR. Then, for each chapter in the chapter-governed EMR, consecutive error-free EMR text in each field is copied, and EMR text with inconsistencies between field names and content is generated, obtaining the chapter's field governance result. The field governance results of each chapter are combined to obtain the field-governed EMR. The field-governed EMR is the data-governed EMR. This solution can both handle errors in EMR data and improve the efficiency and quality of EMR data governance.

[0104] In this application, a large language model can be iteratively invoked based on an Agent mechanism to achieve chapter governance and field governance of each chapter of the electronic medical record.

[0105] As one possible approach, in this application, the process of handling garbled characters and duplicate content errors in the chapter based on the Agent mechanism to obtain the chapter governance result includes: iteratively calling a large language model based on the Agent mechanism to handle garbled characters and duplicate content errors in the chapter to obtain the chapter governance result. The process of copying consecutive error-free medical record text from each field of the chapter based on the Agent mechanism and generating medical record text with inconsistencies between field names and field content to obtain the field governance result includes: iteratively calling a large language model based on the Agent mechanism to copy consecutive error-free medical record text from each field of the chapter and generating medical record text with inconsistencies between field names and field content to obtain the field governance result.

[0106] The specific implementation method for handling garbled characters and content duplication errors in the chapter based on each call to the large language model based on the Agent mechanism, as well as the specific implementation method for copying consecutive error-free medical record texts in each field of the chapter and generating medical record texts with inconsistencies between field names and field contents based on the Agent mechanism based on each call to the large language model based on the Agent mechanism, will be explained in detail through the following embodiments.

[0107] In another embodiment of this application, the specific implementation method for handling garbled characters and content duplication errors in the chapters based on the Agent mechanism for each call to the large language model is described.

[0108] Reference Figure 4, Figure 4 The following is a flowchart illustrating a method for handling garbled characters and duplicate content errors in chapters based on an Agent mechanism that calls a large language model each time, as provided in this application embodiment. This method may include the following steps:

[0109] S201: Determine the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter governance result of the chapter;

[0110] In this application, the current chapter governance result of the aforementioned chapter is initially empty.

[0111] Considering that in the actual chapter management process, electronic medical records are usually directly exported from the hospital's electronic medical record system, which may contain some errors, such as incorrect chapter labels and mixed content from multiple chapters, this application requires correction of these errors before chapter management.

[0112] In one possible implementation, the medical record content of a chapter can be input into a large language model. The large language model will first determine whether there is any chapter mixing. If there is no mixing, the large language model will directly provide the correct chapter label. When performing chapter governance on this chapter, the correct chapter label can be used. If there is mixing, the large language model will provide all the mixed chapter labels. When performing chapter governance on this mixed chapter, it is necessary to perform chapter governance multiple times using each mixed chapter label separately.

[0113] It should be noted that when using a mixed chapter tag to process a mixed chapter, in addition to garbled characters and duplicate content errors, other medical record content outside the mixed chapter tag should also be excluded.

[0114] S202: Based on the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter management result of the chapter, generate a range judgment instruction;

[0115] In one possible implementation, generating a scope judgment instruction based on the original medical record text of the chapter, the chapter tags of the chapter, and the current governance result of the chapter includes: obtaining a pre-configured scope judgment prompt template, the scope judgment prompt template containing preset scope judgment task description information, medical record text filling slots, chapter tag filling slots, and current governance result filling slots; filling the original medical record text of the chapter into the medical record text filling slots, filling the chapter tags of the chapter into the chapter tag filling slots, and filling the current governance result of the chapter into the current governance result filling slots to obtain the scope judgment instruction.

[0116] For ease of understanding, this application provides an example of a range judgment prompt template, as shown in Table 1 below:

[0117] Table 1

[0118]

[0119] As shown in Table 1, "Task Definition" is the description information for the scope judgment task, "{Chapter Label}" is the chapter label filling slot, "{Medical Record Text Content}" is the medical record text filling slot, and "{Current Governance Result Content}" is the current governance result filling slot.

[0120] It is worth noting that, considering that indexing within the original medical record text of a chapter might result in the same segment being indexed multiple times, leading to multiple consecutive texts, this application provides a reference length for consecutive texts in the range determination task description information. By limiting the reference length, it can be ensured that the indexing yields a unique and correct consecutive text. Figure 2 For example, "Initial stage: Chief complaint; Ending segment: Family history" will match multiple results in the input medical record, but the length limit will serve to remove duplicate medical record content and obtain a unique and correct result.

[0121] S203: Input the range judgment instruction into the large language model to obtain the range judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model.

[0122] In this application, if it is not the last call to the large language model, the result of the large language model's output determining the range of the next continuous medical record text without garbled characters or duplicate content errors is used to indicate the start segment, end segment, and reference length of the next continuous medical record text without garbled characters or duplicate content errors. If it is the last call to the large language model, the result of the large language model's output determining the range of the next continuous medical record text without garbled characters or duplicate content errors is used to indicate the termination of the determination.

[0123] by Figure 2 For example, when the large language model is called for the first time, the output of the next segment of medical record text without garbled characters or duplicate content errors will be "Starting segment: Chief complaint; Ending segment: Family history". After the large language model outputs "Starting segment: Chief complaint; Ending segment: Family history", the next output of the large language model will be "Starting segment: Physical examination; Ending segment: Signature date" to remove garbled characters and errors in the medical record.

[0124] S204: Based on the judgment result of the range of continuous medical record text without garbled characters and content duplication errors in the next segment output by the large language model, determine the current chapter governance result of the chapter.

[0125] In one possible implementation, if the range determination result of the next segment of continuous medical record text without garbled characters or duplicate content errors output by the large language model is used to indicate the start segment, end segment, and reference length of the next segment of continuous medical record text without garbled characters or duplicate content errors, then based on the start segment, end segment, and reference length of the next segment of continuous medical record text without garbled characters or duplicate content errors, an index is performed in the original medical record text of the chapter to obtain the next segment of continuous medical record text without garbled characters or duplicate content errors; the next segment of continuous medical record text without garbled characters or duplicate content errors is then merged with the current chapter governance result of the chapter to obtain the latest chapter governance result of the chapter. The latest chapter governance result of the chapter can be used as the current chapter governance result of the chapter when the large language model is called again.

[0126] In another possible implementation, if the judgment result of the range of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the termination of the judgment, then the current chapter governance result of the chapter is taken as the chapter governance result of the chapter.

[0127] In another embodiment of this application, the specific implementation method of copying consecutive error-free medical record texts in each field of the chapter and generating medical record texts with inconsistencies between field names and field contents is described for each call to the large language model based on the Agent mechanism.

[0128] Reference Figure 5 , Figure 5 The flowchart provided in this application illustrates the specific implementation method of copying consecutive error-free medical record text from each field of a chapter and generating medical record text with inconsistencies between field names and field contents for each call to the large language model based on the Agent mechanism. This method may include the following steps:

[0129] S301: Determine the chapter governance result of the chapter, the field label to be governed in the chapter, and the current field governance result of the chapter.

[0130] In this application, the current field governance result of the aforementioned section is initially empty.

[0131] S302: Based on the chapter governance results of the chapter, the field tags to be governed in the chapter, and the current field governance results of the chapter, generate an action judgment instruction;

[0132] In this application, the action judgment instruction is used to indicate whether a copy action or a generation action should be performed next to correctly obtain the complete content of the field to be governed, given the current field governance result in the current section. Performing a copy action means that the following continuous text is error-free and can be copied directly. Performing a generation action means that the following text contains errors where the field names and field contents are inconsistent.

[0133] In one possible implementation, the generation of action judgment instructions based on the chapter governance results of the chapter, the field tags to be governed in the chapter, and the current field governance results of the chapter includes:

[0134] Obtain a pre-configured action judgment prompt template, which includes preset action judgment task description information, medical record text filling slots, field label filling slots, and current governance result filling slots.

[0135] The chapter management results of the chapter are filled into the medical record text filling slot, the field labels to be managed of the chapter are filled into the field label filling slot, and the current field management results of the chapter are filled into the current management result filling slot to obtain the action judgment instruction.

[0136] For ease of understanding, an example of an action judgment prompt template is provided in this application, as shown in Table 2 below:

[0137] Table 2

[0138]

[0139] As shown in Table 2, “Task Definition” is the description information of the action judgment task, “{Field Labels}” is the field label filling slot, “{Medical Record Text Content}” is the medical record text filling slot, and “{Current Governance Result Content}” is the current governance result filling slot.

[0140] It is worth noting that, considering that indexing the original medical record text in a chapter may result in the same segment being indexed multiple times, thus leading to multiple consecutive texts, this application provides a copy length in the action judgment task description information. By limiting the copy length, it can be ensured that the indexing yields a unique and correct consecutive text.

[0141] In addition, the task description information for action judgment also provides the generated length, which is used to compare the length of the generated text with the length of the corresponding text in the input medical record to help determine whether there are serious omissions or errors in the generated content.

[0142] S303: Input the action judgment instruction into the large language model to obtain the action judgment result output by the large language model;

[0143] In this application, if it is not the last call to the large language model, the action judgment result output by the large language model is used to indicate the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be treated, or to indicate the generated result after correcting the medical record text in the field corresponding to the field label to be treated where the field name and field content are inconsistent. Figure 3 Taking the input on the left as an example, if the current field to be treated is physical examination, under the initial input, the Agent will first determine to execute the generation action, because there are confusion errors in the original medical record regarding basic vital signs information such as body temperature, pulse, respiration, and blood pressure, where the field names and field contents do not correspond, and this needs to be directly corrected through generation.

[0144] If this is the last call to the large language model, the action judgment result output by the large language model is used to indicate the termination of the judgment.

[0145] S304: Based on the action judgment result output by the large language model, determine the current field governance result of the chapter.

[0146] In one possible implementation, if the action judgment result output by the large language model is used to indicate the start segment, end segment, and reference length of the consecutive error-free medical record text in the field corresponding to the field label to be governed, then the start segment, end segment, and reference length of the consecutive error-free medical record text in the field corresponding to the field label to be governed are indexed in the chapter governance result of the chapter to obtain the consecutive error-free medical record text in the field corresponding to the field label to be governed, and the consecutive error-free medical record text in the field corresponding to the field label to be governed is merged with the current field governance result of the chapter to obtain the latest field governance result of the chapter;

[0147] In another possible implementation, if the action judgment result output by the large language model is used to indicate the generated result after correcting the medical record text with the error of inconsistent field name and field content in the field corresponding to the field to be governed, then the generated result is merged with the current field governance result of the chapter as the latest field governance result of the chapter.

[0148] In another possible implementation, if the action judgment result output by the large language model is used to indicate the termination of the judgment, then the current field governance result of the chapter is taken as the field governance result of the chapter.

[0149] In summary, this application proposes an agent-based electronic medical record (EMR) data governance scheme. This scheme utilizes the autonomous decision-making capability of the agent mechanism to achieve chapter and field governance in EMR data governance. In the chapter governance stage, the agent mechanism iteratively generates range judgment instructions to identify the start and end segments of continuous text without garbled characters or duplicate content, thus efficiently completing chapter governance while discarding erroneous content. In the field governance stage, the agent mechanism iteratively generates action judgment instructions to determine whether to perform a copy or generation action. The copy action corresponds to continuous, error-free EMR text, which is efficient and completely adheres to the original text. The generation action addresses erroneous text where field names and content do not match, correcting errors in the EMR data.

[0150] Compared to text generation techniques based solely on large models, agent-based technology allows for autonomous decision-making throughout the data governance process. Different actions generated by the agent mechanism implement a more rational data governance strategy. In agent-based data governance, the large model actually generates less content; instead, data governance is largely accomplished through copying actions and indexing the input medical records. Therefore, compared to pure generation strategies, agent-based data governance is faster and more efficient. The results obtained through copying actions perfectly replicate the original text, greatly avoiding the illusion and duplicate generation problems common in pure generation strategies, thus improving the quality of the final data governance results.

[0151] The above describes an agent-based electronic medical record data governance method provided by the embodiments of this application. The following describes the apparatus for implementing the above agent-based electronic medical record data governance method.

[0152] Please see Figure 6 , Figure 6 This is a schematic diagram of an electronic medical record data governance device based on an agent mechanism, provided as an embodiment of this application. Figure 6 As shown, the agent-based electronic medical record data governance device includes:

[0153] Acquisition unit 11 is used to acquire electronic medical records to be processed for data governance;

[0154] Chapter governance unit 12 is used to process garbled characters and duplicate content errors in each chapter of the electronic medical record based on the Agent mechanism, and obtain the chapter governance result of the chapter. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record.

[0155] The field governance unit 13 is used to copy the continuous error-free medical record text in each field of the chapter based on the Agent mechanism for each chapter in the electronic medical record after chapter governance, and generate the medical record text with the error of inconsistent field name and field content, so as to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

[0156] In one possible implementation, the chapter governance unit is specifically used for:

[0157] The large language model is iteratively invoked based on the Agent mechanism to process garbled characters and duplicate content errors in the chapter, thereby obtaining the chapter governance result.

[0158] In one possible implementation, the chapter governance unit includes:

[0159] The chapter governance information determination unit is used to determine the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter governance result of the chapter;

[0160] The scope judgment instruction generation unit is used to generate a scope judgment instruction based on the original medical record text of the chapter, the chapter tag of the chapter, and the current chapter management result of the chapter.

[0161] The range judgment instruction execution unit is used to input the range judgment instruction into the large language model and obtain the range judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model.

[0162] The chapter governance result determination unit is used to determine the current chapter governance result of the chapter based on the judgment result of the range of continuous medical record text without garbled characters and content duplication errors output by the large language model.

[0163] In one possible implementation, the range determination instruction generation unit is specifically used for:

[0164] Obtain a pre-configured scope judgment prompt template, which includes preset scope judgment task description information, medical record text filling slots, chapter tag filling slots, and current governance result filling slots;

[0165] The original medical record text of the chapter is filled into the medical record text filling slot, the chapter label of the chapter is filled into the chapter label filling slot, and the current chapter governance result of the chapter is filled into the current governance result filling slot to obtain the range judgment instruction.

[0166] In one possible implementation, the chapter governance result determination unit is specifically used for:

[0167] If the range judgment result of the next continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, then based on the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, an index is performed in the original medical record text of the chapter to obtain the next continuous medical record text without garbled characters and content duplication errors; the next continuous medical record text without garbled characters and content duplication errors is merged with the current chapter governance result of the chapter to obtain the latest chapter governance result of the chapter;

[0168] If the judgment result of the next segment of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the termination of the judgment, then the current chapter governance result of the chapter is taken as the chapter governance result of the chapter.

[0169] In one possible implementation, the field governance unit is specifically used for:

[0170] Based on the agent mechanism, the large language model is iteratively invoked to copy the continuous error-free medical record text in each field of the chapter, and generate medical record text with errors in field name and field content, so as to obtain the governance result of the field.

[0171] In one possible implementation, the field governance unit includes:

[0172] A field governance information determination unit is used to determine the chapter governance result of the chapter, the field tags to be governed in the chapter, and the current field governance result of the chapter;

[0173] An action judgment instruction generation unit is used to generate action judgment instructions based on the chapter governance results of the chapter, the field tags to be governed in the chapter, and the current field governance results of the chapter.

[0174] An action judgment instruction execution unit is used to input the action judgment instruction into a large language model and obtain the action judgment result output by the large language model.

[0175] The field governance result determination unit is used to determine the current field governance result of the chapter based on the action judgment result output by the large language model.

[0176] In one possible implementation, the action judgment instruction generation unit is specifically used for:

[0177] Obtain a pre-configured action judgment prompt template, which includes preset action judgment task description information, medical record text filling slots, field label filling slots, and current governance result filling slots.

[0178] The chapter management results of the chapter are filled into the medical record text filling slot, the field labels to be managed of the chapter are filled into the field label filling slot, and the current field management results of the chapter are filled into the current management result filling slot to obtain the action judgment instruction.

[0179] In one possible implementation, the field governance result determination unit is specifically used for:

[0180] If the action judgment result output by the large language model is used to indicate the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed, then the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed are indexed in the chapter governance result of the chapter to obtain the continuous error-free medical record text in the field corresponding to the field label to be governed. The continuous error-free medical record text in the field corresponding to the field label to be governed is merged with the current field governance result of the chapter to obtain the latest field governance result of the chapter.

[0181] If the action judgment result output by the large language model is used to indicate the generated result after correcting the medical record text with the error of inconsistent field name and field content in the field corresponding to the field to be governed, then the generated result is merged with the current field governance result of the chapter as the latest field governance result of the chapter;

[0182] If the action judgment result output by the large language model is used to indicate the termination of the judgment, then the current field governance result of the chapter is taken as the field governance result of the chapter.

[0183] This application also provides an electronic device in its embodiments. (See reference...) Figure 7 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0184] like Figure 7As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0185] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0186] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the agent-based electronic medical record data governance methods provided in this application.

[0187] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the agent-based electronic medical record data governance methods provided in this application.

[0188] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0189] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0190] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0191] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method for governing electronic medical record data based on an agent mechanism, characterized in that, include: Obtain electronic medical records for data governance. For each chapter in the electronic medical record, a large language model is iteratively invoked based on an Agent mechanism to process garbled characters and duplicate content errors in the chapter, resulting in a chapter governance result. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record. Each invocation of the large language model based on the Agent mechanism to process garbled characters and duplicate content errors in the chapter includes: obtaining a pre-configured range judgment prompt template, which contains preset range judgment task description information, medical record text filling slots, and chapter tag filling. The system fills the slots with the current governance results and the original medical records of the chapter into the medical record text filling slot, fills the chapter tags of the chapter into the chapter tag filling slot, and fills the current chapter governance results of the chapter into the current governance results filling slot, thereby obtaining a range judgment instruction; the range judgment instruction is input into the large language model to obtain the range judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model; based on the range judgment result of the next segment of continuous medical record text without garbled characters and content duplication errors output by the large language model, the current chapter governance result of the chapter is determined. For each chapter in the electronic medical record after chapter governance, the Agent mechanism is used to copy the continuous error-free medical record text in each field of the chapter and generate the medical record text with the error of inconsistent field name and field content to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

2. The method according to claim 1, characterized in that, The determination of the current chapter governance result based on the judgment result of the next segment of medical record text without garbled characters and content duplication errors output by the large language model includes: If the range judgment result of the next continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, then based on the start segment, end segment, and reference length of the next continuous medical record text without garbled characters and content duplication errors, an index is performed in the original medical record text of the chapter to obtain the next continuous medical record text without garbled characters and content duplication errors; the next continuous medical record text without garbled characters and content duplication errors is merged with the current chapter governance result of the chapter to obtain the latest chapter governance result of the chapter; If the judgment result of the next segment of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the termination of the judgment, then the current chapter governance result of the chapter is taken as the chapter governance result of the chapter.

3. The method according to claim 1, characterized in that, The agent-based mechanism copies consecutive error-free medical record texts from each field of the chapter and generates new texts for those with discrepancies between field names and content, resulting in the field governance results for the chapter, including: Based on the agent mechanism, the large language model is iteratively invoked to copy the continuous error-free medical record text in each field of the chapter, and generate medical record text with errors in field name and field content, so as to obtain the governance result of the field.

4. The method according to claim 3, characterized in that, Based on the Agent mechanism, each call to the large language model copies consecutive error-free medical record texts from each field of the aforementioned chapter and generates new medical record texts with discrepancies between field names and field contents, including: Determine the chapter governance result, the field labels to be governed in the chapter, and the current field governance result of the chapter; Based on the chapter governance results of the chapter, the field tags to be governed in the chapter and the current field governance results of the chapter, an action judgment instruction is generated; The action judgment instruction is input into the large language model to obtain the action judgment result output by the large language model; Based on the action judgment results output by the large language model, the current field governance result of the chapter is determined.

5. The method according to claim 4, characterized in that, Based on the chapter governance results of the chapter, the field tags to be governed in the chapter, and the current field governance results of the chapter, an action judgment instruction is generated, including: Obtain a pre-configured action judgment prompt template, which includes preset action judgment task description information, medical record text filling slots, field label filling slots, and current governance result filling slots. The chapter management results of the chapter are filled into the medical record text filling slot, the field labels to be managed of the chapter are filled into the field label filling slot, and the current field management results of the chapter are filled into the current management result filling slot to obtain the action judgment instruction.

6. The method according to claim 4 or 5, characterized in that, The determination of the current field governance result of the chapter based on the action judgment result output by the large language model includes: If the action judgment result output by the large language model is used to indicate the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed, then the start segment, end segment, and reference length of the continuous error-free medical record text in the field corresponding to the field label to be governed are indexed in the chapter governance result of the chapter to obtain the continuous error-free medical record text in the field corresponding to the field label to be governed. The continuous error-free medical record text in the field corresponding to the field label to be governed is merged with the current field governance result of the chapter to obtain the latest field governance result of the chapter. If the action judgment result output by the large language model is used to indicate the generated result after correcting the medical record text with the error of inconsistent field name and field content in the field corresponding to the field to be governed, then the generated result is merged with the current field governance result of the chapter as the latest field governance result of the chapter; If the action judgment result output by the large language model is used to indicate the termination of the judgment, then the current field governance result of the chapter is taken as the field governance result of the chapter.

7. An electronic medical record data governance device based on an agent mechanism, characterized in that, include: The acquisition unit is used to acquire electronic medical records that need to undergo data governance. The chapter governance unit is used to iteratively call the large language model based on an agent mechanism for each chapter in the electronic medical record to process garbled characters and duplicate content errors in the chapter, thereby obtaining the chapter governance result. The chapter governance results of each chapter are combined to obtain the chapter-governed electronic medical record. Each call to the large language model based on the agent mechanism to process garbled characters and duplicate content errors in the chapter includes: obtaining a pre-configured range judgment prompt template, which contains preset range judgment task description information, medical record text filling slots, and chapter information. The process involves filling the label slot and the current governance result slot with the original medical record text of the chapter, filling the chapter label slot with the chapter label, and filling the current governance result slot with the current governance result slot to obtain a range judgment instruction. This instruction is then input into a large language model to obtain the range judgment result of the next segment of medical record text without garbled characters or duplicate content errors, as output by the large language model. Based on the range judgment result of the next segment of continuous medical record text without garbled characters or duplicate content errors output by the large language model, the current governance result of the chapter is determined. The field governance unit is used to copy consecutive error-free medical record texts in each field of the chapter in the electronic medical record after the chapter governance, based on the Agent mechanism, and generate medical record texts with errors in field names and field contents, to obtain the field governance result of the chapter. The field governance results of each chapter are combined to obtain the electronic medical record after field governance. The electronic medical record after field governance is the electronic medical record after data governance.

8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the agent-based electronic medical record data governance method as described in any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the agent-based electronic medical record data governance method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the agent-based electronic medical record data governance method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Inquiry information processing method and device, storage medium and computer equipment

    CN111415740A

  • Electronic medical record searching method, system and device, storage medium and product

    CN116069904A