Electronic medical record generation method, task execution method, equipment, medium and product
By combining the task evaluation model with the electronic medical record generation model, medical records are automatically generated, which solves the problem that traditional medical record entry is time-consuming, labor-intensive and error-prone, and achieves high-quality medical record generation.
Patent Information
- Application Number
- CN202510646200.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional medical record entry methods rely on manual input, which is time-consuming, labor-intensive, and error-prone. It is difficult to meet the growing medical needs and results in uneven medical record quality.
A task evaluation model is used to evaluate whether the medical record content description text meets the generation requirements. When the conclusion is negative, additional information is obtained from the medical knowledge base, and the electronic medical record generation model is used to automatically generate medical records.
It improves the accuracy and completeness of medical record generation, reduces manual intervention, and improves the quality and generation efficiency of medical records.
Smart Images

Figure CN120600202A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of terminal technology, and in particular, to an electronic medical record generation method, a task execution method, an electronic device, a computer-readable medium, and a computer program product. Background Art
[0002] With the continuous advancement of medical information technology, electronic medical records have become an indispensable tool in clinical practice. However, traditional medical record entry methods rely on manual input, which is not only time-consuming and labor-intensive, but also prone to errors and unable to meet the growing demand for medical care. In busy clinical environments, doctors often lack the time to prepare detailed medical records, resulting in inconsistent medical record quality. Summary of the Invention
[0003] In view of this, one or more embodiments of this specification provide an electronic medical record generation method, a task execution method, an electronic device, a computer-readable medium, and a computer program product.
[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0005] According to a first aspect of one or more embodiments of this specification, a method for generating an electronic medical record is provided, comprising:
[0006] Get the description text of medical record content;
[0007] Using the trained task evaluation model, evaluate whether the pending electronic medical record generation task can be completed based on the medical record content description text, and if a negative conclusion is obtained, further output the to-be-supplemented information, which is used to describe the knowledge required to complete the electronic medical record generation task;
[0008] Filtering the supplementary knowledge indicated by the information to be supplemented from a preset medical knowledge base;
[0009] The medical record content description text and the supplementary knowledge are input into the trained electronic medical record generation model, so that the electronic medical record generation model performs the electronic medical record generation task to generate an electronic medical record.
[0010] According to a second aspect of the embodiments of this specification, a task execution method is provided, including:
[0011] Get task description information;
[0012] Using the trained task evaluation model, evaluate whether the target task to be performed can be completed based on the task description information, and if a negative conclusion is obtained, further output the information to be supplemented, where the information to be supplemented is used to describe the knowledge required to complete the target task;
[0013] Filtering the supplementary knowledge indicated by the information to be supplemented from a preset knowledge base;
[0014] The task description information and the supplementary knowledge are input into a trained task execution model so that the task execution model executes the target task to obtain a task execution result.
[0015] According to a third aspect of the embodiments of this specification, there is provided an electronic device, including:
[0016] processor;
[0017] a memory for storing processor-executable instructions;
[0018] When the processor executes the executable instructions, it is used to implement the method described in the first aspect or the second aspect.
[0019] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0020] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program, which implements the steps of the method described in the first aspect or the second aspect when executed by a processor.
[0021] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0022] In the embodiments of this specification, a task evaluation model is used to evaluate whether the medical record content description text meets the requirements for electronic medical record generation. When the task evaluation model obtains a negative conclusion and information to be supplemented, medical knowledge can be intelligently supplemented from a preset medical knowledge base, and the information to be supplemented output by the task evaluation model has stronger pertinence and directionality, which can improve the quality of medical knowledge supplementation. The medical record content description text and supplementary knowledge are then input into the trained electronic medical record generation model to ensure that the medical record content generated by the final electronic medical record generation model is accurate and complete, thereby improving the quality of medical records.
[0023] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flowchart of a method for generating an electronic medical record provided by an exemplary embodiment.
[0025] Figure 2This is another flow chart of a method for generating an electronic medical record provided by an exemplary embodiment.
[0026] Figure 3 This is a schematic diagram of an electronic medical record quality assessment and display provided by an exemplary embodiment.
[0027] Figure 4 This is a flowchart of a task execution method provided by an exemplary embodiment.
[0028] Figure 5 It is a structural diagram of an electronic device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0030] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0031] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0032] Here are some explanations of the terms mentioned in this specification:
[0033] 1. Language models, such as the Large Language Model (LLM) and the BERT model, are AI models based on deep learning technology, particularly those trained using large corpora. They are designed to understand and generate text similar to human language and possess strong natural language understanding and generation capabilities. The goal of language models is to leverage natural language processing capabilities to enable a variety of applications, such as text generation, translation, summarization, question-answering, and dialogue systems, thereby improving the efficiency and automation of human-computer interaction.
[0034] 2. Prompts are tips, instructions, or instructions. In the field of artificial intelligence (AI), prompts are used to guide and direct language models to produce specific outputs. Prompts can be text snippets or questions that inspire language models to think and generate relevant content.
[0035] Based on the problems in the related art, the embodiments of this specification provide a method for generating electronic medical records to achieve automatic generation of electronic medical records.
[0036] The following is an exemplary description of the models used in the embodiments of this specification, such as the task evaluation model, the electronic medical record generation model, the quality assessment model, and the speech recognition model:
[0037] (1) Regarding the task evaluation model, it is used to evaluate whether the electronic medical record generation task to be performed can be completed based on the medical record content description text, and further output the information to be supplemented if a negative conclusion is obtained. The information to be supplemented is used to describe the knowledge required to complete the electronic medical record generation task.
[0038] In one possible implementation, the task evaluation model can directly use a pre-trained language model in related technologies.
[0039] In another possible implementation, in order to improve the evaluation accuracy, the task evaluation model can be obtained by fine-tuning a pre-trained language model based on the first training data set; wherein the first training data set includes positive samples and negative samples, the positive samples include medical record content description texts used as model input (these texts contain complete key knowledge in content), and the supervision labels of the positive samples include affirmative conclusions (for example, "the information is complete, and the electronic medical record generation task can be executed directly"); the negative samples include medical record content description texts used as model input (these texts lack some key knowledge in content, such as medical history, medication records, examination results, etc.), and the supervision labels of the negative samples include negative conclusions and information to be supplemented (for example, "the patient's past medical history information is missing, and this part of the content needs to be supplemented").
[0040] During fine-tuning training, the electronic device inputs samples (positive or negative) included in the first training dataset into the task evaluation model to be trained. The task evaluation model then generates a corresponding prediction output, specifically a judgment on whether the input medical record content description text is sufficient to complete the electronic medical record generation task (i.e., the prediction conclusion), and outputs the required supplementary information (i.e., the prediction supplementary information) if the judgment is negative. The prediction results output by the model are compared with the supervisory labels corresponding to the input samples.
[0041] The accuracy and standardization of the current task evaluation model output are evaluated by calculating the error between the predicted result and the supervised label. Specifically, a combination of loss metrics suitable for multi-task outputs can be used, such as cross-entropy loss for classification tasks and sequence generation loss functions (such as token-level cross-entropy loss or KL divergence) for text generation or extraction tasks. This error reflects the degree of deviation in the model's judgment of information completeness and the generation of supplementary content.
[0042] With the training objective of minimizing the error between the predicted results and the supervised labels, the backpropagation algorithm automatically adjusts the trainable parameters in the task evaluation model. Each parameter update is based on the principle of "minimizing error," which enables the model to gradually learn which key information in the input text is crucial for task completion, and what specific content should be supplemented when it is missing.
[0043] This fine-tuning process typically occurs over multiple iterations. As the number of training rounds increases, the model's output becomes closer to the actual annotations, and the prediction error decreases. Ultimately, the task evaluation model converges to one that accurately determines whether medical record descriptions meet the requirements of the EMR generation task and provides clear supplementary suggestions when necessary, effectively improving the accuracy and intelligence of the overall generation process.
[0044] (2) Regarding the electronic medical record generation model, it is used to perform the electronic medical record generation task based on the input content and generate an electronic medical record.
[0045] In one possible implementation, the electronic medical record generation model can directly use a pre-trained language model in related technologies.
[0046] In another possible implementation, in order to improve accuracy, the electronic medical record generation model can be obtained by fine-tuning a pre-trained language model based on a second training data set, where the second training data set includes: text content as model input (such as medical records, doctor's notes, test results, patient complaints, etc.), and electronic medical records as supervisory labels.
[0047] Similar to the above-mentioned fine-tuning process, the electronic device inputs each text content in the second training data set as the model input into the electronic medical record generation model to be trained, and the model generates a predicted electronic medical record based on the input text content. The predicted electronic medical record is compared with the supervisory label (i.e., the real electronic medical record text) corresponding to the input text content, and the accuracy and standardization of the medical record generation capability of the current model are evaluated by calculating the error between the two. The training goal is to minimize the difference between the predicted electronic medical record and the real electronic medical record. The trainable parameters in the model are automatically updated based on the current error through the back propagation algorithm. Each parameter update follows the principle of error minimization, which helps the model gradually learn how to effectively convert structured and semi-structured input information into complete, compliant, and medically expressed electronic medical record text.
[0048] The entire fine-tuning process utilizes an iterative optimization approach, typically repeating the input-prediction-evaluation-update training cycle over multiple training rounds. As training progresses, the model-generated EMR text becomes increasingly similar to the actual record, with the error gradually decreasing until convergence. The resulting EMR generation model accurately understands and extracts key medical information from the input content, generating fluent, complete, and well-structured EMR text based on this information.
[0049] (3) A quality assessment model is used to assess the quality of electronic medical records in at least one quality dimension, thereby obtaining quality assessment information for each quality dimension of the electronic medical record. The quality dimensions include, but are not limited to, at least one of the following: accuracy, completeness, professionalism, and readability.
[0050] In one possible implementation, the quality assessment model can directly use a pre-trained language model in related technologies.
[0051] In another possible implementation, to improve accuracy, the quality assessment model is obtained by fine-tuning a pre-trained language model based on a third training dataset. The third training dataset includes: electronic medical records as model inputs, and quality assessment information of the electronic medical records in at least one quality dimension as supervisory labels. Exemplarily, the quality assessment information can take the form of discrete labels (e.g., excellent / good / fair / poor) or continuous scores (e.g., scores in the range of 0.0–1.0), which is not limited in this embodiment.
[0052] Similar to the above-mentioned fine-tuning process, the electronic device inputs each electronic medical record in the third training data set as a model input into the quality assessment model to be trained. The model scores or classifies its performance in each quality dimension based on the input electronic medical record, and generates a corresponding predictive evaluation. The electronic device then compares the predictive evaluation with the corresponding supervisory label (quality assessment information of the electronic medical record in at least one quality dimension) and calculates its error. The error is used as the loss function input in the training process, and the electronic device automatically adjusts all trainable parameters in the model through the back-propagation algorithm. Each parameter update is aimed at "minimizing the error between the predictive evaluation and the supervisory label", thereby prompting the model to gradually learn the judgment criteria and corresponding text features of different quality dimensions.
[0053] During training, the model iterates through a cycle of prediction, comparison, and optimization. As the number of training rounds increases, the model's ability to assess the quality of electronic medical records across various dimensions improves, and the error gradually decreases until the model converges.
[0054] (4) Regarding the speech recognition model, it is used to identify speech signals related to the generation of electronic medical records and obtain medical record content description information.
[0055] In a possible implementation, the speech recognition model can directly adopt a trained speech recognition model in related technologies.
[0056] In another possible implementation, to improve the recognition accuracy of speech signals in medical scenarios, a speech recognition model is trained based on a fourth training dataset. The fourth training dataset includes: speech signal samples related to medical scenarios (e.g., doctor's rounds recordings, oral medical histories, consultation notes, etc.) as model inputs, and speech recognition text as supervisory labels. An electronic device inputs each speech signal sample from the fourth training dataset into the speech recognition model to be trained. The model maps speech features to corresponding text sequences and outputs predicted text. The electronic device compares the predicted text output by the model with the corresponding supervisory labels (the actual speech recognition text), calculates the error between them, and uses this error as input to the loss function during training. The electronic device automatically adjusts all trainable parameters in the model using a backpropagation algorithm. The training goal is to minimize the error between the predicted text output by the model and the corresponding supervisory labels to improve the accuracy of speech-to-text conversion. Training utilizes a backpropagation algorithm, automatically updating model parameters based on the current loss. The training process typically occurs in multiple iterative rounds. In each round, the model executes a "prediction-evaluation-update" cycle on a new batch of samples to continuously optimize its speech recognition capabilities.
[0057] Because the training samples include speech signal samples relevant to medical scenarios, the speech recognition model's adaptability to medical contexts is enhanced, improving its ability to recognize proper nouns in medical settings. After training, the resulting speech recognition model can automatically and accurately interpret speech input in medical settings as medical record descriptions, providing a reliable text input foundation for subsequent electronic medical record generation tasks.
[0058] See also Figure 1 as well as Figure 2 Next, the electronic medical record generation method provided in this specification is exemplified. The electronic medical record generation method can be executed by an electronic device, including but not limited to a smart phone / mobile phone, a tablet computer, a personal digital assistant (PDA), a laptop computer, a desktop computer, a physical server, a virtual server, or a cloud server, etc. This embodiment does not impose any restrictions on this. The electronic medical record generation method includes:
[0059] In S101, a medical record content description text is obtained.
[0060] In one possible implementation, see Figure 2 , the electronic device can receive voice signals related to the generation of electronic medical records, and then use the trained speech recognition model to perform speech recognition on the voice signals to obtain a text describing the medical record content.
[0061] In another possible implementation, the electronic device also supports doctors to directly input the medical record content description text in the electronic device. The input method can be diverse. This embodiment does not strictly limit the input style, and specific selection can be made based on actual application scenarios.
[0062] For example, the medical record content description text may include but is not limited to at least one of the following: symptom description, disease summary, patient basic information, test results, preliminary diagnosis and treatment opinions, task type of electronic medical record generation task, electronic medical record format requirements, etc.
[0063] In S102, the trained task evaluation model is used to evaluate whether the electronic medical record generation task to be executed can be completed based on the medical record content description text, and if a negative conclusion is obtained, the information to be supplemented is further output. The information to be supplemented is used to describe the knowledge required to complete the electronic medical record generation task.
[0064] In this step, at least the "medical record content description text" obtained in S101 is input into the task evaluation model. The task evaluation model first performs an integrity assessment on the medical record content description text, that is, whether the medical record content description text contains the key information required to generate an electronic medical record. If the assessment is "information complete", the task evaluation model directly outputs a positive conclusion; if the assessment is "incomplete information", the task evaluation model simultaneously generates information to be supplemented, and finally outputs a negative conclusion and information to be supplemented.
[0065] Given that medical record descriptions can be crude, incomplete, or non-standard, this embodiment of the manual introduces a task evaluation model to pre-evaluate whether they contain sufficient information to perform the electronic medical record generation task. Compared to generating electronic medical records directly from raw text, this solution effectively identifies information gaps in the text, thereby avoiding inaccurate medical record generation results caused by incomplete input content and improving overall generation quality and applicability.
[0066] For example, considering that there are multiple types of electronic medical record generation tasks, including but not limited to outpatient medical records, admission summaries, inpatient medical records, discharge summaries, surgical records, and informed consent forms, to improve evaluation accuracy, the electronic device can first perform intent recognition on the medical record content description text to determine the task type of the electronic medical record generation task. The medical record content description text and the task type are then input into the task evaluation model, so that the task evaluation model can evaluate whether the electronic medical record generation task indicated by the task type can be completed based on the medical record content description text.
[0067] In this embodiment, the introduction of an intention recognition mechanism to determine the specific task type of the electronic medical record generation task can significantly improve the evaluation pertinence and accuracy of the task evaluation model. Specifically, different types of electronic medical records (such as outpatient medical records, discharge summaries, surgical records, etc.) have obvious differences in content structure, information focus and expression specifications. If the evaluation process does not distinguish between task types, it may lead to inconsistent evaluation standards, thereby affecting the reliability of the evaluation results. By first identifying the task type and inputting it into the task evaluation model as an auxiliary input together with the medical record content description text, the model can make accurate judgments based on the standard requirements of the corresponding type and identify whether the current input content meets the generation conditions of this type of electronic medical record. This approach not only enhances the model's ability to understand the evaluation context, but also effectively avoids misjudgments caused by ambiguous task types, thereby improving the evaluation adaptability and output quality of the overall system in multi-task electronic medical record generation scenarios.
[0068] In one scenario, given that the task evaluation model has already learned and mastered the content requirements and judgment criteria for different EMR generation tasks through the aforementioned fine-tuning process, in actual applications, the medical record content description text can be directly provided as input along with the corresponding task type. Leveraging the model's internalized knowledge of task types, the model can conduct a targeted evaluation of the input text based on the task type, accurately determining whether it meets the requirements for completing that type of EMR generation task. This eliminates the need for additional rules or template matching, streamlining the system process and improving evaluation efficiency.
[0069] Alternatively, to further improve evaluation accuracy, multiple prompt word templates can be preconfigured. Each prompt word template corresponds to a task type and describes the input requirements for the electronic medical record generation task indicated by that task type. Based on the task type, the electronic device can select a target prompt word template that matches the task type from the preconfigured prompt word templates. The electronic device then embeds the medical record content description and task type into the target prompt word template to generate the target prompt word, which is then input into the task evaluation model.
[0070] By introducing a prompt word template mechanism corresponding to the task type, the task evaluation model's ability to understand and judge different electronic medical record generation tasks can be further enhanced. For example, each prompt word template can describe the content related to a specific task type, providing the task evaluation model with clear and structured task background information. By embedding the medical record content description text and the task type into the matching prompt word template to generate the target prompt word, and passing it as input to the task evaluation model, the task evaluation model can be effectively guided to focus on the key content elements and judgment criteria required for the specific task type. This approach not only improves the task evaluation model's ability to perceive the input context, but also enhances the controllability and consistency of the evaluation process, so that when dealing with complex or ambiguously expressed medical record content, the accuracy and robustness of the evaluation can still be maintained, which helps to achieve more reliable pre-verification of electronic medical record generation.
[0071] Taking the discharge summary as an example, the corresponding prompt word template can be preset as shown in the following table:
[0072]
[0073] This prompt word template clearly describes the input requirements for the electronic medical record generation task corresponding to the "discharge summary" (such as the reason for admission, diagnosis and treatment process, discharge condition, and medical advice, etc.), thereby guiding the task evaluation model to judge the completeness and applicability of the input text around these key points.
[0074] In S103, the supplementary knowledge indicated by the to-be-supplemented information is screened out from a preset medical knowledge base.
[0075] Exemplarily, the pre-set medical knowledge base may include but is not limited to at least one of the following:
[0076] (1) At least one of the following: basic medical knowledge, explanations of professional terms, and interpretations of indicators in each department, such as common terminology in internal medicine, surgery, obstetrics and gynecology, pediatrics, neurology, oncology, etc., definitions of common diseases, normal ranges and abnormal interpretations of examination indicators (such as blood routine, liver function, imaging results, etc.).
[0077] (2) Specific requirements for different electronic medical record templates, including but not limited to the field structure, content specifications, and compliance requirements for document templates such as outpatient medical records, inpatient medical records, discharge summaries, surgical records, and informed consent forms. For example, the discharge summary must include a summary of the diagnosis and treatment plan; surgical records should include intraoperative findings and postoperative conditions.
[0078] (3) The latest knowledge and standard medical expertise of various medical specialties; such as clinical pathways, diagnosis and treatment guidelines (such as the "Guidelines for the Prevention and Treatment of Hypertension"), drug use regulations, medical journal abstracts, etc.
[0079] (4) Case examples and expert-annotated samples, including typical case document samples reviewed by experts, to help the medical record generation model refer to real expressions.
[0080] (5) Frequently asked questions and education content for patients, including daily explanations by doctors, such as “Should I fast before surgery?” and “When is the best time to take antihypertensive drugs?”, etc., to enhance the rationality of the patient communication section or education suggestion section in the medical record.
[0081] (6) Medical entity dictionary and relationship map, including standard naming and relationship network of entities such as diseases, symptoms, drugs, examinations, and treatments, to improve the professionalism and consistency of the model.
[0082] Exemplarily, the preset medical knowledge base can be expressed as at least one of a FAQ (Frequently Asked Questions) knowledge base, a knowledge graph, a search engine, and a structured database, but is not limited thereto. The FAQ knowledge base includes a structured set of question-answer pairs to facilitate quick retrieval of common knowledge. The knowledge graph constructs a medical knowledge network in an entity-attribute-relationship manner, supporting complex reasoning and semantic retrieval. The structured database uses a relational database to store medical standard entries (such as drug information tables) to facilitate table-driven information retrieval. The search engine supports keyword search or semantic search to facilitate quick search of documents or paragraphs.
[0083] In this step, the supplementary knowledge is screened based on the "information to be supplemented" output by the task evaluation model in S102, rather than directly based on the medical record content description text itself. Compared to the original medical record content description text, the supplementary information output by the task evaluation model is more targeted and directional, and can clearly indicate the specific knowledge points or content types missing from the current electronic medical record generation task, thereby providing more focused query conditions for screening. This approach effectively avoids screening errors caused by redundant information or unclear semantics in medical record descriptions, and significantly improves the accuracy and relevance of supplementary knowledge extracted from the pre-set medical knowledge base.
[0084] In one possible implementation, the electronic device can obtain a first embedding vector converted from the information to be supplemented, and a second embedding vector converted from each piece of knowledge in the medical knowledge base. Then, based on the similarity between the first embedding vector and each second embedding vector, the electronic device can obtain the supplementary knowledge indicated by the information to be supplemented. By converting the information to be supplemented and the knowledge items in the medical knowledge base into embedding vectors and matching them based on the similarity in the embedding space, the electronic device can achieve a more efficient and semantically accurate supplementary knowledge screening process. The vectorized representation can capture semantic similarities. Even if there are textual differences between the information to be supplemented and the knowledge items, their potential semantic associations can still be identified, thereby improving the accuracy and intelligence of the screening.
[0085] In S104 , the medical record content description text and supplementary knowledge are input into the trained electronic medical record generation model, so that the electronic medical record generation model performs the electronic medical record generation task and generates an electronic medical record.
[0086] In one possible implementation, given that the EMR generation model has already learned and mastered EMR generation capabilities after the aforementioned fine-tuning process, in actual applications, the medical record content description text, along with supplementary knowledge, can be directly provided as input to the EMR generation model. Leveraging the model's internalized knowledge of the task type, the model can conduct a targeted evaluation of the input text based on the task type, accurately determining whether it meets the requirements for completing that type of EMR generation task. This eliminates the need for additional rules or template matching, streamlining the process and improving evaluation efficiency.
[0087] In another case, in order to further improve the accuracy of the evaluation, multiple prompt word templates can also be pre-configured, each prompt word template corresponds to a task type and describes at least one execution step of the electronic medical record generation task indicated by the task type. Based on the task type, the electronic device can select a target prompt word template that matches the task type from multiple preset prompt word templates, and then embed the medical record content description text, task type and supplementary instructions into the target prompt word template to obtain the target prompt word. Finally, the target prompt word is input into the electronic medical record generation model, and the electronic medical record generation model executes the electronic medical record generation task to generate an electronic medical record. In this embodiment, different types of electronic medical records (such as outpatient medical records, discharge summaries, etc.) have different information organization structures and content focuses. The prompt word template clarifies the execution steps of the task type, guides the model to focus on specific elements when generating, and improves the relevance and pertinence of the output content.
[0088] The electronic medical record generation method provided in this embodiment realizes the automatic generation of electronic medical records. It evaluates whether the medical record content description text meets the requirements for electronic medical record generation through a task evaluation model. When the task evaluation model obtains a negative conclusion and information to be supplemented, it can intelligently supplement medical knowledge from a preset medical knowledge base, and input the medical record content description text and supplementary knowledge into the trained electronic medical record generation model to ensure that the medical record content generated by the final electronic medical record generation model is accurate and complete, thereby improving the quality of medical records.
[0089] In some embodiments, when the task evaluation model outputs a positive conclusion, the medical record content description text can be directly input into the trained electronic medical record generation model so that the electronic medical record generation model can perform the electronic medical record generation task and generate an electronic medical record.
[0090] In some embodiments, see Figure 3 After the electronic medical record generation model outputs the electronic medical record, the electronic device can input the electronic medical record into a trained quality assessment model. The quality assessment model then assesses the quality of the electronic medical record in at least one quality dimension and outputs quality assessment information for each quality dimension. Quality dimensions include, but are not limited to, at least one of the following: accuracy, completeness, professionalism, and readability.
[0091] In one possible implementation, the electronic device can automatically evaluate whether the quality assessment information of the electronic medical record in each quality dimension meets the preset quality requirements. If there is quality assessment information in at least one quality dimension that does not meet the preset quality requirements, the electronic medical record generation task can be re-executed based on the quality assessment information that does not meet the preset quality requirements and the medical record content description text. Specifically, the re-execution method may include the following two methods: one method is to regenerate from scratch, that is, re-enter the task evaluation process: re-input the medical record content description text into the task evaluation model, determine whether additional knowledge is needed, and regenerate the electronic medical record after updating the input accordingly; the other method is to modify based on the existing electronic medical record: the quality assessment information that does not meet the preset quality requirements is used as guidance information, and is input into the electronic medical record generation model together with the electronic medical record and the medical record content description text, guiding the electronic medical record generation model to perform targeted optimization and modification only on the parts of the electronic medical record with quality problems. Among them, the preset quality requirements can be specifically set according to the actual application scenario, and this embodiment does not impose any restrictions on this.
[0092] This embodiment implements an automatic error correction and enhanced medical record quality control mechanism, which can discover and repair quality defects without human intervention, and can achieve closed-loop verification and optimization of multi-dimensional quality indicators, ensuring that the output documents meet the dual requirements of clinical and document specifications, improving the system's autonomous intelligence level, and reducing the risk of poor-quality output.
[0093] In another possible implementation, see Figure 3 , at least one of the electronic medical records and the quality assessment information of the electronic medical records in various quality dimensions can be displayed to the user (such as a doctor). If the user is not satisfied with certain parts of the generated content (such as treatment plan descriptions, examination result records, etc.), the user can instruct the electronic device to make modifications, such as by voice description, but not limited to this, or can also make manual modifications directly. If the electronic device receives modification instruction information for at least one medical record content in the electronic medical record, it can re-execute the electronic medical record generation task based on the modification instruction information and the medical record content description text. Specifically, the re-execution method may include the following two methods: one method is to regenerate from scratch, that is, re-enter the task evaluation process: re-input the medical record content description text into the task evaluation model, determine whether additional knowledge is needed, and then update the input and regenerate the electronic medical record accordingly; the other method is to modify based on the existing electronic medical record: the modification instruction information is used as guidance information, and is input into the electronic medical record generation model together with the electronic medical record and the medical record content description text, guiding the electronic medical record generation model to only perform targeted optimization and modification on the parts of the electronic medical record with quality problems. This embodiment retains space for manual review and customized modification, enhances the ability to respond to the doctor's subjective intentions, combines the advantages of human-computer collaboration, and improves the personalization and practical application value of electronic medical record content.
[0094] The various technical features in the above embodiments can be combined arbitrarily as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, the arbitrary combination of the various technical features in the above embodiments also falls within the scope of disclosure of this specification.
[0095] In some embodiments, considering that the implementation logic of the above-mentioned electronic medical record generation task has strong versatility, it is not only applicable to electronic medical record generation tasks, but can also be extended to more types of task execution scenarios. For example, in various applications that need to complete complex text generation or decision reasoning based on input information (such as legal document drafting, intelligent customer service Q&A, academic abstract generation, etc.), the completeness and accuracy of task execution can also be improved through the collaborative mechanism of task evaluation, knowledge supplementation and model execution. Therefore, please refer to Figure 4 , this specification also provides a task execution method, including:
[0096] In S401, task description information is obtained.
[0097] In S402, the trained task evaluation model is used to evaluate whether the target task to be executed can be completed based on the task description information, and if a negative conclusion is obtained, the information to be supplemented is further output. The information to be supplemented is used to describe the knowledge required to complete the target task.
[0098] In S403, the supplementary knowledge indicated by the to-be-supplemented information is screened out from a preset knowledge base.
[0099] In S404, the task description information and the supplementary knowledge are input into the trained task execution model so that the task execution model executes the target task and obtains a task execution result.
[0100] Exemplarily, the task description information includes report content description information, the target task includes a report generation task, and the task execution result includes a report.
[0101] For example, in a civil dispute, a lawyer hopes to quickly generate a complaint document that complies with the regulations. Figure 4 The method shown performs the following steps:
[0102] S401 obtains task description information: "Party Zhang borrowed RMB 200,000 from Li in March 2023, with an agreed repayment deadline of September 30, 2023, but Li has not yet repaid the loan."
[0103] S402 uses the task evaluation model for evaluation: The task evaluation model determines that the description does not contain complete prosecution elements and cannot directly generate an indictment. Therefore, it outputs information to be supplemented, such as: "Is there a written agreement or evidence for the loan?", "Is the basic identity information of the parties clear?", etc.
[0104] S403 Knowledge Supplement: Filter relevant content from the judicial knowledge base based on the information to be supplemented, such as: the standard format and content requirements of the complaint; the evidentiary elements of loan cases; examples of party identity descriptions in the complaint; and the legal basis for interest claims.
[0105] S404 report (complaint) generation: The task description information and supplementary knowledge are input into the task execution model (for example, a judicial text generation model fine-tuned based on a large language model) to generate a civil complaint with a complete structure, clear logic, and compliance with court requirements, including: plaintiff and defendant information; facts and reasons; litigation request; list of evidence; and legal basis.
[0106] This method avoids the situation where an invalid complaint is generated due to incomplete information. It can automatically prompt the content to be supplemented and guide the supplement of evidence, thereby significantly improving the quality of judicial document generation and work efficiency, lowering the threshold for legal professionals, and is especially suitable for scenarios such as legal assistance platforms and intelligent legal consulting systems.
[0107] In one implementation, the method further includes: performing intent recognition on the task description information to determine the task type of the target task. Using a trained task evaluation model, an evaluation is performed to determine whether the target task to be executed can be completed based on the task description information. This includes: inputting the task description information and the task type into the task evaluation model, so that the task evaluation model evaluates whether the target task indicated by the task type can be completed based on the task description information.
[0108] In one implementation, the method further includes: selecting a target prompt word template that matches the task type from a plurality of pre-set prompt word templates based on the task type; wherein each prompt word template corresponds to a task type and describes the input requirements of the target task indicated by the task type; and embedding the task description information and the task type into the target prompt word template to obtain the target prompt word. Inputting the task description information and the task type into the task evaluation model includes: inputting the target prompt word into the task evaluation model.
[0109] In one implementation, supplementary knowledge indicated by the information to be supplemented is screened out from a preset knowledge base, including: obtaining a first embedding vector converted from the information to be supplemented, and obtaining a second embedding vector converted from each piece of knowledge in the knowledge base; and obtaining the supplementary knowledge indicated by the information to be supplemented based on the similarity between the first embedding vector and each second embedding vector.
[0110] In one implementation, the method further includes: inputting the task execution result into a trained quality assessment model, so that the quality assessment model evaluates the quality of the task execution result in at least one quality dimension, and outputs quality assessment information of the task execution result in each quality dimension.
[0111] In one implementation, the method further includes: if quality assessment information of at least one quality dimension does not meet preset quality requirements, re-executing the target task based on the quality assessment information that does not meet the preset quality requirements and the task description information.
[0112] In one implementation, it also includes: displaying the task execution results and / or quality assessment information of the task execution results in various quality dimensions; if modification indication information for at least one item in the task execution results is received, re-executing the target task based on the modification indication information and the task description information.
[0113] In one implementation, a task evaluation model is obtained by fine-tuning a pre-trained language model based on a first training dataset; wherein the first training dataset includes positive samples and negative samples, the positive samples include task description information as model input, and the supervision labels of the positive samples include affirmative conclusions; the negative samples include task description information as model input, and the supervision labels of the negative samples include negative conclusions and information to be supplemented.
[0114] In one implementation, the task execution model is obtained by fine-tuning a pre-trained language model based on a second training dataset, where the second training dataset includes: text content as model input, and task execution results as supervision labels.
[0115] In one implementation, the quality assessment model is obtained by fine-tuning a pre-trained language model based on a third training dataset, where the third training dataset includes: task execution results as model input, and quality assessment information of the task execution results in at least one quality dimension as a supervision label.
[0116] In one implementation, obtaining task description information includes: receiving a speech signal related to a target task; using a trained speech recognition model to perform speech recognition on the speech signal to obtain task description information; wherein the speech recognition model is trained based on a fourth training data set, and the fourth training data set includes: speech signal samples related to the scene to which the target task belongs as model input, and speech recognition text as a supervision label.
[0117] In some embodiments, an embodiment of this specification further provides an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements any of the above methods by running the executable instructions.
[0118] Figure 5 This is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 5 At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510. Of course, it may also include hardware required for other functions. One or more embodiments of this specification can be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0119] In some embodiments, the electronic medical record generating device can be applied to Figure 5 The electronic medical record generating device may include:
[0120] Description text acquisition module, used to obtain the description text of medical record content;
[0121] The task evaluation module is used to use the trained task evaluation model to evaluate whether the electronic medical record generation task to be executed can be completed based on the medical record content description text. If a negative conclusion is obtained, it will further output the supplementary information to be supplemented. The supplementary information is used to describe the supplementary knowledge required to complete the electronic medical record generation task;
[0122] A supplementing module is used to filter out supplementary knowledge indicated by the information to be supplemented from a preset medical knowledge base;
[0123] The electronic medical record generation module is used to input the medical record content description text and supplementary knowledge into the trained electronic medical record generation model, so that the electronic medical record generation model can perform the electronic medical record generation task and generate an electronic medical record.
[0124] In some embodiments, the task execution device can be applied to Figure 5 The device shown in the figure is used to implement the technical solution of this specification. The task execution device may include:
[0125] Description information acquisition module, used to obtain task description information;
[0126] The task evaluation module is used to use the trained task evaluation model to evaluate whether the target task to be executed can be completed based on the task description information. If a negative conclusion is obtained, it will further output the supplementary information to describe the supplementary knowledge required to complete the target task;
[0127] A supplementing module is used to filter out the supplementary knowledge indicated by the information to be supplemented from a preset knowledge base;
[0128] The task execution module is used to input task description information and supplementary knowledge into the trained task execution model so that the task execution model can execute the target task and obtain the task execution result.
[0129] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0130] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the method described in any of the above embodiments by running the executable instructions.
[0131] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0132] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0133] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.
[0134] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.
Claims
1. A method for generating an electronic medical record, comprising: Get the description text of medical record content; Using the trained task evaluation model, evaluate whether the pending electronic medical record generation task can be completed based on the medical record content description text, and if a negative conclusion is obtained, further output the to-be-supplemented information, which is used to describe the knowledge required to complete the electronic medical record generation task; Filtering the supplementary knowledge indicated by the information to be supplemented from a preset medical knowledge base; The medical record content description text and the supplementary knowledge are input into the trained electronic medical record generation model, so that the electronic medical record generation model performs the electronic medical record generation task to generate an electronic medical record.
2. The method according to claim 1, further comprising: Performing intent recognition on the medical record content description text to determine the task type of the electronic medical record generation task; The step of using the trained task evaluation model to evaluate whether the electronic medical record generation task to be executed can be completed based on the medical record content description text includes: The medical record content description text and the task type are input into the task evaluation model, so that the task evaluation model evaluates whether the electronic medical record generation task indicated by the task type can be completed based on the medical record content description text.
3. The method according to claim 2, further comprising: Based on the task type, selecting a target prompt word template that matches the task type from a plurality of preset prompt word templates; wherein each prompt word template corresponds to a task type and describes the input requirements of the electronic medical record generation task indicated by the task type; Embedding the medical record content description text and the task type into the target prompt word template to obtain the target prompt word; The step of inputting the medical record content description text and the task type into the task evaluation model includes: The target cue word is input into the task evaluation model.
4. The method according to claim 1, wherein filtering out the supplementary knowledge indicated by the to-be-supplemented information from a preset medical knowledge base comprises: Obtaining a first embedding vector converted from the information to be supplemented, and obtaining a second embedding vector converted from each piece of knowledge in the medical knowledge base; Based on the similarity between the first embedding vector and each of the second embedding vectors, the supplementary knowledge indicated by the to-be-supplemented information is obtained.
5. The method according to claim 1, further comprising: The electronic medical record is input into a trained quality assessment model so that the quality assessment model assesses the quality of the electronic medical record in at least one quality dimension and outputs quality assessment information of the electronic medical record in each of the quality dimensions.
6. The method according to claim 5, further comprising: If there is quality assessment information of at least one quality dimension that does not meet the preset quality requirements, the electronic medical record generation task is re-executed based on the quality assessment information that does not meet the preset quality requirements and the medical record content description text.
7. The method according to claim 5, further comprising: Displaying the electronic medical record and / or quality assessment information of the electronic medical record in each of the quality dimensions; If modification instruction information for at least one medical record content in the electronic medical record is received, the electronic medical record generation task is re-executed based on the modification instruction information and the medical record content description text.
8. The method according to claim 1, wherein the task evaluation model is obtained by fine-tuning a pre-trained language model based on a first training dataset; The first training data set includes positive samples and negative samples, wherein the positive samples include text describing the content of medical records as input to the model, and the supervisory labels of the positive samples include positive conclusions; the negative samples include text describing the content of medical records as input to the model, and the supervisory labels of the negative samples include negative conclusions and information to be supplemented; and / or, The electronic medical record generation model is obtained by fine-tuning a pre-trained language model based on a second training data set, where the second training data set includes: text content as model input, and electronic medical records as supervision labels.
9. The method according to claim 5, wherein the quality assessment model is obtained by fine-tuning a pre-trained language model based on a third training dataset, wherein the third training dataset comprises: The electronic medical records are used as model input, and the quality assessment information of the electronic medical records in at least one quality dimension is used as supervision labels.
10. The method according to claim 1, wherein obtaining a text description of the medical record content comprises: receiving a voice signal associated with generating an electronic medical record; Using a trained speech recognition model, performing speech recognition on the speech signal to obtain a text describing the medical record content; The speech recognition model is trained based on a fourth training data set, and the fourth training data set includes: speech signal samples related to medical scenarios as model input, and speech recognition text as supervision labels.
11. A task execution method, comprising: Get task description information; Using the trained task evaluation model, evaluate whether the target task to be performed can be completed based on the task description information, and if a negative conclusion is obtained, further output the information to be supplemented, where the information to be supplemented is used to describe the knowledge required to complete the target task; Filtering the supplementary knowledge indicated by the information to be supplemented from a preset knowledge base; The task description information and the supplementary knowledge are input into a trained task execution model so that the task execution model executes the target task to obtain a task execution result. 12 . The method according to claim 11 , wherein the task description information comprises report content description information, the target task comprises a report generation task, and the task execution result comprises a report.
13. An electronic device comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to any one of claims 1 to 12 by running the executable instructions.
14. A computer-readable storage medium having computer instructions stored thereon, wherein when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
15. A computer program product comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.
Citation Information
Cited By
Intelligent medical record generation and quality control method and system based on large model
CN121483474A
Intelligent medical record generation and quality control method and system based on large model
CN121483474B