Methods and apparatus for triaging patients
The intelligent triage method, which combines multi-round IM interaction with a large model, solves the problem of inaccurate triage in existing triage systems, realizes accurate triage and efficient patient triage process, and improves the medical experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JINGDONG TUOXIAN TECH CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-14
AI Technical Summary
Existing triage systems are unable to achieve accurate triage, especially for patients with complex symptoms or diseases involving multiple systems. The accuracy of triage results is poor, which affects the patient's medical experience.
By establishing a multi-round IM interaction combined with a large model, intelligent triage is carried out. Based on patient conversation data, the consultation stage is automatically determined, and information on the patient's condition is collected progressively. Identification questions are generated and patients are guided to provide information on their condition, ultimately determining the target department.
This improved the accuracy of triage results, enhanced the patient's medical experience, and achieved a closed loop throughout the entire process from consultation to triage, reducing the number of steps required for patients.
Smart Images

Figure CN122392841A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart healthcare technology, and in particular to a method and apparatus for triaging patients. Background Technology
[0002] Currently, hospital triage systems primarily rely on manual triage or automated triage based on simple rules. Manual triage depends on the clinical experience of triage staff, which suffers from high subjectivity, low efficiency, and potential backlogs during peak hours. Rule-driven triage systems, on the other hand, only match preset departments based on keywords in the patient's complaint, lacking integration of multi-dimensional information such as the patient's age, gender, and symptom details, making accurate triage difficult. In recent years, some triage systems have attempted to introduce instant messaging interaction, but these remain at the level of single-round information collection, failing to delve into the details of the patient's condition. Especially for patients with complex symptoms or diseases involving multiple systems, triage accuracy is difficult to guarantee.
[0003] In summary, existing triage systems fail to achieve accurate triage when diagnosing patients, struggle to distinguish between different departments for similar symptoms, and produce inaccurate triage results, thus impacting patients' medical experience. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and apparatus for patient triage, which can perform intelligent triage based on multi-round IM interaction and a large model. By establishing a multi-round IM consultation interaction of "first sentence - non-first sentence", the consultation stage is automatically determined based on patient conversation data, realizing progressive collection of disease information; by introducing a large model and combining consultation conversation records to generate identification of consultation questions and corresponding departments for diseases, patients can be better guided to provide disease information and intelligent triage results can be generated, improving the accuracy of triage results.
[0005] To achieve the above objectives, according to one aspect of the present invention, a method for triaging patients is provided, comprising: Step S101: Receive the consultation message sent by the patient, and obtain the session round identifier corresponding to the current consultation process according to the session identifier corresponding to the consultation message; Step S102: Obtain the large model interaction identifier corresponding to the current consultation process based on the session round identifier; Step S103: In response to the large model interaction identifier being that the large model has not been sent, generate the first consultation prompt word according to the consultation message, call the large model to generate identification consultation questions, return the identification consultation questions to the patient, and update the large model interaction identifier; Step S104: In response to the large model interaction identifier indicating that the large model has been sent, extract the historical session records of the current consultation process, the historical session records including the consultation messages; generate non-first-sentence consultation prompts based on the historical session records and the department list, and call the large model to generate multiple diseases and their corresponding departments and the next round of differential consultation questions; Step S105: In response to the determination that the current consultation process does not meet the interaction termination condition, the next round of identification consultation questions is sent to the patient, and the process returns to step S101; Step S106: In response to determining that the current consultation process meets the interaction termination condition, determine the target department based on the multiple diseases and their corresponding departments, and generate the patient's triage result based on the target department.
[0006] Optionally, the session identifier is generated based on the patient's patient identifier and the consultation robot identifier when the patient enters the triage service; wherein, the triage service corresponds to at least one consultation process, and each consultation process corresponds to a session round identifier.
[0007] Optionally, the interaction termination conditions include: the number of interaction rounds completed in the current consultation process has reached a preset maximum number of rounds, or the number of interaction rounds completed in the current consultation process has not reached the preset maximum number of rounds, but the departments corresponding to the multiple diseases are the same.
[0008] Optionally, generating a first-sentence consultation prompt based on the consultation message includes: obtaining the patient's basic information and, in conjunction with the consultation message, assembling and generating a first-sentence consultation prompt using a first preset template; generating a non-first-sentence consultation prompt based on the historical conversation records and department list includes: obtaining the patient's basic information and, in conjunction with the historical conversation records and department list, assembling and generating a non-first-sentence consultation prompt using a second preset template.
[0009] Optionally, before determining the target department based on the multiple diseases and their corresponding departments, the method further includes: for each of the multiple diseases, obtaining the corresponding International Classification of Diseases (ICD) code based on the disease name; obtaining the standard department for the disease based on the ICD code; standardizing and correcting the department corresponding to the disease based on the standard department; and determining the target department based on the multiple diseases and their corresponding departments, including: determining the target department based on the multiple diseases and their corrected departments.
[0010] Optionally, the standardization correction of the department corresponding to the disease based on the standard department includes: in response to the inconsistency between the standard department and the department corresponding to the disease, replacing the department corresponding to the disease with the standard department to perform standardization correction; the method further includes: in response to the failure to obtain the corresponding International Classification of Diseases code based on the disease name, directly using the department corresponding to the disease as the corrected department.
[0011] Optionally, the method further includes: in response to the failure to obtain a standard department for the disease according to the International Classification of Diseases (ICD) code, obtaining a corresponding list of mapped departments based on the department corresponding to the disease; generating department matching prompts based on the list of mapped departments and the patient's diagnostic information, and calling the large model to determine the matching mapped department; and standardizing and correcting the department corresponding to the disease based on the mapped department.
[0012] Optionally, the target department is determined based on the various diseases and their corresponding modified departments, including: selecting the modified department with the highest priority as the target department according to the preset priority of each department.
[0013] Optionally, the method further includes storing the consultation messages from each round of interaction, the data generated by the large model, and the timestamp in a consultation message table for use in disease retrospection and large model optimization.
[0014] Optionally, generating the patient's triage result based on the target department includes: calling the hospital information system scheduling interface to obtain the doctor's scheduling information of the target department, and generating the patient's triage result based on the doctor's scheduling information.
[0015] According to another aspect of the present invention, an apparatus for triaging patients is provided, comprising: The consultation message receiving module is used to receive consultation messages sent by patients and obtain the session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message. The large model interaction determination module is used to obtain the large model interaction identifier corresponding to the current consultation process based on the session round identifier; The first-sentence consultation processing module is used to respond to the large model interaction identifier being that the large model has not been sent, generate a first-sentence consultation prompt word based on the consultation message, call the large model to generate a differential consultation question, return the differential consultation question to the patient, and update the large model interaction identifier; The non-first-sentence consultation processing module is used to respond to the large model interaction identifier as a large model has been sent, extract the historical session records of the current consultation process, the historical session records include the consultation message; generate non-first-sentence consultation prompt words according to the historical session records and the department list, and call the large model to generate multiple diseases and corresponding departments and the next round of differential consultation questions; The consultation question sending module is used to send the next round of identification consultation questions to the patient in response to the determination that the current consultation process has not met the interaction termination condition, and return to the consultation message receiving module; The triage result generation module is used to respond to the determination that the current consultation process meets the interaction termination condition, determine the target department according to the multiple diseases and their corresponding departments, and generate the patient's triage result according to the target department.
[0016] According to another aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for triaging patients provided in the embodiments of the present invention.
[0017] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method for triaging patients provided in the embodiments of the present invention.
[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for triaging patients provided in the embodiments of the present invention.
[0019] One embodiment of the above invention has the following advantages or beneficial effects: By receiving a consultation message sent by the patient, the session round identifier corresponding to the current consultation process is obtained based on the session identifier corresponding to the consultation message; the large model interaction identifier corresponding to the current consultation process is obtained based on the session round identifier; in response to the large model interaction identifier being "large model not sent," the first consultation prompt word is generated based on the consultation message, the large model is called to generate an identification consultation question, and the identification consultation question is returned to the patient, updating the large model interaction identifier; in response to the large model interaction identifier being "large model sent," the historical session records of the current consultation process are extracted. The system includes historical conversation records, consultation messages, and generates non-first-sentence consultation prompts based on these records and a department list. It then uses a large model to generate various diseases, their corresponding departments, and the next round of diagnostic questions. In response to a decision that the current consultation process has not met the interaction termination condition, it sends the next round of diagnostic questions to the patient and returns to the step of receiving the patient's consultation message. Finally, in response to a decision that the current consultation process meets the interaction termination condition, it determines the target department based on various diseases and their corresponding departments and generates the patient's triage result based on the target department. This technical solution enables intelligent triage based on multi-round IM interactions and a large model. Specifically, by establishing a "first-sentence-non-first-sentence" multi-round IM consultation interaction, it automatically determines the consultation stage based on patient conversation data, achieving progressive collection of medical information. By introducing a large model and combining consultation conversation records to generate diagnostic questions and the corresponding departments for diseases, it can better guide patients to provide medical information and generate intelligent triage results, improving the accuracy of the triage results.
[0020] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0021] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein: Figure 1 This is a schematic diagram of the main steps of a patient triage method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first-sentence consultation processing flow according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a non-first-sentence consultation processing flow according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a patient triage process according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the main modules of a patient triage device according to an embodiment of the present invention; Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied; Figure 7This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0022] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0023] It should be noted that the technical solutions disclosed in this invention, regarding the collection, updating, analysis, processing, use, transmission, and storage of user personal information, all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0024] To address the problems of low efficiency, high subjectivity, limited dimensions, and inaccurate triage results in existing triage systems, this invention provides a method and apparatus for patient triage that enables intelligent triage based on multi-round IM (Instant Messenger) interaction and a large-scale model. Specifically, by establishing a multi-round IM consultation interaction from the first sentence to subsequent sentences, the system automatically determines the consultation stage based on patient conversation data, achieving progressive collection of medical information. By introducing a large-scale model and combining consultation conversation records to generate identification of consultation questions and corresponding departments for diseases, the system can better guide patients to provide medical information and generate intelligent triage results, thereby improving the accuracy of triage results.
[0025] Figure 1 This is a schematic diagram illustrating the main steps of a patient triage method according to an embodiment of the present invention. Figure 1 As shown, the method for triaging patients according to an embodiment of the present invention mainly includes the following steps S101 to S106.
[0026] Step S101: Receive the consultation message sent by the patient, and obtain the session round identifier corresponding to the current consultation process according to the session identifier corresponding to the consultation message.
[0027] According to one embodiment of the present invention, the session identifier is generated based on the patient's patient identifier and the consultation robot identifier when the patient enters the triage service; wherein, the triage service corresponds to at least one consultation process, and each consultation process corresponds to a session round identifier.
[0028] When a patient enters the triage module and triggers the triage process, the system concatenates the patient's unique patient ID (such as an encrypted value of an ID card number) and the consultation robot's identifier (such as a number assigned to the consultation robot) using a hash encryption algorithm to generate a unique session identifier (session_id) to ensure the uniqueness of message ownership within the same session. The triage process then initiates a consultation flow and generates a round identifier (round_session_id) for the current consultation flow to mark the start and end of a single consultation flow. The round identifier is initiated when the patient sends their first consultation message and terminates when the patient clicks the "Re-conversation" button to start another consultation flow or when the current consultation flow has completed a preset maximum number of rounds (e.g., 5 rounds).
[0029] Additionally, after generating the session identifier and session round identifier, an initial record will be created in the consultation message table to write the session identifier, session round identifier, and current timestamp. Simultaneously, a large model interaction identifier field corresponding to the current consultation process can be added to the consultation message table, with its value set to 0. This indicates that the consultation message for the current process has not yet been sent to the large model, and the system is waiting for the patient to send a consultation message for the first round of consultation interaction. After the patient sends a consultation message, the large model will be invoked for subsequent processing. At this point, the value of the large model interaction identifier will change to 1, indicating that the consultation message for the current process has been sent to the large model, and a non-first round of consultation interaction will begin.
[0030] When a patient sends a consultation message, it carries a corresponding session identifier. The system will then retrieve the session round identifier corresponding to the current consultation process from the consultation message table based on the session identifier of the consultation message.
[0031] Step S102: Obtain the large model interaction identifier corresponding to the current consultation process based on the session round identifier. After obtaining the session round identifier corresponding to the current consultation process, the large model interaction identifier corresponding to the current consultation process can be obtained from the consultation message table to determine whether this consultation interaction is the first consultation or not, and to perform targeted processing.
[0032] Step S103: In response to the large model interaction identifier indicating that the large model has not been sent, generate the first consultation prompt based on the consultation message, call the large model to generate a diagnostic question, return the diagnostic question to the patient, and update the large model interaction identifier. If the large model interaction identifier indicates that the large model has not been sent, it means that this consultation message is the first consultation message in the current consultation process, and it is currently in the first consultation stage. In the first consultation stage, it is necessary to guide the user to provide more information about their condition. Therefore, the first consultation prompt will be generated to call the large model to generate a diagnostic question and send it to the patient. Then, the large model interaction identifier corresponding to the session round identifier in the consultation message table will be updated.
[0033] According to one embodiment of the present invention, generating a first-sentence consultation prompt based on a consultation message may specifically include: obtaining the patient's basic information and, in conjunction with the consultation message, assembling and generating a first-sentence consultation prompt using a first preset template. In the first-sentence consultation stage, the first-sentence consultation prompt only requires the generation of one open-ended identification question to avoid information overload.
[0034] In a specific example, a patient sends their first IM consultation message (e.g., "I've been experiencing chest pain lately"). The system queries the consultation message table for the value of the large model interaction identifier corresponding to the current session round identifier. Since the initial value is 0 (no large model has been sent), it is determined to be in the first consultation stage. The system uses the patient identifier to call the hospital system's user information interface to obtain the patient's basic information—patientName, patientAge, and patientSex (gender, such as "male / female / unknown"). Then, the system uses the patient's first consultation message as ${patientSymptoms} (patient's chief complaint), and combines it with the patient's basic information such as age ${patientAge} and gender ${patientSex} to assemble the first consultation prompt word Prompt according to the first preset template as follows: "You will be playing the role of a chief physician, and all actions must be in accordance with relevant medical guidelines. The patient's specific situation is as follows:" ${patientSymptoms} ${patientAge} ${patientSex} ### Task: Your task is to design a question based on the patient's condition, with the aim of differentiating which systemic disease it is.
[0035] - Please ask questions following these guidelines: Based on the patient's symptoms, ask questions about the relevant systemic diseases that the patient needs to differentiate and diagnose. Avoid directly asking about symptoms and design more precise open-ended questions.
[0036] Please only reply with one consultation question; do not reply with irrelevant content.
[0037] Try to use open-ended questions.
[0038] ###Special Note: - During the consultation, you don't need to identify yourself, nor do you need to show excessive empathy. When asking about the patient's symptoms, you don't need to provide explanatory statements or tell them why you're asking the questions; simply state your questions. After generating the first consultation prompt, the system sends the first consultation prompt to the large model deployed within the system. The large model then returns one differential consultation question (e.g., if the patient complains "I have been experiencing chest pain recently," the system returns "In which area of the chest is your chest pain mainly concentrated, and is it accompanied by difficulty breathing or sweating?").
[0039] According to one embodiment of the present invention, after generating the diagnostic questions using a large model, the diagnostic messages from each round of interaction, the data generated by the large model, and the timestamps can be stored in a diagnostic message table for disease retrospection and large model optimization. The system writes the first diagnostic message sent by the patient and the diagnostic questions returned by the large model into the diagnostic message table, and updates the value of the large model interaction identifier to 1 (large model sent). Simultaneously, a large model response field is added to the diagnostic message table to store the diagnostic questions returned by the large model, marking the end of the first diagnostic process.
[0040] Figure 2 This is a schematic diagram of the initial consultation process according to an embodiment of the present invention. Figure 2 As shown, in an embodiment of the present invention, during the initial consultation stage, the patient's basic information, such as name, gender, and age, is first obtained based on the patient identifier. Then, a prompt word for the initial consultation is generated based on the patient's basic information and the initial consultation message. This prompt word is sent to the large model, and the open-ended identification question returned by the large model is obtained. Next, the initial consultation message and the identification question returned by the large model are written into the consultation message table, and the interaction identifier of the large model is updated; specifically, the interaction identifier of the large model is updated from 0 to 1. Finally, the identification question is pushed to the patient, ending the initial consultation processing flow.
[0041] Step S104: In response to the large model interaction flag indicating that the large model has been sent, extract the historical session records of the current consultation process. The historical session records include consultation messages. Generate non-first-sentence consultation prompts based on the historical session records and the department list. Call the large model to generate various diseases and their corresponding departments, as well as the next round of identification consultation questions. In the non-first-sentence consultation stage, the main focus is on optimizing disease diagnosis and department prediction by combining the session context of the current consultation process. This avoids consultation redundancy or information loss caused by fixed processes. At the same time, the lifecycle of each session round is strictly controlled through session round flags to ensure that the consultation data of each round is independent and traceable.
[0042] In practice, after a patient replies to the diagnostic questions returned by the large model (e.g., "Chest pain on the left side, no difficulty breathing, but sweating"), the system determines that it has received a new diagnostic message from the patient. At this point, it queries the diagnostic message table again to obtain the large model interaction identifier corresponding to the current diagnostic process based on the session round identifier. If the large model interaction identifier corresponding to the current session round identifier is 1 (large model already sent), it is determined to be in the non-first-sentence diagnostic stage. The system extracts all session records under the current session round identifier and assembles them in the order of "patient's chief complaint → large model question → patient's reply" to generate the historical session record ${inquiry} for the current diagnostic process. Example: Patient's chief complaint: I've been experiencing chest pain lately. Large model question: In which area of your chest is your chest pain mainly concentrated? Is it accompanied by difficulty breathing or sweating? The patient replied: "The chest pain is on the left side, I don't have difficulty breathing, but I'm sweating." Then, based on the historical conversation records generated above and the preset list of hospital departments, non-first-sentence consultation prompts will be generated to call the large model to generate various diseases and their corresponding departments and the next round of differential diagnosis questions.
[0043] According to one embodiment of the present invention, generating non-first-sentence consultation prompts based on historical conversation records and a department list specifically includes: obtaining the patient's basic information and, in conjunction with historical conversation records and a department list, assembling and generating non-first-sentence consultation prompts using a second preset template. In the non-first-sentence consultation stage, the non-first-sentence consultation prompts introduce the constraint of "historical conversation records + department list + prohibition of repeated questions," forcing the large model to output "multiple (e.g., 3 types) diseases + corresponding departments + 1 progressive question (i.e., the next round of differential diagnosis question)." Simultaneously, it supplements the patient's condition information by incorporating basic information such as age and gender, improving the accuracy of disease prediction and overcoming the shortcomings of existing systems with single-round questioning and limited information dimensions.
[0044] In one embodiment, by combining the patient's basic information (patient symptoms, age, and sex), historical conversation records, and a preset list of hospital departments, a non-first-sentence consultation prompt word, Prompt, is generated using a second preset template as follows: "You are a doctor who provides multi-round differential diagnosis for patients based on their conversations and conversation records."
[0045] #Task Requirements
[0046] ##Analysis and Output
[0047] -Analyze the patient's most likely pathogenesis based on the information obtained from the medical history.
[0048] - If these three diseases involve different departments on the list, prioritize identifying and consulting based on the diseases in these different departments, and generate a consultation response.
[0049] -Do not ask again if you have already asked.
[0050] The purpose of the consultation is to differentiate which system the disease belongs to.
[0051] - Approach: Ask questions based on the patient's need for differential diagnosis of relevant systemic diseases.
[0052] #Output Rules
[0053] - Only the three most likely diagnoses (arranged in descending order of likelihood) and their corresponding departments (the departments must be from the department list) and a single sentence of medical history are allowed to be output.
[0054] - Output example: {"disDeptList":[{"disease":"tension pneumothorax","dept":"Respiratory Medicine"},{"disease":"acute asthma","dept":"Respiratory Medicine"},{"disease":"primary pneumothorax","dept":"Respiratory Medicine"}],"question":"You recently xxxxx"}
[0055] # Special note: - During the consultation, you do not need to state your identity, nor do you need to show excessive empathy. When asking about the symptoms, you do not need to provide explanatory or suggestive statements, nor do you need to tell the patient why you are asking the question. You only need to express the question.
[0056] ## Information Reference
[0057] - Standard Department List: [Pediatrics, Gynecology, Obstetrics, Otolaryngology, Ophthalmology, Stomatology, Traditional Chinese Medicine, Infectious Diseases, Gastroenterology, Respiratory Medicine, Cardiology, Hematology, Neurology, Endocrinology, Nephrology, Rheumatology and Immunology, Geriatrics, Mental Health, Oncology, Allergy, General Practice, Orthopedics, Urology, Neurosurgery, Thoracic Surgery, Cardiac Surgery, Hepatobiliary and Pancreatic Surgery, Vascular Surgery, Colorectal Surgery, Gastrointestinal Surgery, Thyroid and Breast Surgery, Plastic Surgery, Burn and Wound Repair Clinic, Rehabilitation Medicine, Dermatology, Pain Management]
[0058] ${patientSymptoms}
[0059] ${patientAge}
[0060] ${patientSex}
[0061] The following is a record of the patient's and doctor's conversation history: ${inquiry}.
[0062] After generating the non-first-sentence consultation prompts above, you can input them into the large model so that it returns a response containing three diseases, the corresponding departments, and the next round of identification consultation questions. An example is shown below: { "disDeptList": [ {"disease": "coronary artery disease", "dept": "cardiology"}, {"disease": "tension pneumothorax", "dept": "respiratory medicine"}, {"disease": "chest wall injury", "dept": "thoracic surgery"} ], Question: Does your chest pain worsen after exertion and improve with rest? }
[0063] According to one embodiment of the present invention, after generating multiple diseases and corresponding departments and the next round of diagnostic questions by calling a large model, the diagnostic messages of each round of interaction, the data generated by the large model, and the timestamps can be stored in a diagnostic message table for disease retrospection and large model optimization. By recording the full data of "patient message - large model response - timestamp" for each round of interaction in the diagnostic message table, subsequent disease retrospection (such as doctors viewing patient triage dialogue records) and system optimization (such as adjusting large model prompt parameters based on historical data) are supported, solving the problems of data not being stored locally and being untraceable in existing IM triage systems.
[0064] According to one embodiment of the present invention, after generating response results containing multiple diseases, corresponding departments, and the next round of triage questions in a large model, the generated departments corresponding to the diseases can be standardized to solve the problem of confusing and inaccurate triage results when the same disease corresponds to different departments. Specifically, for each of the multiple diseases, the corresponding International Classification of Diseases (ICD) code is obtained based on the disease name; the standard department for the disease is obtained based on the ICD code; and the department corresponding to the disease is standardized and corrected based on the standard department. In this way, the standard department within the hospital can be determined by combining the ICD and the hospital department code, so as to accurately determine the triage department corresponding to the patient.
[0065] Furthermore, when standardizing the departments corresponding to diseases output by the large model based on standard departments, if the standard departments are inconsistent with the departments corresponding to diseases output by the large model, the standard departments are used to replace the departments corresponding to diseases for standardization correction; otherwise, the departments output by the large model are retained directly.
[0066] After standardizing and correcting the departments, the departments in the large model response recorded in the consultation message table will be updated to the corrected departments.
[0067] Step S105: In response to the determination that the current consultation process does not meet the interaction termination condition, send the next round of identification consultation questions to the patient and return to step S101.
[0068] According to one embodiment of the present invention, the interaction termination condition includes, for example, the number of interaction rounds completed in the current consultation process reaching a preset maximum number of rounds, or the number of interaction rounds completed in the current consultation process not reaching the preset maximum number of rounds, but the departments corresponding to multiple diseases are the same.
[0069] If the current consultation process does not meet the conditions for termination, the next round of diagnostic questions will be sent to the patient to guide them to provide more information about their condition.
[0070] Afterwards, the system writes the patient's response (i.e., the consultation message of this round of interaction) and the corrected large model response (including multiple diseases, the corresponding corrected departments, and the next round of differential diagnosis questions) into the consultation message table and updates the large model response field; at the same time, it counts the number of completed interaction rounds (patient messages) under the current session round identifier. If the number of rounds has not reached the preset maximum number of rounds (e.g., 5 rounds) and the corrected departments corresponding to multiple diseases are inconsistent, it is determined that the current consultation process has not met the interaction termination condition, and the next round of differential diagnosis questions generated by the large model is sent to the patient, repeating the process of "patient response - non-first sentence consultation"; if the number of rounds has reached 5 rounds, or if the number of rounds has not reached 5 rounds but the corrected departments corresponding to multiple diseases are consistent, it is determined that the current consultation process meets the interaction termination condition, and the subsequent step S106 is executed.
[0071] By using the maximum number of interactions in the set consultation process and the consistency of the corresponding department for multiple diseases as the dual interaction termination condition, a balance is struck between consultation depth (5 rounds of interaction are sufficient to uncover key details of the condition) and efficiency (avoiding patient loss due to unlimited consultation rounds).
[0072] Step S106: In response to determining that the current consultation process meets the interaction termination conditions, determine the target department based on multiple diseases and their corresponding departments, and generate the patient's triage results based on the target department.
[0073] According to one embodiment of the present invention, before determining the target department based on multiple diseases and their corresponding departments, the process may further include: for each of the multiple diseases, obtaining the corresponding International Classification of Diseases (ICD) code based on the disease name; obtaining the standard department for the disease based on the ICD code; and standardizing and correcting the corresponding department based on the standard department. Furthermore, determining the target department based on multiple diseases and their corresponding departments can specifically involve determining the target department based on multiple diseases and their corresponding corrected departments. In this way, the standard department can be determined by combining the ICD and hospital department codes, thus facilitating the accurate determination of the patient's corresponding triage department.
[0074] According to one embodiment of the present invention, the standardization correction of the department corresponding to a disease based on a standard department includes: in response to an inconsistency between the standard department and the department corresponding to the disease, replacing the department corresponding to the disease with the standard department for standardization correction. Furthermore, the method for triaging patients may further include: in response to the inability to obtain a corresponding International Classification of Diseases (ICD) code based on the disease name, directly using the department corresponding to the disease as the corrected department. If a corresponding ICD code cannot be obtained based on the disease name, it indicates that the disease may be a rare disease, and in this case, the department corresponding to the disease returned by the large model can be retained.
[0075] In practice, the system iterates through each disease output by the large model, querying the ICD (International Classification of Diseases) code table by disease name to obtain the corresponding ICD code (e.g., "coronary artery disease" corresponds to ICD subcategory code I25.1). Then, it queries the mapping table between ICD codes and standard departments to obtain a standardized secondary department name (e.g., I25.1 corresponds to "cardiology") as the standard department for the disease. If the standard department differs from the department returned by the large model (e.g., the large model misclassifies "coronary artery disease" as "respiratory medicine"), the standard department ("cardiology") replaces the department returned by the large model ("respiratory medicine") for department standardization correction; if they match, the department returned by the large model is directly retained as the corrected department. Furthermore, if no corresponding ICD code is found based on the disease name, it indicates that the disease may be rare, and the department returned by the large model is directly retained as the corrected department.
[0076] After standardizing and correcting the departments, the departments in the large model response recorded in the consultation message table will be updated to the corrected departments.
[0077] Figure 3 This is a schematic diagram of a non-first-sentence inquiry processing flow according to an embodiment of the present invention. Figure 3As shown, in an embodiment of the present invention, during the non-first-sentence consultation phase, the historical conversation record of the current consultation process is first assembled and generated in the order of "patient's chief complaint (first-sentence consultation message) → large model question → patient's response." Then, non-first-sentence consultation prompts are assembled and generated based on the patient's basic information, historical conversation records, and department list. The non-first-sentence consultation prompts are input into the large model, and the response results returned by the large model are received, including three diseases, corresponding departments, and the next round of identification consultation questions. Then, for each of the multiple diseases, the corresponding International Classification of Diseases (ICD) code is obtained based on the disease name; the standard department for the disease is obtained based on the ICD code; and the department corresponding to the disease is standardized and corrected based on the standard department. Specifically, if the standard department is inconsistent with the department corresponding to the disease output by the large model, the standard department is used to replace the department corresponding to the disease for standardization correction; otherwise, the department output by the large model is directly retained. Finally, the department in the large model response recorded in the consultation message table is updated to the corrected department.
[0078] Next, retrieve the number of completed interaction rounds in the current consultation process (based on the number of messages sent by the patient). If the number of interaction rounds is ≥5, determine the target department based on multiple diseases and their corresponding revised departments, and generate a triage result based on the target department; otherwise, determine whether the revised departments corresponding to the three diseases are consistent. If they are consistent, determine the target department based on multiple diseases and their corresponding revised departments, and generate a triage result based on the target department; otherwise, send the next round of identification consultation questions to the patient.
[0079] According to one embodiment of the present invention, the target department is determined based on multiple diseases and their corresponding modified departments. Specifically, this may include selecting the modified department with the highest priority as the target department based on the preset priority of each department.
[0080] The system extracts the revised department list and determines whether the departments corresponding to the three diseases are consistent. If the departments corresponding to the three diseases are consistent (e.g., all three diseases correspond to cardiology), the department corresponding to the first disease (sorted by priority in the larger model) can be directly selected as the target department. If the departments corresponding to the three diseases are inconsistent and the interaction rounds reach 5 (e.g., the three diseases correspond to cardiology, respiratory medicine, and thoracic surgery respectively, and have interacted 5 times), then the revised department with the highest priority is selected as the target department based on the preset priorities of each department. In this way, the priority of departments can be set in conjunction with the layout of medical resources within the hospital to triage patients, improving the utilization rate of medical resources within the hospital and the patient's medical experience.
[0081] According to one embodiment of the present invention, generating a patient's triage result based on the target department may specifically include: calling the hospital information system's scheduling interface to obtain the doctor's scheduling information for the target department, and generating the patient's triage result based on the doctor's scheduling information. After obtaining the target department, the present invention may also call the hospital information system's scheduling interface to obtain the current and next 7 days' doctor's scheduling information for that target department, including information such as doctor's name, title, consultation date, consultation time, and remaining appointment slots. Then, the doctor's scheduling information is pushed to the patient as a triage result in the form of an IM card.
[0082] After the patient views the doctor's schedule, the current consultation process corresponding to the conversation turn identifier ends. If the patient clicks "Restart Conversation," a new conversation turn identifier is generated to indicate a new consultation process, and the patient re-enters the initial consultation stage.
[0083] According to the technical solution of the present invention, after the IM interaction is terminated, the scheduling interface of the hospital information system is directly called to obtain the appointment information of the target department in the hospital, realizing a closed loop of the whole process from consultation to triage to appointment, without requiring patients to jump to multiple modules to operate, thus improving the patient's medical experience.
[0084] In embodiments of the present invention, by constructing three association tables (a mapping table between diseases and ICD codes, a mapping table between ICD codes and standard departments, and a mapping table between ICD codes and tertiary departments within the hospital), the accurate conversion from disease names output by the large model to International Classification of Disease (ICD) codes, and then to hospital department codes, can be achieved. This not only solves the problem of incompatibility between departments output by the large model and hospital departments, but also realizes the priority ranking of departments through the priority field of each department, ensuring that the triage results are more in line with the layout of medical resources within the hospital.
[0085] According to one embodiment of the present invention, the method for triaging patients may further include: in response to the failure to obtain a standard department for a disease based on the International Classification of Diseases (ICD) coding, obtaining a corresponding list of mapped departments based on the department corresponding to the disease; generating department matching prompts based on the list of mapped departments and the patient's diagnostic information, and calling a large model to determine the matching mapped department; and standardizing and correcting the department corresponding to the disease based on the mapped department. When the standard department for a disease cannot be obtained through the ICD coding (e.g., the hospital does not have a certain specialty, or the mapping data between the ICD code and the hospital's internal departments is missing), the following fallback mechanism will be triggered: 1. Mapping Department List Generation: Based on the departments output by the large model (such as "Gastroenterology"), query the preset mapping relationship table between secondary and tertiary departments (such as "Gastroenterology → Gastrointestinal Medicine, Hepatology") to generate a mapping department list consisting of the tertiary departments within the hospital corresponding to the departments output by the large model. 2. Use of catch-all suggestions: Assemble catch-all suggestions according to the template below, send them to the large model, and obtain the most matching mapping department (tertiary department). For example, the assembled catch-all suggestions might look like this: "You will play the role of a chief physician, and based on the given diagnostic information, determine which department on the list of departments the patient should visit for further diagnosis."
[0086] The following is the patient's diagnostic information: ${diagnosis} The following is a list of departments: ${deptList} Require: - Only return the name of the closest department in the department list.
[0087] - If it cannot be determined, output 0.
[0088] - No explanations or irrelevant content may be provided.
[0089] 3. In-hospital department matching: Based on the name of the mapped department output by the large model, query the preset association table of standard departments and tertiary departments in the hospital to obtain the standard department in the hospital corresponding to the mapped department; 4. Scheduling Inquiry and Display: Based on the standard departments within the hospital corresponding to various diseases output by the large model, determine the target department, query the doctor scheduling information of the target department to generate triage results, and complete the triage loop.
[0090] In the above catch-all prompts, the patient's diagnosis information (diagnosis) is the patient's chief complaint (i.e., the first sentence of the consultation message), and the department list (deptList) is the mapped department list. The patient's chief complaint and the mapped department list are input into the large model, which provides the closest tertiary department name. Then, the hospital department number (code) is queried using the tertiary department name provided by the large model, and the hospital doctor's scheduling information is queried using the department number (code). The doctor's scheduling information is then pushed to the patient in the form of an IM card.
[0091] Figure 4 This is a schematic diagram of a patient triage process according to an embodiment of the present invention. Figure 4As shown in the embodiment of the present invention, after a patient enters the triage service, firstly, a session identifier is generated based on the patient identifier and the consultation robot identifier, and a session round identifier corresponding to the current consultation process is generated; then, the first-sentence consultation stage is entered, and the first-sentence consultation processing flow is executed, returning the identification consultation question generated by the large model to the patient; the patient's response to the identification consultation question is received, and the non-first-sentence consultation stage is entered, executing the non-first-sentence consultation processing flow, calling the large model to generate multiple diseases, corresponding departments, and the next round of identification consultation questions. Then, it is determined whether the interaction termination condition is met (the current consultation process has completed 5 interaction rounds, or the current consultation process has completed less than 5 interaction rounds but the departments corresponding to multiple diseases are consistent). If not, the next round of identification consultation questions is sent to the patient, and the process jumps to the step of receiving the patient's response to the identification consultation question; if so, the department corresponding to the disease returned by the large model is standardized and corrected, and the target department is determined based on the corrected department. Then, the hospital information system scheduling interface is called to obtain the doctor's scheduling information of the target department, and the doctor's scheduling information is pushed to the patient. Next, determine whether the patient clicks "Re-engage". If so, proceed to the step of generating the session round identifier corresponding to the current consultation process; otherwise, end the patient's triage process.
[0092] Figure 5 This is a schematic diagram of the main modules of a patient triage device according to an embodiment of the present invention. Figure 5 As shown, the triage device 500 for patients in this embodiment of the invention mainly includes a consultation message receiving module 501, a large model interaction determination module 502, a first-sentence consultation processing module 503, a non-first-sentence consultation processing module 504, a consultation question sending module 505, and a triage result generation module 506.
[0093] The consultation message receiving module 501 is used to receive consultation messages sent by patients and obtain the session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message. The large model interaction determination module 502 is used to obtain the large model interaction identifier corresponding to the current consultation process based on the session round identifier; The first-sentence consultation processing module 503 is used to respond to the large model interaction identifier as not sending the large model, generate the first-sentence consultation prompt word according to the consultation message, call the large model to generate the identification consultation question, return the identification consultation question to the patient, and update the large model interaction identifier; The non-first-sentence consultation processing module 504 is used to respond to the large model interaction identifier as having been sent to the large model, extract the historical session records of the current consultation process, including consultation messages; generate non-first-sentence consultation prompts based on the historical session records and the department list; and call the large model to generate various diseases and their corresponding departments and the next round of identification consultation questions. The consultation question sending module 505 is used to send the next round of identification consultation questions to the patient in response to the determination that the current consultation process has not met the interaction termination condition, and return to the consultation message receiving module; The triage result generation module 506 is used to respond to the determination that the current consultation process meets the interaction termination conditions, determine the target department based on multiple diseases and their corresponding departments, and generate the patient's triage result based on the target department.
[0094] According to one embodiment of the present invention, the session identifier is generated based on the patient's patient identifier and the consultation robot identifier when the patient enters the triage service; wherein, the triage service corresponds to at least one consultation process, and each consultation process corresponds to a session round identifier.
[0095] According to one embodiment of the present invention, the interaction termination conditions include: the number of interaction rounds completed in the current consultation process has reached a preset maximum number of rounds, or the number of interaction rounds completed in the current consultation process has not reached the preset maximum number of rounds, but the departments corresponding to multiple diseases are the same.
[0096] According to one embodiment of the present invention, the first-sentence consultation processing module 503 can be specifically used to: obtain the patient's basic information and, in conjunction with the consultation message, assemble and generate the first-sentence consultation prompt word through a first preset template; the non-first-sentence consultation processing module 504 can be specifically used to: obtain the patient's basic information and, in conjunction with historical conversation records and a department list, assemble and generate the non-first-sentence consultation prompt word through a second preset template.
[0097] According to one embodiment of the present invention, the patient triage device 500 may further include a department standardization processing module (not shown in the figure), used for: obtaining the corresponding International Classification of Diseases (ICD) code for each of the multiple diseases based on the disease name before determining the target department based on multiple diseases and their corresponding departments; obtaining the standard department for the disease based on the ICD code; and standardizing and correcting the department corresponding to the disease based on the standard department. Furthermore, the triage result generation module 506 may specifically be used for: determining the target department based on multiple diseases and their corresponding corrected departments.
[0098] According to one embodiment of the present invention, the department standardization processing module (not shown in the figure) can also be used to: in response to the inconsistency between the standard department and the department corresponding to the disease, replace the department corresponding to the disease with the standard department for standardization correction; and in response to the failure to obtain the corresponding International Classification of Diseases code based on the disease name, directly use the department corresponding to the disease as the corrected department.
[0099] According to one embodiment of the present invention, the department standardization processing module (not shown in the figure) can also be used to: in response to the failure to obtain the standard department of the disease according to the International Classification of Diseases coding, obtain the corresponding mapping department list according to the department corresponding to the disease; generate department matching prompt words according to the mapping department list and the patient's diagnostic information, and call the large model to determine the matching mapping department; and perform standardization correction on the department corresponding to the disease according to the mapping department.
[0100] According to one embodiment of the present invention, the triage result generation module 506 can be specifically used to: select the corrected department with the highest priority as the target department according to the preset priority of each department.
[0101] According to one embodiment of the present invention, the triage device 500 for patients may further include a data storage module (not shown in the figure) for storing the consultation messages of each round of interaction, the data generated by the large model, and the timestamp in the consultation message table for the purpose of tracing back the patient's condition and optimizing the large model.
[0102] According to one embodiment of the present invention, the triage result generation module 506 can be specifically used to: call the hospital information system scheduling interface to obtain the doctor scheduling information of the target department, and generate the patient's triage result based on the doctor scheduling information.
[0103] According to the technical solution of the present invention, by receiving a consultation message sent by a patient, obtaining the session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message; obtaining the large model interaction identifier corresponding to the current consultation process based on the session round identifier; responding to the large model interaction identifier being "large model not sent", generating the first consultation prompt word based on the consultation message, calling the large model to generate identification consultation questions, returning the identification consultation questions to the patient, and updating the large model interaction identifier; responding to the large model interaction identifier being "large model sent", extracting the historical session records of the current consultation process, the historical session records including consultation messages; generating a non-first consultation prompt word based on the historical session records and the department list, calling the large model to generate multiple diseases and their corresponding departments and the next round of identification consultation questions; responding to the determination that the current consultation process does not meet the interaction termination condition, sending the next round of identification consultation questions to the patient, and returning to the step of receiving the consultation message sent by the patient; responding to the determination that the current consultation process meets the interaction termination condition, determining the target department based on multiple diseases and their corresponding departments, and generating the patient's triage result based on the target department, the technical solution can perform intelligent triage based on multi-round IM interaction and a large model. Specifically, by establishing a multi-round IM consultation interaction from "first sentence to non-first sentence", the consultation stage is automatically determined based on patient conversation data, enabling progressive collection of medical information. By introducing a large model and combining consultation conversation records to generate identification of consultation questions and corresponding departments for diseases, patients can be better guided to provide medical information and intelligent triage results can be generated, improving the accuracy of triage results.
[0104] Figure 6 An exemplary system architecture 600 for a method or apparatus for triaging patients, to which embodiments of the present invention can be applied, is shown.
[0105] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0106] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0107] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0108] Server 605 can be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 601, 602, and 603 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal devices.
[0109] It should be noted that the patient triage method provided in this embodiment of the invention is generally executed by server 605, and correspondingly, the device for patient triage is generally located in server 605.
[0110] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0111] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing terminal devices or servers of the present invention. Figure 7 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0112] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0113] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0114] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0115] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0117] The units or modules described in the embodiments of the present invention can be implemented in software or hardware. The described units or modules can also be housed in a processor. For example, a processor can be described as including a consultation message receiving module, a large model interaction determination module, a first-sentence consultation processing module, a non-first-sentence consultation processing module, a consultation question sending module, and a triage result generation module. The names of these units or modules do not necessarily limit the specific unit or module itself. For example, the consultation message receiving module can also be described as "a module for receiving consultation messages sent by patients and obtaining the session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message."
[0118] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: step S101, receiving a consultation message sent by a patient, and obtaining a session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message; step S102, obtaining a large model interaction identifier corresponding to the current consultation process based on the session round identifier; step S103, in response to the large model interaction identifier being that the large model has not been sent, generating a first consultation prompt based on the consultation message, calling the large model to generate an identification consultation question, returning the identification consultation question to the patient, and updating the large model interaction identifier; step S104; step S105. 4. In response to the large model interaction flag indicating that the large model has been sent, extract the historical session records of the current consultation process, which include consultation messages; generate non-first-sentence consultation prompts based on the historical session records and the department list, and call the large model to generate multiple diseases and their corresponding departments and the next round of differential consultation questions; Step S105. In response to the determination that the current consultation process does not meet the interaction termination condition, send the next round of differential consultation questions to the patient and return to step S101; Step S106. In response to the determination that the current consultation process meets the interaction termination condition, determine the target department based on multiple diseases and their corresponding departments, and generate the patient's triage results based on the target department.
[0119] According to the technical solution of the present invention, by receiving a consultation message sent by a patient, obtaining the session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message; obtaining the large model interaction identifier corresponding to the current consultation process based on the session round identifier; responding to the large model interaction identifier being "large model not sent", generating the first consultation prompt word based on the consultation message, calling the large model to generate identification consultation questions, returning the identification consultation questions to the patient, and updating the large model interaction identifier; responding to the large model interaction identifier being "large model sent", extracting the historical session records of the current consultation process, the historical session records including consultation messages; generating a non-first consultation prompt word based on the historical session records and the department list, calling the large model to generate multiple diseases and their corresponding departments and the next round of identification consultation questions; responding to the determination that the current consultation process does not meet the interaction termination condition, sending the next round of identification consultation questions to the patient, and returning to the step of receiving the consultation message sent by the patient; responding to the determination that the current consultation process meets the interaction termination condition, determining the target department based on multiple diseases and their corresponding departments, and generating the patient's triage result based on the target department, the technical solution can perform intelligent triage based on multi-round IM interaction and a large model. Specifically, by establishing a multi-round IM consultation interaction from "first sentence to non-first sentence", the consultation stage is automatically determined based on patient conversation data, enabling progressive collection of medical information. By introducing a large model and combining consultation conversation records to generate identification of consultation questions and corresponding departments for diseases, patients can be better guided to provide medical information and intelligent triage results can be generated, improving the accuracy of triage results.
[0120] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for triaging patients, characterized in that, include: Step S101: Receive the consultation message sent by the patient, and obtain the session round identifier corresponding to the current consultation process according to the session identifier corresponding to the consultation message; Step S102: Obtain the large model interaction identifier corresponding to the current consultation process based on the session round identifier; Step S103: In response to the large model interaction identifier being that the large model has not been sent, generate the first consultation prompt word according to the consultation message, call the large model to generate identification consultation questions, return the identification consultation questions to the patient, and update the large model interaction identifier; Step S104: In response to the large model interaction identifier indicating that the large model has been sent, extract the historical session records of the current consultation process, the historical session records including the consultation messages; generate non-first-sentence consultation prompts based on the historical session records and the department list, and call the large model to generate multiple diseases and their corresponding departments and the next round of differential consultation questions; Step S105: In response to the determination that the current consultation process does not meet the interaction termination condition, the next round of identification consultation questions is sent to the patient, and the process returns to step S101; Step S106: In response to determining that the current consultation process meets the interaction termination condition, determine the target department based on the multiple diseases and their corresponding departments, and generate the patient's triage result based on the target department.
2. The method according to claim 1, characterized in that, The session identifier is generated based on the patient's patient identifier and the consultation robot identifier when the patient enters the triage service; wherein, the triage service corresponds to at least one consultation process, and each consultation process corresponds to a session round identifier.
3. The method according to claim 1 or 2, characterized in that, The interaction termination conditions include: The current consultation process has completed the maximum number of interactive rounds, or the current consultation process has not completed the maximum number of interactive rounds, but the departments corresponding to the multiple diseases are the same.
4. The method according to claim 1, characterized in that, Generate the first consultation prompt based on the consultation message, including: Obtain the patient's basic information and, in conjunction with the consultation message, assemble and generate the first consultation prompt using a first preset template; Based on the historical conversation records and department list, non-first-sentence consultation prompts are generated, including: The patient's basic information is obtained, and combined with the historical conversation records and department list, non-first-sentence consultation prompts are generated using a second preset template.
5. The method according to claim 1, characterized in that, Before determining the target department based on the various diseases and their corresponding departments, the process also includes: For each of the multiple diseases, obtain the corresponding International Classification of Diseases (ICD) code based on the disease name; Obtain the standard department for the disease according to the International Classification of Diseases (ICD) code; The departments corresponding to the diseases are standardized and modified according to the standard departments; The target department was determined based on the various diseases and their corresponding departments, including: The target department is determined based on the various diseases and their corresponding revised departments.
6. The method according to claim 5, characterized in that, The departments corresponding to the diseases are standardized and modified according to the standard departments, including: In response to the inconsistency between the standard department and the department corresponding to the disease, the standard department is used to replace the department corresponding to the disease for standardization correction; The method further includes: in response to the failure to obtain the corresponding International Classification of Diseases code based on the disease name, directly using the department corresponding to the disease as the corrected department.
7. The method according to claim 5, characterized in that, The method further includes: In response to the failure to obtain the standard department for the disease according to the International Classification of Diseases code, a list of corresponding mapped departments is obtained according to the department corresponding to the disease; Based on the mapped department list and the patient's diagnostic information, department matching prompts are generated, and the large model is invoked to determine the matching mapped departments; The corresponding departments for the diseases are standardized and corrected based on the mapped departments.
8. The method according to claim 5, characterized in that, The target department was determined based on the aforementioned diseases and their corresponding revised departments, including: Based on the preset priorities of each department, the modified department with the highest priority is selected as the target department.
9. The method according to claim 1, characterized in that, The method further includes: The consultation messages from each round of interaction, the data generated by the large model, and the timestamps are stored in the consultation message table for the purpose of retrospective analysis of the patient's condition and optimization of the large model.
10. The method according to claim 1, characterized in that, The triage results for the patient are generated based on the target department, including: The system calls the hospital information system's scheduling interface to obtain the doctor's scheduling information for the target department, and generates the patient's triage result based on the doctor's scheduling information.
11. A device for triaging patients, characterized in that, include: The consultation message receiving module is used to receive consultation messages sent by patients and obtain the session round identifier corresponding to the current consultation process based on the session identifier corresponding to the consultation message. The large model interaction determination module is used to obtain the large model interaction identifier corresponding to the current consultation process based on the session round identifier; The first-sentence consultation processing module is used to respond to the large model interaction identifier being that the large model has not been sent, generate a first-sentence consultation prompt word based on the consultation message, call the large model to generate a differential consultation question, return the differential consultation question to the patient, and update the large model interaction identifier; The non-first-sentence consultation processing module is used to respond to the large model interaction identifier as a large model has been sent, extract the historical session records of the current consultation process, the historical session records include the consultation message; generate non-first-sentence consultation prompt words according to the historical session records and the department list, and call the large model to generate multiple diseases and corresponding departments and the next round of differential consultation questions; The consultation question sending module is used to send the next round of identification consultation questions to the patient in response to the determination that the current consultation process has not met the interaction termination condition, and return to the consultation message receiving module; The triage result generation module is used to respond to the determination that the current consultation process meets the interaction termination condition, determine the target department according to the multiple diseases and their corresponding departments, and generate the patient's triage result according to the target department.
12. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-10.
13. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.