Drug identification and curative effect analysis method based on large model and multi-round treatment data

By combining large language models with multi-round medical records, the accuracy and reliability of drug identification and efficacy analysis in electronic medical records have been solved. This has enabled the handling of drug naming variants and complex contexts, enhanced the judgment of medication status and the completion of historical information, and ensured the stability and credibility of medication results.

CN121662268APending Publication Date: 2026-03-13NANJING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies for drug identification and efficacy analysis in electronic medical records suffer from problems such as numerous drug naming variations, complex contexts, lack of fusion of multi-round consultation information, and model illusions, resulting in low identification accuracy and unreliability.

Method used

Using a large language model combined with a disease diagnosis and treatment knowledge base, drug identification and efficacy analysis are performed through multiple rounds of medical data, including sentence segmentation, word segmentation, and encoding processing. The disease diagnosis and treatment knowledge base and the large model are used for semantic recognition, state judgment, name standardization, and category summarization. Historical medical records are introduced to complete the data, and finally, fact-checking is performed to avoid hallucinations.

Benefits of technology

It improves the accuracy and robustness of drug identification, ensures stable and reliable medication results, and is suitable for medical scenarios such as chronic disease management systems and electronic medical record quality control. It has the advantages of convenient deployment, high accuracy, and strong scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121662268A_ABST
    Figure CN121662268A_ABST
Patent Text Reader

Abstract

The invention discloses a drug identification and curative effect analysis method based on a large model and multi-round treatment data. Comprising the following steps: firstly, giving multiple rounds of doctor seeing records and a disease diagnosis and treatment knowledge base of a patient, and carrying out preprocessing and candidate medicine extraction on text contents to obtain an initial medicine set which is being taken by the patient; thirdly, identifying the drug state to remove invalid drugs, and outputting a drug standard category in combination with disease diagnosis and treatment knowledge base information and large model reasoning ability; if the current doctor-seeing information is lost, automatically backtracking historical doctor-seeing records; through semantic verification and fact check, an accurate and credible recognition result is generated; and finally, according to an identification result, automatically constructing a real world research queue so as to carry out drug curative effect analysis. The method has high accuracy and high clinical adaptability, and large model illusion is avoided. The method is suitable for scenes of chronic disease management, clinical auxiliary decision making, intelligent health follow-up visit, curative effect analysis and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to artificial intelligence medical data processing technology, and in particular to an automated method for disease medication identification and efficacy analysis that integrates a large language model, electronic medical record information and a disease diagnosis and treatment knowledge base. It is applicable to scenarios such as chronic disease management systems, intelligent follow-up platforms, and clinical auxiliary decision-making systems. Background Technology

[0002] With the deepening of information technology development in the global healthcare system, electronic medical record (EMR) systems have been widely deployed in medical institutions at all levels and are gradually becoming the core carrier for medical data collection, storage, and application. EMR systems comprehensively record patients' basic information, chief complaints, present medical history, physical examinations, auxiliary examination results, medical orders, and medication prescriptions, serving as a key data source reflecting the evolution of a patient's disease and the course of treatment. In clinical practice and public health management, accurately identifying patients' medication use and efficacy, especially the long-term medication use and efficacy for chronic diseases such as diabetes, is of great significance for risk assessment, medication adherence analysis, efficacy monitoring, and prevention of adverse drug reactions. Diabetes, as a long-term metabolic chronic disease with a complex treatment pathway, involves a wide variety of medications, often requiring the combined use of multiple drugs and periodic adjustments. Therefore, systematically and accurately extracting patients' medication information and efficacy analysis at different stages is fundamental to building high-quality disease management models and decision support systems.

[0003] Drug identification and efficacy analysis in the real world present numerous challenges. Firstly, real-world data structures are complex, making accurate identification difficult. While a large amount of drug information in EMR data exists in structured forms (such as prescription systems), a significant proportion of crucial information resides in free text, such as medical records, chief complaints, present medical history, and medication prescriptions. This unstructured text often contains information such as patient medication intent, historical drug names, obsolescence instructions, and usage frequency, which are crucial for accurately identifying whether medication is currently being used, whether a drug is obsolescence-free, and the drug's category. However, traditional information extraction methods primarily rely on regular expression matching, drug dictionaries, rule systems, or shallow machine learning models. These methods often exhibit significant limitations when dealing with drug naming variations (such as generic names, brand names, and abbreviations), complex contextual expressions (such as discontinuation, change, observation, and testing), nested negation relationships, or temporal logic, leading to low identification accuracy and severely impacting model reliability and practical application value. Secondly, due to the differences in efficacy among different drugs and their varying onset times, it is difficult to assess the efficacy of different drugs in different populations. Therefore, real-world simulation clinical trial methods are needed to evaluate the efficacy of drugs and drug combinations. This helps medical institutions and drug regulatory authorities to more rationally assess the therapeutic effectiveness and safety of drugs.

