A method for detecting potential inappropriate medication in a comorbidity pattern

By combining machine learning and knowledge graph path reasoning models, the problem of traditional machine learning models being highly dependent on data is solved, improving the accuracy and reliability of potential inappropriate medication detection, especially significantly enhancing predictive ability in low-frequency cases.

CN116504351BActive Publication Date: 2026-11-24SOUTHWEST JIAOTONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310471299.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-27
Publication Date
2026-11-24
Estimated Expiration
2043-04-27

AI Technical Summary

Technical Problem

Traditional machine learning models are highly dependent on data, which leads to insufficient reliability in predicting potentially inappropriate medication, especially in low-frequency cases with small sample sizes, making data-driven methods ineffective.

Method used

By combining machine learning models and knowledge graph path reasoning models, a knowledge graph is constructed by preprocessing and vectorizing the original medical record data. The CatBoost model is used to learn multi-label associations, and path reasoning is performed in the knowledge graph. The final decision is made by combining the results of machine learning and knowledge graph.

Benefits of technology

It improves the accuracy and reliability of potential inappropriate medication detection, reduces reliance on data, enhances the predictive ability of low-frequency potential inappropriate medication, and achieves a high overall accuracy rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116504351B_ABST
    Figure CN116504351B_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting potential inappropriate medication use in comorbidity patterns, comprising the following steps: processing original medical record data to obtain a trained machine learning model; constructing a knowledge graph based on relevant factors of potential inappropriate medication use in drug standards, and establishing a knowledge graph path reasoning model based on the original features; combining the prediction results of the machine learning model and the reasoning results of the knowledge graph path reasoning model to obtain the potential inappropriate medication use detection result. This invention overcomes the weakness of machine learning in predicting low-frequency potential inappropriate medication use, increases the accuracy and reliability of the prediction results, and reduces the dependence on sample data, thus having high clinical application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information processing technology, and in particular to a method for detecting potential inappropriate medication use in comorbidity patterns. Background Technology

[0002] With socioeconomic development and improved medical standards, life expectancy has increased, exacerbating the aging problem. The elderly, as a special group, often suffer from multiple chronic diseases, frequently seeking treatment from multiple specialists and taking multiple medications. Furthermore, age-related changes in pharmacokinetics and pharmacodynamics affect drug absorption, distribution, and metabolism, making elderly patients more susceptible to drug-related problems, leading to increased adverse reactions, hospitalization rates, and related medical costs. Therefore, researching methods for detecting potentially inappropriate medication (PIM) is of great significance for reducing and preventing adverse drug reactions.

[0003] Currently, machine learning methods are mainly used to predict potential inappropriate medication use. However, traditional machine learning models are highly dependent on data. In reality, the incidence of most potential inappropriate medication use is low, the sample size is small, and data-driven methods lack reliability. Summary of the Invention

[0004] To address the aforementioned shortcomings in existing technologies, this invention provides a method for detecting potential inappropriate medication use in comorbidity patterns. This method solves the problems of traditional machine learning models' strong dependence on data and the unreliability of traditional detection methods in the process of predicting potential inappropriate medication use.

