A method, device, storage medium and electronic device for identifying the rationality of medication
By constructing a drug use knowledge graph and combining large language models, the rationality of the drug use list is automatically judged, and the problem of high manual review costs in the existing technology is solved, and efficient and accurate rational identification of drug use is achieved.
Patent Information
- Application Number
- CN202411629658.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The existing method of rational identification of medications relies on manual review and is costly, especially when the amount of medical insurance reimbursement materials is large.
By obtaining a drug use knowledge map, including the correspondence between disease and therapeutic drugs and the usage relationship between therapeutic drugs, combined with a fine-tuned large language model, automatically screen and judge the rationality of the drug use list.
It realizes the rationality of drug use in automated identification, reduces the cost and time of manual review, and improves the efficiency and accuracy of drug use in rational identification.
Smart Images

Figure CN119170192B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and specifically relates to a method, device, storage medium, and electronic device for identifying the rationality of medication use. Background Art
[0002] The rationality of medication use refers to the behavior of doctors selecting appropriate medications, dosages, and treatment courses according to the patient's condition and treatment needs during the medical process. This behavior aims to ensure that patients achieve the best treatment effect while avoiding unnecessary waste and risks. With the continuous development of medical technology and the increasing medical needs, the demand for medical insurance reimbursement is also increasing.
[0003] Currently, the commonly used method for identifying the rationality of medication use is as follows: The medical insurance department organizes professionals to manually review and compare the medication usage in the medical insurance reimbursement materials with the clinical guidelines to determine the rationality of medication use. However, once the volume of medical insurance reimbursement materials is large, the manual review cost for identifying the rationality of medication use in this way is relatively high. Summary of the Invention
[0004] In order to reduce the manual review cost for identifying the rationality of medication use, this application provides a method, device, storage medium, and electronic device for identifying the rationality of medication use.
[0005] In the first aspect of this application, a method for identifying the rationality of medication use is provided, which specifically includes:
[0006] Obtain a medication knowledge graph, where the medication knowledge graph includes the correspondence between diseases and treatment medications and the usage relationship between treatment medications;
[0007] Obtain the patient's clinical diagnosis information and medication list information, and screen target information from the medication knowledge graph according to the clinical diagnosis information and the medication list information, where the target information is used to determine whether the medication list information is reasonable for the clinical diagnosis information;
[0008] Determine the medication rationality result corresponding to the medication list information according to the target information and the fine-tuned large model, where the fine-tuned large model is a model fine-tuned and trained by combining graph data and large language model technology.
[0009] By adopting the above technical solution, a medication knowledge graph is obtained. Then, based on the corresponding relationships between different diseases and treatment drugs in the medication knowledge graph and the usage relationships between different treatment drugs, the relationship between the clinical diagnosis information and the treatment drugs in the medication knowledge graph is determined. Combining with the usage relationships between pairwise drugs in the medication list information in the medication knowledge graph, target information is then screened out, which is the basis for determining whether the medication list information is reasonable for the clinical diagnosis information. Finally, based on the target information, that is, the basis for determination, the fine-tuned large model is used to determine whether the medication list information is reasonable for the clinical diagnosis information, thereby realizing the automatic identification of the medication rationality of the medication list information without the need for manual review based on clinical guidelines one by one, thus reducing the manual review cost of identifying medication rationality.
[0010] Optionally, the obtaining of the medication knowledge graph specifically includes:
[0011] Obtain medical content, where the medical content includes descriptions of different diseases and corresponding treatment drugs and usage instructions for different treatment drugs;
[0012] Perform desensitization processing on the medical content to obtain the processed result;
[0013] Through a preset target large model, extract at least one knowledge graph triple from the processed result. The knowledge graph triple is a set composed of a disease, a treatment drug, and the corresponding relationship between the two, or a set composed of different treatment drugs and the corresponding usage relationships between different treatment drugs. The target large model is a model that combines graph data and large language model technology;
[0014] Merge each of the knowledge graph triples into the initial knowledge graph in a preset graph database to obtain the medication knowledge graph.
[0015] By adopting the above technical solution, desensitization processing is performed on the obtained medical content to obtain the processed result, thereby removing the personal privacy data therein. Then, the relationships between entities in the processed result are identified through the target large model, and knowledge graph triples are extracted. Finally, the knowledge graph triples are merged into the initial knowledge graph to realize the update and optimization of the initial knowledge graph, making the subsequent target information screened from the medication knowledge graph more comprehensive.
[0016] Optionally, before determining the medication rationality result corresponding to the medication list information according to the target information and the fine-tuned large model, it further includes:
[0017] Generate fine-tuning training samples according to the medication knowledge graph;
[0018] Fine-tune and train a preset target large model with the fine-tuning training samples, obtain the fine-tuned large model and store it in a preset database, where the target large model is a model that combines graph data and large language model technology;
[0019] When drug use rationality identification is required, call the fine-tuned large model from the database.
[0020] By adopting the above technical solution, fine-tune and train the target large model with the fine-tuning training samples, obtain the fine-tuned large model and store it in a preset database, so that the model has a stronger ability to understand or process the relationship between diseases and treatment drugs, and between treatment drugs, and enables the subsequent fine-tuned large model to more accurately identify the rationality of drug use.
[0021] Optionally, the screening of target information from the medication knowledge graph according to the clinical diagnosis information and the medication list information specifically includes:
[0022] Construct a first graph query statement according to the clinical diagnosis information;
[0023] Through the first graph query statement, query the set of correct treatment drugs and the set of prohibited treatment drugs corresponding to the diseases in the clinical diagnosis information from the medication knowledge graph;
[0024] Construct a second graph query statement according to each actual treatment drug in the medication list information;
[0025] According to the second graph query statement, query the target usage relationship between each of the actual treatment drugs from the medication knowledge graph, and determine the set of correct treatment drugs, the set of prohibited treatment drugs, and each of the target usage relationships as target information.
[0026] By adopting the above technical solution, based on the first graph query statement, entities associated with the diseases in the clinical diagnosis information are found from the medication knowledge graph, that is, the set of correct treatment drugs and the set of prohibited treatment drugs; then based on the second graph query statement, the usage relationship between two actual treatment drugs is found from the medication knowledge graph, and finally the target information is determined accordingly, so as to facilitate providing a judgment basis for the subsequent fine-tuned large model to judge the rationality of drug use.
[0027] Optionally, the determination of the drug use rationality result corresponding to the medication list information according to the target information and the fine-tuned large model specifically includes:
[0028] Concatenate the target information, the clinical diagnosis information, and the medication list information to obtain a concatenated result;
[0029] Construct the prompt task information, and splice the prompt task information with the splicing result to obtain the final prompt instruction;
[0030] Input the final prompt instruction into the fine-tuned large model to obtain at least one determination result, and determine the medication rationality result corresponding to the medication list information according to each determination result. The final prompt instruction is used to determine the rationality of the medication list information based on the target information.
[0031] By adopting the above technical solution, the target information, clinical diagnosis information, and medication list information are spliced to obtain a splicing result, thereby integrating the determination object and determination basis for determining medication rationality. Further, the prompt task information and the splicing result are spliced again to obtain the final prompt instruction. Finally, this final prompt instruction is input into the fine-tuned large model. Through this final prompt instruction, it is better to guide the judgment of the medication rationality of the medication list information according to the determination basis, that is, the target information, so that the medication rationality result is relatively accurate.
[0032] Optionally, the prompt task information includes a first determination task, a second determination task, a third determination task, and a fourth determination task. The first determination task is to determine whether the actual treatment drug is effective. The second determination task is to determine whether the actual treatment drug is a contraindicated drug for the disease in the clinical diagnosis information. The third determination task is to determine whether there are mutual side effects between the actual treatment drugs. The fourth determination task is to determine whether the dosage of the actual treatment drug is reasonable. The inputting the final prompt instruction into the fine-tuned large model to obtain at least one determination result specifically includes:
[0033] Input the final prompt instruction into the fine-tuned large model. If the actual treatment drug does not exist in the set of correct treatment drugs, then determine that the corresponding actual treatment drug is ineffective as the determination result of the first determination task;
[0034] If the actual treatment drug exists in the set of contraindicated treatment drugs, then determine that the corresponding actual treatment drug is a contraindicated drug for the disease in the clinical diagnosis information as the determination result of the second determination task;
[0035] If the target usage relationship between the actual treatment drugs is that there are mutual side effects, then determine that there are mutual side effects between the corresponding actual treatment drugs as the determination result of the third determination task;
[0036] If the dosage of the actual therapeutic drug in the set of correct therapeutic drugs is inconsistent with the dosage of the corresponding correct therapeutic drug, then the dosage of the corresponding actual therapeutic drug is unreasonably determined as the determination result of the fourth determination task.
[0037] By adopting the above technical solution, if a single actual therapeutic drug is not in the set of correct therapeutic drugs, it indicates that it is not a symptomatic drug for the disease in the clinical diagnosis information, and the corresponding actual therapeutic drug is determined to be ineffective. If a single actual therapeutic drug is in the set of prohibited therapeutic drugs, the corresponding actual therapeutic drug is determined to be a prohibited drug for the disease in the clinical diagnosis information; if the target usage relationship between actual therapeutic drugs is considered to have mutual side effects, it indicates that the corresponding actual therapeutic drugs cannot be used together; further, if the dosage of the actual therapeutic drug in the set of correct therapeutic drugs is inconsistent with the dosage of the corresponding correct therapeutic drug, it indicates that the dosage of the corresponding actual therapeutic drug in the medication list information is unreasonable for disease diagnosis and treatment.
[0038] Optionally, determining the medication rationality result corresponding to the medication list information according to each of the determination results specifically includes:
[0039] If there is a target determination result among each of the determination results, then determine that the medication rationality result corresponding to the medication list information is unreasonable, where the target determination result includes one of the following: a single actual therapeutic drug is ineffective, a single actual therapeutic drug is a prohibited drug, there are mutual side effects between a single actual therapeutic drug and other actual therapeutic drugs, or the dosage of a single actual therapeutic drug is unreasonable;
[0040] If there is no such target determination result among each of the determination results, then determine that the medication rationality result corresponding to the medication list information is reasonable.
[0041] By adopting the above technical solution, if there is a target determination result among each determination result, it indicates that there are taboos in the medication list information for the patient's disease treatment, the medication list information is not fully applicable to the patient's disease, there are mutual side effects between actual therapeutic drugs, or the dosage of actual therapeutic drugs is unreasonable. Then, determine that the medication rationality result is unreasonable; if there is no target determination result among each determination result, it indicates that all actual therapeutic drugs in the medication list information are neither prohibited drugs, nor have mutual side effects between them, can be used simultaneously, and all actual therapeutic drugs are effective for the disease in the clinical diagnosis information and the dosage is also reasonable. Then, determine that the medication rationality result is reasonable, thereby realizing multi-dimensional evaluation of the rationality of the medication list information and making the identification of medication rationality more accurate.
[0042] Optionally, the target large model is Graph+LLM.
[0043] By adopting the above technical solutions, the target large model combined with the graph database technology can help the large language model better understand the relationships between entities and improve its own expression and reasoning abilities. Through the graph database technology, it is also possible to extract the relationships and semantic information between entities from large-scale text data, enabling the target large model to accurately extract entities and the relationships between entities from medical content.
[0044] In a second aspect of the present application, a device for identifying the rationality of drug use is provided, specifically including:
[0045] A graph acquisition module, configured to acquire a drug use knowledge graph, where the drug use knowledge graph includes the corresponding relationships between diseases and treatment drugs and the usage relationships between treatment drugs;
[0046] An information screening module, configured to acquire the clinical diagnosis information and drug use list information of a patient, and screen target information from the drug use knowledge graph according to the clinical diagnosis information and the drug use list information, where the target information is used to determine whether the drug use list information is reasonable for the clinical diagnosis information;
[0047] A rationality determination module, configured to determine the drug use rationality result corresponding to the drug use list information according to the target information and the fine-tuned large model, where the fine-tuned large model is a model obtained by combining graph data and large language model technology and fine-tuning training.
[0048] By adopting the above technical solutions, the graph acquisition module acquires the drug use knowledge graph, then the information screening module acquires the clinical diagnosis information and drug use list information of the patient, and screens target information from the drug use knowledge graph according to the clinical diagnosis information and the drug use list information. Finally, the rationality determination module determines the drug use rationality result corresponding to the drug use list information based on the target information and the fine-tuned large model.
[0049] In a third aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps described in any item of the first aspect are executed.
[0050] In a fourth aspect of the present application, an electronic device is provided, specifically including:
[0051] A processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the processor is configured to load and execute the computer program stored in the memory so that the electronic device executes the method described in any item of the first aspect.
[0052] In summary, the present application includes at least one of the following beneficial technical effects: Based on the correspondence between different diseases and treatment drugs in the medication knowledge graph and the usage relationships between different treatment drugs, the relationship between the treatment drugs in the medication knowledge graph and the clinical diagnosis information, as well as the relationship between the treatment drugs existing in the medication list information, are determined. Then, the target information, that is, the judgment basis for determining whether the medication list information is reasonable for the clinical diagnosis information, is screened out from them. Finally, based on the target information, that is, the judgment basis, the large model after fine-tuning is used to determine whether the medication list information is reasonable for the clinical diagnosis information, thereby realizing the automatic identification of the medication rationality of the medication list information without the need for manual review one by one based on clinical guidelines, thus reducing the manual review cost of identifying medication rationality. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a schematic flowchart of a method for identifying medication rationality provided by an embodiment of the present application;
[0054] Figure 2 is a schematic flowchart of another method for identifying medication rationality provided by an embodiment of the present application;
[0055] Figure 3 is a schematic structural diagram of a device for identifying medication rationality provided by an embodiment of the present application;
[0056] Figure 4 is a schematic structural diagram of another device for identifying medication rationality provided by an embodiment of the present application.
[0057] Description of the reference numerals: 11, graph acquisition module; 12, information screening module; 13, rational judgment module; 14, model fine-tuning module. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.
[0059] In the description of the embodiments of the present application, words such as "exemplary", "for example", or "for illustration" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary", "for example", or "for illustration" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example", or "for illustration" is intended to present related concepts in a specific manner.
[0060] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, B exists alone, and A and B exist simultaneously. Additionally, unless otherwise specified, the meaning of the term "plural" refers to two or more. For example, a plurality of systems refers to two or more systems, and a plurality of screen terminals refers to two or more screen terminals. Furthermore, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise particularly emphasized in other ways.
[0061] See Figure 1 , the embodiments of the present application disclose a schematic flow chart of a method for identifying the rationality of drug use, which can be implemented depending on a computer program or run on a drug use rationality identification device based on the von Neumann architecture. This computer program can be integrated into an application or run as an independent tool-like application, and specifically includes:
[0062] S101: Obtain a drug use knowledge graph, where the drug use knowledge graph includes the correspondence between diseases and treatment drugs and the usage relationship between treatment drugs.
[0063] Specifically, a knowledge graph is a structured semantic knowledge base used to describe concepts and their relationships in the real world. The basic unit of a knowledge graph is a triple composed of "entity-relationship-entity". The form of the triple is concise and intuitive, which can clearly express the semantic association between entities, thus clearly expressing various knowledge. The triple can be expressed as: <entity, relationship, entity>. Exemplarily, <A, father-son, B>, where A is one of the entities, B is one of the entities, and "father-son" represents the association between the two entities. In the embodiments of the present application, the medication knowledge graph is a structured semantic network specifically representing medication-related knowledge, characterizing entities such as medications and diseases and the relationships between the entities. Specifically, the medication knowledge graph includes the corresponding relationship between diseases and treatment medications, and the usage relationship between different treatment medications. Among them, the corresponding relationship is divided into the applicable relationship and the contraindication relationship between diseases and treatment medications. The applicable relationship means that the treatment medication is effective for the treatment of the disease, and the contraindication relationship means that the treatment medication is not applicable to the disease. In addition, the usage relationship between treatment medications is divided into having mutual side effects and not having mutual side effects. Having mutual side effects means that side effects will occur when two treatment medications are used simultaneously. Not having mutual side effects means that no side effects will occur when two treatment medications are used simultaneously. Exemplarily, the usage relationship between cephalosporin and amoxicillin is having mutual side effects, and allergic reactions will occur when the two are used simultaneously. In other embodiments, the medication knowledge graph can also characterize entities such as medications, diseases, symptoms, treatment plans, etc. and the relevant relationships between the entities.
[0064] Further, the execution subject of a medication rationality recognition method disclosed in the embodiments of the present application is a server. The server is connected to the terminal through a wireless network. A client or a small program related to medication recognition is installed in the terminal. The server is the background server of the client or the small program. The terminal can be a smart phone or a personal computer. The server can be an independent physical server or a server cluster or a distributed system composed of multiple physical servers. The specific application scenario is as follows: When a person needs to perform a medication rationality analysis on various medications in the medication list information of a patient, then open the client or the small program in the terminal and click the "Start button" for medication rationality recognition on the opened interface. In response to this operation, the server first obtains the medication knowledge graph.
[0065] Further, a feasible way to obtain the medication knowledge graph is: Through web crawler technology, obtain medical knowledge Q&A with high timeliness and the drug instructions of various different treatment medications. The medical knowledge Q&A is the Q&A about different diseases and the corresponding treatment drug instructions, and the drug instructions contain the usage instructions of the corresponding treatment medications. Finally, determine the obtained content as medical content. Among them, the treatment drug instructions are mainly the instructions for the symptomatic drugs and contraindicated drugs for diseases.
[0066] Further, desensitize the medical content to remove the personal privacy data therein, and obtain the processed result. Among them, desensitization processing is a data protection technology aimed at hiding or obscuring sensitive information to prevent unauthorized access and disclosure. Specifically, desensitization processing is performed by means of hash desensitization. In other embodiments, desensitization processing can also be performed by means of encryption desensitization. Then, input the processed result into a preset target large model, and extract at least one knowledge graph triple from the processed result through this target large model. Finally, merge the extracted knowledge graph triples into the initial knowledge graph in the preset graph database to update the initial knowledge graph and obtain the medication knowledge graph. It should be noted that the graph database can be a Neo4j graph database. In other embodiments, it can be a TigerGraph graph database. In addition, the target large model can be Graph+LLM. In other embodiments, it can also be GNN-BERT. Among them, Graph+LLM combines graph database technology (Graph) with large language model (Large Language Model, LLM). Graph database technology can help the large language model better understand the relationships between entities and improve its own expression and reasoning capabilities. Through graph database technology, it is also possible to extract the relationships and semantic information between entities from large-scale text data.
[0067] Among them, the target large model is a model that combines graph data and large language model technology. By combining graph data and language models, it aims to improve the model's ability to process or identify complex relationship data, such as different entities and the relationships between different entities. Therefore, the target large model can identify different entities and the relationships between them in the processed result and convert them into the form of triples. Graph data is a data structure composed of vertices and edges. Each vertex represents an entity, and each edge represents the association relationship between two entities. In addition, the knowledge graph triple is a set composed of diseases, treatment drugs, and the corresponding relationships between them, or a set composed of different treatment drugs and the corresponding usage relationships between different treatment drugs. Exemplarily, the extracted knowledge graph triple related to medication is: <Drug a, applicable to, Disease b>.
[0068] S102: Obtain the clinical diagnosis information and medication list information of the patient, and screen the target information from the medication knowledge graph according to the clinical diagnosis information and the medication list information. The target information is used to determine whether the medication list information is reasonable for the clinical diagnosis information.
[0069] Specifically, after obtaining the medication knowledge graph, extract the image of the prescription from the database storing images of materials such as the patient's medical records and prescription slips, and identify the patient's clinical diagnosis information and medication list information from the prescription image through Optical Character Recognition (OCR) technology. The clinical diagnosis information includes the patient's disease information or symptoms. The medication list information includes the patient's actual treatment medications and corresponding usage and dosage information. In other embodiments, the patient's clinical diagnosis information and medication list information can also be identified from the prescription image through a preset multimodal large model. In another embodiment, the image of the prescription can also be obtained by being sent from the patient's terminal. In yet another embodiment, the patient's clinical diagnosis information and medication list information can be directly obtained from the medical system or the medical information storage database. It should be noted that the patient can be a patient with medical insurance reimbursement needs or a patient without medical insurance reimbursement needs.
[0070] Further, according to the obtained clinical diagnosis information and medication list information, screen the target information from the medication knowledge graph. The target information is used to determine whether the medication list information is reasonable for the clinical diagnosis information. In the embodiments of the present application, a feasible screening method is: Since the medication knowledge graph is stored in the Neo4j graph database, according to the disease or symptom of the patient in the clinical diagnosis information, construct the first graph query statement through the corresponding cypher query language of the Neo4j graph database. Exemplarily, if the patient's disease is "pneumonia", then the corresponding first graph query statement is:
[0071] MATCH (d:Disease {name:"pneumonia"})-[r:TREATS]-(m:Medication)
[0072] RETURN d.name AS Disease, m.name AS Medication; where, "MATCH (d:Disease{name:\"pneumonia\"})" means to find the node with the label Disease and the value of the name attribute of this node is "pneumonia"; "-[r:TREATS]-" means to match the relationship from a disease node to a treatment medication node; "(m:Medication)" means the other end of the specified relationship, that is, the node with the Medication label; "RETURN d.name AS Disease,m.name AS Medication" means the columns of the query result, including the disease name (d.name) and the treatment medication name (m.name).
[0073] Further, through this first graph query statement, the set of correct treatment drugs corresponding to the diseases in the medication knowledge graph is queried from the clinical diagnosis information, that is, each treatment drug whose relationship with the disease is an applicable relationship, and the set of prohibited treatment drugs, that is, each treatment drug whose relationship with the disease is a prohibited relationship.
[0074] Further, according to each actual treatment drug in the medication list information, a second graph query statement is constructed. Specifically, according to every two actual treatment drugs, a corresponding second graph query statement is constructed. Through the second graph query statement, the target usage relationship between the corresponding actual treatment drugs is queried from the medication knowledge graph. Finally, only one of the set of correct treatment drugs, the set of prohibited treatment drugs, and each target usage relationship can be determined as the target information. In other embodiments, the set of correct treatment drugs, the set of prohibited treatment drugs, and each target usage relationship can also be determined as the target information.
[0075] In one embodiment, at least one triple is extracted from the obtained medication knowledge graph, and these triples are determined as fine-tuning training samples. In other embodiments, the knowledge graph triples extracted from medical content can also be determined as fine-tuning training samples. A fine-tuning training sample refers to a data set used to fine-tune a target large model during the training process of a machine learning or deep learning model. Further, the fine-tuning training samples are divided into a training set and a test set according to a preset ratio. The preset ratio can be 7:3 or 6:4. The target large model is trained through the training set and the test set, and the fine-tuned large model is stored in a preset database, so that the model has a stronger ability to understand or process the relationships between diseases and treatment drugs, and between treatment drugs. During the training process, the model parameters are optimized through the reverse gradient algorithm until the model converges. This is the prior art and will not be elaborated here. Finally, when drug use rationality identification is required, the fine-tuned large model is called from the database.
[0076] S103: Determine the drug use rationality result corresponding to the medication list information according to the target information and the fine-tuned large model. The fine-tuned large model is a model fine-tuned by combining graph data and large language model technology.
[0077] Specifically, after the target information is determined, in combination with the fine-tuned large model called, the drug rationality result corresponding to the drug list information is determined. In an embodiment of the present application, a feasible determination method is as follows: The target information, clinical diagnosis information, and drug list information are concatenated and combined to obtain a concatenated result. Exemplarily, the target message is a set of correct treatment drugs. The set of correct treatment drugs is concatenated with the clinical diagnosis information and the drug list information to obtain a concatenated result. Then, a prompt task information is constructed to guide the tasks that the fine-tuned large model needs to execute when identifying drug rationality. The prompt task information can be expressed as follows: Suppose you are a doctor expert and strictly follow medical common sense. I need you to judge whether the actual treatment drugs in the {drug list information} are effective based on the {disease in the clinical diagnosis information}, and the judgment basis please refer to the {set of correct treatment drugs}.
[0078] Further, this prompt task information is concatenated with the concatenated result to obtain a final prompt instruction. Finally, this final prompt instruction is input into the fine-tuned large model. The fine-tuned large model executes the relevant tasks in the prompt task information according to this final prompt instruction to obtain a determination result related to whether the actual treatment drugs are reasonable. The corresponding determination result contains the result of whether each actual treatment drug is reasonable. If there is an actual treatment drug that is ineffective for the disease in the determination result, it is determined that the drug rationality result corresponding to the drug list information is unreasonable; if each actual treatment drug in the determination result is effective for the disease, it is determined that the drug rationality result corresponding to the drug list information is reasonable.
[0079] See Figure 2 , the embodiment of the present application discloses a flowchart of another method for identifying drug rationality, which can be implemented depending on a computer program or run on a drug rationality identification device based on the von Neumann architecture. This computer program can be integrated in an application or run as an independent tool application, and specifically includes:
[0080] S201: Obtain a drug knowledge graph, which includes the corresponding relationship between diseases and treatment drugs and the usage relationship between treatment drugs.
[0081] S202: Obtain the clinical diagnosis information and drug list information of the patient.
[0082] S203: Construct a first graph query statement according to the clinical diagnosis information.
[0083] S204: Through the first graph query statement, query the set of correct treatment drugs and the set of prohibited treatment drugs corresponding to the disease in the clinical diagnosis information from the drug knowledge graph.
[0084] S205: Construct a second graph query statement based on each actual treatment drug in the medication list information.
[0085] S206: Query the target usage relationships between the actual treatment drugs from the medication knowledge graph according to the second graph query statement, and determine the correct treatment drug set, the contraindicated treatment drug set, and each target usage relationship as the target information.
[0086] Specifically, reference can be made to steps S101 - S102, which will not be elaborated here. In the embodiments of the present application, the obtained correct treatment drug set, the contraindicated treatment drug set, and each target usage relationship are all determined as the target information.
[0087] S207: Concatenate the target information, the clinical diagnosis information, and the medication list information to obtain a concatenation result.
[0088] S208: Construct prompt task information, and concatenate the prompt task information with the concatenation result to obtain the final prompt instruction.
[0089] S209: Input the final prompt instruction into the fine - tuned large model to obtain at least one determination result, and determine the medication rationality result corresponding to the medication list information according to each determination result.
[0090] Specifically, concatenate the correct treatment drug set, the contraindicated treatment drug set, each target usage relationship, the clinical diagnosis information, and the medication list information to obtain a concatenation result, and then construct the corresponding prompt task information. In the embodiments of the present application, a feasible construction method is as follows: Receive the task description information sent by the terminal and determine it as the prompt task information. The prompt task information includes a first determination task, a second determination task, a third determination task, and a fourth determination task. The first determination task is the task of determining whether the actual treatment drug is effective, the second determination task is the task of determining whether the actual treatment drug is a contraindicated drug for the disease in the clinical diagnosis information, the third determination task is the task of determining whether there are mutual side effects between the actual treatment drugs, and the fourth determination task is the task of determining whether the dosage of the actual treatment drug is reasonable.
[0091] Exemplarily, the prompt task information can be expressed as follows: Suppose you are a doctor expert, please strictly follow medical common sense. I need you to determine whether the actual treatment drugs in the {medication list information} are reasonable based on the {disease in the clinical diagnosis information}, and the judgment basis can refer to the {correct treatment drug set}, the {contraindicated treatment drug set}, and the {target usage relationships between the actual treatment drugs in the medication list information}. The judgment of medication rationality is mainly carried out from the following aspects:
[0092] (1) Whether the actual treatment drugs in the medication list information are effective for the disease;
[0093] (2) Whether the actual treatment drugs in the medication list information are contraindicated for the disease;
[0094] (3) Whether there are mutual side effects among the actual treatment drugs in the medication list information;
[0095] (4) Whether the dosages of the actual treatment drugs in the medication list information are reasonable.
[0096] Further, splice and combine the constructed prompt task information with the splicing result to obtain the corresponding final prompt instruction. Input this final prompt instruction into the fine-tuned large model, so that the fine-tuned large model refers to the disease, the set of correct treatment drugs, the set of contraindicated treatment drugs, and each target usage relationship in the clinical diagnosis information, and executes according to four judgment tasks. The specific process is as follows: Determine whether a single actual treatment drug is in the set of correct treatment drugs. If it is not, then determine that the corresponding actual treatment drug is ineffective and use it as the judgment result of the first judgment task; if it is, determine that the corresponding actual treatment drug is effective and use it as the judgment result of the first judgment task. After the first judgment task is completed, the result of whether each actual treatment drug is effective for the disease exists in the corresponding judgment result.
[0097] Further, determine whether a single actual treatment drug is in the set of contraindicated treatment drugs. If it is, then determine that the corresponding actual treatment drug is a contraindicated drug for the disease in the clinical diagnosis information and use it as the judgment result of the second judgment task. After the second judgment task is completed, the result of whether each actual treatment drug is a contraindicated drug exists in the corresponding judgment result. Further, determine whether the target usage relationship between every two actual treatment drugs is that there are mutual side effects. If so, then the corresponding actual treatment drugs have mutual side effects as the judgment result of the third judgment task; otherwise, use that the corresponding actual treatment drugs have no mutual side effects as the judgment result of the third judgment task.
[0098] Further, determine whether the dosage of the actual treatment drug existing in the set of correct treatment drugs is consistent with the corresponding correct treatment drug, that is, the dosage of the correct treatment drug in the set of correct treatment drugs that is the same as the actual treatment drug. If not, then use that the dosage of the corresponding actual treatment drug is unreasonable as the judgment result of the fourth judgment task; otherwise, use that the dosage of the corresponding actual treatment drug is reasonable as the judgment result of the fourth judgment task. After the fourth judgment task is completed, the result of whether the dosage of each actual treatment drug is reasonable exists in the corresponding judgment result. Finally, obtain the judgment result corresponding to each judgment task.
[0099] Further, according to each determination result, determine the medication rationality result corresponding to the medication list information of this patient. A feasible determination method is as follows: If there is a target determination result among each determination result, and in the target determination result, there is one of the following situations: a single actual treatment drug is ineffective, a single actual treatment drug is a contraindicated drug, there is an interaction side effect between a single actual treatment drug and other actual treatment drugs, or the dosage of a single actual treatment drug is unreasonable. Exemplarily, if there is a result that an actual treatment drug is ineffective for the disease in the determination result corresponding to the first determination task, regard the determination result corresponding to the first determination task as the target determination result, indicating that the medication list information is not fully applicable to the patient's disease, then determine the medication rationality result as unreasonable; if there is a result that an actual treatment drug is a contraindicated drug for the disease in the determination result corresponding to the second determination task, regard the determination result corresponding to the second determination task as the target determination result, indicating that the medication list information has a contraindication for the patient's disease treatment, then determine the medication rationality result as unreasonable, and there is no need to evaluate the determination results of the remaining determination tasks, and so on. Further, if there is no such target determination result among each determination result, it means that all the actual treatment drugs in the medication list information are neither contraindicated drugs, nor have interaction side effects with each other, and can be used simultaneously, and all the actual treatment drugs are effective for the disease in the clinical diagnosis information and the dosage is also reasonable, then determine the medication rationality result as reasonable.
[0100] In other embodiments, based on the reasonable medication list information of historical patients with the same disease type as this patient, determine the number of occurrences of each treatment drug in the medication list information of this patient in all reasonable medication list information, and select the treatment drug with the first number from each treatment drug in descending order of the number of occurrences as the target drug, and determine the remaining treatment drugs as the remaining drugs. Calculate the first weight of each target drug, and the first weight is the ratio of the number of occurrences of each target drug to the sum of the number of occurrences of all target drugs. Further, count the number of co-occurrences of the remaining drugs that co-occur with each target drug in the reasonable medication list information, and calculate the second weight of each remaining drug, that is, the ratio of the number of co-occurrences of a single remaining drug corresponding to the target drug to the sum of the number of co-occurrences of all the remaining drugs corresponding to the target drug. Finally, for a single target drug, calculate the sum of the products of the first weight and the corresponding second weights, and get the sum of the products. The larger the sum of the products, the more reasonable the combination of each remaining drug and the target drug is for the patient's disease. And sum up the sum of the products corresponding to each target drug to get the final sum of the products. If the final sum of the products is greater than the preset product sum threshold, it indicates that the rationality of each treatment drug in the medication list information of the patient is relatively high, and thus the successful verification of the medication rationality result is achieved.
[0101] The implementation principle of a method for identifying the rationality of drug use in an embodiment of the present application is as follows: Based on the correspondence between different diseases and treatment drugs in the drug use knowledge graph and the usage relationships between different treatment drugs, the relationship between the treatment drugs in the drug use knowledge graph and the clinical diagnosis information, as well as the relationship between the treatment drugs in the drug use list information, are determined. Then, target information is screened out therefrom, that is, the judgment basis for determining whether the drug use list information is reasonable for the clinical diagnosis information. Finally, based on the target information, that is, the judgment basis, the fine-tuned large model is used to determine whether the drug use list information is reasonable for the clinical diagnosis information, thereby realizing the automatic identification of the rationality of drug use in the drug use list information without manual review one by one based on clinical guidelines, thus reducing the manual review cost of identifying the rationality of drug use.
[0102] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0103] Please refer to Figure 3 , which is a schematic structural diagram of the device for identifying the rationality of drug use provided in the embodiment of the present application. This device for identifying the rationality of drug use can be implemented as all or part of the device through software, hardware, or a combination of both. The device includes a graph acquisition module 11, an information screening module 12, and a rationality judgment module 13.
[0104] The graph acquisition module 11 is used to acquire a drug use knowledge graph, and the drug use knowledge graph includes the correspondence between diseases and treatment drugs and the usage relationships between treatment drugs;
[0105] The information screening module 12 is used to acquire the clinical diagnosis information and drug use list information of a patient, and screen target information from the drug use knowledge graph according to the clinical diagnosis information and the drug use list information, and the target information is used to determine whether the drug use list information is reasonable for the clinical diagnosis information;
[0106] The rationality judgment module 13 is used to determine the drug use rationality result corresponding to the drug use list information according to the target information and the fine-tuned large model, and the fine-tuned large model is a model obtained by combining graph data and large language model technology and fine-tuning training.
[0107] Optionally, the graph acquisition module 11 is specifically used for:
[0108] Acquire medical content, where the medical content includes descriptions of different diseases and corresponding treatment drugs and usage instructions of different treatment drugs;
[0109] Perform desensitization processing on the medical content to obtain the processed result;
[0110] Extract at least one knowledge graph triple from the processed results through a preset target large model. The knowledge graph triple is a set composed of diseases, therapeutic drugs, and the corresponding relationship between the two, or a set composed of different therapeutic drugs and the corresponding usage relationships between different therapeutic drugs. The target large model is a model that combines graph data and large language model technology;
[0111] Merge each knowledge graph triple into the initial knowledge graph in the preset graph database to obtain a medication knowledge graph.
[0112] Optionally, as Figure 4 shown, the device further includes a model fine-tuning module 14, which is specifically used for:
[0113] Generate fine-tuning training samples according to the medication knowledge graph;
[0114] Fine-tune the preset target large model through the fine-tuning training samples to obtain a fine-tuned large model and store it in the preset database. The target large model is a model that combines graph data and large language model technology;
[0115] When medication rationality identification is required, call the fine-tuned large model from the database.
[0116] Optionally, the information screening module 12 is specifically used for:
[0117] Construct a first graph query statement according to the clinical diagnosis information;
[0118] Query the correct therapeutic drug set and contraindicated therapeutic drug set corresponding to the disease in the clinical diagnosis information from the medication knowledge graph through the first graph query statement;
[0119] Construct a second graph query statement according to each actual therapeutic drug in the medication list information;
[0120] Query the target usage relationship between each actual therapeutic drug from the medication knowledge graph according to the second graph query statement, and determine the correct therapeutic drug set, contraindicated therapeutic drug set, and each target usage relationship as the target information.
[0121] Optionally, the rationality determination module 13 is specifically used for:
[0122] Concatenate the target information, clinical diagnosis information, and medication list information to obtain a concatenated result;
[0123] Construct prompt task information and concatenate the prompt task information with the concatenated result to obtain a final prompt instruction;
[0124] Input the final prompt instruction into the fine-tuned large model to obtain at least one determination result, and determine the medication rationality result corresponding to the medication list information according to each determination result. The final prompt instruction is used to determine the rationality of the medication list information based on the target information.
[0125] Optionally, the rationality determination module 13 is specifically configured to:
[0126] Input the final prompt instruction into the fine-tuned large model. If the actual treatment drug does not exist in the correct treatment drug set, determine that the corresponding actual treatment drug is invalid as the determination result of the first determination task;
[0127] If the actual treatment drug exists in the contraindicated treatment drug set, determine that the corresponding actual treatment drug is a contraindicated drug for the disease in the clinical diagnosis information as the determination result of the second determination task;
[0128] If the target usage relationship between the actual treatment drugs is that there are mutual side effects, determine that there are mutual side effects between the corresponding actual treatment drugs as the determination result of the third determination task;
[0129] If the dosage of the actual treatment drug existing in the correct treatment drug set is inconsistent with the dosage of the corresponding correct treatment drug, determine that the dosage of the corresponding actual treatment drug is unreasonable as the determination result of the fourth determination task.
[0130] Optionally, the rationality determination module 13 is specifically configured to:
[0131] If there is a target determination result among the determination results, determine that the medication rationality result corresponding to the medication list information is unreasonable. The target determination result includes one of the following: a single actual treatment drug is invalid, a single actual treatment drug is a contraindicated drug, there are mutual side effects between a single actual treatment drug and other actual treatment drugs, or the dosage of a single actual treatment drug is unreasonable;
[0132] If there is no target determination result among the determination results, determine that the medication rationality result corresponding to the medication list information is reasonable.
[0133] It should be noted that when the medication rationality recognition device provided in the above embodiment executes the medication rationality recognition method, only the above division of each functional module is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the medication rationality recognition device and the medication rationality recognition method embodiment provided in the above embodiment belong to the same concept, and the implementation process is shown in detail in the method embodiment, which will not be repeated here.
[0134] An embodiment of the present application also discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, a method for identifying the rationality of drug use in the above embodiment is adopted.
[0135] Among them, the computer program can be stored in a computer-readable medium. The computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some middleware form, etc. The computer-readable medium includes any entity or device, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above components.
[0136] Among them, through this computer-readable storage medium, a method for identifying the rationality of drug use in the above embodiment is stored in the computer-readable storage medium, and is loaded and executed on the processor to facilitate the storage and application of the above method.
[0137] An embodiment of the present application also discloses an electronic device. A computer program is stored in the computer-readable storage medium. When the computer program is loaded and executed by the processor, a method for identifying the rationality of drug use in the above embodiment is adopted.
[0138] Among them, the electronic device can be a desktop computer, a laptop computer, or a cloud server, etc. The electronic device includes but is not limited to a processor and a memory. For example, the electronic device can also include input / output devices, network access devices, and a bus, etc.
[0139] Among them, the processor can adopt a central processing unit (CPU). Of course, according to the actual usage situation, other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc. The present application does not make any restrictions in this regard.
[0140] Among them, the memory can be an internal storage unit of the electronic device, for example, the hard disk or memory of the electronic device, or can be an external storage device of the electronic device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital card (SD), or a flash card (FC) equipped on the electronic device, etc. Moreover, the memory can also be a combination of the internal storage unit and the external storage device of the electronic device. The memory is used to store computer programs and other programs and data required by the electronic device. The memory can also be used to temporarily store the data that has been output or will be output. This application does not make any restrictions on this.
[0141] Among them, through this electronic device, a method for identifying the rationality of medication in the above embodiment is stored in the memory of the electronic device, and is loaded and executed on the processor of the electronic device for convenient use.
[0142] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. This application aims to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include the common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The description and embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for identifying rationality of medication, characterized in that: The method comprises: Obtaining a medication knowledge graph, wherein the medication knowledge graph includes a correspondence between diseases and therapeutic drugs and a usage relationship between therapeutic drugs; Acquire the patient's clinical diagnosis information and medication list information, and filter target information from the medication knowledge graph based on the clinical diagnosis information and the medication list information, wherein the target information is used to determine whether the medication list information is reasonable for the clinical diagnosis information; wherein filtering the target information from the medication knowledge graph based on the clinical diagnosis information and the medication list information specifically includes: Constructing a first graph query statement according to the clinical diagnosis information; Through the first graph query statement, query the correct treatment drug set and the contraindication treatment drug set corresponding to the disease in the clinical diagnosis information from the medication knowledge graph; Constructing a second graph query statement according to each actual therapeutic drug in the medication list information; According to the second graph query statement, query the target usage relationship between each of the actual therapeutic drugs from the medication knowledge graph, and determine the correct therapeutic drug set, the contraindicated therapeutic drug set and each of the target usage relationships as target information; According to the target information and the fine-tuned large model, the medication rationality result corresponding to the medication list information is determined. The fine-tuned large model is a model that combines graph data and large language model technology and is fine-tuned and trained.
2. The method for identifying rationality of medication according to claim 1, characterized in that: The obtaining of the medication knowledge graph specifically includes: Obtaining medical content, including descriptions of different diseases and corresponding therapeutic drugs and instructions for use of different therapeutic drugs; Desensitizing the medical content to obtain processed results; Extracting at least one knowledge graph triple from the processed result through a preset target big model, wherein the knowledge graph triple is a set consisting of diseases, therapeutic drugs and the corresponding relationship between the two or a set consisting of different therapeutic drugs and the corresponding usage relationship between different therapeutic drugs, and the target big model is a model combining graph data and large language model technology; Each of the knowledge graph triples is merged into an initial knowledge graph in a preset graph database to obtain a medication knowledge graph.
3. The method for identifying rationality of medication according to claim 1, characterized in that: Before determining the medication rationality result corresponding to the medication list information according to the target information and the fine-tuned large model, the method further includes: Generating fine-tuning training samples according to the medication knowledge graph; Fine-tune the preset target large model through the fine-tuning training samples to obtain a fine-tuned large model and store it in a preset database, wherein the target large model is a model that combines graph data and large language model technology; When it is necessary to identify the rationality of medication, the fine-tuned large model is called from the database.
4. The method for identifying rationality of medication according to claim 1, characterized in that: Determining the medication rationality result corresponding to the medication list information according to the target information and the fine-tuned large model specifically includes: Splicing the target information, the clinical diagnosis information and the medication list information to obtain a splicing result; Construct prompt task information, and concatenate the prompt task information with the concatenation result to obtain a final prompt instruction; The final prompt instruction is input into the fine-tuned large model to obtain at least one judgment result, and based on each of the judgment results, the medication rationality result corresponding to the medication list information is determined. The final prompt instruction is used to judge the rationality of the medication list information based on the target information.
5. The method for identifying rationality of medication according to claim 4, characterized in that: The prompt task information includes a first determination task, a second determination task, a third determination task and a fourth determination task, wherein the first determination task is a task for determining whether the actual therapeutic drug is effective, the second determination task is a task for determining whether the actual therapeutic drug is a contraindicated drug for the disease in the clinical diagnosis information, the third determination task is a task for determining whether there are mutual side effects between the actual therapeutic drugs, and the fourth determination task is a task for determining whether the dosage of the actual therapeutic drug is reasonable. The final prompt instruction is input into the fine-tuned large model to obtain at least one determination result, specifically including: Inputting the final prompt instruction into the fine-tuned large model, if the actual therapeutic drug does not exist in the correct therapeutic drug set, determining that the corresponding actual therapeutic drug is invalid as the determination result of the first determination task; If the actual therapeutic drug exists in the set of contraindicated therapeutic drugs, determining that the corresponding actual therapeutic drug is a contraindicated drug for the disease in the clinical diagnosis information is a determination result of the second determination task; If the target usage relationship between the actual therapeutic drugs is that there are mutual side effects, then determining that there are mutual side effects between the corresponding actual therapeutic drugs is a determination result of the third determination task; If the dosage of the actual therapeutic drug in the correct therapeutic drug set is inconsistent with the dosage of the corresponding correct therapeutic drug, the unreasonable dosage of the corresponding actual therapeutic drug is determined as the determination result of the fourth determination task.
6. The method for identifying rationality of medication according to claim 5, characterized in that: Determining the rationality of medication corresponding to the medication list information according to each of the determination results specifically includes: If there is a target determination result among the determination results, it is determined that the medication rationality result corresponding to the medication list information is unreasonable, and one of the following exists in the target determination result: a single actual therapeutic drug is ineffective, a single actual therapeutic drug is a contraindicated drug, a single actual therapeutic drug has a mutual side effect with other actual therapeutic drugs, or the dosage of a single actual therapeutic drug is unreasonable; If the target determination result does not exist in the determination results, the medication rationality result corresponding to the medication list information is determined to be reasonable.
7. The method for identifying rationality of medication according to claim 2 or 3, characterized in that: The target large model is Graph+LLM.
8. A device for identifying rationality of medication, used to implement the method for identifying rationality of medication according to any one of claims 1 to 7, characterized in that: include: A graph acquisition module (11) is used to acquire a medication knowledge graph, wherein the medication knowledge graph includes a correspondence between diseases and therapeutic drugs and a usage relationship between therapeutic drugs; An information screening module (12) is used to obtain the patient's clinical diagnosis information and medication list information, and screen target information from the medication knowledge graph based on the clinical diagnosis information and the medication list information, wherein the target information is used to determine whether the medication list information is reasonable for the clinical diagnosis information; A rational determination module (13) is used to determine the rationality result of medication corresponding to the medication list information based on the target information and the fine-tuned large model, wherein the fine-tuned large model is a model that combines graph data and large language model technology and is fine-tuned and trained.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor loads and executes the computer program, the method according to any one of claims 1 to 7 is adopted.
Citation Information
Patent Citations
Repeated medicine taking reminding method and device based on knowledge graph and electronic equipment
CN114913956A
Medical knowledge graph construction method and device, electronic equipment and storage medium
CN116631643A