[0004] In recent years, pre-trained large language models, represented by Transformer, have developed rapidly. Models such as GPT, BERT, and T5 have achieved breakthroughs in tasks such as natural language understanding, text generation, and question answering systems, and have been widely applied in professional fields such as medicine, law, and finance. Large models possess powerful modeling capabilities for natural language semantics, context, and logical reasoning. They can understand the deep semantics in unstructured text without explicit rules and automatically identify key entities, events, relationships, and other information, greatly expanding the application boundaries of natural language processing technology in complex tasks. Nevertheless, directly applying general-purpose large models to medical scenarios, especially for medication identification and efficacy analysis tasks in chronic disease management, still faces many key challenges.

[0005] First, large models suffer from hallucinations, impacting model reliability. Current large models often exhibit hallucinations, where the generated output, while grammatically correct and logically consistent, does not reflect reality. This hallucination is particularly dangerous in the medical field. For example, a model might "guess" the use of a drug instead of actually extracting it from the original text, directly leading to incorrect medication decisions, affecting the accuracy of clinical analysis or scientific research, and in severe cases, even threatening patient safety. Therefore, in drug identification tasks, it is necessary to construct reasoning mechanisms with clear retrieval paths and traceable textual evidence to improve model interpretability and credibility.

[0006] Secondly, there is a lack of reasoning mechanisms guided by disease domain knowledge: While large models perform well in semantic understanding, for highly specialized diseases like diabetes, the types of drugs are diverse (such as biguanides, sulfonylureas, GLP-1 receptor agonists, DPP-4 inhibitors, insulin, etc.), and the naming and combination of some drugs are quite complex. For example, "Glucophage" is the brand name of "metformin," while "Humalog 50" is an insulin formulation with a specific ratio. These details require rich professional knowledge support, which general pre-trained models struggle to effectively handle without domain fine-tuning or embedding of specialized knowledge, easily leading to problems such as recognition errors and inaccurate classification.

[0007] Secondly, there is a lack of a systematic approach that integrates information from multiple medical visits with structured medication logic: Patients' medication use is often distributed across multiple medical visit time points, exhibiting a high degree of temporal and contextual dependence. For example, even if a specific medication is not mentioned in a particular visit, combining keywords such as "follow-up visit" and "medication pickup" with medication records from the previous visit allows for a reasonable inference that the patient is still using a certain type of medication. Currently, there is a lack of a large-scale model reasoning framework that can systematically integrate data from multiple medical visits, combine text and structured prescription information, and simultaneously support drug effectiveness assessments (such as whether medication has been overused or discontinued). Existing methods are either limited to a single medical visit or cannot track the evolution of medication throughout the medical visit sequence, making it difficult to meet the accuracy and consistency requirements of medication identification in real-world clinical scenarios.

[0008] Therefore, establishing a drug identification and classification method driven by a large model that incorporates professional drug knowledge, has the ability to reason about medication use, and can integrate multiple rounds of medical information has become a key requirement for improving the level of intelligence in medical information processing. Summary of the Invention

[0009] Objective: To address several problems existing in the current technology for drug identification and efficacy analysis in electronic medical records, this invention aims to provide a method for drug identification and efficacy analysis based on a large-scale model and multi-round medical visit data. This method acquires multi-round medical visit data from patients and enhances the large-scale model's ability to identify complex and diverse drug names in patient medical records through disease-based drug knowledge retrieval. It avoids the generation of illusions in the large-scale model by using self-correction methods such as checking drug usage status and drug classification results, thereby improving the accuracy of drug identification. The identification results are obtained by integrating information from multiple rounds of medical visits. Finally, a real-world research cohort is constructed based on the extracted medical record text results to evaluate drug efficacy.