[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a method for detecting potentially inappropriate medication use in a comorbidity pattern, comprising the following steps:

[0006] S1: Process the original medical record data to obtain the trained machine learning model;

[0007] S2: Construct a knowledge graph based on relevant factors of potential inappropriate drug use in drug standards, and establish a knowledge graph path reasoning model based on original features;

[0008] S3: Combine the prediction results of the machine learning model with the reasoning results of the knowledge graph path reasoning model to obtain the detection results of potential inappropriate medication.

[0009] The beneficial effects of the above scheme are as follows: This scheme uses machine learning methods to obtain the relationships between data features and introduces a knowledge graph reasoning model, which makes up for the shortcomings of machine learning, increases the accuracy of prediction results, reduces the dependence of machine learning on data, and effectively solves the problems of traditional machine learning models being highly dependent on data and traditional detection methods being unreliable in the process of predicting potential inappropriate medication.

[0010] Furthermore, S1 includes the following sub-steps:

[0011] S1-1: Original features are formed by preprocessing the original medical record data;

[0012] S1-2: Vectorize the original features to obtain feature vectors;

[0013] S1-3: Input the feature vectors into the machine learning model for training to obtain the trained machine learning model.

[0014] The beneficial effect of the above-mentioned further scheme is that by preprocessing and vectorizing the obtained raw data, feature vectors are obtained, which are used to train the machine learning model, thereby obtaining the trained machine learning model.

[0015] Furthermore, the vectorization encoding of the original features in S1-2 includes the following steps:

[0016] S1-2-1: Extract disease names from the diagnostic field using regular expressions;

[0017] S1-2-2: Perform one-hot encoding on the multi-valued category features of disease names and generic drug names in the diagnostic field.

[0018] The beneficial effect of the above-mentioned further scheme is that, since both diagnosis and drug generic names belong to multi-valued category features, different patients include different numbers of diseases and drugs, and have variable length characteristics, one-hot encoding is used to achieve vectorized encoding.

[0019] Furthermore, in S1-3, when the feature vectors are input into the machine learning model for training, a classifier chain model is established to learn the correlation between multiple potentially inappropriate medication labels in the case of multiple labels.

[0020] The beneficial effect of the above-mentioned further solution is that by establishing a classifier chain model, the correlation between labels can be learned efficiently and accurately, thus solving the problem of multiple labels in patient prescriptions.

[0021] Furthermore, the classifier chain model uses the CatBoost model as the base learner.

[0022] The beneficial effect of the above-mentioned further solution is that, by using the CatBoost model as the base learner, the higher-order dependencies between binary features such as drugs and diseases can be captured.

[0023] Furthermore, the knowledge graph construction in S2 is carried out in a top-down manner, including the construction of the schema layer and the construction of the instance layer. The schema layer construction involves abstracting and summarizing the relationship between drugs and diseases, and associating risk factors with potential inappropriate drug use to obtain the ontology structure of the knowledge graph.

[0024] The beneficial effects of the above-mentioned further solutions are: by using the above technical solutions to associate risk factors and potential inappropriate medication, the ontological structure of the knowledge graph is obtained, and the pattern layer in the knowledge graph is constructed.

[0025] Furthermore, the instance layer is constructed by extracting entities and relations from drug standards based on the knowledge graph ontology structure, organizing them into structured triple data, and storing them in the Neo4j graph database. The potential inappropriate medication is represented by the entity node PIM node in the knowledge graph. At the same time, another entity node fact node in the knowledge graph is added as an intermediate node to associate the PIM node and risk factor node for each potential inappropriate medication situation.

[0026] The beneficial effect of the above-mentioned further solutions is that the instance layer in the knowledge graph can be constructed through the above technical solutions.

[0027] Furthermore, the establishment of a knowledge graph path reasoning model based on original features in S2 includes the following steps:

[0028] S2-1: Convert the original features into a list of feature words;

[0029] S2-2: Match the list of feature words in the knowledge graph to obtain the set of starting nodes;

[0030] S2-3: Find all fact nodes that can be reached from start and add them to the candidate set;

[0031] S2-4: Based on the relationship of the last edge on the path from the node in start to the fact node, filter the nodes in the candicade set: if the relationship is excluded, remove the corresponding fact node; otherwise, record the set of predecessor nodes pre of the fact node.

[0032] S2-5: Sequentially determine whether all the relationships of the remaining fact nodes in the candidate are the predecessor nodes of the system and whether they are all included in the pre set. If the condition is met, then all the constituent factors of the potential inappropriate medication situation exist.

[0033] S2-6: Based on the fact nodes that meet the conditions in step S2-5, obtain and return the potential inappropriate medication number attribute value of the corresponding PIM node to complete the establishment of the knowledge graph path reasoning model.

[0034] The beneficial effect of the above-mentioned further solution is that, through the above technical solution, potential inappropriate medication can be searched based on the converted feature word list, thereby establishing a knowledge graph path reasoning model.

[0035] Furthermore, obtaining the final decision in S3 involves combining the predicted results of the potentially inappropriate medication label with the inference results of the potentially inappropriate medication label. By setting a sample size threshold, when the sample size is below the threshold, the result of the knowledge graph path inference model is output; otherwise, the prediction result of the machine learning model is output.

[0036] The beneficial effects of the above-mentioned further approach are: by combining the prediction results and inference results of potential inappropriate drug use labels, the data dependence problem of machine learning models is reduced, a higher overall accuracy is achieved, and the prediction ability for low-frequency potential inappropriate drug use is also significantly improved. Attached Figure Description

[0037] Figure 1 Flowchart for a method to detect potentially inappropriate medication use in a comorbidity pattern. Detailed Implementation

[0038] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0039] like Figure 1 As shown, a method for detecting potentially inappropriate medication use in a comorbidity pattern includes the following steps:

