Method, device and electronic equipment for generating electronic medical records
By extracting and integrating medical record data in the electronic medical record system, and using large language models to generate abstract data and model prompts, the problem that existing systems cannot deeply understand and integrate medical record information is solved, and the effect of efficiently generating electronic medical records is achieved.
Patent Information
- Application Number
- CN202411897278.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
AI Technical Summary
The existing automated electronic medical record system cannot deeply understand and integrate and summarize the patient's medical record information, resulting in low efficiency in generating electronic medical records, and doctors still need to spend a lot of time summarizing and editing.
By obtaining the medical record data of the target object, extracting the document chapter data of the specified medical record type, using the pre-constructed chapter source matching map and large language model to generate chapter source summary data, further generate the disease summary data, and generate model prompts through sample matching, and finally input the model prompts into the pre-trained large language model to generate electronic medical records.
It significantly improves the efficiency of electronic medical records generation, reduces the work burden of doctors, and improves the accuracy and consistency of medical records sorting and writing.
Smart Images

Figure CN119763752A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an electronic medical record generation method, device and electronic equipment. Background Art
[0002] Electronic Medical Records (EMR) is an important tool for recording detailed information about patients during their diagnosis and treatment, which is traditionally completed by doctors manually entering information. However, due to the diversity and complexity of patient medical information, doctors need to spend a lot of time to complete the writing of medical records, which increases the workload of doctors and affects their work efficiency.
[0003] Existing automated electronic medical record systems usually rely on predefined templates and rules, which can assist doctors in writing medical records to a certain extent, such as writing discharge summaries. However, these systems cannot deeply understand and integrate the patient's medical record information, and doctors still need to spend a lot of time summarizing and editing. It can be seen that these systems still have significant limitations in improving the efficiency of electronic medical record generation.
[0004] Therefore, how to improve the efficiency of generating electronic medical records has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] In view of the above problems, the present invention provides an electronic medical record generation method, device and electronic device that overcome the above problems or at least partially solve the above problems. The technical solution is as follows:
[0006] A method for generating an electronic medical record, comprising:
[0007] Obtain medical records of the target subject;
[0008] Extracting document chapter data of a specified medical record type from the medical record data;
[0009] Using a pre-built chapter source matching mapping, obtain chapter source data corresponding to the document chapter data;
[0010] Generate chapter source summary data of the chapter source data using the first language model;
[0011] Generate condition summary data of the medical record data using the chapter source summary data;
[0012] Using the medical condition summary data, obtaining target sample data that matches the medical record data, wherein the target sample data includes target medical record sample data and its matching target medical condition summary sample data;
[0013] Generate a model prompt using the target medical record sample data, the target condition summary sample data and the condition summary data;
[0014] The model prompt is input into a second language model that has been pre-trained for medical record generation, so that the second language model generates the electronic medical record of the target object according to the model prompt.
[0015] Optionally, after obtaining the medical record data of the target object, the method further includes:
[0016] extracting image examination data from the medical record data;
[0017] generating image inspection summary data of the image inspection data using a multimodal model;
[0018] The step of generating condition summary data by using the chapter source summary data includes:
[0019] The condition summary data of the medical record data is generated by using the chapter source summary data and the image examination summary data.
[0020] Optionally, the using the condition summary data to obtain target sample data matching the medical record data includes:
[0021] Among a plurality of medical record sample data that match the physician identification corresponding to the medical record data, the target sample data that matches the medical record data is obtained by using the condition summary data.
[0022] Optionally, the generating model prompt using the target medical record sample data, the target condition summary sample data and the condition summary data includes:
[0023] The target medical record sample data, the target condition summary sample data and the condition summary data are substituted into a writing style prompt template that matches the physician identifier to generate a model prompt, so that the large language model generates the electronic medical record containing the writing style of the designated physician based on the model prompt.
[0024] Optionally, the using the condition summary data to obtain target sample data matching the medical record data includes:
[0025] Performing entity extraction processing on the medical condition summary data to obtain entity keywords of the medical condition summary data, performing entity matching retrieval based on the entity keywords to obtain at least one first medical record sample data;
[0026] Segment the medical condition summary data to obtain a summary vector of the medical condition summary data, and perform vector semantic retrieval based on the summary vector to obtain at least one second medical record sample data;
[0027] Filtering out the target medical record sample data having the highest similarity to the medical record data from each of the first medical record sample data and each of the second medical record sample data;
[0028] According to the target medical record sample data and the target condition summary sample data matched therewith, target sample data matching the medical record data is obtained.
[0029] Optionally, after inputting the model prompt into a second language model that has been pre-trained for medical record generation so that the second language model generates the electronic medical record of the target object according to the model prompt, the method further includes:
[0030] Performing content quality detection on the electronic medical record to obtain a detection result, wherein the content quality verification includes at least one detection method selected from the group consisting of sensitive word detection, model fabrication detection, and output effect detection;
[0031] Based on the test results, the electronic medical record is adjusted.
[0032] Optionally, before obtaining the medical record data of the target object, the method further includes:
[0033] obtaining at least one medical record training data;
[0034] Extracting the document chapter data of the specified medical record type from each of the medical record training data respectively;
[0035] According to the physician identification corresponding to the medical record training data, the document chapter training data is traced back and analyzed to determine the chapter source data corresponding to the document chapter data;
[0036] The chapter source matching mapping is constructed based on the corresponding relationship between the document chapter data and the chapter source data.
[0037] Optionally, the method further includes:
[0038] Generate chapter source summary training data of each of the chapter source data using the first language model;
[0039] extracting the image inspection data from each of the medical record training data respectively;
[0040] generating image inspection summary training data for each of the image inspection data using the multimodal model;
[0041] Generate condition summary training data of the medical record training data by using the chapter source summary training data and the image examination summary training data;
[0042] Generate a training data set using each of the medical record training data and the corresponding condition summary training data;
[0043] The second largest language model is trained for medical record generation using the training data set to obtain a trained second largest language model.
[0044] An electronic medical record generating device comprises: a medical record data obtaining unit, a document chapter data extracting unit, a chapter source data obtaining unit, a chapter source summary data generating unit, a condition summary data generating unit, a target sample data obtaining unit, a model prompt generating unit and an electronic medical record generating unit;
[0045] The medical record data obtaining unit is used to obtain the medical record data of the target object;
[0046] The document chapter data extraction unit is used to extract document chapter data of a specified medical record type from the medical record data;
[0047] The chapter source data obtaining unit is used to obtain the chapter source data corresponding to the document chapter data by using a pre-built chapter source matching mapping;
[0048] The chapter source summary data generating unit is used to generate chapter source summary data of the chapter source data by using the first language model;
[0049] The condition summary data generating unit is used to generate the condition summary data of the medical record data by using the chapter source summary data;
[0050] The target sample data obtaining unit is used to obtain target sample data matching the medical record data by using the medical condition summary data, wherein the target sample data includes target medical record sample data and its matching target medical condition summary sample data;
[0051] The model prompt generating unit is used to generate a model prompt using the target medical record sample data, the target condition summary sample data and the condition summary data;
[0052] The electronic medical record generation unit is used to input the model prompt into a second language model that has been pre-trained for medical record generation, so that the second language model generates the electronic medical record of the target object according to the model prompt.
[0053] An electronic device, comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute any of the above-mentioned electronic medical record generation methods.
[0054] By means of the above technical scheme, the present invention provides an electronic medical record generation method, device and electronic device, the method comprising: obtaining medical record data of a target object; extracting document chapter data of a specified medical record type from the medical record data; obtaining chapter source data corresponding to the document chapter data by using a pre-constructed chapter source matching mapping; generating chapter source summary data of the chapter source data by using a first large language model; generating disease summary data of the medical record data by using the chapter source summary data; obtaining target sample data matching the medical record data by using the disease summary data, wherein the target sample data includes target medical record sample data and its matching target disease summary sample data; generating model prompts by using the target medical record sample data, the target disease summary sample data and the disease summary data; inputting the model prompts into the second large language model pre-trained for medical record generation, so that the second large language model generates the electronic medical record of the target object according to the model prompts. The present invention generates high-quality electronic medical records by automatically extracting chapter sources, generating source summary and matching samples of medical record data, and combining the pre-trained large language model, thereby significantly improving the efficiency of generating electronic medical records, helping to reduce the workload of doctors, and improving the accuracy and consistency of medical record arrangement and writing.
[0055] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0057] Figure 1 A schematic diagram showing a flow chart of an implementation of a method for generating an electronic medical record provided by an embodiment of the present invention;
[0058] Figure 2 A flow chart showing another implementation of the method for generating an electronic medical record provided in an embodiment of the present invention;
[0059] Figure 3 A flow chart showing another implementation of the method for generating an electronic medical record provided in an embodiment of the present invention;
[0060] Figure 4 A flow chart showing another implementation of the method for generating an electronic medical record provided in an embodiment of the present invention;
[0061] Figure 5 A schematic diagram showing the structure of an electronic medical record generating device provided by an embodiment of the present invention is shown;
[0062] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0063] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0064] Traditional automated electronic medical record systems rely on templates and rules to assist doctors in writing medical records, such as discharge summaries. However, these systems are unable to deeply understand and integrate the patient's medical record information, resulting in limitations in information processing and comprehensive analysis. With the development of artificial intelligence technology, especially the contextual understanding and generation capabilities of large language models (LLMs), more and more studies have begun to explore the use of AI for medical record generation. For electronic medical records of specific medical record types, such as discharge summaries, since the data involved is usually long, in order to improve the accuracy of model generation, it is possible to consider splitting the discharge summary into multiple chapters, tracing the source information of each chapter, and then generating the content of each chapter.
[0065] However, in the real-time generation process of medical records, even if the discharge summary is split into multiple chapters, the source data involved may still be long, causing the model's attention to be diluted. Secondly, some medical record data involves examination images, but the text-based large language model cannot directly process these multimodal data. Furthermore, the medical records generated by the existing large language model lack personalized expression and it is difficult to reflect the writing styles of different departments and different doctors. All of the above factors will affect the model generation accuracy of the large language model. In addition, the generated medical records lack effective monitoring and evaluation, which makes it difficult to guarantee the effectiveness of electronic medical records.
[0066] In summary, the current automated electronic medical record system relies on templates and rules, and it is difficult to have a systematic understanding of the patient's entire diagnosis and treatment process. Doctors still need to consult a large amount of medical record data to write discharge summaries. The existing medical record generation method based on large language models cannot effectively handle the problem of long source data and multimodal data such as images. It also fails to generate medical records that conform to the writing styles of different departments and different doctors, and the generated medical records lack accuracy evaluation.
[0067] Based on this, in an embodiment of the present invention, a method for generating an electronic medical record is provided. First, the medical record data of the target object is obtained and the document chapter data of the specified type is extracted. Then, the corresponding chapter source data is obtained using the pre-built chapter source matching mapping. Next, the chapter source summary data is generated using a pre-trained large language model. The target medical record sample data and its corresponding condition summary sample data are matched with the chapter source summary data to generate a model prompt. Finally, the model prompt is input into the large language model to efficiently generate an electronic medical record, thereby helping to reduce the workload of doctors and improve the accuracy and consistency of medical record organization and writing.
[0068] like Figure 1 As shown, a flowchart of an implementation of a method for generating an electronic medical record provided by an embodiment of the present invention is provided. The method may include:
[0069] S100: Obtain medical record data of a target object.
[0070] The target object refers to the medical patient for whom electronic medical records need to be generated. In the general medical field, medical patients are usually individuals seeking diagnosis, treatment and care, while in the specific fields of veterinary medicine or plant protection, medical patients can also refer to animals or plants that need to record health status, medical history, diagnosis, treatment and care information.
[0071] Medical record data refers to detailed medical information that records the patient's health status, medical history, diagnosis, treatment and care. Medical record data can include the target patient's information (e.g., the patient's name, age, gender and contact information, etc.), medical history (e.g., past illnesses, registered departments, attending physicians, surgeries, hospitalization records and allergy history), diagnostic information (e.g., the doctor's diagnosis of the patient's health status), examination and test results (e.g., laboratory tests and imaging examinations), treatment records (e.g., medication records, surgical records and treatment plans) and medical records (observations of doctors and nurses during hospitalization and records of changes in the condition).
[0072] S110. Extract document chapter data of a specified medical record type from the medical record data.
[0073] Among them, the medical record type refers to the medical record category that records the patient's health information and medical activities at all stages of the entire medical process. Optionally, the medical record type may include admission summary, discharge summary, initial diagnosis record, medical course record, operation record, anesthesia record, nursing record, consultation record, pathology report, treatment plan, transfer record, follow-up record and emergency record.
[0074] The embodiment of the present invention can pre-specify the medical record type of the electronic medical record, thereby extracting the document chapter data of the medical record type from the medical record data.
[0075] The document chapter data refers to the text content of different parts or chapters arranged according to specific standards and formats in the medical records of the specified pathological type. For example, for a medical record document with the specified medical record type as admission summary, the document chapter data corresponding to the medical record document in the medical record data may include chapter names such as admission condition summary and diagnosis and treatment status and the corresponding chapter content.
[0076] Specifically, the embodiment of the present invention can perform format conversion and transcoding on the medical record data according to the specified medical record type to obtain the document chapter data of the specified medical record type. Further, the embodiment of the present invention can obtain the medical record data of the target object in the electronic medical record system, convert the medical record data into a unified format (for example: XML, JSON or CSV), and then determine the identifiers of each chapter based on the structure of the medical record document of the specified medical record type, use the identifiers to identify and locate each chapter of the medical record document, and then use natural language processing tools or regular expressions to parse the medical record data, locate and extract the document chapter data corresponding to the chapter identifier.
[0077] S120. Obtain chapter source data corresponding to the document chapter data using a pre-built chapter source matching mapping.
[0078] Among them, chapter source matching mapping is a rule or table used to match different chapters in medical records with their corresponding source data. Chapter source data refers to the actual recorded information in medical records that constitutes the chapter data of the document. For example, the chapter source data of the admission summary can be the admission record and the first page of the medical record, and the chapter source data of the diagnosis and treatment situation can be the ward round record of the superior doctor and the operation record.
[0079] The embodiment of the present invention can quickly find the source data corresponding to each chapter in the document chapter data through chapter source matching mapping, thereby facilitating the rapid generation of electronic medical records and improving the efficiency of electronic medical record generation.
[0080] S130 , using the first language model to generate chapter source summary data of the chapter source data.
[0081] The chapter source summary data includes summary content obtained by summarizing the source data corresponding to each chapter in the chapter source data.
[0082] In the application of large language models, the length of the source data refers to the length of the data input to the model. When processing input data, the large language model has a context length limit, which is usually expressed in the number of tokens, such as 4k or 8k. Among them, "token" refers to the basic unit used by the large language model to process text, which can be a word, a subword, or a character. When the input data exceeds this limit, the model ignores the excess input. In addition, current large language models generally use attention mechanisms to calculate the attention paid to the input data. When the input data is too long, this attention will be diluted, resulting in insufficient attention to certain key parts of the model, thereby reducing the accuracy of the generated results. In short, the longer the input data, the more dispersed the attention distribution may be, which will affect the model's ability to capture important information and ultimately affect the quality of its generation.
[0083] Therefore, the embodiment of the present invention can utilize the summarization and generalization capabilities of the large language model to summarize chapter source data with a longer data volume and obtain chapter source summary data with a shorter data volume, thereby improving the accuracy of electronic medical records generated by the large language model.
[0084] S140. Generate condition summary data of the medical record data using the chapter source summary data.
[0085] Specifically, the embodiment of the present invention can integrate the chapter source summary data according to the summary structure predefined in the medical condition summary data, and organize the integrated information into a coherent medical condition summary data.
[0086] S150. Utilize the medical condition summary data to obtain target sample data that matches the medical record data, wherein the target sample data includes target medical record sample data and its matching target medical condition summary sample data.
[0087] The medical record sample data is the medical record data pre-stored in the database, and the condition summary sample data is the condition summary data extracted based on the medical record sample data.
[0088] Specifically, the embodiment of the present invention can perform entity extraction and sentence segmentation on the medical summary data, construct a retrieval vector with the extracted text data, and then search for similar medical record records from the database in combination with the department information and / or physician information corresponding to the medical record data, that is, the medical record sample data and its matching medical summary sample data, and finally obtain the medical record record with the highest similarity as the target sample data.
[0089] Entity extraction refers to identifying and extracting specific types of entities from text, such as name, department, attending physician, symptom, sign name, disease name, drug name, injection name, etc. The embodiment of the present invention can perform entity extraction through predefined regular expressions or trained named entity recognition models.
[0090] Sentence segmentation refers to segmenting a text into independent sentences. The embodiment of the present invention can perform sentence segmentation based on punctuation marks, or can use a natural language processing database to perform sentence segmentation.
[0091] Optionally, the embodiment of the present invention may first perform entity extraction on the medical summary data, then perform sentence segmentation to mark entities in the medical summary data, then perform sentence-level analysis, and finally construct a retrieval vector from the segmented sentences.
[0092] Optionally, the embodiment of the present invention may first perform sentence segmentation on the medical summary data, and then perform entity extraction, thereby facilitating the identification of entities in the segmented sentences, and finally constructing a retrieval vector based on the extracted entities.
[0093] S160, using the target medical record sample data, the target condition summary sample data and the condition summary data, generate a model prompt.
[0094] Among them, the model prompt refers to a piece of text or instruction input to the large language model to guide the large language model to generate specific output.
[0095] Specifically, the embodiment of the present invention may substitute the target medical record sample data, the target condition summary sample data and the condition summary data into a pre-built model prompt sample template to generate a model prompt.
[0096] S170, inputting the model prompt into the second largest language model that has been pre-trained for medical record generation, so that the second largest language model generates the electronic medical record of the target object according to the model prompt.
[0097] Specifically, in the embodiment of the present invention, after the model prompt is input into the large language model, the large language model generates the electronic medical record of the target object in a streaming manner according to the model prompt.
[0098] Among them, streaming generation refers to the process of generating text one character at a time in sequence. Its main function is to simulate human writing and reduce the waiting time during the overall generation.
[0099] It should be noted that the first language model and the second language model can be the same language model or two different language models. It is understandable that after a large language model is trained for medical record generation, it can not only generate structured electronic medical records, but also retain its powerful summary generation function and can still be used to generate chapter source summary data for chapter source data.
[0100] The present invention provides a method for generating an electronic medical record, the method comprising: obtaining medical record data of a target object; extracting document chapter data of a specified medical record type from the medical record data; obtaining chapter source data corresponding to the document chapter data by using a pre-constructed chapter source matching mapping; generating chapter source summary data of the chapter source data by using a first large language model; generating disease summary data of the medical record data by using the chapter source summary data; obtaining target sample data matching the medical record data by using the disease summary data, wherein the target sample data includes target medical record sample data and its matching target disease summary sample data; generating model prompts by using the target medical record sample data, the target disease summary sample data and the disease summary data; inputting the model prompts into a second large language model pre-trained for medical record generation, so that the second large language model generates an electronic medical record of the target object according to the model prompts. The present invention generates high-quality electronic medical records by automatically extracting chapter sources, generating source summary and matching samples of medical record data, and combining the pre-trained large language model, thereby significantly improving the efficiency of generating electronic medical records, helping to reduce the workload of doctors, and improving the accuracy and consistency of medical record arrangement and writing.
[0101] Optional, based on Figure 1 The method shown, such as Figure 2 As shown, a flowchart of another implementation of the method for generating an electronic medical record provided by an embodiment of the present invention is shown. After step S100, the method may further include:
[0102] S200, extracting image examination data from the medical record data.
[0103] Image examination data refers to various medical images and related information generated during the medical image examination process. Medical images may include images such as X-rays, computed tomography (CT), magnetic resonance imaging (MRI), and ultrasound. Related information of medical images may include additional image information and diagnostic reports.
[0104] Specifically, the embodiment of the present invention identifies the part of the medical record data related to image examination through keywords, regular expressions or machine learning models, then locates the corresponding image file in the image storage system, uses metadata or unique identifiers to build an association relationship between the image file and the corresponding text data, and integrates them into a structured medical record file to obtain image examination data.
[0105] S210 , generating image inspection summary data of the image inspection data using a multimodal model.
[0106] Among them, a multimodal model is a machine learning model that can process and integrate data from multiple different types (or modalities). Common data modalities include text, images, audio, video, sensor data, etc. This model can extract information from multi-source data and integrate this information for analysis, classification, generation or prediction tasks.
[0107] Optionally, the multimodal model may be a Qwen Vision-Language (Qwen-VL) model, a Visual Question Answering (VQA) model, and an Image Captioning model.
[0108] The image inspection summary data refers to the content that briefly summarizes and concludes the image inspection data. The embodiment of the present invention uses a multimodal model to briefly describe the key findings in the image inspection data, and draws preliminary diagnosis conclusions, inspection recommendations, treatment plans and precautions based on the image inspection data.
[0109] For ease of understanding, here is an example: suppose a patient undergoes a chest CT scan, which generates a large number of CT images and a detailed report. The image examination data includes these CT images and the accompanying detailed diagnostic report. After processing by the multimodal model, the generated image examination summary data may include: A nodule with a diameter of approximately 2 cm was found in the right lower lobe of the lung. The preliminary diagnosis is a benign lung nodule, and further observation is recommended. It is recommended to recheck the CT after 6 months, and consider a biopsy if the nodule increases in size or changes in morphology.
[0110] Step S140 may specifically include:
[0111] S220. Generate condition summary data of the medical record data using the chapter source summary data and the image examination summary data.
[0112] Specifically, the embodiment of the present invention can fuse the chapter source summary data and the image examination summary data according to the summary structure predefined by the condition summary data, so as to generate the condition summary data of the medical record data.
[0113] For ease of understanding, an example is given here to illustrate: Assume that the chapter source summary data is "Patient: Zhang San, age: 45 years old, chief complaint: cough for 3 weeks, aggravated for 1 week, past history: no obvious abnormality, preliminary diagnosis: chronic bronchitis". The image examination summary data is "Examination type: CT, examination time: 2023-01-15, examination site: chest, imaging results: abnormal nodules found in the right lower lobe of the lung, considering the possibility of malignancy, recommendation: further examination". The generated condition summary data can be "Patient Zhang San, male, 45 years old, chief complaint of cough for 3 weeks, aggravated for 1 week. There is no obvious abnormality in the past history. The preliminary diagnosis is chronic bronchitis. CT examination (2023-01-15) showed abnormal nodules found in the right lower lobe of the lung, considering the possibility of malignancy, and further examination is recommended.".
[0114] The embodiment of the present invention combines the summary generation technology of the large language model with the multimodal technology to compress and refine the chapter source data, and at the same time integrates the image information, which can significantly improve the accuracy of electronic medical record generation, thereby improving the efficiency of electronic medical record generation.
[0115] Optional, based on Figure 1 The method shown, such as Figure 3 As shown, a flowchart of another implementation of the method for generating an electronic medical record provided by an embodiment of the present invention is shown, and step S150 may specifically include:
[0116] S300 , using the condition summary data to obtain target sample data matching the medical record data from a plurality of medical record sample data matching the physician identification corresponding to the medical record data.
[0117] The physician identification is an information mark or logo used to uniquely identify a specific physician. The physician identification provided by the embodiment of the present invention may include the physician's department information and the physician's personal information. For example, the physician identification format may be "department-physician name".
[0118] It is understandable that each medical record data is associated with a specific physician identifier to indicate which physician is responsible for the medical record. By using this physician identifier, the embodiment of the present invention can filter out medical records related to a specific physician from multiple medical record sample data. Then, using the condition summary data, the target sample data most relevant to the current medical record data is further located and matched in these medical record records to improve the accuracy of the generated model prompts, thereby helping to improve the quality of electronic medical record generation and further improve the efficiency of electronic medical record generation.
[0119] Optional, based on Figure 3 The method shown, such as Figure 4As shown, a flowchart of another implementation of the method for generating an electronic medical record provided by an embodiment of the present invention is shown, and step S160 may specifically include:
[0120] S400, substitute the target medical record sample data, the target condition summary sample data and the condition summary data into the writing style prompt template that matches the physician identification, and generate a model prompt, so that the second largest language model generates an electronic medical record containing the writing style of the designated physician according to the model prompt.
[0121] Among them, the writing style prompt template is a model prompt sample template customized according to the writing habits and style of a specific doctor, which is used to guide the large language model to generate electronic medical records that conform to the doctor's writing style.
[0122] It is understandable that different doctors may have different document writing habits and styles, including wording, sentence structure, description details, etc. These writing styles reflect the doctor's personalized recording method and professional habits to a certain extent. In order to ensure the coherence and consistency of the electronic medical record file, the embodiment of the present invention can pre-create writing style prompt templates, which are customized according to the writing characteristics of each doctor and associated with the corresponding physician identification.
[0123] Specifically, the embodiment of the present invention can substitute the physician identification into the model prompt sample template, construct a writing style prompt template matching the physician identification in real time, and then substitute the target medical record sample data, target condition summary sample data and condition summary data into the writing style prompt template to generate model prompts.
[0124] For example, the model prompt sample template can be "You are an AI doctor. Refer to the following sample based on the medical record source data: {"medical record sample data"}, {"certain department"}{"physician"} written discharge summary admission condition summary section: {"admission condition summary sample"}. Generate the discharge summary admission condition summary section in the writing style of {"certain department"}{"physician"} according to the following medical record data: {"medical record data"}". According to the department and physician name in the physician identification, replace {"certain department"}{"physician"} in the model prompt sample template respectively to generate a writing style prompt template that matches the physician identification, and then replace {"medical record sample data"} in the writing style prompt template with the target medical record sample data, and then replace {"admission condition summary sample"} in the writing style prompt template with the target condition summary sample data, and finally replace {"medical record data"} in the writing style prompt template with the condition summary data, thereby generating a model prompt.
[0125] The embodiment of the present invention generates a model prompt by substituting the target medical record sample data, the target condition summary sample data and the condition summary data into a writing style prompt template that matches the physician identification, and can personalize the writing style of the electronic medical record so that the content and style of the electronic medical record are consistent with the actual writing habits of the doctor, thereby improving the professionalism and personalization of the electronic medical record generation.
[0126] Optional, in the above Figure 3 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, step S300 may specifically include:
[0127] Perform entity extraction on the medical condition summary data to obtain entity keywords of the medical condition summary data, perform entity matching retrieval based on the entity keywords, and obtain at least one first medical record sample data. Perform sentence segmentation on the medical condition summary data to obtain a summary vector of the medical condition summary data, perform vector semantic retrieval based on the summary vector, and obtain at least one second medical record sample data. Filter out the target medical record sample data with the highest similarity to the medical record data from each first medical record sample data and each second medical record sample data. Based on the target medical record sample data and the target medical condition summary sample data that matches it, obtain the target sample data that matches the medical record data.
[0128] Among them, entity matching retrieval refers to performing information retrieval in the medical records stored in the database based on the entity keywords to retrieve the first medical record sample data that matches the entity keywords. It is understandable that multiple entity keywords can be combined with regular expressions to generate a search formula, and then entity matching retrieval is performed through the search formula.
[0129] Among them, vector semantic retrieval refers to information retrieval that performs similarity calculation on summary vectors in a vector space formed by medical records stored in a database, so as to retrieve second medical record sample data with a high similarity to the summary vector.
[0130] The embodiment of the present invention combines the retrieval results of entity matching retrieval and vector semantic retrieval, comprehensively considers different levels of the disease summary data from multiple dimensions, and then screens out the target medical record sample data with the highest similarity to the medical record data, thereby further improving the reliability of the matched target sample data, thereby ensuring that the subsequently generated electronic medical records are not only accurate and relevant in content, but also in structure in accordance with the standards and requirements of medical record records, thereby improving the efficiency of electronic medical record generation.
[0131] Optional, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, after step S170, the method may further include:
[0132] Conduct content quality testing on electronic medical records to obtain test results, wherein the content quality verification includes at least one of sensitive word detection, model fabrication detection, and output effect detection; and adjust the electronic medical records based on the test results.
[0133] Among them, sensitive word detection is used to identify and filter out text containing sensitive words or inappropriate content to ensure the compliance and suitability of the content of the electronic medical record. The embodiment of the present invention can use a predefined sensitive word list (for example: knowledge graph), regular expression matching or machine learning model to identify and filter sensitive content in the electronic medical record. In the process of streaming generation of electronic medical records, the embodiment of the present invention can replace the sensitive words output by the electronic medical record or terminate the generation operation of the electronic medical record in advance.
[0134] Among them, model fabrication detection is used to detect and correct false or inaccurate information that may appear in electronic medical records, ensuring the authenticity and reliability of the content of electronic medical records. The embodiment of the present invention can perform model fabrication detection by comparing the content of the electronic medical record with a known fact database or using a special detection model. Model fabrication detection can be performed by two methods: word level and semantic level. Among them, word level detection is to perform real-time entity extraction on the generated medical record data, and then perform synonymy judgment on these entities with the entities in the original text to ensure the accuracy and consistency of the generated content. Semantic level detection is to perform sentence segmentation on the generated medical record data and convert it into a semantic vector, and then perform similarity calculation with the semantic vector of the original text to determine the semantic consistency of the generated content with the original text. The embodiment of the present invention can truncate certain fabricated information in the electronic medical record, that is, delete it, to ensure that the final generated medical record data is accurate and reliable. At the same time, in this application, the similarity calculation method can adopt the cosine similarity calculation method, and can also calculate the Euclidean distance between semantic vectors to calculate the similarity between vectors, etc.
[0135] Among them, the output effect detection is used to improve the quality of the generated text, including improving the fluency, coherence, grammatical correctness, and the degree to which the electronic medical record meets user needs and expectations. The embodiment of the present invention can optimize the electronic medical record by grammar checking, style improvement (for example, adding line breaks and spaces), and context consistency checking.
[0136] The embodiments of the present invention can promptly correct erroneous and inappropriate content in electronic medical records by performing content quality detection and adjustment on electronic medical records, ensure that the information in the electronic medical records is accurate and complies with industry standards and medical document specifications, thereby improving the reliability and quality of generated electronic medical records.
[0137] Optional, in the above Figure 1On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, before step S100, the method may further include:
[0138] Obtain at least one medical record training data; extract document chapter data of a specified medical record type from each medical record training data; perform source analysis on the document chapter training data based on the physician identification corresponding to the medical record training data to determine the chapter source data corresponding to the document chapter data; and construct a chapter source matching mapping based on the correspondence between the document chapter data and the chapter source data.
[0139] Among them, traceability analysis refers to the process of determining the specific source of each chapter in the document chapter data.
[0140] Specifically, the embodiment of the present invention can perform entity extraction and sentence segmentation on the document chapter training data during the source tracing analysis process. Then, the entity keywords, sentence fragments and all possible first chapter source data of the chapter are converted into vectors using a vector model, and then the possible second chapter source data of the chapter is preliminarily determined in each first chapter source data according to the entity matching retrieval and vector semantic retrieval methods. Finally, the doctor corresponding to the physician identification confirms the most accurate chapter source data of the chapter in each second chapter source data, thereby constructing a chapter source matching mapping.
[0141] The chapter source matching mapping constructed by traceability analysis in the embodiment of the present invention can ensure that the data of each document chapter has a clear and reliable source, which helps to quickly find the source data corresponding to each chapter in the document chapter data, thereby improving the accuracy and generation efficiency of electronic medical records.
[0142] Optional, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, the method may further include:
[0143] Generate chapter source summary training data for each chapter source data using the first language model; extract image inspection data from each medical record training data; generate image inspection summary training data for each image inspection data using the multimodal model; generate condition summary training data for the medical record training data using the chapter source summary training data and the image inspection summary training data; generate a training data set using each medical record training data and its corresponding condition summary training data; use the training data set to perform medical record generation training on the second language model to obtain a trained second language model.
[0144] In order to ensure that the source data of each chapter is as brief as possible, an embodiment of the present invention can use a large language model to summarize the chapter source data, especially to process multiple medical records of the same type of patients (for example: ward rounds records of senior doctors), to obtain chapter source summary training data, and use a multimodal model to summarize the image examination data involving image information to obtain image examination summary training data.
[0145] After generating a training data set, the embodiment of the present invention can perform entity extraction and sentence segmentation on each medical record training data and its corresponding condition summary training data in the training data set, and convert the results into vectors, which are stored in the database for subsequent query and retrieval. Each piece of data in the database corresponds to information such as an entity list, a semantic vector, and a physician identification. For example: for each discharge summary data in the database, its storage structure can be "discharge summary N, summary data N, chapter data N, entity list N, semantic vector N, department N, doctor identification N". Finally, the training data set is used to fine-tune the large language model, and finally a high-performance large language model that can generate the contents of each chapter of a specified medical record type is obtained.
[0146] Specifically, the embodiments of the present invention can batch-input each training data in the training data set into the large language model, calculate the loss function according to the model output and the true label of the large language model, and then use the back-propagation mechanism to update the model parameters of the large language model. After each training cycle, the validation data set can also be used to evaluate the model performance and adjust the hyperparameters and model structure of the large language model.
[0147] The embodiment of the present invention utilizes chapter source summary training data and image examination summary training data to generate condition summary training data, ensuring the diversity and comprehensiveness of the model training data, so that the trained large language model can shorten the chapter source data and integrate image information, thereby improving the accuracy of electronic medical record generation.
[0148] In this application, although operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.
[0149] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0150] Corresponding to the above method embodiment, the embodiment of the present invention also provides an electronic medical record generating device, whose structure is as follows: Figure 5As shown, it may include: a medical record data acquisition unit 10, a document chapter data extraction unit 11, a chapter source data acquisition unit 12, a chapter source summary data generation unit 13, a condition summary data generation unit 14, a target sample data acquisition unit 15, a model prompt generation unit 16 and an electronic medical record generation unit 17.
[0151] The medical record data obtaining unit 10 is used to obtain the medical record data of the target object.
[0152] The document chapter data extraction unit 11 is used to extract document chapter data of a specified medical record type from the medical record data.
[0153] The chapter source data obtaining unit 12 is used to obtain the chapter source data corresponding to the document chapter data by using the pre-built chapter source matching mapping.
[0154] The chapter source summary data generating unit 13 is used to generate chapter source summary data of the chapter source data by using the first language model.
[0155] The condition summary data generating unit 14 is used to generate condition summary data of the medical record data by using the chapter source summary data.
[0156] The target sample data obtaining unit 15 is used to obtain target sample data matching the medical record data using the medical condition summary data, wherein the target sample data includes target medical record sample data and its matching target medical condition summary sample data.
[0157] The model prompt generating unit 16 is used to generate model prompts using target medical record sample data, target condition summary sample data and condition summary data.
[0158] The electronic medical record generating unit 17 is used to input the model prompt into the second largest language model that has been pre-trained for medical record generation, so that the second largest language model generates the electronic medical record of the target object according to the model prompt.
[0159] Optionally, the electronic medical record generating device may further include: an image inspection data extracting unit and an image inspection summary data generating unit.
[0160] The image inspection data extraction unit is used to extract the image inspection data from the medical record data after the medical record data acquisition unit 10 acquires the medical record data of the target object.
[0161] The image inspection summary data generating unit is used to generate image inspection summary data of the image inspection data by using the multimodal model.
[0162] The condition summary data generating unit 14 can be specifically configured to generate condition summary data of the medical record data by using the chapter source summary data and the image examination summary data.
[0163] Optionally, the target sample data obtaining unit 15 may be specifically configured to obtain target sample data matching the medical record data by using the condition summary data from a plurality of medical record sample data matching the physician identification corresponding to the medical record data.
[0164] Optionally, the model prompt generation unit 16 can be specifically used to substitute the target medical record sample data, the target condition summary sample data and the condition summary data into a writing style prompt template that matches the physician identification to generate a model prompt, so that the second largest language model generates an electronic medical record containing the writing style of the specified physician based on the model prompt.
[0165] Optionally, the target sample data obtaining unit 15 may include: a first medical record sample data obtaining subunit, a second medical record sample data obtaining subunit, a target medical record sample data screening subunit and a target sample data obtaining subunit.
[0166] The first medical record sample data obtaining subunit is used to perform entity extraction processing on the condition summary data, obtain entity keywords of the condition summary data, perform entity matching retrieval based on the entity keywords, and obtain at least one first medical record sample data.
[0167] The second medical record sample data obtaining subunit is used to perform sentence segmentation on the medical condition summary data, obtain summary vectors of the medical condition summary data, perform vector semantic retrieval based on the summary vector, and obtain at least one second medical record sample data.
[0168] The target medical record sample data screening subunit is used to screen out the target medical record sample data having the highest similarity to the medical record data from each first medical record sample data and each second medical record sample data.
[0169] The target sample data acquisition subunit is used to obtain target sample data matching the medical record data based on the target medical record sample data and the target condition summary sample data matching it.
[0170] Optionally, the electronic medical record generating device may further include: a content quality detection unit and an electronic medical record adjustment unit.
[0171] The content quality detection unit is used for the electronic medical record generation unit 17 to input the model prompt into the second largest language model that has been pre-trained for medical record generation, so that the second largest language model generates the electronic medical record of the target object according to the model prompt, and then performs content quality detection on the electronic medical record to obtain the detection result, wherein the content quality verification includes at least one detection method of sensitive word detection, model fabrication detection and output effect detection.
[0172] The electronic medical record adjustment unit is used to adjust the electronic medical record based on the test results.
[0173] Optionally, the electronic medical record generating device may further include: a chapter source matching mapping construction unit.
[0174] The chapter source matching mapping construction unit is used to obtain at least one medical record training data before the medical record data obtaining unit 10 obtains the medical record data of the target object; extracts the document chapter data of the specified medical record type from each medical record training data; performs a traceability analysis on the document chapter training data based on the physician identification corresponding to the medical record training data to determine the chapter source data corresponding to the document chapter data; and constructs a chapter source matching mapping based on the correspondence between the document chapter data and the chapter source data.
[0175] Optionally, the electronic medical record generating device may further include: a large language model training unit.
[0176] The large language model training unit is used to generate chapter source summary training data of each chapter source data by using the first large language model; extract image inspection data from each medical record training data respectively; generate image inspection summary training data of each image inspection data by using the multimodal model; generate condition summary training data of the medical record training data by using the chapter source summary training data and the image inspection summary training data; generate a training data set by using each medical record training data and its corresponding condition summary training data; use the training data set to perform medical record generation training on the second large language model to obtain a trained second large language model.
[0177] The present invention provides an electronic medical record generation device, which is used to: obtain medical record data of a target object; extract document chapter data of a specified medical record type from the medical record data; obtain chapter source data corresponding to the document chapter data by using a pre-built chapter source matching mapping; generate chapter source summary data of the chapter source data by using a first large language model; generate disease summary data of the medical record data by using the chapter source summary data; obtain target sample data matching the medical record data by using the disease summary data, wherein the target sample data includes target medical record sample data and its matching target disease summary sample data; generate model prompts by using the target medical record sample data, the target disease summary sample data and the disease summary data; input the model prompts into the second large language model that has been pre-trained for medical record generation, so that the second large language model generates the electronic medical record of the target object according to the model prompts. The present invention generates high-quality electronic medical records by automatically extracting chapter sources, generating source summary and matching samples of medical record data, and combining the pre-trained large language model, thereby significantly improving the efficiency of generating electronic medical records, helping to reduce the workload of doctors, and improving the accuracy and consistency of medical record arrangement and writing.
[0178] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0179] The electronic medical record generating device includes a processor and a memory. The above-mentioned medical record data obtaining unit 10, document chapter data extraction unit 11, chapter source data obtaining unit 12, chapter source summary data generating unit 13, condition summary data generating unit 14, target sample data obtaining unit 15, model prompt generating unit 16 and electronic medical record generating unit 17 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0180] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set to automatically extract the medical record data of the target object by adjusting the kernel parameters, and use the pre-built chapter source matching mapping and large language model to generate chapter source summary data, and then combine the target medical record sample data and its matching target condition summary sample data to generate model prompts, and input the large language model to generate high-quality electronic medical records, thereby significantly improving the efficiency of electronic medical record generation, reducing the workload of doctors, and improving the accuracy and consistency of medical record organization and writing.
[0181] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the electronic medical record generating method is implemented.
[0182] An embodiment of the present invention provides a processor, which is used to run a program, wherein the electronic medical record generating method is executed when the program is run.
[0183] like Figure 6 As shown, an embodiment of the present invention provides an electronic device 1000, which includes at least one processor 1001, at least one memory 1002 connected to the processor 1001, and a bus 1003; wherein the processor 1001 and the memory 1002 communicate with each other through the bus 1003; the processor 1001 is used to call the program instructions in the memory 1002 to execute the above-mentioned electronic medical record generation method. The electronic device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0184] The present invention also provides a computer program product, which, when executed on an electronic device, is suitable for executing a program that initializes the steps of the electronic medical record generation method.
[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, electronic devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] In a typical configuration, an electronic device includes one or more processors (CPU), a memory, and a bus. The electronic device may also include an input / output interface, a network interface, and the like.
[0187] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0188] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage 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 temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0189] It should be noted that 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 the present invention 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 relevant laws, regulations and standards of relevant countries and regions.
[0190] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0191] In the description of the present invention, it should be understood that the terms "up", "down", "front", "back", "left" and "right" etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the positions or elements referred to must have specific directions, be constructed and operate in specific directions. Therefore, they should not be understood as limitations of the present invention.
[0192] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0193] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0194] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims
1. A method for generating an electronic medical record, characterized in that: include: Obtain medical records of the target subject; Extracting document chapter data of a specified medical record type from the medical record data; Using a pre-built chapter source matching mapping, obtain chapter source data corresponding to the document chapter data; Generate chapter source summary data of the chapter source data using the first language model; Generate condition summary data of the medical record data using the chapter source summary data; Using the medical condition summary data, obtaining target sample data that matches the medical record data, wherein the target sample data includes target medical record sample data and its matching target medical condition summary sample data; Generate a model prompt using the target medical record sample data, the target condition summary sample data and the condition summary data; The model prompt is input into a second language model that has been pre-trained for medical record generation, so that the second language model generates the electronic medical record of the target object according to the model prompt.
2. The method according to claim 1, characterized in that After obtaining the medical record data of the target object, the method further includes: extracting image examination data from the medical record data; generating image inspection summary data of the image inspection data using a multimodal model; The step of generating condition summary data by using the chapter source summary data includes: The condition summary data of the medical record data is generated by using the chapter source summary data and the image examination summary data.
3. The method according to claim 1 or 2, characterized in that: The step of using the condition summary data to obtain target sample data that matches the medical record data includes: Among a plurality of medical record sample data that match the physician identification corresponding to the medical record data, the target sample data that matches the medical record data is obtained by using the condition summary data.
4. The method according to claim 3, characterized in that The step of generating a model prompt by using the target medical record sample data, the target condition summary sample data and the condition summary data includes: The target medical record sample data, the target condition summary sample data and the condition summary data are substituted into a writing style prompt template that matches the physician identifier to generate a model prompt, so that the second largest language model generates the electronic medical record containing the writing style of the designated physician based on the model prompt.
5. The method according to claim 3, characterized in that: The step of using the condition summary data to obtain target sample data that matches the medical record data includes: Performing entity extraction processing on the medical condition summary data to obtain entity keywords of the medical condition summary data, performing entity matching retrieval based on the entity keywords to obtain at least one first medical record sample data; Segment the medical condition summary data to obtain a summary vector of the medical condition summary data, and perform vector semantic retrieval based on the summary vector to obtain at least one second medical record sample data; Filtering out the target medical record sample data having the highest similarity to the medical record data from each of the first medical record sample data and each of the second medical record sample data; According to the target medical record sample data and the target condition summary sample data matched therewith, target sample data matching the medical record data is obtained.
6. The method according to claim 1, characterized in that After inputting the model prompt into a second language model that has been pre-trained for medical record generation so that the second language model generates the electronic medical record of the target object according to the model prompt, the method further includes: Performing content quality detection on the electronic medical record to obtain a detection result, wherein the content quality verification includes at least one detection method selected from the group consisting of sensitive word detection, model fabrication detection, and output effect detection; Based on the test results, the electronic medical record is adjusted.
7. The method according to claim 1, characterized in that Before obtaining the medical record data of the target object, the method further includes: obtaining at least one medical record training data; Extracting the document chapter data of the specified medical record type from each of the medical record training data respectively; According to the physician identification corresponding to the medical record training data, the document chapter training data is traced back and analyzed to determine the chapter source data corresponding to the document chapter data; The chapter source matching mapping is constructed based on the corresponding relationship between the document chapter data and the chapter source data.
8. The method according to claim 7, characterized in that Also includes: Generate chapter source summary training data of each of the chapter source data using the first language model; extracting the image inspection data from each of the medical record training data respectively; generating image inspection summary training data for each of the image inspection data using the multimodal model; Generate condition summary training data of the medical record training data by using the chapter source summary training data and the image examination summary training data; Generate a training data set using each of the medical record training data and the corresponding condition summary training data; The second largest language model is trained for medical record generation using the training data set to obtain a trained second largest language model.
9. An electronic medical record generating device, characterized in that: include: A medical record data acquisition unit, a document chapter data extraction unit, a chapter source data acquisition unit, a chapter source summary data generation unit, a condition summary data generation unit, a target sample data acquisition unit, a model prompt generation unit, and an electronic medical record generation unit; The medical record data obtaining unit is used to obtain the medical record data of the target object; The document chapter data extraction unit is used to extract document chapter data of a specified medical record type from the medical record data; The chapter source data obtaining unit is used to obtain the chapter source data corresponding to the document chapter data by using a pre-built chapter source matching mapping; The chapter source summary data generating unit is used to generate chapter source summary data of the chapter source data by using the first language model; The condition summary data generating unit is used to generate the condition summary data of the medical record data by using the chapter source summary data; The target sample data obtaining unit is used to obtain target sample data matching the medical record data by using the medical condition summary data, wherein the target sample data includes target medical record sample data and its matching target medical condition summary sample data; The model prompt generating unit is used to generate a model prompt using the target medical record sample data, the target condition summary sample data and the condition summary data; The electronic medical record generation unit is used to input the model prompt into a second language model that has been pre-trained for medical record generation, so that the second language model generates the electronic medical record of the target object according to the model prompt.
10. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the electronic medical record generation method as described in any one of claims 1 to 8.
Citation Information
Cited By
Personalized medical document oriented large language model agent construction method and system
CN121096508A
A medical voice broadcast case summary generation and illusion suppression method and system
CN122889222A