[0010] Technical Solution: To achieve the above-mentioned objectives, this invention provides a drug identification and efficacy analysis method based on a large model and multi-round medical record data. Combining structured and unstructured electronic medical record information, it infers and summarizes multiple rounds of patient medical records to achieve a stable, accurate, and traceable medication judgment process. The main steps include: (1.1) The system loads patient medical records in chronological order and uses natural language processing technology and domain medical knowledge to perform sentence segmentation, word segmentation, and unified encoding on the medical record text. The system loads a disease diagnosis and treatment knowledge base, which includes the generic names, brand names, and drug types of commonly used drugs. Through a large model, the system performs semantic recognition on text segments mentioning drugs to determine whether the drug belongs to the disease and is in a real medication context. If so, a candidate drug set is constructed and output; the medical records are patient medical records in chronological order, with... The disease diagnosis and treatment knowledge base is described. This indicates that the large model is based on This indicates that the candidate drug set is based on express; (1.2) Based on the candidate drug set obtained in step (1.1) and the medical records and disease diagnosis and treatment knowledge base, for each drug in the candidate drug set, determine whether it is in a state of "invalid," "expired," or "ineffective." If the drug is not currently in use, remove the drug and obtain the set of drugs currently in use. The set of drugs currently in use is... express; (1.3) Based on the set of drugs in use obtained in step (1.2), firstly, retrieve potentially relevant drug knowledge from the disease diagnosis and treatment knowledge base, and then process each set of drugs in use. The drugs in the dataset are classified using a large model to identify and merge various names such as brand names and aliases, resulting in standard drug names. The standard names of all currently used drugs are compared with the target drug type set by the large model, outputting a set of currently used drug categories. The target drug type set is defined as follows: This indicates that the set of drug categories currently in use is... express; (1.4) Based on step (1.3), a set of drug categories is obtained. The system determines whether historical medical records are needed. If the drug category set is empty, and the patient's medication information cannot be determined, then the patient's historical medical records are used to re-obtain the drug category set. The historical medical records include... , Other than the current medical record; (1.5) The set of drug categories in use obtained from step (1.3) or (1.4), and the patient's medical records. Disease diagnosis and treatment knowledge base A large model is used for fact-checking. The accuracy and validity of the final results are verified, ensuring they correspond to the disease and medication categories currently used by patients, thus avoiding the illusions inherent in large models and arriving at the final medication outcomes. These medication outcomes are used... express.

[0011] (1.6) Based on the final medication results obtained in step (1.5) and the patient's medical records. The large model will automatically select patients who meet the research characteristics based on their medication use to construct a real-world research cohort, thereby supporting experiments analyzing the efficacy of medication.

[0012] Furthermore, step (1.1) includes the following steps: (2.1) First, define the medical record. Where T represents the time of the current medical record. This indicates the current medical record. to This constitutes a historical medical record. Disease diagnosis and treatment knowledge base. Each drug knowledge in the text is ,in and These represent the drug name, drug type, and drug description, respectively. A text encoding model is used to obtain the corresponding codes between patient medical records and a disease diagnosis and treatment knowledge base. Cosine similarity is then used to compare the similarity between the two codes, and relevant drug knowledge is selected. ; (2.2) Based on the patient's current medical records Related drug knowledge Build large model prompt words To use large models Determine whether the medical record text mentions any medications used for the disease and whether it falls within a real medication context to obtain a set of candidate drugs. .

[0013] Furthermore, step (1.2) includes the following steps: (3.1) First, construct a set of drug discontinuation states. Based on candidate drug set Current patient medical records Related drug knowledge Build large model prompt words To use large models Determine a candidate drug extracted from the medical record Usage status .

[0014] (3.2) Determine the usage status of a certain drug ,like This indicates the medication It is currently in a disabled state. For the discontinuation of medication collection, then Therefore, the set of drugs currently in use. .

[0015] Beneficial Effects: This invention combines a large language model with multi-round medical data fusion, effectively improving the accuracy and robustness of disease medication information identification and efficacy analysis. By constructing a disease diagnosis and treatment knowledge base, it assists the model in identifying real medication behavior under different expression forms through retrieval enhancement, solving problems such as numerous drug naming variations and complex contexts. Simultaneously, it introduces a medication status judgment mechanism to eliminate invalid drugs such as those that have been discontinued or expired, avoiding misjudgments caused by large model illusions. For scenarios with missing information, the system supports backtracking historical medical records for completion reasoning, enhancing its adaptability to long-term follow-up medical records. The final results are also verified for fact-checking and knowledge consistency through a large model, ensuring stable, reliable, and traceable output. Furthermore, this invention combines medical record text to construct a real-world research cohort for further analysis of real medication efficacy. This invention has advantages such as convenient deployment, high accuracy, and strong scalability, and is applicable to various medical scenarios such as chronic disease management systems and electronic medical record quality control. Attached Figure Description

