Automatic follow-up visit method and equipment for discharged patients
By adopting a large language model LLM in the intelligent follow-up system, personalized follow-up problems are generated and intention recognition and correlation judgment are made, the problem that the existing system cannot achieve personalized customization is solved, and more efficient and accurate follow-up services are achieved, which promotes the patient's rehabilitation process.
Patent Information
- Application Number
- CN202510082566.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-16
AI Technical Summary
The existing intelligent follow-up system cannot achieve personalized customization, and cannot deeply explore and adapt to each patient's unique physical fitness, medical history and rehabilitation needs, resulting in the inability to achieve true personalized customization.
A large language model LLM is adopted to automatically generate personalized follow-up questions based on the basic information of discharged patients, and through the functions of intention identification, correlation judgment between questions and answers, and rewrite the follow-up questions, personalized, intelligent and efficient follow-up services are realized.
It improves the targeted and effective follow-up, and can guide patients to rehabilitation exercise, medication management and lifestyle adjustments more accurately, thereby better promoting patients' rehabilitation process and reducing the risk of complications.
Smart Images

Figure CN120015259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical health technology, and in particular to an automatic follow-up method and device for discharged patients. Background Art
[0002] Postoperative follow-up is a crucial part of the medical process, which is of great significance for the patient's recovery, the prevention of complications and the improvement of medical quality. Traditional postoperative follow-up methods usually rely on phone calls, text messages or outpatient visits, which have problems such as low efficiency, high cost and poor patient compliance.
[0003] Although many intelligent follow-up systems have emerged in recent years, simplifying the medical follow-up process to a certain extent, most of these intelligent follow-up systems are limited to providing standardized follow-up content, failing to fully cope with the complex and changing challenges in the medical field, failing to deeply explore and adapt to each patient's unique physique, medical history and rehabilitation needs, and thus failing to achieve true personalized customization. Although the intelligent follow-up system has made certain progress in technology, how to overcome its current problems of insufficient personalization and lack of interaction is still an important issue to be tackled in the future medical follow-up field. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides an automatic follow-up method and device for discharged patients, which realizes personalized, intelligent and efficient follow-up services, improves follow-up efficiency, reduces costs, and enhances patient interaction experience and compliance.
[0005] To achieve the above technical objectives, the present invention adopts the following technical solution: a method for automatic follow-up of discharged patients, specifically comprising the following steps:
[0006] Step S1: Generate follow-up questions based on historical follow-up data and instruction constraints, and send them to discharged patients one by one after review by medical staff;
[0007] Step S2: The discharged patient gives a voice response to the follow-up questions, and the voice response is converted into a text response through ASR technology;
[0008] Step S3: Analyze the text reply through the large language model LLM, extract the question part and the non-question part, if the question part is a non-empty set, use the large language model LLM to identify the intent of the question part, and generate a reply based on the identified intent. At the same time, resend the follow-up question to the discharged patient, and repeat steps S2-S3; otherwise, the large language model LLM determines the relevance to the follow-up question based on the non-question part;
[0009] Step S4: If not relevant, determine whether the number of rewrites of the follow-up question has reached the maximum value; if not, rewrite the follow-up question through the large language model LLM, update the number of rewrites, and repeat steps S2-S3; otherwise, determine whether all follow-up questions have been asked; if not, send the next follow-up question to the discharged patient and repeat steps S2-S3; otherwise, end the follow-up process; if relevant, directly determine whether all follow-up questions have been asked; if not, send the next follow-up question to the discharged patient and repeat steps S2-S3; otherwise, end the follow-up process.
[0010] Furthermore, the specific process of generating follow-up questions based on historical follow-up data in step S1 is as follows:
[0011] i. Combined with historical follow-up data, a series of follow-up question sample data sets related to surgery and disease diagnosis were set up;
[0012] ii. Retrieve the follow-up question sample dataset based on the surgical information and diagnostic information of discharged patients to obtain the corresponding follow-up question samples;
[0013] iii. Construct follow-up question prompt words based on follow-up question imitation instructions, basic information of discharged patients, medical staff information associated with discharged patients, follow-up question samples and the preset number of follow-up questions, input the follow-up question prompt words into the large language model LLM to generate follow-up questions.
[0014] Furthermore, the specific process of generating follow-up questions according to instruction constraints in step S1 is: constructing follow-up question prompt words based on follow-up question generation instructions, basic information of discharged patients, medical staff information associated with discharged patients, follow-up task instructions, follow-up content requirement instructions, tone style instructions and a preset number of follow-up questions, and inputting the follow-up question prompt words into the large language model LLM to generate follow-up questions.
[0015] Furthermore, in step S3, the specific process of performing intent recognition on the question part through the large language model LLM and generating a reply according to the recognized intent is as follows:
[0016] A. Preset several intents. For each intent, collect high-frequency common question-answer pairs related to the intent based on hospital information, historical follow-up data, medical manuals, medical insurance policies, and consultation and guidance data. Each common question-answer pair includes: question, answer, and associated intent;
[0017] B. Use the sentence embedding model to convert the questions in the general question-answer pair into question vectors, and store the question vectors and the corresponding general question-answer pairs into a quadruple in the database;
[0018] C. Constructing intention recognition prompt words based on the intention recognition instruction, the preset intention, the basic information of the discharged patient, the historical conversation between the large language model LLM and the discharged patient, and the question part extracted by the large language model LLM, and inputting the intention recognition prompt words into the large language model LLM. If the large language model LLM selects an intention that best matches the patient's question from the preset intentions, execute step D; otherwise, it is recommended that the discharged patient come to the hospital for medical treatment in time;
[0019] D. The large language model (LLM) generates the question vector of the discharged patient based on the extracted question part using the sentence embedding model, searches for the quadruple of matching intent from the database, calculates the similarity between the question vector of the discharged patient and each question vector in the matching intent, and determines whether the calculated similarity exceeds the preset similarity threshold. If so, selects the first k general question-answer pairs with the highest similarity; otherwise, it is recommended that the discharged patient come to the hospital for medical treatment in time;
[0020] E. Based on the question answering instructions, the basic information of hospitalized patients, the historical conversations between the large language model LLM and discharged patients, the question part extracted by the large language model LLM, and the questions and answers extracted from the first k most similar general question-answer pairs, the question answering prompt words are constructed and input into the large language model LLM to generate a reply.
[0021] Furthermore, the preset intentions in step A include: wound care, medication use, follow-up appointments, life guidance, cost consultation, and hospital information.
[0022] Furthermore, the reply generated in step E has two kinds of replies with the same meaning but different formats, wherein the first kind of reply is a rich text reply containing links to pictures, audio and video; the second kind of reply is a text suitable for voice broadcast, which is directly converted into voice through TTS technology;
[0023] If the follow-up is conducted through instant messaging software, both replies will be sent to the discharged patient; if the follow-up is conducted through telephone, the second reply will be sent to the discharged patient.
[0024] Furthermore, in step S3, the specific process of the large language model LLM judging the relevance of the non-question part to the follow-up question is as follows:
[0025] ① Collect historical follow-up answer data sets, annotate the relevance of each historical follow-up answer data, and form a follow-up answer pair, wherein the follow-up answer pair includes: question, answer and relevance;
[0026] ② Use the sentence embedding model to convert the questions in the follow-up question pairs into follow-up question vectors, and store the follow-up question vectors and the corresponding follow-up question pairs into a quadruple in the database;
[0027] ③ Randomly select a follow-up question vector, search for m most similar quadruples from the database through the large language model LLM, and extract the text representation of the m questions;
[0028] ④ For each extracted question, retrieve a quadruple of relevant answers from the database as a positive example and a quadruple of irrelevant answers as a negative example;
[0029] ⑤ Based on the question-answer relevance judgment instructions, basic information of discharged patients, historical conversations between the large language model LLM and discharged patients, follow-up questions, answers of discharged patients, and corresponding m positive examples and m negative examples, construct question-answer relevance judgment prompt words, input the question-answer relevance judgment prompt words into the large language model LLM, and the large language model LLM outputs the relevance judgment results of the question and answer.
[0030] Furthermore, each question in the historical follow-up answering dataset contains at least one relevant answer and one irrelevant answer.
[0031] Furthermore, the specific process of rewriting the follow-up questions through the large language model LLM in step S4 is: based on the question rewriting instructions, the dialogue scene description, the basic information of the discharged patients, the historical dialogues between the large language model LLM and the discharged patients, the original follow-up questions and the discharged patients' answers, the follow-up questions after each rewrite and the corresponding answers of the discharged patients, the question rewriting prompt words are constructed, and the question rewriting prompt words are input into the large language model LLM to generate the rewritten follow-up questions.
[0032] Furthermore, the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for automatic follow-up of discharged patients is implemented.
[0033] Compared with the prior art, the present invention has the following beneficial effects: the automatic follow-up method for discharged patients of the present invention utilizes a large language model LLM, which can automatically generate personalized follow-up questions based on the basic information of discharged patients. During the follow-up, each discharged patient will receive follow-up content customized for his or her own situation, thereby improving the pertinence and effectiveness of the follow-up. At the same time, the large language model of the present invention can accurately respond to each link in the follow-up process, including: intention recognition of discharged patients, correlation judgment between questions and answers, and rewriting of follow-up questions. Therefore, the personalized follow-up method of the present invention can more accurately guide patients to conduct rehabilitation exercises, medication management, and lifestyle adjustments, thereby better promoting the patient's rehabilitation process and reducing the risk of complications. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 The present invention is a flow chart of the method for automatic follow-up of discharged patients. DETAILED DESCRIPTION
[0035] The technical solution of the present invention is further explained below in conjunction with the accompanying drawings.
[0036] like Figure 1 The following is a flow chart of the automatic follow-up method for discharged patients of the present invention, which specifically includes the following steps:
[0037] Step S1, generate follow-up questions based on historical follow-up data and instruction constraints to improve the personalization of follow-up questions, and send them to discharged patients one by one after review by medical staff, so as to ensure the accuracy, professionalism and safety of follow-up questions.
[0038] The specific process of the present invention for generating follow-up questions based on historical follow-up data is as follows:
[0039] i. Combined with historical follow-up data, a series of follow-up question sample data sets related to surgery and disease diagnosis are set up. Each follow-up question sample contains all follow-up questions involved in a discharged patient follow-up process related to a certain surgery or disease. Each follow-up questionnaire sample is associated with the surgery name or disease name and stored to form a follow-up questionnaire sample data set;
[0040] ii. Retrieve the follow-up question sample dataset based on the surgical information and diagnostic information of discharged patients to obtain the corresponding follow-up question samples;
[0041] iii. Follow-up question prompts are constructed based on question imitation instructions, basic information of discharged patients, information of medical staff associated with discharged patients, follow-up question samples and the preset number of follow-up questions. The follow-up question prompts are input into the large language model LLM to generate follow-up questions. This follow-up question generation method inherits the professionalism of medical staff. Follow-up question samples are usually formulated by experienced medical staff and contain important medical knowledge and clinical experience, which ensures the professionalism and scientificity of the generated questions. The large language model LLM is expanded and adjusted on this basis; secondly, it can combine the personal situation of discharged patients and the information of relevant medical staff to generate more targeted and personalized follow-up questions, thereby improving the effectiveness of follow-up; at the same time, the automatic generation function of the large language model LLM can greatly save the time of medical staff in manually writing follow-up questions and improve work efficiency; this method also has good scalability, and can flexibly adjust the follow-up question prompts according to the follow-up needs of different departments and diseases.
[0042] The specific process of generating follow-up questions according to instruction constraints is as follows: construct follow-up question prompts based on follow-up question generation instructions, basic information of discharged patients, medical staff information associated with discharged patients, follow-up task instructions, follow-up content requirement instructions, tone style instructions, and the preset number of follow-up questions, and input the follow-up question prompts into the large language model LLM to generate follow-up questions. In addition to ensuring the pertinence of follow-up questions and the efficiency of question generation, it also has greater flexibility. According to different follow-up scenarios and needs, instruction constraint prompts can be flexibly adjusted to generate different types of follow-up questions. For example, different follow-up question prompts can be designed for the early, middle and late stages after surgery to meet the follow-up needs at different stages. Through clear instruction constraints, the generated follow-up questions can be more consistent in content, format and tone, which is not only conducive to the standardization and management of follow-up data, but also greatly facilitates the review and use of follow-up questions by medical staff.
[0043] Step S2: The discharged patient gives a voice response to the follow-up questions, and the voice response is converted into a text response through ASR technology.
[0044] Step S3, analyze the text reply through the large language model LLM, extract the question part and the non-question part, if the question part is a non-empty set, use the large language model LLM to identify the intent of the question part, and generate a reply based on the identified intent. The large language model LLM has strong semantic understanding and generalization capabilities. Using the large language model LLM for intent identification can accurately capture the true intentions of discharged patients and deal with new problems that do not exist in various training data; at the same time, the method is easy to expand. When it is necessary to add new intents or update existing intents, it is only necessary to update the preset intent list without retraining the entire model. At the same time, the follow-up questions are sent to the discharged patients again, and steps S2-S3 are repeated; otherwise, the large language model LLM judges the relevance to the follow-up questions based on the non-question part. There is no need to manually formulate complex rules. The large language model LLM can handle various complex sentence patterns, and at the same time, combined with the conversation history and other contextual information, accurately and comprehensively understand the semantics of the follow-up questions and the non-question part of the patient's answer, and give a conclusion on the relevance judgment.
[0045] The present invention uses the large language model LLM to identify the intent of the question part, and the specific process of generating a reply according to the identified intent is as follows:
[0046] A. Preset several intentions, including wound care, medication use, follow-up appointments, life guidance, cost consultation, and hospital information. For each intention, collect high-frequency common question-answer pairs related to the intention based on hospital information, historical follow-up data, medical manuals, medical insurance policies, and consultation and guidance data. Each common question-answer pair includes: question, answer, and associated intention, for example: [
[0048] {
[0049] “question”: "What is the emergency department phone number?",
[0050] “answer”:"The telephone number of the emergency department is ***-********.",
[0051] “intention”: "hospital information"
[0052] },
[0053] "question":"How to care for the wound after appendectomy?",
[0054] "answer":"After appendectomy, wound care mainly includes keeping the wound clean and dry, avoiding strenuous exercise, etc. Please follow the doctor's advice for specific care methods",
[0055] "intention":"wound care"
[0056] },
[0057] {
[0058] "question":"How to make an appointment for a follow-up visit?",
[0059] "answer":"You can make a follow-up appointment by phone, WeChat official account or hospital official website.",
[0060] "intention":"Follow-up appointment"
[0061] },
[0062] {
[0063] "question":"What expenses can be reimbursed by medical insurance?",
[0064] "answer":"Please consult the medical insurance agency for the scope of medical insurance reimbursement.",
[0065] "intention":"Cost consultation"
[0066] } ]
[0068] B. Use sentence embedding models such as BERT and Sentence-BERT to convert the questions in the general question-answer pair into question vectors, and store the question vectors and the corresponding general question-answer pairs into quadruplets in the database;
[0069] C. Construct the intention recognition prompt word based on the intention recognition instruction, the preset intention, the basic information of the discharged patient, the historical conversation between the large language model LLM and the discharged patient, and the question part extracted by the large language model LLM, and input the intention recognition prompt word into the large language model LLM. If the large language model LLM selects an intention that best matches the patient's question from the preset intentions, execute step D; otherwise, it is recommended that the discharged patient come to the hospital for medical treatment in time;
[0070] D. The large language model (LLM) generates the question vector of the discharged patient based on the extracted question part using the sentence embedding model, searches for the quadruple of matching intent from the database, calculates the similarity between the question vector of the discharged patient and each question vector in the matching intent, and determines whether the calculated similarity exceeds the preset similarity threshold. If so, selects the first k general question-answer pairs with the highest similarity; otherwise, it is recommended that the discharged patient come to the hospital for medical treatment in time;
[0071] E. Based on the instructions for answering questions, basic information of discharged patients, historical conversations between the large language model LLM and discharged patients, the part of the patient's question extracted by the large language model LLM, and the questions and answers extracted from the first k most similar general question-answer pairs, the prompt words for answering questions are constructed, and the prompt words for answering questions are input into the large language model LLM to generate a reply. The large language model LLM has a powerful natural language generation capability and can generate fluent, natural, and human language habit replies, avoiding the stiff and mechanical problems of replies generated by traditional methods and improving the user experience; at the same time, the large language model LLM can understand various contexts, including patient information, hospital information, medical insurance information, etc., and can provide patients with more comprehensive, professional, and personalized answers.
[0072] There are two types of responses generated with the same semantics but different formats. The first type of response is a rich text response, which contains links to pictures, audio and video to display necessary multimedia information. The second type of response is text suitable for voice broadcast, which is directly converted into voice through TTS technology. If the follow-up adopts the interactive method of instant messaging software, both responses will be sent to discharged patients. If the follow-up adopts the interactive method of telephone, the second response will be sent to discharged patients.
[0073] The specific process of the large language model LLM of the present invention judging the relevance of the non-question part to the follow-up question is as follows:
[0074] ① Collect historical follow-up answer data sets to ensure that they cover a variety of diseases, symptoms, and treatment plans, and use them to determine whether the answers given by discharged patients during the follow-up process are relevant to the follow-up questions. Annotate the relevance of each historical follow-up answer data set. Each question in the historical follow-up answer data set contains at least one relevant answer and one irrelevant answer, forming a follow-up answer pair. The follow-up answer pair includes: question, answer, and relevance, for example: [
[0076] {
[0077] “question”:"Do you have fever symptoms?",
[0078] “answer”:"Yes, I have had a fever recently.",
[0079] “relevance”: "relevance"
[0080] },
[0081] {
[0082] “question”:"Do you have fever symptoms?",
[0083] “answer”:"I have a poor appetite recently and cannot eat.",
[0084] "relevance": "irrelevant"
[0085] },
[0086] {
[0087] “question”:"How many meals do you eat every day?",
[0088] “answer”:"I eat three meals a day, at regular times and regular amounts.",
[0089] “relevance”: "relevance"
[0090] },
[0091] {
[0092] “question”:"How many meals do you eat every day?",
[0093] “answer”:"I take medicine on time every day and I don't feel any discomfort for the time being.",
[0094] "relevance": "irrelevant"
[0095] } ]
[0097] ② Use the sentence embedding model to convert the questions in the follow-up question pairs into follow-up question vectors, and store the follow-up question vectors and the corresponding follow-up question pairs into a quadruple in the database;
[0098] ③ Randomly select a follow-up question vector, search for m most similar quadruples from the database through the large language model LLM, and extract the text representation of the m questions;
[0099] ④ For each extracted question, retrieve a quadruple of relevant answers as a positive example and a quadruple of irrelevant answers as a negative example from the database. The answer field and question field of each positive example are relevant, and the answer field and question field of each negative example are irrelevant.
[0100] ⑤ Based on the question-answer relevance judgment instructions, basic information of discharged patients, historical conversations between the large language model LLM and discharged patients, follow-up questions, answers of discharged patients, and the corresponding m positive examples and m negative examples, construct relevance judgment prompt words, and input the relevance judgment prompt words into the large language model LLM. The large language model LLM outputs the relevance judgment result. The m relevance positive examples and m relevance negative examples can help the large language model LLM better understand the semantic relationship between questions and answers, thereby improving the accuracy of relevance judgment.
[0101] Step S4: If it is not relevant, it means that the discharged patient failed to answer the follow-up question. The reasons may include: 1. The discharged patient cannot understand the follow-up question; 2. The discharged patient refuses to answer the question. In order to ensure the completeness of the follow-up, the large language model LLM is used to rewrite the current follow-up question to generate a more specific and easy-to-understand question with unchanged semantics. First, determine whether the number of rewrites of the follow-up question has reached the maximum value. If not, rewrite the follow-up question through the large language model LLM, update the number of rewrites, and repeat steps S2-S3. Otherwise, determine whether all follow-up questions have been asked. If not, send the next follow-up question to the discharged patient and repeat steps S2-S3. Otherwise, end the follow-up process. If it is relevant, it means that the discharged patient has answered the follow-up question. At this time, determine whether all follow-up questions have been asked. If not, send the next follow-up question to the discharged patient and repeat steps S2-S3. Otherwise, end the follow-up process.
[0102] The specific process of rewriting the follow-up questions by the large language model LLM of the present invention is as follows: based on the question rewriting instructions, the dialogue scene description, the basic information of the discharged patient, the historical dialogue between the large language model LLM and the discharged patient, the original follow-up question and the discharged patient's answer, the follow-up question after each rewriting and the corresponding discharged patient's answer, the follow-up question rewriting prompt word is constructed, and the follow-up question rewriting prompt word is input into the large language model LLM to generate the rewritten follow-up question. The question rewriting prompt word can instruct the large language model LLM to generate a follow-up question with the same semantics, clear reference, and more easy to understand. The dialogue scene description includes the interactive platform of the dialogue (telephone voice interaction, instant message interaction, etc.), the type of dialogue (patient postoperative follow-up), which can help the large language model LLM understand the environment in which the dialogue occurs, thereby generating questions that are easy for patients to understand.
[0103] The basic information of discharged patients in the present invention includes: patient clinical information, patient rehabilitation and dietary guidance, and patient information; wherein the patient clinical information package includes discharge diagnosis, surgery / operation record, surgery / operation name, date, method, length of hospital stay, discharge doctor's order, medication guidance (drug name, dosage, usage, amount, course of treatment), follow-up arrangement (follow-up time, department, project), precautions (diet, activity, rest, etc.), review items, test results (such as blood routine, biochemical indicators, imaging examination results, etc. of postoperative review) and examination date, value and reference range, and other treatments (such as rehabilitation therapy, physical therapy, etc.); patient rehabilitation and dietary guidance includes rehabilitation plan, rehabilitation goals, rehabilitation measures, exercise guidance, functional exercise, dietary taboos, dietary recommendations, nutrition plan, etc.; patient information includes: age, gender, place of residence, education level, occupation, etc.
[0104] The automatic follow-up method for discharged patients of the present invention automates all aspects of follow-up, including content generation, speech synthesis, speech recognition and response analysis, greatly reducing the workload of medical staff and enabling them to devote more energy to more complex medical work. Compared with traditional telephone follow-up or outpatient follow-up, the present invention can significantly reduce the manpower and time costs required for follow-up and improve the utilization efficiency of medical resources.
[0105] In a technical solution of the present invention, an electronic device is also provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for automatic follow-up of discharged patients is implemented.
[0106] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0107] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0108] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for automatically following up discharged patients, characterized in that: The specific steps include: Step S1: Generate follow-up questions based on historical follow-up data and instruction constraints, and send them to discharged patients one by one after review by medical staff; Step S2: The discharged patient gives a voice response to the follow-up questions, and the voice response is converted into a text response through ASR technology; Step S3: Analyze the text reply through the large language model LLM, extract the question part and the non-question part, if the question part is a non-empty set, use the large language model LLM to identify the intent of the question part, and generate a reply based on the identified intent. At the same time, resend the follow-up question to the discharged patient, and repeat steps S2-S3; otherwise, the large language model LLM determines the relevance to the follow-up question based on the non-question part; Step S4: If not relevant, determine whether the number of rewrites of the follow-up question has reached the maximum value; if not, rewrite the follow-up question through the large language model LLM, update the number of rewrites, and repeat steps S2-S3; otherwise, determine whether all follow-up questions have been asked; if not, send the next follow-up question to the discharged patient and repeat steps S2-S3; otherwise, end the follow-up process; if relevant, directly determine whether all follow-up questions have been asked; if not, send the next follow-up question to the discharged patient and repeat steps S2-S3; otherwise, end the follow-up process.
2. The method for automatically following up discharged patients according to claim 1, characterized in that: The specific process of generating follow-up questions based on historical follow-up data in step S1 is as follows: i. Combined with historical follow-up data, a series of follow-up question sample data sets related to surgery and disease diagnosis were set up; ii. Retrieve the follow-up question sample dataset based on the surgical information and diagnostic information of discharged patients to obtain the corresponding follow-up question samples; iii. Construct follow-up question prompt words based on follow-up question imitation instructions, basic information of discharged patients, medical staff information associated with discharged patients, follow-up question samples and the preset number of follow-up questions, input the follow-up question prompt words into the large language model LLM to generate follow-up questions.
3. The method for automatically following up discharged patients according to claim 1, characterized in that: The specific process of generating follow-up questions according to instruction constraints in step S1 is: constructing follow-up question prompt words based on follow-up question generation instructions, basic information of discharged patients, medical staff information associated with discharged patients, follow-up task instructions, follow-up content requirement instructions, tone style instructions and a preset number of follow-up questions, and inputting the follow-up question prompt words into the large language model LLM to generate follow-up questions.
4. The method for automatically following up discharged patients according to claim 1, characterized in that: In step S3, the large language model LLM is used to identify the intent of the question part, and the specific process of generating a reply according to the identified intent is as follows: A. Preset several intents. For each intent, collect high-frequency common question-answer pairs related to the intent based on hospital information, historical follow-up data, medical manuals, medical insurance policies, and consultation and guidance data. Each common question-answer pair includes: question, answer, and associated intent; B. Use the sentence embedding model to convert the questions in the general question-answer pair into question vectors, and store the question vectors and the corresponding general question-answer pairs into a quadruple in the database; C. Constructing intention recognition prompt words based on the intention recognition instruction, the preset intention, the basic information of the discharged patient, the historical conversation between the large language model LLM and the discharged patient, and the question part extracted by the large language model LLM, and inputting the intention recognition prompt words into the large language model LLM. If the large language model LLM selects an intention that best matches the patient's question from the preset intentions, execute step D; otherwise, it is recommended that the discharged patient come to the hospital for medical treatment in time; D. The large language model (LLM) generates the question vector of the discharged patient based on the extracted question part using the sentence embedding model, searches for the quadruple of matching intent from the database, calculates the similarity between the question vector of the discharged patient and each question vector in the matching intent, and determines whether the calculated similarity exceeds the preset similarity threshold. If so, selects the first k general question-answer pairs with the highest similarity; otherwise, it is recommended that the discharged patient come to the hospital for medical treatment in time; E. Based on the question answering instructions, the basic information of hospitalized patients, the historical conversations between the large language model LLM and discharged patients, the question part extracted by the large language model LLM, and the questions and answers extracted from the first k most similar general question-answer pairs, the question answering prompt words are constructed and input into the large language model LLM to generate a reply.
5. The method for automatically following up discharged patients according to claim 4, characterized in that: The pre-set intentions in step A include: wound care, medication use, follow-up appointments, life guidance, cost consultation, and hospital information.
6. The method for automatically following up discharged patients according to claim 4, characterized in that: The responses generated in step E include two responses with the same meaning but different formats. The first response is a rich text response, which includes links to pictures, audio, and video. The second response is a text suitable for voice broadcast, which is directly converted into voice through TTS technology. If the follow-up is conducted through instant messaging software, both replies will be sent to the discharged patient; if the follow-up is conducted through telephone, the second reply will be sent to the discharged patient.
7. The method for automatically following up discharged patients according to claim 1, characterized in that: The specific process of the large language model LLM in step S3 judging the relevance of the non-question part to the follow-up question is as follows: ① Collect historical follow-up answer data sets, annotate the relevance of each historical follow-up answer data, and form a follow-up answer pair, wherein the follow-up answer pair includes: question, answer and relevance; ② Use the sentence embedding model to convert the questions in the follow-up question pairs into follow-up question vectors, and store the follow-up question vectors and the corresponding follow-up question pairs into a quadruple in the database; ③ Randomly select a follow-up question vector, search for m most similar quadruples from the database through the large language model LLM, and extract the text representation of the m questions; ④ For each extracted question, retrieve a quadruple of relevant answers from the database as a positive example and a quadruple of irrelevant answers as a negative example; ⑤ Based on the question-answer relevance judgment instructions, basic information of discharged patients, historical conversations between the large language model LLM and discharged patients, follow-up questions, answers of discharged patients, and corresponding m positive examples and m negative examples, construct question-answer relevance judgment prompt words, input the question-answer relevance judgment prompt words into the large language model LLM, and the large language model LLM outputs the relevance judgment results of the question and answer.
8. The method for automatically following up discharged patients according to claim 7, characterized in that: Each question in the historical follow-up answer dataset contains at least one relevant answer and one irrelevant answer.
9. The method for automatically following up discharged patients according to claim 1, characterized in that: The specific process of rewriting the follow-up questions through the large language model LLM in step S4 is: based on the question rewriting instructions, the dialogue scene description, the basic information of the discharged patients, the historical dialogues between the large language model LLM and the discharged patients, the original follow-up questions and the discharged patients' answers, the follow-up questions after each rewrite and the corresponding answers of the discharged patients, the question rewriting prompt words are constructed, and the question rewriting prompt words are input into the large language model LLM to generate the rewritten follow-up questions.
10. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for automatically following up discharged patients as described in any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Intelligent follow-up visit method and system based on large model
CN120220933A
Data synthesis method and device based on large follow-up visit model
CN120260961A