[0040] S1: Process the original medical record data to obtain the trained machine learning model;

[0041] S2: Construct a knowledge graph based on relevant factors of potential inappropriate drug use in drug standards, and establish a knowledge graph path reasoning model based on original features;

[0042] S3: Combine the prediction results of the machine learning model with the reasoning results of the knowledge graph path reasoning model to obtain the detection results of potential inappropriate medication.

[0043] S1 includes the following steps:

[0044] S1-1: Original features are formed by preprocessing the original medical record data;

[0045] S1-2: Vectorize the original features to obtain feature vectors;

[0046] S1-3: Input the feature vectors into the machine learning model for training to obtain the trained machine learning model.

[0047] The vectorization encoding of the original features in S1-2 includes the following steps:

[0048] S1-2-1: Extract disease names from the diagnostic field using regular expressions;

[0049] S1-2-2: Perform one-hot encoding on the multi-valued category features of disease names and generic drug names in the diagnostic field.

[0050] In one embodiment of the invention, prescription data of outpatients aged 65 and above are obtained from the geriatrics department of a medical institution, including age, gender, diagnosis, and generic drug name, excluding records with missing or incomplete information. In this embodiment, the 2019 Beers standard is used as the criterion for judging potential inappropriate medication use, which includes 99 drug entries. Two professional doctors independently review the patient's prescription and mark the corresponding numbers for potential inappropriate medication use. In case of disagreement, a third doctor makes the decision. Considering that comorbidities are common among elderly patients, and that polypharmacy significantly increases the risk of drug interactions and adverse drug reactions, the number of diseases and drugs is added to the features to obtain the original features. The original features contain textual content such as drug names and disease names, which need to be vectorized. The resulting numerical features are used to train a machine learning model. Diagnosis and generic drug name are both multi-valued categorical features, with different patients having different numbers of diseases and drugs, exhibiting variable length characteristics. Therefore, in this embodiment, a one-hot encoding method is used for vectorization.

[0051] In S1-3, the feature vectors are input into the machine learning model for training. For multi-label cases, a classifier chain model is established to learn the correlation between multiple potentially inappropriate medication labels.

[0052] The classifier chain model uses the CatBoost model as the base learner.

[0053] A patient's prescription may contain multiple potentially inappropriate medication scenarios with corresponding numbers, and different potentially inappropriate medications are related to each other. In this embodiment, for the multi-label problem, a classifier chain model is established to learn the correlation between labels. In order to capture the higher-order dependencies between binary features such as drugs and diseases, the CatBoost model is used as the base learner of the classifier chain. When splitting a subtree, it combines the category features previously used for splitting with all the original category features in the dataset to construct new features.

[0054] The knowledge graph construction in S2 adopts a top-down approach, including schema layer construction and instance layer construction. The schema layer construction involves abstracting and summarizing the relationship between drugs and diseases, and associating risk factors with potential inappropriate drug use to obtain the ontology structure of the knowledge graph.