[0016] Figure 1 This is a trajectory diagram of glycated hemoglobin changes in the efficacy analysis experiment of this invention.

[0017] Figure 2 This is a fasting blood glucose change trajectory diagram from the efficacy analysis experiment of this invention.

[0018] Figure 3 This is a flowchart of the method of the present invention.

[0019] Figure 4 This is a system framework diagram of the present invention.

[0020] Specific implementation methods The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0021] This invention discloses a method for drug identification and efficacy analysis based on a large model and multi-round medical data. The method flow is as follows: Figure 3As shown, the method includes the following steps: First, the system loads multiple rounds of patient medical records in chronological order and, combined with natural language processing and a medical knowledge base, performs structured processing on the medical record text, extracting a set of candidate drugs related to the disease using a large model; then, it determines whether the candidate drugs are in a state of obsolescence or discontinuation, eliminating ineffective drugs to obtain a set of drugs currently in use; next, it normalizes the naming and classifies the drug set using the medical knowledge base to obtain a set of drug categories; if the current information is insufficient, it backtracks to historical medical records and repeats the above process to complete the identification of medication use; based on the medical record text, knowledge base, and language model, it performs semantic verification of the results and outputs the final medication identification result; finally, it constructs a research cohort based on the medical record text to further analyze the actual efficacy of medication use in patients. This method has the ability to process multiple rounds of medical records, avoid model illusions, and improve identification accuracy.

[0022] The system framework of this invention is as follows: Figure 4 As shown, the system comprises five parts: a data processing module responsible for loading and preprocessing medical records and knowledge base data; a drug identification module that identifies actual medications mentioned in medical records based on a large model; a drug classification module that standardizes drug naming and completes category summarization; a history integration module that introduces past data to complete the judgment when current medical information is insufficient; and a result verification module that performs semantic consistency checks on the identification results to avoid misjudgments, while also combining pathological texts to construct a research cohort to analyze actual medication efficacy. The system has a clear structure and a complete reasoning chain, making it suitable for various scenarios such as clinical decision support, intelligent follow-up, and chronic disease management.

[0023] The specific implementation methods are described below: 1. Load and preprocess patient medical records and database data to construct structured medical record text and related drug knowledge. The system first defines the patient's medical records. ,in Indicates the most recent time of medical visit. This indicates the current medical record. to This constitutes a historical medical record. In real-world scenarios, medical record texts often originate from electronic medical record systems, encompassing various structured and unstructured fields such as chief complaint, present illness history, medical orders, and medication records. The system loads this medical record data chronologically and preprocesses the raw text using a unified encoding format, providing standardized input for subsequent semantic reasoning.

[0024] Subsequently, the system loads the disease diagnosis and treatment knowledge base. Each drug entity in It consists of three parts: drug name Indicates the standard generic name or brand name of a drug, and the drug type. This indicates the functional category of the drug, such as "insulin analog" or "GLP-1 receptor agonist," and is consistent with the drug description. This database provides detailed information about the drug, including indications, dosage, contraindications, and adverse reactions. It is sourced from the National Medical Products Administration database, hospital drug systems, and publicly available medical knowledge graphs, and supports regular updates and custom expansions.

[0025] To establish semantic links between medical records and medication knowledge, the system uses a unified text encoding model to process medical records. and medical knowledge base The corresponding vectorized representations are obtained respectively. and To obtain the embedding result, where to These are the block representations of the internal paragraphs:

[0026] The text encoding model can utilize a large model pre-trained on medical corpora, such as BERT or BioGPT pre-trained on medical texts, to fully capture domain semantics. The system further calculates the similarity between the medical record embedding representation and the drug embedding representation, as follows:

[0027] Constructing a semantic similarity matrix ,in Indicates the first The medical record text segment and the first The correlation score between the drugs. Combined with the set similarity threshold. If the relevance score is higher than the threshold, it indicates that the drug is relevant, thus filtering out those related to the current medical record. A highly relevant collection of drug knowledge This serves as a candidate knowledge base for subsequent medication status identification and classification. This semantic filtering mechanism effectively bridges the expression differences between free text and standard drug terminology, improving the accuracy and completeness of candidate drug extraction.

