Outpatient medical record generation method and device, electronic equipment and storage medium
By collecting and processing audio data of outpatient doctors’ conversations with patients, using medical records to generate large language models to generate outpatient medical records with normative symptom description text, the problems of incomplete and inaccurate medical records are solved, and the quality and efficiency of medical records are improved.
Patent Information
- Application Number
- CN202510060187.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-13
AI Technical Summary
The outpatient medical records are incomplete, inaccurate, oversimplified content, and high replication rates, resulting in misdiagnosis, missed diagnosis and delayed condition in patients.
By collecting audio data of dialogue between outpatient doctors and patients, performing text conversion processing, the trained medical records are called to generate a large language model, and an outpatient medical record with normative symptom description text is generated.
It reduces the pressure on doctors by writing outpatient medical records, improves the integrity, accuracy and standardization of medical records, and thus improves the quality and efficiency of generating outpatient medical records.
Smart Images

Figure CN119990069A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical assistance technology, and in particular to a method, device, electronic equipment and storage medium for generating outpatient medical records. Background Art
[0002] With the promotion of electronic health records (EHR) and the widespread use of electronic medical record systems in medical institutions. Compared with traditional paper health records, digital information has many advantages, which is reflected in the fact that doctors can more conveniently obtain patients' medical records, update patients' conditions, store patients' prescriptions and medical imaging reports, and simplify billing management. However, in the actual application process, facing a large number of outpatients, the large amount of outpatient medical record writing work related to it also brings a lot of pressure to doctors, which may lead to a decrease in the quality of interaction with patients, shorten the consultation time, and also lead to incomplete and inaccurate medical records, over-simplified content, high duplication rate, etc., which may cause misdiagnosis, missed diagnosis and delayed treatment of patients.
[0003] Therefore, there is an urgent need for a new method that can reduce the pressure on outpatient doctors to write medical records and at the same time improve the completeness, accuracy and standardization of medical records. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for generating outpatient medical records, so as to solve the technical problems of incomplete, inaccurate, overly simplified content and high duplication rate of outpatient medical records.
[0005] In a first aspect, an embodiment of the present invention provides a method for generating an outpatient medical record, comprising:
[0006] Collect target audio data of conversations between doctors and target patients in outpatient clinics;
[0007] Performing text conversion processing on the target audio data to obtain corresponding target text data;
[0008] The trained medical record generation large language model is called to generate and process the target text data to obtain a target outpatient medical record, wherein the target outpatient medical record includes text data that describes the symptoms of the disease using a standardized symptom description text.
[0009] In some embodiments, before the step of calling the trained medical record generation large language model and performing generation processing on the target text data to obtain the target outpatient medical record, the method further includes:
[0010] Constructing a training data set, wherein the training data set includes a plurality of training data pairs, each of which is a historical text data of a different outpatient doctor-patient conversation and a corresponding historical outpatient medical record, wherein the text data in the historical outpatient medical record is text data written using a standardized symptom description text;
[0011] According to the training data set, the large language model to be trained is trained until convergence, and a large language model for generating medical records for generating outpatient medical records containing normative symptom description texts is obtained.
[0012] In some embodiments, the step of constructing a training data set includes:
[0013] Acquire historical audio data of different outpatient doctor-patient conversations collected in advance by audio collection equipment;
[0014] Performing text conversion processing on the historical audio data to obtain corresponding historical text data;
[0015] Determining the patient's historical outpatient medical records based on the patient's identity information in the historical text data;
[0016] The historical text data and historical outpatient medical records of each patient are taken as a training data pair to construct a training dataset.
[0017] In some embodiments, before the step of training the large language model to be trained according to the training data set until convergence to obtain a large language model for generating medical records for generating outpatient medical records containing normative symptom description texts, the method further includes:
[0018] According to a plurality of preset main complaint symptom types, an initial large language model for identifying the main complaint symptom types is constructed, and the initial large language model is used as the large language model to be trained.
[0019] In some embodiments, the step of training the large language model to be trained until convergence according to the training data set to obtain a large language model for generating medical records for generating outpatient medical records containing standardized symptom description texts includes:
[0020] Determine the main complaint symptom type corresponding to each training data pair in the training data set;
[0021] Based on the chief complaint symptom type, the text data in each group of the training data pairs are annotated to obtain a fine-tuning data set, wherein each group of adjustment data pairs in the fine-tuning data set is the historical text data annotated with marks describing the symptoms of the disease under different consultation angles and the corresponding historical outpatient medical records;
[0022] The fine-tuning data set is used to train the large language model to be trained until convergence, thereby obtaining a large language model for generating medical records for outpatient medical records containing normative symptom description texts.
[0023] In some embodiments, the step of annotating the text data in each set of the training data pairs based on the main complaint symptom type to obtain a fine-tuning data set includes:
[0024] Based on the type of symptoms complained, determine the corresponding standardized medical record template;
[0025] According to the standardized medical record template, the text data belonging to different inquiry angles in each group of the training data pairs are paired and marked to obtain a fine-tuning data set.
[0026] In some embodiments, before the step of determining a corresponding standardized medical record template based on the main complaint symptom type, the method further includes:
[0027] Based on the prior knowledge of multiple disease symptoms, determine the main symptom type of each disease symptom and the corresponding questioning angle of each main symptom type, the questioning angle includes the main symptom, current medical history, past medical history and other medical history, allergy history, and the questioning angle of auxiliary examination;
[0028] According to the chief symptom type of each disease symptom and the corresponding consultation angle, a standardized medical record template for each chief symptom type is constructed.
[0029] In a second aspect, an embodiment of the present invention provides an outpatient medical record generating device, comprising:
[0030] A collection module, used to collect target audio data of conversations between doctors and target patients in outpatient clinics;
[0031] A conversion module, used to perform text conversion processing on the target audio data to obtain corresponding target text data;
[0032] The generation module is used to call the trained medical record generation large language model to generate the target text data to obtain the target outpatient medical record, which includes text data that uses standardized symptom description text to describe the symptoms of the disease.
[0033] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned outpatient medical record generation methods when executing the computer program.
[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above-mentioned outpatient medical record generation methods are implemented.
[0035] The embodiment of the present invention provides an outpatient medical record generation method, device, electronic device and storage medium. The method can automatically generate an outpatient medical record containing standardized symptom description text to describe the symptoms of the disease by inputting text data of outpatient doctor-patient conversations into a trained large language model for medical record generation. This method can not only reduce the pressure on doctors caused by outpatient medical record writing work, but also improve the completeness, accuracy and standardization of medical record records, thereby improving the quality and efficiency of generating outpatient medical records. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of a method for generating outpatient medical records provided by an embodiment of the present invention;
[0037] Figure 2 It is a flow chart of a training method for generating a large language model from medical records provided by an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of a labeling process provided by an embodiment of the present invention;
[0039] Figure 4 It is a structural schematic diagram of a standardized medical record template for abdominal pain, provided by an embodiment of the present invention;
[0040] Figure 5 It is a structural schematic diagram of an outpatient medical record generating device provided by an embodiment of the present invention;
[0041] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present invention;
[0042] Figure 7 This is another structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] It should be understood that the various steps described in the method embodiments of the present disclosure 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 disclosure is not limited in this respect.
[0045] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0046] In related technologies, with the promotion of electronic health records (EHR) and the widespread use of electronic medical record systems in medical institutions. Compared with traditional paper health records, digital information has many advantages, which is reflected in the fact that doctors can more conveniently obtain patients' medical records, update patients' conditions, store patients' prescriptions and medical imaging reports, and simplify billing management. However, in actual application, facing a large number of outpatients, the large amount of outpatient medical record writing work related to it also brings a lot of pressure to doctors, which may lead to a decrease in the quality of interaction with patients, shorten the consultation time, and also lead to incomplete and inaccurate medical records, overly simplified content, high duplication rate, etc., which may cause misdiagnosis, missed diagnosis and delayed treatment of patients.
[0047] Therefore, there is an urgent need for a new method that can reduce the pressure on outpatient doctors to write medical records and at the same time improve the completeness, accuracy and standardization of medical records.
[0048] In order to solve the technical problems existing in the related art, the embodiment of the present invention provides a method for generating outpatient medical records. Figure 1 , Figure 1 1 is a flow chart of a method for generating outpatient medical records provided by an embodiment of the present invention, the method comprising steps 101 to 103;
[0049] Step 101 , collecting target audio data of a conversation between a doctor and a target patient in an outpatient clinic.
[0050] In this embodiment, an audio acquisition device can be installed in the outpatient clinic in advance, and when the doctor is consulting the target patient, the target audio data of the conversation between the doctor and the target patient can be collected through the audio acquisition device. Specifically, the outpatient clinic in this embodiment can be an outpatient clinic of any department, and the target patient can be a patient with any disease symptom, which is not specifically limited here.
[0051] Step 102: Perform text conversion on the target audio data to obtain corresponding target text data.
[0052] In this embodiment, the target audio data can be converted into text and the privacy information can be removed by using a pre-debugged audio conversion device to obtain target text data without privacy information. The privacy information may include the patient's name, home address, contact number, medical number and other personal privacy information. The privacy information removal process may include deletion, replacement with specified information and other processing methods, as long as the patient's real privacy information can be avoided, and no specific limitation is made here.
[0053] Step 103, calling the trained medical record generation large language model, generating and processing the target text data to obtain a target outpatient medical record, wherein the target outpatient medical record includes text data that describes the symptoms of the disease using a standardized symptom description text.
[0054] Among them, the trained medical record generation large language model provided in this embodiment is pre-trained, and can process the text data of doctor-patient conversations and generate corresponding standardized and normative outpatient medical records, which can not only effectively reduce the pressure on doctors caused by outpatient medical record writing work, but also improve the completeness, accuracy and standardization of medical record records, thereby improving the quality and efficiency of generating outpatient medical records.
[0055] Specifically, Large Language Models (LLMs) have been widely used in the field of medical documents mainly due to their powerful natural language processing capabilities. Large language models can generate appropriate feedback for complex interactions based on the context. In addition, they can quickly analyze and generate reports, which helps doctors improve their work efficiency. In addition to simple text analysis, they can also assist in diagnosis and differential diagnosis and provide personalized treatment recommendations. In addition, fine-tuning can be used to further train the model using new data sets suitable for specific target tasks to improve the model's applicability to new vertical target tasks, thereby enhancing domain adaptability, improving task-specific performance, and improving data utilization without having to train a new model from scratch.
[0056] In this embodiment, the large language models built or fine-tuned using clinical texts may include ClinicalBERT, Med-PaLM 2, and GatorTron, etc. These large language models generally perform better than various general large models in biomedical natural language processing tasks, and fine-tuning for specific tasks under the guidance of experts can improve the accuracy and safety of the output.
[0057] Therefore, by using the large language model for medical record generation provided in the embodiment of the present invention, it is possible to automatically generate outpatient medical records based on the doctor-patient conversation text. The outpatient medical records are those that describe the symptoms of the disease using standardized symptom description texts. This can save a lot of time for outpatient doctors to write outpatient medical records and reduce the consultation pressure on outpatient doctors.
[0058] At the same time, since the large language model for generating medical records provided in this embodiment can also assist in diagnosis and differential diagnosis and provide personalized treatment recommendations, when training the large language model for generating medical records in this embodiment, labeled data containing treatment recommendations can be used to train or fine-tune the large language model for generating medical records. This enables the large language model for generating medical records provided in this embodiment to not only automatically generate structured medical records containing standardized descriptions of disease symptoms when processing text data of doctor-patient conversations, but also to generate treatment recommendation text corresponding to the target patient in the medical record, thereby effectively improving the efficiency of outpatient diagnosis and treatment.
[0059] In some embodiments, in order to obtain a trained large language model for medical records, the embodiment of the present invention further provides a method for training a large language model for medical records before the step of calling the trained large language model for medical records, generating and processing the target text data, and obtaining the target outpatient medical records. Figure 2 As shown, Figure 2 It is a flowchart of a training method for generating a large language model from medical records provided by an embodiment of the present invention, including steps 201 to 202;
[0060] Among them, step 201 is to construct a training data set, which includes multiple groups of training data pairs, each group of the training data pairs is historical text data of different outpatient doctor-patient conversations and corresponding historical outpatient medical records, and the text data in the historical outpatient medical records are text data written using standardized symptom description texts.
[0061] In this embodiment, the historical text data are all text data obtained by audio conversion processing of the audio data of the historical doctor-patient conversation stored in the audio acquisition device through an audio conversion device; the historical outpatient medical records can be structured outpatient electronic health records corresponding to the patients obtained through the hospital's electronic medical record information system. It should be noted that the text data in the historical outpatient medical records are text data written in a standardized symptom description text, and also need to be processed to remove privacy information to avoid leakage of the patient's privacy information.
[0062] Therefore, the steps for constructing a training data set provided in this embodiment may specifically be: obtaining historical audio data of different outpatient doctor-patient conversations collected in advance by an audio collection device; performing text conversion processing on the historical audio data to obtain corresponding historical text data; determining the patient's historical outpatient medical record based on the patient's identity information in the historical text data; and taking each patient's historical text data and historical outpatient medical record as a training data pair to construct a training data set.
[0063] Step 202: According to the training data set, the large language model to be trained is trained until convergence, so as to obtain a large language model for generating medical records for outpatient medical records containing standardized symptom description texts.
[0064] Among them, the large language model to be trained provided in this embodiment can be a large language model such as ClinicalBERT, Med-PaLM 2 and GatorTron. As long as it can perform the medical record generation task in the biomedical natural language processing task, there is no specific limitation here.
[0065] In one case, the method of training the large language model to be trained until convergence can be that the number of training times reaches a preset number of training times, that is: inputting the historical text data in the training data set into the large language model to be trained for generation processing to obtain a generation result; using a preset loss function, calculating the loss value of the historical outpatient medical records corresponding to the historical text data relative to the generation result, and fine-tuning the model parameters of the large language model to be trained according to the loss value; continuously using the training data set to train the large language model to be trained and fine-tuning the model parameters until the calculated training times reaches a preset number of training times, such as 50,000 times or 100,000 times, it can be determined that the large language model converges.
[0066] In another case, the large language model to be trained can be trained until convergence, and the accuracy of the generated result can reach a preset accuracy threshold, that is: the historical text data in the training data set is input into the large language model to be trained for generation processing to obtain a generation result; a preset loss function is used to calculate the loss value of the historical outpatient medical records corresponding to the historical text data relative to the generated result, and the model parameters of the large language model to be trained are fine-tuned according to the loss value; the training data set is continuously used to train the large language model to be trained and the model parameters are fine-tuned until the accuracy of the generated result of the large language model to be trained reaches a preset accuracy threshold, such as 95% or 98%, and then it can be determined that the large language model has converged.
[0067] Only two methods of model convergence methods are described above. Other methods of determining model convergence may also be used, which are not specifically limited here.
[0068] After the large language model to be trained is trained using the training data set provided in this embodiment until convergence, a large language model for generating medical records containing normative symptom description texts can be obtained. By using the trained large language model for generating medical records, corresponding outpatient medical records can be automatically generated based on the doctor-patient conversation text, thereby improving the quality and efficiency of generating outpatient medical records.
[0069] In some embodiments, in order to improve the recognition accuracy of the final large language model for medical record generation, the large language model to be trained provided in this embodiment can adopt a pre-trained large language model that can identify the patient's main complaint symptom type based on the text data of the doctor-patient conversation. Specifically, before the step of training the large language model to be trained according to the training data set until convergence to obtain a large language model for generating medical records containing normative symptom description texts for outpatient medical records, the outpatient medical record generation method provided in this embodiment can also include: constructing an initial large language model for identifying the main complaint symptom type based on a plurality of preset main complaint symptom types, and using the initial large language model as the large language model to be trained.
[0070] Among them, this embodiment can pre-classify the historical text data in the training data set to obtain the symptom classification label corresponding to each historical text data; then use the historical text data and the corresponding symptom classification label to train the initial large language model, so that the initial large language model has the ability to recognize the symptom category of the text data of the doctor-patient conversation, and use the trained initial large language model as the large language model to be trained for subsequent specific task training, thereby improving the generation efficiency and generation accuracy of the medical record generation large language model finally obtained after specific task training (medical record generation training).
[0071] In other embodiments, in order to enable the final large language model for medical record generation to output structured outpatient medical records, this embodiment can pre-construct medical record structures for different types of main complaint symptoms, and adjust the training data set, and then use the adjusted training data set to train the large language model to be trained, so that it can output structured outpatient medical records. Specifically, the steps provided in this embodiment of training the large language model to be trained according to the training data set until convergence to obtain a large language model for medical record generation for generating outpatient medical records containing standardized symptom description texts can include: determining the main complaint symptom type corresponding to each group of training data pairs in the training data set; based on the main complaint symptom type, annotating the text data in each group of the training data pairs to obtain a fine-tuning data set, each group of adjustment data pairs in the fine-tuning data set is the historical text data and the corresponding historical outpatient medical records annotated with the description of the disease symptoms under different consultation angles; using the fine-tuning data set to train the large language model to be trained until convergence, to obtain a large language model for medical record generation for generating outpatient medical records containing standardized symptom description texts.
[0072] Among them, this embodiment can pre-set the corresponding medical record structure for diseases of different main complaint symptom types. Specifically, the historical text data in the training data set and the text in the historical medical record can be entity labeled to classify and label the text data in the training data set according to the different consultation angles of the doctor, so as to guide the training process of the model so that it can generate a structured medical record with the same structure as the annotation structure. The specific annotation process is as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of the annotation process provided by the embodiment of the present invention. In this way, the final large language model for medical record generation can output structured outpatient medical records, thereby improving the standardization, completeness and accuracy of the generated outpatient medical records, and further improving the efficiency of diagnosis and treatment.
[0073] As an optional embodiment, this embodiment can also set corresponding standardized medical record templates for diseases with different chief complaint symptom types. The standardized medical record templates are pre-set with annotation areas of corresponding structures, and then the standardized medical record templates corresponding to the chief complaint symptom types are used to annotate the text data in each set of training data pairs. Specifically, based on international guidelines and expert consensus, standardized medical record templates based on different chief complaint symptom types for multiple departments and multiple symptoms can be constructed, and each template has annotations corresponding to different consultation angles. Taking gastroenterology diseases as an example, 8 sets of templates can be constructed for the chief complaint symptom types of abdominal pain, nausea and vomiting, diarrhea, constipation, jaundice, dysphagia, hematemesis, and bloody stools. Among them, the consultation angle structure in the standardized medical record template for abdominal pain can be as follows: Figure 4 As shown, Figure 4It is a structural diagram of a standardized medical record template for abdominal pain, provided by an embodiment of the present invention. Therefore, the step of labeling the text data in each group of the training data pairs based on the main complaint symptom type to obtain a fine-tuning data set provided in this embodiment may include: determining the corresponding standardized medical record template based on the main complaint symptom type; pairing and marking the text data belonging to different consultation angles in each group of the training data pairs according to the standardized medical record template to obtain a fine-tuning data set.
[0074] Specifically, this embodiment can be based on the inquiry angle in the standardized medical record template, for example Figure 4 The main questions in the questioning are "chief complaint", "current medical history", "past medical history and other medical history", "auxiliary examinations", etc. Figure 3 The training data pairs shown are paired and labeled to obtain the adjusted fine-tuning dataset.
[0075] In this embodiment, in order to determine the inquiry angle in the standardized medical record template corresponding to each chief complaint symptom type, before the step of determining the corresponding standardized medical record template based on the chief complaint symptom type, the outpatient medical record generation method provided in this embodiment may also include: based on the prior knowledge of multiple disease symptoms, determining the chief complaint symptom type of each disease symptom and the inquiry angle corresponding to each chief complaint symptom type, the inquiry angle including the chief complaint symptom, current medical history, past medical history and other medical history, allergy history, and auxiliary examination inquiry angle; constructing a standardized medical record template for each chief complaint symptom type according to the chief complaint symptom type of each disease symptom and the corresponding inquiry angle.
[0076] In this way, by using a fine-tuning dataset that has been labeled by pairing with standardized medical record templates, the large language model to be trained is trained until convergence. The trained large language model can accurately extract key information entities in the doctor-patient dialogue text data and determine the corresponding chief complaint symptom type, thereby automatically selecting a standardized template that matches the chief complaint symptom type for generation processing, and ultimately achieving the purpose of generating a structured outpatient medical record containing standardized symptom description text, further improving the standardization, completeness and accuracy of the generated outpatient medical records, thereby improving the generation efficiency and accuracy of the large language model for medical record generation, and effectively improving the subsequent diagnosis and treatment efficiency.
[0077] In summary, the embodiment of the present invention provides a method for generating outpatient medical records, which includes collecting target audio data of a conversation between a doctor and a target patient in an outpatient clinic, performing text conversion processing on the target audio data to obtain corresponding target text data, calling a trained large language model for generating medical records, performing generation processing on the target text data, and obtaining a target outpatient medical record, wherein the target outpatient medical record includes text data that describes the symptoms of the disease using a standardized symptom description text. The embodiment of the present invention can not only reduce the pressure on doctors caused by the writing of outpatient medical records, but also improve the completeness, accuracy and standardization of medical records, thereby improving the quality and efficiency of generating outpatient medical records.
[0078] According to the method described in the above embodiment, this embodiment will be further described from the perspective of an outpatient medical record generating device. The outpatient medical record generating device can be implemented as an independent entity or integrated into an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, etc.
[0079] See also Figure 5 , Figure 5 is a structural schematic diagram of an outpatient medical record generating device provided by an embodiment of the present invention, such as Figure 5 As shown, the outpatient medical record generating device 500 provided in the embodiment of the present invention includes: a collection module 501, a conversion module 502 and a generating module 503;
[0080] Among them, the collection module 501 is used to collect target audio data of the conversation between the doctor and the target patient in the outpatient clinic.
[0081] The conversion module 502 is used to perform text conversion processing on the target audio data to obtain corresponding target text data.
[0082] The generation module 503 is used to call the trained medical record generation large language model to generate the target text data to obtain the target outpatient medical record, which includes text data that uses standardized symptom description text to describe the symptoms of the disease.
[0083] In an embodiment of the present invention, the outpatient medical record generating device 500 provided in this embodiment may further include a training module, wherein the training module is used to construct a training data set, wherein the training data set includes multiple groups of training data pairs, each group of the training data pairs is historical text data of different outpatient doctor-patient conversations and corresponding historical outpatient medical records, and the text data in the historical outpatient medical records is text data written using normative symptom description texts; according to the training data set, the large language model to be trained is trained until convergence, and a medical record generation large language model for generating outpatient medical records containing normative symptom description texts is obtained.
[0084] In some embodiments, the training module provided in this embodiment can also be used to: obtain historical audio data of different outpatient doctor-patient conversations collected in advance by audio collection equipment; perform text conversion processing on the historical audio data to obtain corresponding historical text data; determine the patient's historical outpatient medical record based on the patient's identity information in the historical text data; and use each patient's historical text data and historical outpatient medical record as a training data pair to construct a training data set.
[0085] In other embodiments, the training module provided in this embodiment can also be used to: construct an initial large language model for identifying the main complaint symptom type according to multiple preset main complaint symptom types, and use the initial large language model as the large language model to be trained.
[0086] As an optional embodiment, the training module provided in this embodiment can also be used to: determine the chief complaint symptom type corresponding to each group of training data pairs in the training data set; based on the chief complaint symptom type, annotate the text data in each group of the training data pairs to obtain a fine-tuning data set, each group of adjustment data pairs in the fine-tuning data set is the historical text data marked with marks describing the symptoms of the disease under different consultation angles and the corresponding historical outpatient medical records; use the fine-tuning data set to train the large language model to be trained until convergence, and obtain a medical record generation large language model for generating outpatient medical records containing normative symptom description texts.
[0087] Specifically, the training module provided in this embodiment can also be used to: determine the corresponding standardized medical record template based on the main complaint symptom type; according to the standardized medical record template, pair and mark the text data belonging to different consultation angles in each group of the training data to obtain a fine-tuning data set.
[0088] In addition, the training module provided in this embodiment can also be used for: based on the prior knowledge of multiple disease symptoms, determining the chief symptom type of each disease symptom and the corresponding consultation angle of each chief symptom type, the consultation angle includes the chief symptom, current medical history, past medical history and other medical history, allergy history, and auxiliary examination consultation angle; constructing a standardized medical record template for each chief symptom type according to the chief symptom type of each disease symptom and the corresponding consultation angle.
[0089] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.
[0090] Also, see Figure 6 , Figure 6 1 is a schematic diagram of a structure of an electronic device provided by an embodiment of the present invention, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.
[0091] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 600 and processes data by running or loading applications stored in the memory 602 and calling data stored in the memory 602, thereby monitoring the electronic device 600 as a whole.
[0092] In this embodiment, the processor 601 in the electronic device 600 will load the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 will run the application stored in the memory 602, thereby implementing any step in the outpatient medical record generation method provided in the above embodiment.
[0093] The electronic device 600 can implement the steps in any embodiment of the outpatient medical record generation method provided in the embodiments of the present invention, and therefore can achieve the beneficial effects that can be achieved by any outpatient medical record generation method provided in the embodiments of the present invention. Please refer to the previous embodiments for details and will not be repeated here.
[0094] See also Figure 7 , Figure 7 is another structural schematic diagram of an electronic device provided by an embodiment of the present invention, such as Figure 7 As shown, Figure 7 The electronic device 700 is a mobile terminal such as a smart phone or a laptop computer.
[0095] The RF circuit 710 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.
[0096] The memory 720 can be used to store software programs and modules, such as the program instructions / modules corresponding to the outpatient medical record generation method in the above-mentioned embodiment. The processor 780 executes various functional applications and generates outpatient medical records by running the software programs and modules stored in the memory 720.
[0097] The memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 720 may further include a memory remotely arranged relative to the processor 780, and these remote memories may be connected to the electronic device 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0098] The input unit 730 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen or touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 731), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 731 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0099] The display unit 740 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 700, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 740 may include a display panel 741, and optionally, the display panel 741 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 731 may cover the display panel 741, and when the touch-sensitive surface 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of the touch event. Although in the figure, the touch-sensitive surface 731 and the display panel 741 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 731 and the display panel 741 can be integrated to implement input and output functions.
[0100] The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 700, they will not be repeated here.
[0101] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the electronic device 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another terminal through the RF circuit 710, or the audio data is output to the memory 720 for further processing. The audio circuit 760 may also include an earplug jack to provide communication between an external headset and the electronic device 700.
[0102] The electronic device 700 can help the user receive requests, send information, etc. through the transmission module 770 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 770 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 700 and can be omitted as needed without changing the essence of the invention.
[0103] The processor 780 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the electronic device 700 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 780.
[0104] The electronic device 700 also includes a power supply 790 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 790 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0105] Although not shown, the electronic device 700 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step in the outpatient medical record generation method provided in the above embodiment.
[0106] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0107] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores a plurality of instructions, and when the instructions are executed by the processor, any step in the outpatient medical record generation method provided in the above embodiments can be implemented.
[0108] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0109] Since the instructions stored in the storage medium can execute the steps in any embodiment of the outpatient medical record generation method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any outpatient medical record generation method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0110] The above is a detailed introduction to an outpatient medical record generation method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. Moreover, for those of ordinary skill in the art, without departing from the principles of the present invention, several improvements and modifications can be made, and these improvements and modifications are also regarded as the protection scope of the present invention.
Claims
1. A method for generating outpatient medical records, characterized in that: include: Collect target audio data of conversations between doctors and target patients in outpatient clinics; Performing text conversion processing on the target audio data to obtain corresponding target text data; The trained medical record generation large language model is called to generate and process the target text data to obtain a target outpatient medical record, wherein the target outpatient medical record includes text data that describes the symptoms of the disease using a standardized symptom description text.
2. The outpatient medical record generation method according to claim 1, characterized in that: Before the step of calling the trained medical record generation large language model and performing generation processing on the target text data to obtain the target outpatient medical record, the method further includes: Constructing a training data set, wherein the training data set includes a plurality of training data pairs, each of which is a historical text data of a different outpatient doctor-patient conversation and a corresponding historical outpatient medical record, wherein the text data in the historical outpatient medical record is text data written using a standardized symptom description text; According to the training data set, the large language model to be trained is trained until convergence, and a large language model for generating medical records for generating outpatient medical records containing normative symptom description texts is obtained.
3. The outpatient medical record generation method according to claim 2, characterized in that: The step of constructing a training data set includes: Acquire historical audio data of different outpatient doctor-patient conversations collected in advance by audio collection equipment; Performing text conversion processing on the historical audio data to obtain corresponding historical text data; Determining the patient's historical outpatient medical records based on the patient's identity information in the historical text data; The historical text data and historical outpatient medical records of each patient are taken as a training data pair to construct a training dataset.
4. The outpatient medical record generation method according to claim 2, characterized in that: Before the step of training the large language model to be trained according to the training data set until convergence to obtain a large language model for generating medical records for generating outpatient medical records containing standardized symptom description texts, the method further includes: According to a plurality of preset main complaint symptom types, an initial large language model for identifying the main complaint symptom types is constructed, and the initial large language model is used as the large language model to be trained.
5. The outpatient medical record generation method according to claim 2, characterized in that: The step of training the large language model to be trained until convergence according to the training data set to obtain a large language model for generating medical records for outpatient medical records containing standardized symptom description texts comprises: Determine the main complaint symptom type corresponding to each training data pair in the training data set; Based on the chief complaint symptom type, the text data in each group of the training data pairs are annotated to obtain a fine-tuning data set, wherein each group of adjustment data pairs in the fine-tuning data set is the historical text data annotated with marks describing the symptoms of the disease under different consultation angles and the corresponding historical outpatient medical records; The fine-tuning data set is used to train the large language model to be trained until convergence, thereby obtaining a large language model for generating medical records for outpatient medical records containing normative symptom description texts.
6. The outpatient medical record generation method according to claim 5, characterized in that: The step of labeling the text data in each set of the training data pairs based on the main complaint symptom type to obtain a fine-tuning data set includes: Based on the type of symptoms complained, determine the corresponding standardized medical record template; According to the standardized medical record template, the text data belonging to different inquiry angles in each group of the training data pairs are paired and marked to obtain a fine-tuning data set.
7. The outpatient medical record generation method according to claim 6, characterized in that: Before the step of determining a corresponding standardized medical record template based on the main complaint symptom type, the method further includes: Based on the prior knowledge of multiple disease symptoms, determine the main symptom type of each disease symptom and the corresponding questioning angle of each main symptom type, the questioning angle includes the main symptom, current medical history, past medical history and other medical history, allergy history, and the questioning angle of auxiliary examination; According to the chief symptom type of each disease symptom and the corresponding consultation angle, a standardized medical record template for each chief symptom type is constructed.
8. An outpatient medical record generating device, characterized in that: include: A collection module, used to collect target audio data of conversations between doctors and target patients in outpatient clinics; A conversion module, used to perform text conversion processing on the target audio data to obtain corresponding target text data; The generation module is used to call the trained medical record generation large language model to generate the target text data to obtain the target outpatient medical record, which includes text data that uses standardized symptom description text to describe the symptoms of the disease.
9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Quality evaluation method for model generated medical record and storage medium
CN122417264A