[0055] In this embodiment, the 2019 Beers standard is used as the basis for judging potential inappropriate medication use. By analyzing the relevant factors of potential inappropriate medication use in the Beers standard, and through abstraction and organization, four major categories of concepts are identified: drug, disease, population, and potential inappropriate medication use. Concept attributes include drug category, disease category, age, gender, and potential inappropriate medication use number. Concept relationships include alias, category, gender, age, composition, and exclusion. Among them, the "alias" relationship exists between different drugs, different drug categories, different diseases, and different disease categories. Gender, age, drug, drug category, disease, and disease category are all risk factors. A "composition" or "exclusion" relationship is established between potential inappropriate medication use and risk factors, thereby adding the judgment conditions of potential inappropriate medication use to the knowledge graph to facilitate reasoning.

[0056] The instance layer is constructed by extracting entities and relations from drug standards based on the knowledge graph ontology structure, organizing them into structured triple data, and storing them in the Neo4j graph database. The potential inappropriate medication is represented by the entity node PIM node in the knowledge graph. At the same time, another entity node fact node in the knowledge graph is added as an intermediate node to associate the PIM node and risk factor node for each potential inappropriate medication situation.

[0057] In this embodiment, the drugs and diseases mentioned and their corresponding categories are compiled from the Beers standard. To increase the completeness of the knowledge, other names and classification information related to these drugs and diseases are collected from medical websites. Knowledge from different data sources often has duplication and conflict issues, requiring entity alignment. In this embodiment, for different names of the same drug or disease, an "alias" relationship is established between the English name and other names, while differences caused by transliteration or spelling are directly merged. Finally, professional doctors check and correct the information to ensure its accuracy. The structured triple data is imported into the Neo4j graph database for storage. In this embodiment, potential inappropriate medication use is represented using PIM nodes, and fact nodes are added as intermediate nodes to associate PIM nodes and risk factor nodes for each potential inappropriate medication use scenario.

[0058] The steps involved in building a knowledge graph path reasoning model based on original features in S2 are as follows:

[0059] S2-1: Convert the original features into a list of feature words;

[0060] S2-2: Match the list of feature words in the knowledge graph to obtain the set of starting nodes;

[0061] S2-3: Find all fact nodes that can be reached from start and add them to the candidate set;

[0062] S2-4: Based on the relationship of the last edge on the path from the node in start to the fact node, filter the nodes in the candicade set: if the relationship is excluded, remove the corresponding fact node; otherwise, record the set of predecessor nodes pre of the fact node.

[0063] S2-5: Sequentially determine whether all the relationships of the remaining fact nodes in the candidate are the predecessor nodes of the system and whether they are all included in the pre set. If the condition is met, then all the constituent factors of the potential inappropriate medication situation exist.

[0064] S2-6: Based on the fact nodes that meet the conditions in step S2-5, obtain and return the potential inappropriate medication number attribute value of the corresponding PIM node to complete the establishment of the knowledge graph path reasoning model.

[0065] The final decision in S3 involves combining the predicted results of potential inappropriate medication labels with the inference results of potential inappropriate medication labels. By setting a sample size threshold, when the sample size is below the threshold, the result of the knowledge graph path reasoning model is output; otherwise, the prediction result of the machine learning model is output.

[0066] In this step, the machine learning model learns the implicit relationships between features from the data based on probabilistic and statistical principles. However, in real-world scenarios, many potential inappropriate medications have low incidence rates, resulting in a very limited sample size. In such cases, data-driven decision-making may lead to erroneous results. Therefore, in this embodiment, even with insufficient sample size, the knowledge-based reasoning model can still obtain relatively reliable results, reducing the data dependency problem inherent in machine learning models. On the other hand, potential omissions and errors in knowledge can reduce the effectiveness of the reasoning model, while sufficient sample size can fully leverage the feature learning capabilities of machine learning. Therefore, combining the results of both approaches not only achieves a high overall accuracy but also significantly improves the predictive ability for low-frequency potential inappropriate medications and increases the reliability of the results.