[0028] 2. Identify and extract relevant drugs, and monitor their usage status. Obtain the patient's current medical record With the filtered drug knowledge set The system then further determines whether each drug actually appears in the current medication context. Since clinical records often contain recommended medications, historical medications, and anticipated plans—information that is not actually used—relying solely on surface-level matching of drug names often leads to misjudgments. Therefore, semantic reasoning based on the context is necessary. To achieve this, the system relies on the construction of prompt words and the strong semantic understanding capabilities of the large model, using natural language prompts to drive the model for fine-grained contextual classification.

[0029] Knowledge of each relevant drug in the drug set The system constructs prompt word templates. Used to input language models Initiate a query to determine the medical record text. Does the drug exist in the system? The cue word structure is designed as follows:

[0030] Language Model Received prompt word Then, for each potentially related disease medication It will return a boolean result. .in, Indicates drug It was used by patients in their medical records; This indicates that the medication was not used. Finally, the system judged all cases as... Preliminary candidate set of drug components: This set represents the current medical records. The drugs used.

[0031] However, in real-world medical records, the use of medications is complex and varied. (Medications) These may be marked as discontinued, invalid, or have a usage period indicated. Therefore, it is necessary to accurately determine whether each drug is currently in use. The system first defines a set of drug keywords. Next, regarding Each drug Constructing prompt words Guide the model to determine the drug status:

[0032] Model The output will show the status label for each drug. Drug status .like This indicates the drug These medications are currently discontinued. All medications currently discontinued constitute the discontinued medication set. And the collection of drugs currently in use :

[0033] Through the above steps, the system can effectively remove drugs with unclear meanings or those that have been discontinued, retaining only the actual medication entries to form a true record of the patient's medication use.

[0034] 3. Standardization and Category Identification of Drug Names for Diseases Obtain the set of drugs identified in the current medical record that are currently in actual use. Next, the system needs to complete two key tasks: standardizing drug names and identifying the category label corresponding to the patient's current medication. These two tasks aim to address practical problems such as inconsistent descriptions in clinical medical records, multiple brand names or aliases for the same drug, and unclear drug categories, thereby laying an accurate knowledge foundation for subsequent medication recommendations and monitoring.

[0035] First, in the drug name standardization phase, the system uses information such as standard names, trade names, synonyms, and pharmacological descriptions contained in the diagnostic knowledge base to standardize the names of each drug currently in use. Build prompt words And submit to the large model In order to obtain its standardized name The prompt words are designed as follows:

[0036] in, This represents knowledge text related to the extracted drug from the database, such as brand name / alias, ingredient list, indications, dosage and administration, and pharmacological mechanism. (Model) Upon receiving the prompt, the system will combine semantic context information to extract or summarize the standard name of the drug from knowledge. Standardizing drug names through a large model avoids erroneous normalization caused by direct string or regular expression matching. For example, "glimepiride," "Amaryl," and "Amaryl" are essentially the same drug, but direct text matching will be difficult to unify. Standardization based on a large model and related knowledge enhancement can understand the mapping relationships between complex drug names. Finally, the system will denote the normalized drug set as... .

[0037] The next step is the drug category identification stage, where the system will classify the standardized drugs... With the defined set of target drug categories Semantic comparison is performed to determine which categories each drug belongs to. Category set This typically includes standard classifications such as "sulfonylureas," "GLP-1 receptor agonists," "biguanides," and "DPP-4 inhibitors." Therefore, the system constructs prompt words. Using language models Classification is required. Firstly, the overall model needs to reference relevant drug knowledge. Information on relevant drugs, their types, and descriptions was collected to analyze standardized drug sequences. The system retrieves drug names from the database to understand the mapping from drug names to target drug categories and outputs the usage information for the corresponding drug categories. The prompts are as follows:

[0038] Large Model Return the corresponding set of drug category labels. This task is a multi-label text classification task, where each label represents one possible category of the drug. Finally, the set of all normalized drugs and their corresponding categories is obtained. .

[0039] This method effectively overcomes many challenges faced by traditional drug identification in clinical text processing, including diverse drug name formats (such as Chinese brand names, English abbreviations, and Latin scientific names), redundant descriptions (brand names and ingredient names appearing simultaneously in the same medical record), ambiguous category classifications (such as compound drugs or cross-category use), and complex natural language structures (such as multiple modifications, inversions, and context dependencies). By integrating the language understanding capabilities of a large model with the generalization ability of medical knowledge, the system achieves the goal of accurately converting unstructured drug descriptions into structured category labels, providing a high-quality semantic input foundation for downstream tasks such as personalized medication recommendation, automated prescription review, and clinical risk warning.

