Electronic medical record data governance method based on Agent mechanism and related device
Through the electronic medical record data management method based on the Agent mechanism, the large language model is called iteratively to manage chapters and fields in the electronic medical record, solving the problem of difficult to deal with garbled codes and content duplication errors in the existing technology, and achieving efficient and high-quality electronic medical record data management.
Patent Information
- Application Number
- CN202411968423.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Existing electronic medical record data management methods are difficult to effectively deal with garbled codes and content duplication errors, and large language models are inefficient and hallucinated when dealing with long electronic medical records, which affects the quality of data governance.
The electronic medical record data management method based on the Agent mechanism is adopted, and the chapters and fields in the electronic medical record are controlled through iterative call to the large language model. The specific steps include: handling garbled code and content duplication errors for each chapter, generating scope judgment instructions to determine the error-free text range, and combining it with the current governance results; copying and generating fields in each chapter, and processing errors whose field names and field contents are inconsistent through action judgment instructions.
It realizes effective processing of errors in electronic medical record data, improves the efficiency and quality of electronic medical record data management, and avoids the inefficiency and hallucination of large language models when processing long texts.
Smart Images

Figure CN119864117A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an electronic medical record data management method and related devices based on an Agent mechanism. Background Art
[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 a digital form, which brings many conveniences such as easy storage, easy management, and easy sharing. At present, electronic medical records still have problems such as different formats among different hospitals, which is not conducive to unified use, and has hindered subsequent medical review and scientific research. In order to solve this problem, electronic medical record data governance came into being.
[0003] Electronic medical record data management refers to standardizing electronic medical records of different formats to a unified data interface, while solving errors such as garbled characters and duplicate content. Electronic medical record data management generally includes two stages: chapter management and field management. Chapter management refers to standardizing a patient's full medical record to a pre-defined chapter interface; field management refers to standardizing the medical records of each chapter after chapter management to the field interface of that chapter.
[0004] Electronic medical record data governance can be achieved through sequence annotation methods, but sequence annotation methods do not have the ability to handle errors such as garbled characters and repeated content. With the development of large language model technology, using the text generation capabilities of large language models to handle errors in electronic medical record data governance has become a feasible solution, but electronic medical records are often long, and relying entirely on text generation will bring efficiency problems. In addition, large language models have hallucination phenomena, and the generated results may not follow the original text of the medical record.
[0005] Therefore, how to provide an electronic medical record data management solution that can both process errors in electronic medical record data and improve the efficiency and quality of electronic medical record data management has become a technical problem that needs to be urgently solved in this field. Summary of the invention
[0006] In view of the above problems, this application provides an electronic medical record data management method and related devices based on the Agent mechanism to achieve the purpose of processing errors in electronic medical record data and improving the efficiency and quality of electronic medical record data management. The specific plan is as follows:
[0007] The first aspect of the present application provides an electronic medical record data management method based on an Agent mechanism, comprising:
[0008] Obtain electronic medical records for data governance;
[0009] For each chapter in the electronic medical record, garbled characters and content duplication errors in the chapter are processed based on the Agent mechanism to obtain a chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain the electronic medical record after chapter management;
[0010] For each chapter in the electronic medical record after chapter management, the continuous error-free medical record text in each field of the chapter is copied based on the Agent mechanism, and the medical record text with inconsistency errors between the field name and the field content is generated to obtain the field management result of the chapter. The field management results of each chapter are combined to obtain the electronic medical record after field management. The electronic medical record after field management is the electronic medical record after data management.
[0011] In a possible implementation, the Agent-based mechanism processes the garbled characters and content duplication errors in the chapter to obtain the chapter management result of the chapter, including:
[0012] Based on the Agent mechanism, the large language model is iteratively called to process the garbled characters and content duplication errors in the chapter, so as to obtain the chapter management result of the chapter.
[0013] In a possible implementation, the large language model is called each time based on the Agent mechanism to process the garbled characters and content duplication errors in the chapter, including:
[0014] Determine the original medical record text of the chapter, the chapter label of the chapter and the current chapter governance result of the chapter;
[0015] Generate a scope judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current chapter governance result of the chapter;
[0016] Inputting the range judgment instruction into the large language model, obtaining the next medical record text range judgment result output by the large language model without garbled characters and content duplication errors;
[0017] Based on the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model, the chapter governance result of the chapter is determined.
[0018] In a possible implementation, the generating of the scope judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current governance result of the chapter includes:
[0019] Obtain a preconfigured scope judgment prompt template, wherein the scope judgment prompt template includes preset scope judgment task description information, a medical record text filling slot, a chapter label filling slot, and a current governance result filling slot;
[0020] Fill the original medical record text of the chapter into the medical record text filling slot, fill the chapter tag of the chapter into the chapter tag filling slot, and fill the current chapter management result of the chapter into the current management result filling slot to obtain a range judgment instruction.
[0021] In a possible implementation, the next medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to determine the chapter governance result of the chapter, including:
[0022] If the range judgment result of the next paragraph of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, then based on the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, index the original medical record text of the chapter to obtain the next paragraph of continuous medical record text without garbled characters and content duplication errors; merge the next paragraph of continuous medical record text without garbled characters and content duplication errors with the current chapter management result of the chapter as the latest chapter management result of the chapter;
[0023] If the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate termination judgment, the current chapter management result of the chapter is used as the chapter management result of the chapter.
[0024] In a possible implementation, the Agent-based mechanism copies the continuous error-free medical record texts in each field of the chapter and generates the medical record texts with the inconsistency between the field name and the field content, and obtains the field management result of the chapter, including:
[0025] Based on the Agent mechanism, the large language model is iteratively called to copy the continuous error-free medical record texts in each field of the chapter and generate the medical record texts with inconsistency errors between the field name and the field content to obtain the governance result of the field.
[0026] In a possible implementation, the large language model is called each time based on the Agent mechanism to copy the continuous error-free medical record texts in each field of the chapter and generate the medical record texts with the inconsistency between the field name and the field content, including:
[0027] Determine the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter;
[0028] Generate an action judgment instruction based on the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter;
[0029] Inputting the action judgment instruction into a large language model to obtain an action judgment result output by the large language model;
[0030] Based on the action judgment result output by the large language model, the field management result of the chapter is determined.
[0031] In a possible implementation, the generating of the action judgment instruction based on the chapter management result of the chapter, the to-be-managed field tag of the chapter and the current field management result of the chapter includes:
[0032] Obtain a preconfigured action judgment prompt template, wherein the action judgment prompt template includes preset action judgment task description information, a medical record text filling slot, a field label filling slot, and a current governance result filling slot;
[0033] Fill the chapter management result of the chapter into the medical record text filling slot, fill the field label to be managed of the chapter into the field label filling slot, and fill the current field management result of the chapter into the current management result filling slot to obtain an action judgment instruction.
[0034] In a possible implementation, the 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 starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, then the chapter management result of the chapter is indexed based on the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, and the continuous error-free medical record text in the field corresponding to the field label to be managed is obtained, and the continuous error-free medical record text in the field corresponding to the field label to be managed is merged with the current field management result of the chapter as the latest field management 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 inconsistency error between the field name and the field content in the field corresponding to the field label 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 termination judgment, the current field management result of the chapter is used as the field management result of the chapter.
[0038] The second aspect of the present application provides an electronic medical record data management device based on an Agent mechanism, comprising:
[0039] An acquisition unit, used to acquire electronic medical records to be subject to data governance;
[0040] A chapter management unit is used for processing garbled characters and content duplication errors in each chapter of the electronic medical record based on an Agent mechanism to obtain a chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain an electronic medical record after chapter management;
[0041] The field management unit is used for copying the continuous error-free medical record texts in each field of each chapter in the electronic medical record after chapter management based on the Agent mechanism and generating the medical record text with the inconsistency error between the field name and the field content to obtain the field management result of the chapter. The field management results of each chapter are combined to obtain the electronic medical record after field management, and the electronic medical record after field management is the electronic medical record after data management.
[0042] In a possible implementation, the chapter governance unit is specifically used to:
[0043] Based on the Agent mechanism, the large language model is iteratively called to process the garbled characters and content duplication errors in the chapter, so as to obtain the chapter management result of the chapter.
[0044] In a possible implementation, the chapter governance unit includes:
[0045] A chapter management information determination unit, used to determine the original medical record text of the chapter, the chapter label of the chapter and the current chapter management result of the chapter;
[0046] A range judgment instruction generating unit, used for generating a range judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current chapter management result of the chapter;
[0047] A range judgment instruction execution unit, used for inputting the range judgment instruction into the large language model to obtain the range judgment result of the next medical record text output by the large language model without garbled characters and content duplication errors;
[0048] The chapter management result determination unit is used to determine the chapter management result of the chapter based on the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model.
[0049] In a possible implementation, the range determination instruction generating unit is specifically used to:
[0050] Obtain a preconfigured scope judgment prompt template, wherein the scope judgment prompt template includes preset scope judgment task description information, a medical record text filling slot, a chapter label filling slot, and a current governance result filling slot;
[0051] Fill the original medical record text of the chapter into the medical record text filling slot, fill the chapter tag of the chapter into the chapter tag filling slot, and fill the current chapter management result of the chapter into the current management result filling slot to obtain a range judgment instruction.
[0052] In a possible implementation, the chapter governance result determination unit is specifically used to:
[0053] If the range judgment result of the next paragraph of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, then based on the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, index the original medical record text of the chapter to obtain the next paragraph of continuous medical record text without garbled characters and content duplication errors; merge the next paragraph of continuous medical record text without garbled characters and content duplication errors with the current chapter management result of the chapter as the latest chapter management result of the chapter;
[0054] If the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate termination judgment, the current chapter management result of the chapter is used as the chapter management result of the chapter.
[0055] In a possible implementation, the field management unit is specifically used to:
[0056] Based on the Agent mechanism, the large language model is iteratively called to copy the continuous error-free medical record texts in each field of the chapter and generate the medical record texts with inconsistency errors between the field name and the field content to obtain the governance result of the field.
[0057] In a possible implementation, the field management unit includes:
[0058] A field management information determination unit, used to determine the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter;
[0059] An action judgment instruction generating unit, used for generating an action judgment instruction based on the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter;
[0060] an action judgment instruction execution unit, used for inputting the action judgment instruction into a large language model to obtain an action judgment result output by the large language model;
[0061] The field management result determination unit is used to determine the current field management result of the chapter based on the action judgment result output by the large language model.
[0062] In a possible implementation, the action determination instruction generating unit is specifically used to:
[0063] Obtain a preconfigured action judgment prompt template, wherein the action judgment prompt template includes preset action judgment task description information, a medical record text filling slot, a field label filling slot, and a current governance result filling slot;
[0064] Fill the chapter management result of the chapter into the medical record text filling slot, fill the field label to be managed of the chapter into the field label filling slot, and fill the current field management result of the chapter into the current management result filling slot to obtain an action judgment instruction.
[0065] In a possible implementation, the field management result determination unit is specifically configured to:
[0066] If the action judgment result output by the large language model is used to indicate the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, then the chapter management result of the chapter is indexed based on the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, and the continuous error-free medical record text in the field corresponding to the field label to be managed is obtained, and the continuous error-free medical record text in the field corresponding to the field label to be managed is merged with the current field management result of the chapter as the latest field management 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 inconsistency error between the field name and the field content in the field corresponding to the field label 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 termination judgment, the current field management result of the chapter is used as the field management result of the chapter.
[0069] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the electronic medical record data management method based on the agent mechanism of the above-mentioned first aspect or any implementation method of the first aspect.
[0070] A fourth aspect of the present application provides an electronic device, comprising 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 electronic medical record data management method based on the Agent mechanism of the above-mentioned first aspect or any implementation method of the first aspect.
[0073] The fifth aspect of the present application provides a computer-readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the electronic medical record data management method based on the agent mechanism according to the above-mentioned first aspect or any implementation method of the first aspect.
[0074] By means of the above technical scheme, the electronic medical record data management method and related device based on the Agent mechanism provided by the present application, after obtaining the electronic medical record to be data managed, firstly for each chapter in the electronic medical record, the garbled characters and content duplication errors in the chapter are processed to obtain the chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain the electronic medical record after chapter management; then for each chapter in the electronic medical record after chapter management, the continuous error-free medical record text in each field of the chapter is copied and the medical record text with the inconsistency error between the field name and the field content is generated to obtain the field management result of the chapter, and the field management results of each chapter are combined to obtain the electronic medical record after field management, and the electronic medical record after field management is the electronic medical record after data management. This scheme can not only process the errors in the electronic medical record data, but also improve the efficiency and quality of electronic medical record data management. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent 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 of an electronic medical record data management method based on an Agent mechanism provided in an embodiment of the present application;
[0077] Figure 2 A schematic diagram of format comparison of electronic medical records after chapter management provided in an embodiment of the present application;
[0078] Figure 3 A schematic diagram of format comparison after field management of chapters in an electronic medical record provided in an embodiment of the present application;
[0079] Figure 4 A flowchart of a method for processing garbled characters and content duplication errors in a chapter by calling a large language model each time based on an Agent mechanism provided in an embodiment of the present application;
[0080] Figure 5 A flowchart diagram of a specific implementation method for calling a large language model based on an Agent mechanism each time, copying continuous error-free medical record texts in each field of a chapter, and generating medical record texts with inconsistency errors between field names and field contents provided in an embodiment of the present application;
[0081] Figure 6 A schematic diagram of the structure of an electronic medical record data management device based on an Agent mechanism provided in an embodiment of the present application;
[0082] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0084] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0085] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[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 a digital form, which brings many conveniences such as easy storage, easy management, and easy sharing. At present, electronic medical records still have problems such as different formats among different hospitals, which is not conducive to unified use, and has hindered subsequent medical review and scientific research. In order to solve this problem, electronic medical record data governance came into being.
[0087] Electronic medical record data management refers to standardizing electronic medical records of different formats to a unified data interface, while solving errors such as garbled characters and duplicate content. Electronic medical record data management generally includes two stages: chapter management and field management. Chapter management refers to standardizing a patient's full medical record to a pre-defined chapter interface; field management refers to standardizing the medical records of each chapter after chapter management to the field interface of that chapter.
[0088] Existing electronic medical record data management solutions are mainly divided into two categories: the first category is the sequence annotation method based on deep learning. This type of method first uses a deep learning model to encode the unmanaged electronic medical records, and then identifies the chapter boundaries or field boundaries in the medical records through the sequence annotation pattern, and gives the corresponding categories. The second type of method is the text generation method based on the large language model. This type of method first inputs the unmanaged electronic medical records into the large language model, and the large language model directly outputs according to the pre-defined chapter and field interface format to achieve data management of electronic medical records.
[0089] Among them, the sequence annotation method based on deep learning is essentially the segmentation and classification of the input electronic medical record text. The data management results obtained are completely in line with the original medical record text, so it is not capable of processing errors such as garbled characters and repeated content that often appear in electronic medical records. In addition, electronic medical records are long, and sequence annotation methods often perform poorly when processing long sequences.
[0090] Although the text generation method based on the large language model has the ability to handle errors, this method requires the regeneration of the entire medical record. In the actual data processing process, the proportion of text that needs to be followed is much higher than the proportion of text that needs to be corrected by the generation method. Therefore, this method itself is an over-modeling, and it will also bring the following two problems: ① The content of medical records is often long, and regeneration of the full text will bring serious decoding efficiency problems; ② Although the erroneous parts of the input medical records are corrected, due to the uncontrollability of the generation process, the parts that originally needed to follow the original medical records will have repeated generation and hallucination problems, which will affect the final data governance quality.
[0091] The agent mechanism is an autonomous software system that can perceive the environment, make decisions and take actions. It has the ability to perceive, reason, learn and execute, and can autonomously react and make decisions based on environmental changes. Considering that electronic medical records contain many chapters and fields, the governance of each chapter and field needs to be implemented separately.
[0092] Based on this, in order to solve the above problems, the embodiment of the present application provides an electronic medical record data management method based on the Agent mechanism, which can not only process errors in electronic medical record data but also improve the efficiency and quality of electronic medical record data management.
[0093] The following is a detailed introduction to the electronic medical record data management method based on the Agent mechanism of the embodiment of the present application in conjunction with the accompanying drawings.
[0094] Reference Figure 1 , Figure 1 A flowchart of an electronic medical record data management method based on an Agent mechanism provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, an electronic medical record data management method based on an Agent mechanism provided in an embodiment of the present application 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-managed is a complete electronic medical record. The format of the electronic medical record to be data-managed can be any format, and this application does not impose any limitation.
[0097] S102: for each chapter in the electronic medical record, garbled characters and content duplication errors in the chapter are processed based on the Agent mechanism to obtain a chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain an electronic medical record after chapter management;
[0098] In the present application, a large language model can be used to perform chapter management on the electronic medical record. However, the length of a complete electronic medical record often exceeds the upper limit of the text length that can be processed by the large language model. Therefore, in the present application, the electronic medical record can be managed chapter by chapter to process garbled characters and content duplication errors in each chapter of the electronic medical record. After completing the chapter management of all chapters, the managed chapters are combined to obtain the electronic medical record after chapter management.
[0099] For ease of understanding, refer to Figure 2 , Figure 2 A schematic diagram of a format comparison of electronic medical records after chapter management provided in an embodiment of the present application. Figure 2 As shown, the left side is an example of an electronic medical record to be data managed provided by an embodiment of the present application, and the right side is the electronic medical record after chapter management. By comparison, it can be found that after chapter management of the electronic medical record on the left, the garbled characters and duplication errors in the electronic medical record have been managed.
[0100] S103: For each chapter in the electronic medical record after chapter management, based on the Agent mechanism, copy the continuous error-free medical record text in each field of the chapter and generate the medical record text with inconsistency errors between the field name and the field content to obtain the field management result of the chapter. The field management results of each chapter are combined to obtain the electronic medical record after field management. The electronic medical record after field management is the electronic medical record after data management.
[0101] In this application, similar to chapter management, after completing the chapter management of the electronic medical record, the electronic medical record after chapter management can be subjected to field management according to the chapters to handle the inconsistency error between the field name and the field content. After completing the field management of all chapters, the chapters after each field management are combined to obtain the electronic medical record after field management. The electronic medical record after field management is the electronic medical record after data management.
[0102] For ease of understanding, refer to Figure 3 , Figure 3 This is a schematic diagram of a format comparison of a chapter in an electronic medical record after field management provided by an embodiment of the present application. Figure 3 As shown, the left side is an example of an electronic medical record chapter to be subject to field management provided in an embodiment of the present application, and the right side is the electronic medical record chapter after field management. By comparison, it can be found that after field management is performed on the electronic medical record chapter on the left, the field name and field content in the field "Physical Examination" are inconsistent. The error "Body temperature 19 times / min, pulse 36℃, respiration 120 / 68mmHg, blood pressure 94 times / min" has been managed and corrected to "Body temperature 36℃, pulse 94 times / min, respiration 19 times / min, blood pressure 120 / 68mmHg".
[0103] The electronic medical record data management method based on the Agent mechanism provided in this embodiment, after obtaining the electronic medical record to be data managed, firstly processes the garbled characters and content duplication errors in each chapter of the electronic medical record to obtain the chapter management result of the chapter, and combines the chapter management results of each chapter to obtain the electronic medical record after chapter management; then, for each chapter in the electronic medical record after chapter management, copies the continuous error-free medical record text in each field of the chapter and generates the medical record text with the inconsistency error between the field name and the field content, and obtains the field management result of the chapter, and combines the field management results of each chapter to obtain the electronic medical record after field management, and the electronic medical record after field management is the electronic medical record after data management. This scheme can not only process the errors in the electronic medical record data, but also improve the efficiency and quality of electronic medical record data management.
[0104] In this application, the large language model can be iteratively called based on the Agent mechanism to achieve chapter management and field management of each chapter of the electronic medical record.
[0105] As an implementable method, in the present application, the Agent-based mechanism processes the garbled characters and content duplication errors in the chapter to obtain the chapter management result of the chapter, including: iteratively calling the large language model based on the Agent mechanism, processing the garbled characters and content duplication errors in the chapter, and obtaining the chapter management result of the chapter. The Agent-based mechanism copies the continuous error-free medical record texts in each field of the chapter and generates the medical record texts with the error of inconsistency between the field name and the field content, and obtains the field management result of the chapter, including: iteratively calling the large language model based on the Agent mechanism, copying the continuous error-free medical record texts in each field of the chapter and generating the medical record texts with the error of inconsistency between the field name and the field content, and obtaining the field management result of the chapter.
[0106] The specific implementation method of processing the garbled characters and content duplication errors in the chapter by calling the large language model each time based on the Agent mechanism, and the specific implementation method of iteratively calling the large language model based on the Agent mechanism each time to copy the continuous error-free medical record texts in each field of the chapter and generate the medical record texts with the inconsistency errors between the field name and the field content, will be described in detail through the following embodiments.
[0107] In another embodiment of the present application, a specific implementation method for processing garbled characters and content duplication errors in the chapters based on the Agent mechanism each time the large language model is called is described.
[0108] Reference Figure 4, Figure 4 A flowchart of a method for processing garbled characters and content duplication errors in a chapter by calling a large language model each time based on an Agent mechanism provided in an embodiment of the present application, the method may include the following steps:
[0109] S201: Determine the original medical record text of the chapter, the chapter label of the chapter, and the current chapter management result of the chapter;
[0110] In this application, the current chapter governance result of the 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 chapter label errors, mixed content of multiple chapters, etc. Therefore, in this application, before performing chapter management, the above errors need to be corrected.
[0112] In a possible implementation, the medical record content of a chapter can be input into the large language model. The large language model will first determine whether there is a mixture of multiple chapters. If there is no mixture, the large model will directly give the correct chapter label of the chapter. When performing chapter management on the chapter, the correct chapter label of the chapter can be used. If there is a mixture, the large language model will give all the mixed chapter labels. When performing chapter management on the mixed chapter, each mixed chapter label needs to be used to perform multiple chapter management on the mixed chapter.
[0113] It should be noted that when a miscellaneous chapter tag is used to process the miscellaneous chapter, in addition to garbled characters and content duplication errors, other medical record content outside the miscellaneous chapter tag in the miscellaneous chapter also needs to be excluded.
[0114] S202: Generate a range judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current chapter management result of the chapter;
[0115] In a possible implementation, the range judgment instruction is generated based on the original medical record text of the chapter, the chapter label of the chapter and the current governance result of the chapter, including: obtaining a preconfigured range judgment prompt template, the range judgment prompt template containing preset range judgment task description information, a medical record text filling slot, a chapter label filling slot and a current governance result filling slot; filling the original medical record text of the chapter into the medical record text filling slot, filling the chapter label of the chapter into the chapter label filling slot and filling the current chapter governance result of the chapter into the current governance result filling slot to obtain the range judgment instruction.
[0116] For ease of understanding, an example of a range judgment prompt template is provided in this application, as shown in Table 1 below:
[0117] Table 1
[0118]
[0119] As shown in Table 1, “Task Definition” is the scope judgment task description information, “{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 when indexing in the original medical record of a chapter, the same fragment may be indexed multiple times, thereby obtaining multiple continuous texts. Therefore, in this application, the reference length of the continuous text is given in the range judgment task description information. By limiting the reference length, it can be ensured that the index obtains the only correct continuous text. Figure 2 For example, "Starting stage: chief complaint; Ending segment: family history" will match multiple results in the input medical record, but the length limit will play a role in removing duplicate medical record content and obtaining a unique correct result.
[0121] S203: Input the range judgment instruction into the large language model to obtain the next medical record text range judgment result output by the large language model without garbled characters and content duplication errors.
[0122] In the present application, if it is not the last time that the large language model is called, the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate the starting segment, ending segment and reference length of the next segment of continuous medical record text without garbled characters and content duplication errors. If it is the last time that the large language model is called, the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate the termination judgment.
[0123] by Figure 2 For example, when the large language model is called for the first time, the large language model outputs the next medical record text range judgment result without garbled characters and repeated content errors as "Starting segment: Chief complaint; Ending segment: Family history". After the large language model outputs "Starting segment: Chief complaint; Ending segment: Family history", the next large language model output will be: "Starting segment: Physical examination; Ending segment: Signature date" to remove garbled characters in the medical record.
[0124] S204: Based on the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model, determine the chapter governance result of the chapter.
[0125] In a possible implementation, if the range judgment result of the next paragraph of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, then based on the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, the original medical record text of the chapter is indexed to obtain the next paragraph of continuous medical record text without garbled characters and content duplication errors; the next paragraph of continuous medical record text without garbled characters and content duplication errors is merged with the current chapter management result of the chapter as the latest chapter management result of the chapter. The latest chapter management result of the chapter can be used as the current chapter management result of the chapter when the large language model is called next time.
[0126] In another possible implementation, if the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate termination judgment, the current chapter management result of the chapter is used as the chapter management result of the chapter.
[0127] In another embodiment of the present application, a specific implementation method is described for calling a large language model based on an Agent mechanism each time, copying continuous error-free medical record texts in each field of the chapter and generating medical record texts with inconsistency errors between field names and field contents.
[0128] Reference Figure 5 , Figure 5 A flowchart of a specific implementation method for calling a large language model based on an Agent mechanism each time, copying continuous error-free medical record texts in each field of a chapter and generating medical record texts with inconsistency errors between field names and field contents is provided in an embodiment of the present application. The method may include the following steps:
[0129] S301: Determine the chapter management result of the chapter, the to-be-managed field label of the chapter, and the current field management result of the chapter.
[0130] In this application, the current field management result of the chapter is initially empty.
[0131] S302: generating an action judgment instruction based on the chapter management result of the chapter, the to-be-managed field tag of the chapter and the current field management result of the chapter;
[0132] In this application, the action judgment instruction is used to indicate whether to perform a copy action or a generate action in the next step in order to correctly obtain the entire content of the field to be managed under the current field management result of the chapter. If the copy action is performed, it means that the next continuous text has no errors and can be copied directly. If the generate action is performed, it means that the next paragraph of text has an error that the field name and field content are inconsistent.
[0133] In a possible implementation, the generating of the action judgment instruction based on the chapter management result of the chapter, the to-be-managed field tag of the chapter and the current field management result of the chapter includes:
[0134] Obtain a preconfigured action judgment prompt template, wherein the action judgment prompt template includes preset action judgment task description information, a medical record text filling slot, a field label filling slot, and a current governance result filling slot;
[0135] Fill the chapter management result of the chapter into the medical record text filling slot, fill the field label to be managed of the chapter into the field label filling slot, and fill the current field management result of the chapter into the current management result filling slot to obtain an 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 action judgment task description information, “{Field Label}” 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 the indexing in the original medical record of the chapter, the same fragment may be indexed multiple times, resulting in multiple continuous texts. Therefore, in this application, the copy length is given in the action judgment task description information. By limiting the copy length, it can be ensured that the index obtains a unique and correct continuous text.
[0141] In addition, the generated length is also given in the action judgment task description information, which is used to compare whether the length of the generated text is close to the corresponding text length in the input medical record, thereby assisting in determining whether there are serious omissions or errors in the generated content.
[0142] S303: inputting the action judgment instruction into a large language model to obtain an action judgment result output by the large language model;
[0143] In this application, if it is not the last time to call the large language model, the action judgment result output by the large language model is used to indicate the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, or to indicate the generated result after correcting the medical record text with the inconsistency error between the field name and the field content in the field corresponding to the field label to be managed. Figure 3 Taking the input on the left as an example, if the current field to be managed is physical examination, under the initial input, the Agent will first determine to execute the generation action, because the basic vital signs information such as body temperature, pulse, respiration, blood pressure, etc. in the original medical record has a confusing error in which the field name does not correspond to the field content, which needs to be corrected directly through generation.
[0144] If it is the last time that the large language model is called, the action judgment result output by the large language model is used to indicate the termination judgment.
[0145] S304: Determine the current field management result of the chapter based on the action judgment result output by the large language model.
[0146] In a possible implementation, if the action judgment result output by the large language model is used to indicate the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, then the chapter management result of the chapter is indexed based on the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, and the continuous error-free medical record text in the field corresponding to the field label to be managed is obtained, and the continuous error-free medical record text in the field corresponding to the field label to be managed is merged with the current field management result of the chapter as the latest field management 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 in which there is an error of inconsistency between the field name and the field content in the field corresponding to the field label 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 a termination judgment, the current field management result of the chapter is used as the field management result of the chapter.
[0149] In summary, the present application proposes an electronic medical record data governance solution based on an Agent mechanism, which implements chapter governance and field governance in electronic medical record data governance through the autonomous decision-making ability of the Agent mechanism. In the chapter governance stage, the Agent mechanism generates range judgment instructions through iteration to determine the starting and ending segments of continuous text without garbled characters and repeated content, thereby discarding erroneous content while efficiently completing medical record chapter governance. In the field governance stage, the Agent mechanism generates action judgment instructions through iteration to determine whether the next step should be a copy action or a generate action. The copy action corresponds to continuous and error-free medical record text, which is highly efficient and fully complies with the original text. The generate action corresponds to erroneous text where the field name and field content do not correspond, and the correction of medical record errors is achieved through the generate action.
[0150] Compared with the text generation technology based purely on large models, Agent technology can make autonomous decisions throughout the data governance process, and the different actions generated by the Agent mechanism can achieve a more reasonable data governance process. In the data governance process based on the Agent mechanism, the actual content generated by the large model is less, and more data governance is completed by generating copy actions and indexing and copying in the input medical records. Therefore, compared with the pure generation strategy, the data governance based on the Agent mechanism takes less time and is more efficient. The results obtained by the copy action completely follow the original text, which greatly avoids the common illusion problems and repeated generation problems of the pure generation strategy, and improves the quality of the final data governance results.
[0151] The above describes an electronic medical record data management method based on an Agent mechanism provided in an embodiment of the present application. The following describes a device for executing the electronic medical record data management method based on an Agent mechanism.
[0152] See also Figure 6 , Figure 6 The following is a schematic diagram of the structure of an electronic medical record data management device based on an Agent mechanism provided in an embodiment of the present application. Figure 6 As shown, the electronic medical record data management device based on the Agent mechanism includes:
[0153] An acquisition unit 11, used for acquiring electronic medical records to be data managed;
[0154] A chapter management unit 12 is used for processing garbled characters and content duplication errors in each chapter of the electronic medical record based on an Agent mechanism to obtain a chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain an electronic medical record after chapter management;
[0155] The field management unit 13 is used for copying the continuous error-free medical record texts in each field of each chapter in the electronic medical record after chapter management based on the Agent mechanism and generating the medical record texts with inconsistency errors between the field name and the field content to obtain the field management result of the chapter. The field management results of each chapter are combined to obtain the electronic medical record after field management, and the electronic medical record after field management is the electronic medical record after data management.
[0156] In a possible implementation, the chapter governance unit is specifically used to:
[0157] Based on the Agent mechanism, the large language model is iteratively called to process the garbled characters and content duplication errors in the chapter, so as to obtain the chapter management result of the chapter.
[0158] In a possible implementation, the chapter governance unit includes:
[0159] A chapter management information determination unit, used to determine the original medical record text of the chapter, the chapter label of the chapter and the current chapter management result of the chapter;
[0160] A range judgment instruction generating unit, used for generating a range judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current chapter management result of the chapter;
[0161] A range judgment instruction execution unit, used for inputting the range judgment instruction into the large language model to obtain the range judgment result of the next medical record text output by the large language model without garbled characters and content duplication errors;
[0162] The chapter management result determination unit is used to determine the chapter management result of the chapter based on the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model.
[0163] In a possible implementation, the range determination instruction generating unit is specifically used to:
[0164] Obtain a preconfigured scope judgment prompt template, wherein the scope judgment prompt template includes preset scope judgment task description information, a medical record text filling slot, a chapter label filling slot, and a current governance result filling slot;
[0165] Fill the original medical record text of the chapter into the medical record text filling slot, fill the chapter tag of the chapter into the chapter tag filling slot, and fill the current chapter management result of the chapter into the current management result filling slot to obtain a range judgment instruction.
[0166] In a possible implementation, the chapter governance result determination unit is specifically used to:
[0167] If the range judgment result of the next paragraph of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, then based on the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, index the original medical record text of the chapter to obtain the next paragraph of continuous medical record text without garbled characters and content duplication errors; merge the next paragraph of continuous medical record text without garbled characters and content duplication errors with the current chapter management result of the chapter as the latest chapter management result of the chapter;
[0168] If the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate termination judgment, the current chapter management result of the chapter is used as the chapter management result of the chapter.
[0169] In a possible implementation, the field management unit is specifically used to:
[0170] Based on the Agent mechanism, the large language model is iteratively called to copy the continuous error-free medical record texts in each field of the chapter and generate the medical record texts with inconsistency errors between the field name and the field content to obtain the governance result of the field.
[0171] In a possible implementation, the field management unit includes:
[0172] A field management information determination unit, used to determine the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter;
[0173] An action judgment instruction generating unit, used for generating an action judgment instruction based on the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter;
[0174] an action judgment instruction execution unit, used for inputting the action judgment instruction into a large language model to obtain an action judgment result output by the large language model;
[0175] The field management result determination unit is used to determine the current field management result of the chapter based on the action judgment result output by the large language model.
[0176] In a possible implementation, the action determination instruction generating unit is specifically used to:
[0177] Obtain a preconfigured action judgment prompt template, wherein the action judgment prompt template includes preset action judgment task description information, a medical record text filling slot, a field label filling slot, and a current governance result filling slot;
[0178] Fill the chapter management result of the chapter into the medical record text filling slot, fill the field label to be managed of the chapter into the field label filling slot, and fill the current field management result of the chapter into the current management result filling slot to obtain an action judgment instruction.
[0179] In a possible implementation, the field management result determination unit is specifically configured to:
[0180] If the action judgment result output by the large language model is used to indicate the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, then the chapter management result of the chapter is indexed based on the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, and the continuous error-free medical record text in the field corresponding to the field label to be managed is obtained, and the continuous error-free medical record text in the field corresponding to the field label to be managed is merged with the current field management result of the chapter as the latest field management 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 inconsistency error between the field name and the field content in the field corresponding to the field label 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 termination judgment, the current field management result of the chapter is used as the field management result of the chapter.
[0183] The present application also provides an electronic device in an embodiment. Figure 7 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0184] like Figure 7As shown, the electronic device may include a processing device (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, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0185] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0186] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any of the electronic medical record data management methods based on the Agent mechanism provided in the embodiments of the present application.
[0187] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When one or more computer programs are executed by an electronic device, the electronic device can implement any of the electronic medical record data management methods based on the Agent mechanism provided in the embodiment of the present application.
[0188] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0189] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0190] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of 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, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. 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, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. An electronic medical record data management method based on Agent mechanism, characterized in that: include: Obtain electronic medical records for data governance; For each chapter in the electronic medical record, garbled characters and content duplication errors in the chapter are processed based on the Agent mechanism to obtain a chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain the electronic medical record after chapter management; For each chapter in the electronic medical record after chapter management, the continuous error-free medical record text in each field of the chapter is copied based on the Agent mechanism, and the medical record text with inconsistency errors between the field name and the field content is generated to obtain the field management result of the chapter. The field management results of each chapter are combined to obtain the electronic medical record after field management. The electronic medical record after field management is the electronic medical record after data management.
2. The method according to claim 1, characterized in that The Agent-based mechanism processes the garbled characters and content duplication errors in the chapter to obtain the chapter management result of the chapter, including: Based on the Agent mechanism, the large language model is iteratively called to process the garbled characters and content duplication errors in the chapter, so as to obtain the chapter management result of the chapter.
3. The method according to claim 2, characterized in that Based on the Agent mechanism, the large language model is called each time to handle the garbled characters and content duplication errors in the chapters, including: Determine the original medical record text of the chapter, the chapter label of the chapter and the current chapter governance result of the chapter; Generate a scope judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current chapter governance result of the chapter; Inputting the range judgment instruction into the large language model, obtaining the next medical record text range judgment result output by the large language model without garbled characters and content duplication errors; Based on the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model, the chapter governance result of the chapter is determined.
4. The method according to claim 3, characterized in that: The generating of the scope judgment instruction based on the original medical record text of the chapter, the chapter label of the chapter and the current governance result of the chapter includes: Obtain a preconfigured scope judgment prompt template, wherein the scope judgment prompt template includes preset scope judgment task description information, a medical record text filling slot, a chapter label filling slot, and a current governance result filling slot; Fill the original medical record text of the chapter into the medical record text filling slot, fill the chapter tag of the chapter into the chapter tag filling slot, and fill the current chapter management result of the chapter into the current management result filling slot to obtain a range judgment instruction.
5. The method according to claim 3 or 4, characterized in that: The next medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to determine the chapter governance result of the chapter, including: If the range judgment result of the next paragraph of continuous medical record text without garbled characters and content duplication errors output by the large language model is used to indicate the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, then based on the starting segment, ending segment and reference length of the next paragraph of continuous medical record text without garbled characters and content duplication errors, index the original medical record text of the chapter to obtain the next paragraph of continuous medical record text without garbled characters and content duplication errors; merge the next paragraph of continuous medical record text without garbled characters and content duplication errors with the current chapter management result of the chapter as the latest chapter management result of the chapter; If the next segment of continuous medical record text range judgment result without garbled characters and content duplication errors output by the large language model is used to indicate termination judgment, the current chapter management result of the chapter is used as the chapter management result of the chapter.
6. The method according to claim 1, characterized in that The agent-based mechanism copies the continuous error-free medical record texts in each field of the chapter and generates the medical record texts with the inconsistency between the field name and the field content, and obtains the field management results of the chapter, including: Based on the Agent mechanism, the large language model is iteratively called to copy the continuous error-free medical record texts in each field of the chapter and generate the medical record texts with inconsistency errors between the field name and the field content to obtain the governance result of the field.
7. The method according to claim 6, characterized in that Based on the Agent mechanism, each time the large language model is called, the continuous and error-free medical record texts in each field of the chapter are copied and the medical record texts with inconsistency errors between the field name and the field content are generated, including: Determine the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter; Generate an action judgment instruction based on the chapter management result of the chapter, the to-be-managed field label of the chapter and the current field management result of the chapter; Inputting the action judgment instruction into a large language model to obtain an action judgment result output by the large language model; Based on the action judgment result output by the large language model, the field management result of the chapter is determined.
8. The method according to claim 7, characterized in that The generating of the action judgment instruction based on the chapter management result of the chapter, the to-be-managed field tag of the chapter and the current field management result of the chapter includes: Obtain a preconfigured action judgment prompt template, wherein the action judgment prompt template includes preset action judgment task description information, a medical record text filling slot, a field label filling slot, and a current governance result filling slot; Fill the chapter management result of the chapter into the medical record text filling slot, fill the field label to be managed of the chapter into the field label filling slot, and fill the current field management result of the chapter into the current management result filling slot to obtain an action judgment instruction.
9. The method according to claim 7 or 8, characterized in that: The action judgment result based on the output of the large language model determines the field governance result of the chapter, including: If the action judgment result output by the large language model is used to indicate the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, then the chapter management result of the chapter is indexed based on the starting segment, ending segment and reference length of the continuous error-free medical record text in the field corresponding to the field label to be managed, and the continuous error-free medical record text in the field corresponding to the field label to be managed is obtained, and the continuous error-free medical record text in the field corresponding to the field label to be managed is merged with the current field management result of the chapter as the latest field management 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 inconsistency error between the field name and the field content in the field corresponding to the field label 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 termination judgment, the current field management result of the chapter is used as the field management result of the chapter.
10. An electronic medical record data management device based on Agent mechanism, characterized in that: include: An acquisition unit, used to acquire electronic medical records to be subject to data governance; A chapter management unit is used for processing garbled characters and content duplication errors in each chapter of the electronic medical record based on an Agent mechanism to obtain a chapter management result of the chapter, and the chapter management results of each chapter are combined to obtain an electronic medical record after chapter management; The field management unit is used for copying the continuous error-free medical record texts in each field of each chapter in the electronic medical record after chapter management based on the Agent mechanism and generating the medical record text with the inconsistency error between the field name and the field content to obtain the field management result of the chapter. The field management results of each chapter are combined to obtain the electronic medical record after field management, and the electronic medical record after field management is the electronic medical record after data management.
11. A computer program product, characterized in that It includes computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the electronic medical record data management method based on the Agent mechanism as described in any one of claims 1 to 9.
12. An electronic device, characterized in that: The method comprises 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 so that the electronic device can implement the electronic medical record data management method based on the Agent mechanism as described in any one of claims 1 to 9.
13. 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 electronic medical record data governance method based on the Agent mechanism as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Inquiry information processing method and device, storage medium and computer equipment
CN111415740A
Medical ability evaluation method and device based on electronic medical record, equipment and medium
CN112734202A
Electronic medical record searching method, system and device, storage medium and product
CN116069904A
Electronic medical record-based difficult disease evidence-based method and system, and storage medium
CN117352159A
Medical record chapter reconfiguration method and system, terminal and storage medium
CN117688927A