[0067] This invention first utilizes machine learning methods to mine implicit relationships between features in data. Based on this, a knowledge graph reasoning model is introduced to perform path reasoning based on explicit relationships of drug knowledge. This overcomes the problem that machine learning has a weak ability to predict low-frequency potential inappropriate drug use, increases the accuracy and reliability of prediction results, and reduces dependence on sample data. Therefore, it has high clinical application value.

[0068] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of the invention.

Claims

1. A method for detecting potentially inappropriate medication use in a comorbidity pattern, characterized in that, The method includes the following steps: S1: Process the original medical record data to obtain the trained machine learning model; S2: Construct a knowledge graph based on relevant factors of potential inappropriate drug use in drug standards, and establish a knowledge graph path reasoning model based on original features; The knowledge graph construction in S2 is carried out in a top-down manner, including the construction of the schema layer and the construction of the instance layer. The schema layer construction is to abstract and summarize the relationship between drugs and diseases, and to associate risk factors and potential inappropriate drug use to obtain the ontology structure of the knowledge graph. The instance layer is constructed by extracting entities and relations from drug standards based on the knowledge graph ontology structure, organizing them into structured triple data, and storing them in the Neo4j graph database. Potential inappropriate drug use is represented by the entity node PIM node in the knowledge graph. At the same time, another entity node fact node in the knowledge graph is added as an intermediate node to associate the PIM node and risk factor node for each potential inappropriate drug use case. The establishment of the knowledge graph path reasoning model based on the original features in S2 includes the following steps: S2-1: Convert the original features into a list of feature words; S2-2: Match the list of feature words in the knowledge graph to obtain the set of starting nodes; S2-3: Find all fact nodes that can be reached from start and add them to the candidate set; S2-4: Based on the relationship of the last edge on the path from the node in start to the fact node, filter the nodes in the candicade set: if the relationship is excluded, remove the corresponding fact node; otherwise, record the set of predecessor nodes pre of the fact node. S2-5: Sequentially determine whether all the relationships of the remaining fact nodes in the candidate are the predecessor nodes of the system and whether they are all included in the pre set. If the condition is met, then all the constituent factors of the potential inappropriate medication situation exist. S2-6: Based on the fact nodes that meet the conditions in step S2-5, obtain and return the potential inappropriate medication number attribute value of the corresponding PIM node to complete the establishment of the knowledge graph path reasoning model; S3: Combine the prediction results of the machine learning model with the reasoning results of the knowledge graph path reasoning model to obtain the detection results of potential inappropriate medication. The final decision obtained in S3 includes combining the prediction results of the potential inappropriate medication label and the reasoning results of the potential inappropriate medication label. By setting a sample size threshold, when the sample size is lower than the threshold, the result of the knowledge graph path reasoning model is output; otherwise, the prediction result of the machine learning model is output.

2. The method for detecting potentially inappropriate medication in a comorbidity pattern according to claim 1, characterized in that, S1 includes the following sub-steps: S1-1: Original features are formed by preprocessing the original medical record data; S1-2: Vectorize the original features to obtain feature vectors; S1-3: Input the feature vectors into the machine learning model for training to obtain the trained machine learning model.

3. The method for detecting potentially inappropriate medication in a comorbidity pattern according to claim 2, characterized in that, The vectorization encoding of the original features in S1-2 includes the following steps: S1-2-1: Extract disease names from the diagnostic field using regular expressions; S1-2-2: Perform one-hot encoding on the multi-valued category features of disease names and generic drug names in the diagnostic field.

4. The method for detecting potentially inappropriate medication in a comorbidity pattern according to claim 3, characterized in that, In steps S1-3, when the feature vector is input into the machine learning model for training, a classifier chain model is established for multi-label cases to learn the correlation between multiple potentially inappropriate medication labels.

5. The method for detecting potentially inappropriate medication in a comorbidity pattern according to claim 4, characterized in that, The classifier chain model uses the CatBoost model as the base learner.

Citation Information

Patent Citations

  • Prescription recommendation method and system based on machine learning and knowledge graph

    CN111191020A