[0040] 4. A medication identification framework integrating multi-round medical visit data In practical clinical applications, single-round medical records (i.e., text generated during a particular outpatient or inpatient visit) may not explicitly mention the patient's disease and medication information, especially when the round of visits is not specifically for disease management, making this type of "information gap" more likely. Therefore, after performing drug name normalization and category identification steps, the system obtains a category set. Subsequently, a robust completion mechanism integrating historical medical data was specifically designed to improve the fault tolerance and coverage of the drug identification system in low-information scenarios, with the number of backtracking steps recorded as... Then the following conditions are met:

[0041] Current medical records The extracted drug category set is denoted as ,like Empty (i.e., the system failed to identify any medication category related to the disease) If a matching medication is found, the system will automatically retrieve a historical medical record, i.e. =1, retrieve the patient's most recent medical record. And based on this historical medical record As input, the aforementioned drug identification module is executed again, including drug extraction, actual administration status determination, standard name normalization and category mapping, and finally outputting a new set of categories. Therefore, ultimately When the filter is empty, the system will use This serves as the final medication category result. If historical round identification also fails, i.e., | If |=0, the system can choose to trace back further to an earlier medical record, such as... =2 and so on until recognition is successful.

[0042] This history completion mechanism not only significantly improves the system's adaptability to scenarios where "the current round of information is incomplete," but also effectively utilizes the accumulated medical record data from long-term patient follow-ups, ensuring the stability and continuity of the drug identification module.

[0043] 5. Verify the medication results by combining medical records. After combining data from multiple rounds of medical visits, the system obtained the final total of disease medication types as follows: This collection is derived from current medical records. Or, when no effective drug can be identified, it comes from historical records. , Historical medical records are also considered. Because large models may exhibit "illusion" during generation—that is, outputting drug classifications that do not conform to medical facts or the knowledge base, or mistakenly identifying a patient as having used a certain medication—the system needs to incorporate a fact-checking mechanism to verify and confirm candidate drug categories, thereby generating a reliable final medication result. Therefore, the system is re-based on knowledge from the disease diagnosis and treatment knowledge base. The above-mentioned preliminary identification of drug names and categories and medical records Input together into the language model Construct prompts for verification tasks The prompt content is designed as follows:

[0044] After receiving the prompt, the model will combine the existing classification results with the knowledge base data to perform semantic reasoning and comparison, and complete the following three levels of verification tasks: (1) Determine whether there is a disease medication situation in the original medical record. If not, retrieve and analyze the historical text; (2) Determine whether the drug is actually used for disease treatment based on the context of the original medical record, and avoid misidentifying drugs used for other comorbidities or non-diseases as disease treatment drugs; (3) Assess the degree of correlation between the medication situation and its corresponding category, that is, whether the drug has been correctly classified.

[0045] If a drug classification is deemed incorrect by the model (e.g., the category does not exist, the drug is not for a specific disease, or the identification result is out of clinical context), then that record will be removed from the set. The system removes incorrect entries and outputs the corresponding analysis reasons. If there are any omissions in classification or ambiguities in identification, the system allows the large model to complete or correct the correct category of the drug based on the component information in the knowledge base and the usage context.

[0046] 5. Construct a real-world research cohort based on medical record texts for drug efficacy analysis. The system obtains the final medication result for the disease, which is recorded as follows: To more accurately determine the differences in drug efficacy among different populations in a real-world setting and obtain efficacy analysis results, the system will screen eligible trial patients based on the results of the large-scale model. For example, it will screen patients who did not use the drug within three months prior to admission, started the drug after discharge, and continued to use the drug during subsequent follow-ups to construct a real-world research cohort.

[0047] After the above process is completed, the system will retain the medication classification results. And the research cohort selected from the results of the large language model. Therefore, the system will obtain the results for each drug. Standardized names, and trusted category labels verified by a knowledge base. Unlike traditional manual review and rule-based drug identification systems, this approach relies on a large model's ability to understand natural language and generalize knowledge. It also incorporates a knowledge base to establish factual boundaries, thus constructing an integrated closed loop for drug information processing encompassing generation, verification, and efficacy analysis. This strategy significantly reduces the risk of hallucinations, improves the semantic consistency of drug classification and the medical rationality of efficacy analysis, and provides safe, standardized, and reliable structured data for subsequent personalized medication recommendations, prescription review, and risk alerts.

