CN-116779094-B - Method and electronic device for checking drug interactions
Abstract
The invention provides a method and an electronic device for checking drug interactions. The method includes generating a first ratio of the first medication combination to the hospitalization event, a second ratio of the second medication combination to the hospitalization event, and a third ratio of the third medication combination to the hospitalization event from the plurality of medical records, generating a first score corresponding to the first medication from the second ratio, generating a second score corresponding to the second medication from the third ratio, and outputting the first medication combination in response to the first ratio being greater than a first threshold, a sum of the first score and the second score being greater than a second threshold, and a quotient of the first score and the second score being less than a third threshold.
Inventors
- CHEN PEIRONG
- CAI ZONGXIAN
- CHEN LIANGGONG
- XIAO FEIYUAN
- HUANG SHIZONG
Assignees
- 宏碁股份有限公司
- 陈亮恭
Dates
- Publication Date
- 20260508
- Application Date
- 20220614
- Priority Date
- 20220310
Claims (15)
- 1. A method of checking drug interactions, comprising: Obtaining a plurality of medical records, wherein at least one of the plurality of medical records indicates whether a patient taking a first combination of drugs has had an inpatient; generating a medication combination set from the plurality of medical records, wherein the medication combination set comprises the first medication combination, a second medication combination, and a third medication combination, wherein the first medication combination and the second medication combination each comprise a first medication, and the first medication combination and the third medication combination each comprise a second medication; generating a first ratio of ratios between the first combination of medications and the hospitalization event, a second ratio of ratios between the second combination of medications and the hospitalization event, and a third ratio of ratios between the third combination of medications and the hospitalization event from the plurality of medical records; Generating a first score corresponding to the first drug according to the second ratio, wherein the first score is inversely related to the second ratio; Generating a second score corresponding to the second drug according to the third ratio, wherein the second score is inversely related to the third ratio, wherein the first score is greater than or equal to the second score, and The first combination of drugs is output in response to the first ratio being greater than a first threshold, the sum of the first score and the second score being greater than a second threshold, and the quotient of the first score and the second score being less than a third threshold.
- 2. The method of claim 1, wherein generating the first score corresponding to the first drug from the second ratio comprises: marking the second combination of medications in response to the second ratio being greater than a risk threshold; Generating a third score from the labeled second combination of medications, wherein the third score is equal to the number of combinations of medications in the set of combinations of medications that include the first medication but do not include the second medication and are labeled divided by the number of combinations of medications in the set of combinations of medications that include the first medication but do not include the second medication, and The first score is calculated from the third score, wherein the sum of the first score and the third score is equal to one.
- 3. The method of claim 1, wherein generating the medication combination collection from the plurality of medical records comprises: performing a screening process to generate a first set of unique medication combinations comprising: generating K topic vectors comprising a first topic vector according to the plurality of medical records and an implicit dirichlet allocation model, wherein K is a first topic number, wherein the K topic vectors respectively correspond to K topics, wherein the K topics comprise a first topic corresponding to the first topic vector, wherein the first topic vector comprises probability distributions of all medication combinations; selecting a plurality of important combinations of medications from the first topic vector, starting with the combination of medications having the greatest probability, to produce a first set of important combinations of medications, and Determining the first set of unique medication combinations from the first set of important medication combinations, and Generating the set of medication combinations from the first set of unique medication combinations.
- 4. The method of claim 3, wherein the K topics include a second topic, wherein determining the first set of unique medication combinations from the first set of important medication combinations comprises: in response to a first important medication combination being included in the first set of important medication combinations corresponding to the first topic and a second set of important medication combinations corresponding to the second topic, the first important medication combination is deleted from the first set of important medication combinations to produce the first set of unique medication combinations.
- 5. The method of claim 3, wherein generating the set of medication combinations from the first set of unique medication combinations comprises: Repeating the screening process a plurality of times to generate a plurality of unique medication combination sets including the first set of unique medication combinations; responsive to the number of the first drug combinations in the plurality of unique drug combination sets being greater than a number threshold, generating a first set of stable drug combinations corresponding to the first topic from the first drug combinations, and Generating the medication combination set according to the first stable medication combination set.
- 6. The method of claim 5, wherein generating the medication combination set from the first stable medication combination set comprises: Generating a plurality of medical record vectors respectively corresponding to the plurality of medical records according to the plurality of medical records and the implicit dirichlet distribution model, wherein each of the plurality of medical record vectors comprises probability distributions of the K topics; judging a medical record set corresponding to the first theme in the medical records according to the probability distribution of the K themes; calculating a ratio of at least one medical record in the set of medical records to the set of medical records, wherein the at least one medical record indicates at least one medication combination in the first set of stable medication combinations, and In response to the ratio being greater than a ratio threshold, the set of medication combinations is generated from the first set of stable medication combinations, wherein the set of medication combinations includes a plurality of medication combinations in the first set of stable medication combinations.
- 7. The method of claim 6, wherein a first medical record in the set of medical records corresponds to a first probability distribution of the K topics, wherein determining the set of medical records in the plurality of medical records corresponding to the first topic based on the probability distribution of the K topics comprises: and in response to the maximum probability in the first probability distribution corresponding to the first topic, determining that the first medical record corresponds to the first topic.
- 8. A method according to claim 3, further comprising: generating a first index corresponding to the first topic number and a second index corresponding to the second topic number according to the plurality of medical records and the implicit dirichlet distribution model, and The first index and the second index are compared to select the first topic number from the first topic number and the second topic number as K.
- 9. The method of claim 8, wherein generating the first indicator corresponding to the first number of topics comprises: generating the K topic vectors according to the plurality of medical records, the implicit dirichlet distribution model and the first topic number, and The average similarity of all 2-combinations of the K topic vectors is calculated as the first index.
- 10. The method of claim 8, wherein generating the first indicator corresponding to the first number of topics comprises: Generating a plurality of medical record vectors respectively corresponding to the plurality of medical records according to the plurality of medical records, the implicit dirichlet distribution model and the first topic number, wherein each of the plurality of medical record vectors comprises probability distributions of the K topics; Judging at least one medical record corresponding to the first theme in the plurality of medical records according to the probability distribution of the K themes, and And calculating a ratio according to the number of the at least one medical record and the total number of the plurality of medical records to serve as the first index.
- 11. The method of claim 10, wherein determining the at least one of the plurality of medical records corresponding to the first topic from the probability distribution of the K topics comprises: obtaining a first probability distribution corresponding to the K topics of the at least one medical record from the plurality of medical record vectors, and And in response to the maximum probability in the first probability distribution corresponding to the first topic and being greater than a probability threshold, determining that the at least one medical record corresponds to the first topic.
- 12. The method of claim 8, wherein generating the first indicator corresponding to the first number of topics comprises: Generating a plurality of medical record vectors respectively corresponding to the plurality of medical records according to the plurality of medical records, the implicit dirichlet distribution model and the first topic number, wherein each of the plurality of medical record vectors comprises probability distributions of the K topics; dividing the plurality of medical records into K groups according to the probability distribution of the K topics, wherein the K groups respectively correspond to the K topics; calculating a first statistic of the inter-group distances according to the K groups; calculating a second statistical value of the intra-group distances from the K groups, and A ratio of the first statistic to the second statistic is calculated as the first indicator.
- 13. The method of claim 12, wherein calculating the first statistic of the inter-group distances from the K groups comprises: Calculating a plurality of distances between the K topic vectors, and The plurality of distances are added to obtain the first statistical value.
- 14. The method of claim 12, wherein the K groups comprise a first group and a second group, wherein calculating the second statistic of intra-group distances from the K groups comprises: Calculating a plurality of distances between a plurality of elements in the first group to generate a first intra-group distance sum corresponding to the first group, and The first intra-group distance sum corresponding to the first group and a second intra-group distance sum corresponding to the second group are added to find the second statistic.
- 15. An electronic device for checking drug interactions, comprising: Transceiver, and A processor coupled to the transceiver and configured to perform: Obtaining a plurality of medical records via the transceiver, wherein at least one of the plurality of medical records indicates whether a patient taking a first combination of drugs has had an inpatient event; generating a medication combination set from the plurality of medical records, wherein the medication combination set comprises the first medication combination, a second medication combination, and a third medication combination, wherein the first medication combination and the second medication combination each comprise a first medication, and the first medication combination and the third medication combination each comprise a second medication; generating a first ratio of ratios between the first combination of medications and the hospitalization event, a second ratio of ratios between the second combination of medications and the hospitalization event, and a third ratio of ratios between the third combination of medications and the hospitalization event from the plurality of medical records; Generating a first score corresponding to the first drug according to the second ratio, wherein the first score is inversely related to the second ratio; Generating a second score corresponding to the second drug according to the third ratio, wherein the second score is inversely related to the third ratio, wherein the first score is greater than or equal to the second score, and In response to the first ratio being greater than a first threshold, a sum of the first score and the second score is greater than a second threshold, and a quotient of the first score and the second score is less than a third threshold, the first drug combination is output by the transceiver.
Description
Method and electronic device for checking drug interactions Technical Field The present invention relates to a method and an electronic device for checking drug interactions. Background Patients often need to take multiple medications over the same period of time. Interaction between these drugs may lead to serious adverse reactions, leading to unintended hospitalization of the patient. In order to avoid the occurrence of the above-mentioned situation, it is necessary to examine the interaction of various combinations of drugs. However, the number of combinations is enormous, and it is very inefficient to check each combination one by one. Therefore, it is one of the objectives addressed by those skilled in the art how to propose a method that can quickly examine combinations of medications that are at high risk. Disclosure of Invention The present invention provides a method and electronic device for checking drug interactions that can output drug combinations with high risk for reference by a user. A method of examining drug interactions includes obtaining a plurality of medical records, wherein at least one of the plurality of medical records indicates whether an hospitalization event has occurred for a patient taking a first combination of drugs, generating a set of drug combinations based on the plurality of medical records, wherein the set of drug combinations includes a first drug combination, a second drug combination, and a third drug combination, wherein the first drug combination and the second drug combination each include a first drug, and the first drug combination and the third drug combination each include a second drug, generating a first ratio between the first drug combination and the hospitalization event, a second ratio between the second drug combination, and the hospitalization event based on the plurality of medical records, and a third ratio between the third drug combination and the hospitalization event, generating a first score corresponding to the first drug according to the second ratio, wherein the first score is inversely related to the second ratio, generating a second score corresponding to the second drug according to the third ratio, wherein the first score is greater than or equal to the second score, and a third score is inversely related to the third ratio, and a score is greater than or equal to the first score is greater than the first score and a first score is less than a first score threshold, and is greater than a second score is greater than a first threshold. In one embodiment of the invention, the step of generating the first score corresponding to the first drug according to the second ratio includes marking the second drug combination in response to the second ratio being greater than the risk threshold, generating a third score according to the marked second drug combination, wherein the third score is equal to the number of drug combinations in the set of drug combinations that contain the first drug but do not contain the second drug and that are marked divided by the number of drug combinations in the set of drug combinations that contain the first drug but do not contain the second drug, and calculating the first score according to the third score, wherein the sum of the first score and the third score is equal to one. In an embodiment of the present invention, the step of generating the medication combination set according to the plurality of medical records includes performing a filtering process to generate a first unique medication combination set, including generating K topic vectors including a first topic vector according to the plurality of medical records and an implicit dirichlet allocation model, wherein K is a first topic number, wherein the K topic vectors respectively correspond to the K topics, wherein the K topics include a first topic corresponding to the first topic vector, wherein the first topic vector includes a probability distribution of all medication combinations, selecting a plurality of important medication combinations from the first topic vector to generate a first important medication combination set from the medication combinations having a maximum probability, and determining the first unique medication combination set according to the first important medication combination set, and generating the medication combination set according to the first unique medication combination set. In an embodiment of the invention, the K topics include a second topic, and the determining the first unique set of medication combinations based on the first set of important medication combinations includes deleting the first important set of medication combinations from the first set of important medication combinations to generate the first unique set of medication combinations in response to the first important set of medication combinations being included in the first set of important medication combinations corresponding to the first topi