[0048] A specific embodiment of the present invention also provides a drug identification and efficacy analysis system based on a large model and multi-round medical data, such as... Figure 4 As shown, it includes: The data processing module is responsible for loading and preprocessing medical record texts and disease diagnosis and treatment knowledge base data, including text segmentation, noise reduction, structured extraction and other operations, while filtering out disease and drug knowledge related to the medical record texts. The drug identification module identifies drugs currently in use from the processed medical record text. By calling a large-scale model, it performs semantic analysis on the text to determine which drug-related terms correspond to actual medication use, while simultaneously removing non-medication-related items such as historical mentions, comparative instructions, and discarded prescriptions. The final result is a set of disease-related drugs currently being used by the patient. The drug classification module compares the identified drug names with standard names in the knowledge base, unifying different expressions such as trade names and aliases into a unified drug name format. Next, combining the drug's description information with a predefined set of categories, it classifies each drug and identifies its corresponding drug category. Ultimately, a structured drug-category correspondence is obtained, forming a clear set of disease-specific medication labels. The historical medical record integration module, when no disease medication category can be identified in the current medical record, retrieves the patient's previous medical record and re-enters this historical medical record text into the drug identification and classification module. This process of drug extraction, standardization, and classification is repeated to obtain potentially missed disease medication information. This mechanism enhances robustness to information gaps and improves the system's accuracy in scenarios with incomplete data.

[0049] The results verification and medication efficacy analysis module combines the patient's medical context, the identified drug category, and medical facts from the knowledge base to verify the consistency of the final medication decision. For example, it checks whether the drug category matches the disease description and whether the drug combination is reasonable, avoiding potential misunderstandings or semantic illusions that might occur in large models. After verification, the system outputs the final confirmed disease and medication category. Finally, based on the identification results, a real-world research cohort is automatically constructed for drug efficacy analysis experiments.

[0050] This invention differs from existing electronic medical record processing systems that rely on template matching or rule retrieval. Addressing the challenges of complex clinical medication descriptions, significant individual differences, and fragmented historical information, it constructs a disease medication identification and classification system that integrates a large language model with multi-round consultation information. Starting from the current medical record, the system leverages the advantages of a large model in natural language understanding and medical knowledge generalization to accurately identify actually used medications and complete standardized, multi-label classification, effectively solving problems such as inconsistent drug names and ambiguous category attribution. When current medical record information is insufficient, the system can automatically retrieve the patient's historical consultation records and reuse validated identification processes for supplementary judgment, thereby enhancing the system's robustness and completeness in the event of data gaps. Finally, by introducing a semantic verification module, the identification results undergo dual verification of semantic consistency and medical rationality, preventing misjudgments caused by model illusions and providing a foundation for detailed analysis of actual medication efficacy. The overall system achieves an organic combination of structured medical record information, standardized medication information, refined category labels, and cross-round information fusion, laying the foundation for accurate drug identification and real efficacy analysis. It can significantly improve the accuracy and practicality of tasks such as intelligent prescription review, personalized recommendation, and clinical risk warning, and has significant clinical application value and promotion potential.

[0051] To demonstrate the aforementioned advantages, this invention was evaluated in detail based on real medical data from diabetic patients at a certain hospital. To verify its effectiveness, the table below compares the results of this method with those obtained manually by professional doctors.

[0052] As shown in Table 1, this invention achieved high accuracy in the extraction of various types of diabetes drugs, surpassing the overall accuracy of manual extraction by professional doctors. Secondly, Table 2 shows the comparison of extraction accuracy in multiple follow-up scenarios. This invention demonstrates greater robustness in the continuity and consistency of follow-up data, significantly outperforming manual extraction. In summary, the experimental results indicate that compared to manual extraction by professional doctors, this invention not only maintains a high extraction accuracy but also achieves more stable performance in complex, multi-round follow-up scenarios, thus demonstrating strong practical application value. Figure 1 and Figure 2As shown, a real-world research cohort was constructed based on a large-scale model screening. The trial employed an active comparator-new-user (ACNU) design. Inclusion criteria for participants were patients with type 2 diabetes, aged over 18 years, who had not used the aforementioned medication within the three months prior to admission and had started the medication anew after discharge. The trial start date was set at the patient's discharge date, and the endpoint was the last follow-up visit. Outpatient records with relevant laboratory test information most recent to each follow-up visit were used as the laboratory test information for that follow-up visit. The primary endpoints were changes in glycated hemoglobin (HbA1c) and fasting plasma glucose (FPG) from baseline. Figure 1 As shown, compared with DPP4 inhibitors, there were no significant differences in the changes in HbA1c and FPG levels at the follow-up endpoints of newly initiated SGLT2 inhibitors. Figure 2 As shown, there was no significant difference in the changes in HbA1c and FPG levels at the follow-up endpoint between newly initiated GLP-1 receptor agonists and DPP4 inhibitors, indicating that the constructed study cohort validated the efficacy of SGLT2 inhibitors versus GLP-1 receptor agonists.

[0053] Table 1: Comparison of accuracy between this method and manual extraction for different types of diabetes drugs

[0054] Table 2: Accuracy comparison between our method and manual extraction method based on multi-round follow-up data

Claims

1. A method for drug identification and efficacy analysis based on large-scale models and multi-round medical data, characterized in that, Includes the following steps: (1.1) The system loads patient medical records in chronological order and performs sentence segmentation, word segmentation, and unified encoding processing on the medical record text based on disease domain medical knowledge; the system loads a disease diagnosis and treatment knowledge base, including the generic names, brand names, and drug types of commonly used drugs; through a large model, the system performs semantic recognition on text segments mentioning drugs to determine whether the drug belongs to the disease and is in a real medication context; if so, a candidate drug set is constructed and output; the medical records are patient medical records in chronological order, with... This indicates that the disease diagnosis and treatment knowledge base is based on... This indicates that the large model is based on This indicates that the candidate drug set is based on express; (1.2) Based on the candidate drug set, medical records, and disease diagnosis and treatment knowledge base obtained in step (1.1), determine whether each drug in the candidate drug set is in a "discarded," "expired," or "invalid" state. If the drug is not currently in use, remove the drug and obtain the set of drugs currently in use; the set of drugs currently in use is... express; (1.3) Based on the set of drugs in use obtained in step (1.2), firstly, retrieve potentially relevant drug knowledge from the disease diagnosis and treatment knowledge base, and then process each set of drugs in use. The drugs in the dataset are classified and categorized using a large model to identify and merge brand names and aliases, obtaining standard drug names. The standard names of all currently used drugs are compared with the target drug type set to be identified by the large model, outputting a set of currently used drug categories. The target drug type set to be identified is... This indicates that the set of drug categories currently in use is... express; (1.4) The set of drug categories obtained based on step (1.3). To determine whether to use historical medical records: if the drug category set is empty and the patient's disease medication information cannot be determined, then the historical medical records are used to obtain the drug category set; (1.5) Based on the aforementioned drug category set and the aforementioned medical records Disease diagnosis and treatment knowledge base Using a large model for fact-checking verifies whether the final results are accurate and effective, and whether they correspond to the disease medication category that the patient is currently using, in order to avoid the illusion of the large model and thus obtain the final medication results; The final medication results were used express; (1.6) Based on the final medication results and medical records The large model automatically selects patients who meet the research characteristics based on their medication use to build a real-world research cohort, thereby supporting the analysis of medication efficacy.

2. The method for drug identification and efficacy analysis based on a large model and multi-round medical data as described in claim 1, characterized in that, Step (1.1) includes the following steps: (2.1) First, define the medical record. Where T represents the time of the current medical record. This indicates the current medical record. to Constitutes historical medical records; disease diagnosis and treatment knowledge base Each drug in Defined as ,in and These represent the drug name, drug type, and drug description, respectively. A text encoding model is used to obtain the corresponding codes in the patient's medical records and the disease diagnosis and treatment knowledge base. Cosine similarity is then used to compare the similarity between the two codes, and relevant drug knowledge is selected. ; (2.2) Based on the current patient's medical records Related drug knowledge Build large model prompt words To use large models Determine whether the medical record text mentions the use of a medication for the disease and whether it is currently in use, thus obtaining a set of candidate drugs. .

3. The method for drug identification and efficacy analysis based on a large model and multi-round medical data as described in claim 2, characterized in that, Step (1.2) includes the following steps: (3.1) First, construct a set of drugs that are ineffective. Based on candidate drug set Current patient medical records Related drug knowledge Build large model prompt words To use large models Determine a candidate drug extracted from the medical record Usage status ; (3.2) Determine the usage status ,like This indicates the medication It is currently in a disabled state. For the discontinuation of medication collection, then The collection of drugs currently in use .