Next Article in Journal
Topology Optimization of Functionally Graded Structure for Thermal Management of Cooling Plate
Previous Article in Journal
Robust Federated Learning for Mitigating Advanced Persistent Threats in Cyber-Physical Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

PharmiTech: Addressing Polypharmacy Challenges through AI-Driven Solutions

Research Group on Intelligent Engineering and Computing for Advanced Innovation and Development (GECAD), School of Engineering, Polytechnic of Porto (ISEP/IPP), 4249-015 Porto, Portugal
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2024, 14(19), 8838; https://doi.org/10.3390/app14198838
Submission received: 29 July 2024 / Revised: 24 September 2024 / Accepted: 29 September 2024 / Published: 1 October 2024

Abstract

:
Due to the rising prevalence of polypharmacy, pharmacists face more challenges in ensuring patient safety and optimizing medication management. This paper introduces PharmiTech, a Clinical Decision Support System that leverages Artificial Intelligence (AI) to tackle the growing need for efficient tools to assist pharmacists. The primary focus of the tool is to identify possible herb-drug interactions and instances of prescription drug abuse, combining an expert knowledge base with a supervised classification model and providing user-friendly alerts to pharmacists. To demonstrate the capabilities of the developed tool, this paper presents its functionalities through a case study involving simulated scenarios using de-identified information to maintain the confidentiality of real patients’ personal data. Tested in Portuguese pharmacies, PharmiTech enhances pharmaceutical care, safeguards patient data, and aids pharmacists in informed decision-making, making it a valuable resource for healthcare professionals.

1. Introduction

Pharmacists face the challenge of navigating through an abundance of medical guidelines and the extensive output of evidence-based research. To facilitate the timely acquisition of knowledge, computer technology can be leveraged, employing online databases and medical guideline software as valuable resources [1]. Within this context, Clinical Decision Support Systems (CDSS) emerge as crucial tools intended to enhance healthcare delivery by improving medical decision-making with clinical knowledge, patient data, and other relevant health information. A traditional CDSS is essentially software that matches the unique characteristics of an individual patient to a computerized clinical knowledge base, presenting the clinician with patient-specific recommendations for informed decision-making [2]. Presently, CDSS are predominantly utilized at the point of care, allowing clinicians to combine their expertise with the information or suggestions provided by the CDSS [2].
The use of these systems has been widely discussed and promoted by healthcare services, extending beyond diagnostics and prescription to encompass alarm systems [3]. Particularly in the patient safety topic, CDSS are crucial for addressing issues related to drug allergies and Drug-Drug Interactions (DDI) alerts. Such interactions can potentially result in Adverse Drug Reactions (ADR), leading to prolonged hospitalization and, in some instances, even fatalities [4,5]. To mitigate the occurrence of these situations, the community pharmacy, the patient’s first line of contact with the healthcare system, assumes a crucial role in ensuring that every patient understands the effects of the medications and uses them in a responsible manner [6,7].
Simultaneously, modern healthcare is confronted with the challenge of polypharmacy, a situation exacerbated by the increasing prevalence of chronic diseases and an aging population [8]. Concurrently, there is a rising trend in the utilization of Complementary and Alternative Medicine (CAM), driven by factors such as its historical usage, perceived safety, and mounting scientific validation [9,10]. The National Institutes of Health (NIH) categorizes it into several distinct types, including natural products, mind and body practices, and manipulative and body-based methods. Despite this growing acceptance being motivated by beliefs in the cost-effectiveness and accessibility of CAM, it is also essential for community pharmacies to alert the patients to the possible risks of combining it with other medications [11].
As many substances are available in pharmacies or para-pharmacies without the need for a prescription, pharmacists hold an important role in identifying and monitoring potential interactions between medications and CAM as well as identifying possible cases of drug abuse where patients start subtly requesting excessive dosages of an active substance. However, while DDIs are widely recognized as a significant challenge in clinical pharmacy, the same level of concern is not currently extended to Herb-Drug Interactions (HDIs) within the pharmaceutical community. To retrieve relevant information from the sheer volume of available scientific literature, using Artificial Intelligence (AI) is a promising approach. These technologies have the potential to transform the information retrieval process, resulting in substantial time savings and improving the efficiency and efficacy of the detection of interactions and medication abuse [12,13].
To address the challenges outlined, this paper introduces PharmiTech, a tool designed to aid pharmacists in identifying HDIs as well as instances of prescription drug abuse. Unlike existing systems, which primarily focuses on DDIs, PharmiTech uniquely targets HDIs. This distinction is crucial, as the rising trend in CAM use necessitates a dedicated approach to understanding the interactions that can arise between herbal products and conventional medications. This work is organized into multiple sections that can be described as follows. Section 2 provides an overview on current state of the art of the CDSS domain and explores the application of AI techniques to address these challenges faced by pharmacists. Following this, Section 3 details the architecture of the PharmiTech tool, providing insights into its design and functionality. Moving forward, Section 4 showcases the practical application of PharmiTech through simulated scenarios, demonstrating its efficacy in real-world situations. Finally, Section 5 provides a summary of the main conclusions of this work and appoints future research lines.

2. Related Work

CDSS have been in use since the 1970s and find application in various domains such as patient safety, clinical management, cost containment, administrative function/automation, diagnostics support, among others [2]. Additionally, these systems are commonly categorized as either knowledge-based or non-knowledge based. In the former, rules are established, typically as a set of If-Then statements. The system then retrieves data to assess these rules and generates an action or output accordingly. These rules can be developed using literature-based, practice-based, or patient-directed evidence. Even though the latter approach requires a data source, the decision-making process involves leveraging AI techniques or statistical pattern recognition rather than adhering to explicitly programmed expert medical knowledge [14]. This approach comes with challenges, including the difficulty in understanding the reasoning behind AI-generated recommendations and issues related to data availability to train the AI techniques [2].
In alignment with the capabilities of CDSS, the proposed system focuses on enhancing patient safety by monitoring potential HDIs and identifying cases of drug abuse. To effectively mitigate the occurrence of HDIs, it is imperative to raise public awareness of the potential consequences of combining herbal remedies with pharmaceuticals. It is necessary for healthcare practitioners and the general public to collaborate, aiming to ensure that patients make well-informed choices and possess comprehensive knowledge about the risks linked to HDIs and the essential precautions to avoid them. Furthermore, healthcare professionals need to have reliable and timely access to resources that supply the most up-to-date insights on HDIs [15].
On the other hand, addressing the growing threat of prescription and non-prescription drug abuse requires more than just raising awareness and allowing individuals to self-medicate. In addition to encouraging informed decision-making, it is crucial to implement direct restrictions within pharmacies when signs of potential abuse are observed. Since it is not easy for healthcare professionals to detect every possible situation where individuals may be overusing a medication, CDSS powered by AI techniques can be very valuable to support them. More specifically, there are some studies that successfully apply supervised Machine Learning (ML) models to automatically perform drug abuse detection, improving the reliability of pharmacy systems [13,16].
In order to address these potential issues, pharmacists have access to a range of commercial databases that aid in the assessment of them. However, it’s important to note that certain databases might have ties to the pharmaceutical industry, require payment for access, or lack comprehensive information regarding the period of reviews. These considerations highlight the necessity for more advanced and easily accessible tools in this topic [17]. In this context, the application of Natural Language Processing (NLP) holds great relevance since it offers an approach to comprehend and organize vast volumes of biomedical textual data. AI can be applied to create databases focusing on HDIs, with a prominent example being the SUPP.AI database developed by Wang et al. in 2019 [18]. This innovative database employs the RoBERTa language model [19] to automatically extract information about supplements and detect interactions from scientific literature achieving 82% of precision, 58% of recall, and 68% of F1-score on the SDI test set.
Furthermore, healthcare professionals often grapple with constraints such as time limitations and search capabilities. Thus, the need for a user-friendly system that can effectively sift through HDI-related information and translate it into actionable insights at the point of care is important. To address this problem, Lin et al. created a user-friendly tool that automatically retrieves articles based on PubMed for the MEDLINE database [20]. This system uses specific keywords, Unique Ingredient Identifier (UNII) codes for herbs and drugs, and article details to find relevant information. In initial tests, the system was accurate around 93% of the time. The goal of this system is to be helpful to users, reduce the time wasted on irrelevant articles, and generate precise searches. However, more research is needed to make it a part of regular medical practice and to improve patient safety and healthcare professionals’ experiences [20,21].
To tackle this issue, Trinh et al. have introduced a novel way of finding potential HDIs in the biomedical literature [12]. Firstly, the authors used a feature reduction method, PCA [22], to perform sparse feature reduction and applied the K-means clustering technique to cluster group entity pairs that have similar relationships, achieving 54.45% of accuracy, 75.71% of recall, and an F-score of 63%. Furthermore, a web-based tool called the “HDI highlighter”, developed by Cnudde et al., assists readers in identifying important information about HDIs in clinical studies and case reports [23]. This tool employs NLP algorithms, primarily focusing on medicines. When applied to studies from the last decade, limitations were found, including insufficient patient product details and questionable product quality due to regulatory issues with herbal and food supplements. The tool’s future versions aim to enhance coverage by integrating ML models.
Despite the recent developments, it is essential to improve detection techniques to better identify potential instances of self-medication that can lead to drug abuse or harmful HDIs. This is where AI techniques for supervised classification and unsupervised anomaly detection have an increasing potential [24]. By using AI to assist pharmacists in real-time, they can ensure the safe selection of medication during the purchasing process [25].

3. Proposed Solution

The proposed PharmiTech tool was designed to support the daily operations of a network of pharmacies and para-pharmacies and improve patient safety and counseling. Figure 1 shows the PharmiTech tool architecture.
This tool was designed in a modular architecture, and currently integrates two modules that perform the detection of HDIs and drug abuse in real-time. It provides relevant and informative alerts to pharmacists so they can better assist different patient populations, based on the information requested by the system and provided by the pharmacist. PharmiTech is designed to dynamically learn from new data inputs, ensuring adaptability and continued improvement. Furthermore, a context-aware detection is performed when there is information of the previous purchases of each patient, while always ensuring privacy and confidentiality. The generated alerts are displayed in a simple and user-friendly graphical interface, which ensures that the most relevant information for each patient is provided to a pharmacist before a purchase is completed. The two modules are described below.

3.1. Herb-Drug Interaction Module

The developed HDI detection module uses a rule engine based approach to automatically detect possible HDIs and generate informative interaction alerts, based on biomedical information that was standardized and represented in a knowledge base.
The module was developed with three phases, each introducing distinct components and challenges. In the initial phase, Knowledge Extraction and Representation, data concerning HDIs is extracted from literature and structured in a knowledge base. Moving on to the second phase, Knowledge Completion, the extracted information undergoes standardization to facilitate seamless integration into the expert system. Lastly, the concluding phase, Knowledge Exploitation, uses the knowledge from the preceding phases to intelligently provide pharmacists with valuable and timely information regarding potential HDIs. This implementation was described in [26] and is summarized in Figure 2.
In order to establish the knowledge base, a biomedical literature review was performed to extract information from the literature. The culmination of this work resulted in a pre-designed datasheet, which served as the foundation for constructing the knowledge base of the ForPharmacy DSS system.
Given the heterogeneity of the scientific literature, all the information collected was standardized for maintaining reliability and consistency in the system’s data, improving the continuous learning. This standardized approach also eases future updates and upkeep of the system, making it user-friendly for incorporating new data. In this way, to assist pharmacists in swiftly comprehending information when interacting with patients in limited time, the key variables of interest were identified and selected among all the variables presented in the knowledge base. This step was critical for maintaining harmony between the performed encodings and any additional information input to ensure the smooth operation of the system.
Afterwards, in order to establish correlations within the standardized information and provide new insights within the pharmaceutical domain, an expert system was constructed. This approach aggregates the information provided by an expert into a knowledge base. It then translates this knowledge into a series of if-then rules using an inference or rule engine, mimicking human thought processes. This enables the program to function at or close to the proficiency of human experts. For converting the knowledge base content into a rule-based format, an automated format conversion system was developed. This system transforms the knowledge base information into a standard rule format. Since the rules are predefined, the rule engine operates as an inference engine. When supplied with the relevant variables, this engine scrutinizes the stored rules to identify potential interactions. If the input variables align with a rule, the system extracts pertinent interaction information from its available data.

3.2. Drug Abuse Module

The developed drug abuse detection module uses two machine learning models to automatically identify types of patients, detect possible cases of overmedication, and generate informative alerts with the substance abuse risk, based on the purchase behaviour of different clusters of patients that were analyzed and systematized.

3.2.1. Patient Clustering

To reliably detect that a patient is abusing a certain substance or group of substances, it is necessary to know the maximum allowed dosage for that patient. Since privacy regulations prevent pharmacies and para-pharmacies from accessing the medical history of the health conditions and required dosages of their patients [27], a pharmacist must gain a deeper understanding of the patient population without having direct access to their sensitive personal data.
A valuable approach to provide useful information to a pharmacist, without accessing medical data, is to analyze how a purchase being made by a certain patient deviates from the purchases of other similar patients. Therefore, the system must classify a patient into a general type that represents the shared characteristics of many patients. This can be done by applying clustering algorithms to a dataset of many purchases over a period of time, and then training machine learning models to perform the classification for each new patient.
Within the scope of the ForPharmacy project, the purchases of 200 patients in Portuguese pharmacies from 2020 to 2023 were recorded and organized into a dataset with over 36 thousand entries. To uphold privacy and maintain confidentiality, all potentially identifiable data of both patients and pharmacies was anonymized, and a unique identifier was generated to distinguish between different anonymous patients. The dataset contains various essential attributes: the National Medication Code (PNMC) used by Portuguese authorities to identify the purchased product, the quantity of the purchased product, the month and year of the purchase, a randomly generated patient identifier, and the gender and age group of the patient.
Even though the dataset itself did not provide all the required information to analyze shared characteristics, conditions, and medication profiles of the patients, it was possible to use the PNMC to obtain additional attributes of each purchased product from the official database of the Infarmed [28], the Portuguese National Authority of Medicines and Health Products. The obtained attributes were: the Anatomical Therapeutic Chemical (ATC) codes of each active substance within the product, the international name of each active substance, the dosage of each active substance, and the pharmaceutical form of the product.
In a data preprocessing stage, these additional attributes were used to improve the dataset and provide more valuable insights of the patterns and trends of purchases of the 200 patients. First, the products that contained multiple active substances were split into multiple entries, one for each substance. Then, the correct dosage of each substance was calculated, considering the different quantities and units of measurement of different products. To provide a better generalization to groups of substances with similar characteristics, each active substance was identified by the more general second level of its ATC code, which corresponds to the pharmacological or therapeutic subgroup [29], taking into account their different dosages. Finally, all the information was combined into 200 entries, one per patient, representing their overall purchase behaviour. The entry of each patient contained the total dosages of each second level ATC code for each of the four seasons of the year, as well as the demographic information of the gender and age group.
By applying the well-established K-Means machine learning algorithm [30] to this improved dataset, the patients could effectively be divided into four clusters, with just a small overlap between them. These clusters achieved a Silhouette Coefficient of 0.82, which is reasonably close to the maximum value of 1. Figure 3 provides a two dimensional representation of the purchase behaviour of the 200 patients, obtained through Principal Component Analysis (PCA) [31] after the clusters were computed.

3.2.2. Cluster Analysis

A comprehensive analysis was conducted for each cluster with the help of a medical practitioner, examining their unique characteristics and the possible diseases and conditions that the substances of the second level ATC codes may be used to treat. The clusters are described below, highlighting their distinctive characteristics.
Cluster 1 is mainly composed by elder women who purchase drugs for acid related disorders, drugs used in diabetes, drugs acting on the renin-angiotensin-aldosterone system, lipid lowering drugs, antithrombotic drugs, thyroid drugs, drugs for bone diseases, analgesics, psychoanalgesics and psycholeptics. According to this data and based on the most common diseases, this group of patients appears to have a high prevalence of cardiovascular conditions, probably hypertension and heart failure (in a minor extent), dyslipidemia, Diabetes Mellitus and gastroesophageal reflux disease. Distinctive characteristics of this cluster are a high consumption of antithrombotic drugs, meaning that this cluster could have more acute cardiovascular events (e.g., acute coronary syndrome or stroke) than cluster 2 and 4, but not cluster 3. Also, thyroid drugs are more purchased comparatively to all other clusters, indicating that hypothyroidism or hyperthyroidism could be present. This group also purchases more analgesics revealing that pain, either acute or chronic, is a characteristic symptom of these patients. Drugs for bone diseases are also more commonly bought, meaning that possible osteoporosis is present. At last, there is also high purchase of psycholeptics drug class, indicating that sleep disturbances or psychiatric disorders, namely depression or anxiety disorders, could be present.
Cluster 2 is also composed of elder female patients who purchase drugs used in diabetes, lipid lowering drugs, analgesics, psychoanalgesics and psycholeptics, which are similar to cluster 1. Distinctive characteristics are an increase in diuretics, calcium channel blockers and renin-angiotensin-aldosterone system inhibitor purchases and the absence of thyroid and bone drugs. Due to the different first line agents used in the treatment of hypertension, this could mean that these patients have hypertension that is harder to treat. Gastric acid drugs are also more used than in cluster 1, meaning that this group could have a higher prevalence of gastric acid reflux disease, although the difference is small.
Cluster 3 is composed of elder male patients. They tend to purchase similar medication in terms of cardiovascular, lipid lowering, diabetes, antithrombotic and gastric acid lowering drugs. Distinctive characteristics are the fact that they use more drugs acting on the renin-angiotensin-aldosterone system, diuretics and beta-blockers, which can all be used in heart failure treatment and possibly means that this group has a higher prevalence of heart failure compared to all other clusters. However, all these drugs can be used for the treatment of hypertension as well and beta-blockers can be used to control arrhythmias. Also, they purchase more anti-anemic preparations, meaning that this cluster could have a higher prevalence of anemia. Urological drugs are also more purchased than in other clusters. As they are mainly males, this probably means that this cluster has benign prostatic hyperplasia. On the other hand, these patients purchase less analgesics, psychoanalgesics and psycholeptics comparatively to the other clusters.
Cluster 4 is composed of an approximate proportion of men and women, 64% over 65 years-old and the remaining younger than 65. The only similarities with other clusters are the purchase of acid lowering drugs, analgesics, psychoanalgesics and psycholeptics, which probably have the same indications as in other clusters. Distinctive characteristics of this group are the purchase of more antibacterials for systemic use, which are used for infection treatment, although we cannot accurately predict which type of infection, due to the vast number of different drugs. Also, anti-inflammatory and rheumatic drugs are more bought that in other groups. This could either mean that they use different analgesics to treat pain or that they have a rheumatological condition (e.g., an autoimmune disease). Corticosteroid and dermatological preparations are also more bought than in other clusters. This could point to a wide variety of skin diseases and it’s difficult to predict which. However, certain skin diseases are associated with rheumatological conditions, such as psoriasis. Furthermore, this group purchases a high amount of nasal preparations, antihistamines and drugs for obstructive airway diseases, which can be a possible pattern of atopia. This means that this cluster is characterized by allergic diseases, examples being allergic rhinitis, urticaria and asthma. However, there could be other diseases, as drugs for obstructive airway diseases can also be used in Chronic Pulmonary Obstructive disease (COPD), which is more prevalent in older people.
Figure 4 provides an overview of the demographic information of each cluster, with percentages for male and female patients, as well as percentages of each age group, which correspond to under 18 years old, between 18 and 65, or over 65, respectively.
It is important to note that cluster 2 was similar to cluster 1, but presented different anti-hypertensive therapy and no relation with thyroid nor bone pathologies. On the other hand, there were unique characteristics like anemia and benign prostatic hyperplasia for cluster 3, and skin diseases and rheumatologic conditions like autoimune diseases for cluster 4. Based on all of the information of these clusters, short descriptions were created to summarize the types of patients and provide relevant information to a pharmacist. Some characteristics were repeated to ensure that a pharmacist will receive information about the most prevalent diseases in each type, even if those are present in multiple types. Therefore, the final types of patients obtained from the four clusters were:
  • Type 1—Patient with a cardiovascular disease, diabetes, osteoporosis, hypothyroidism and hyperthyroidism, sleep or psychiatric disorder.
  • Type 2—Patient with a cardiovascular disease, diabetes, sleep or psychiatric disorder.
  • Type 3—Patient with a cardiovascular disease, diabetes, anemia or benign prostatic hyperplasia.
  • Type 4—Patient with an alergic or non-alergic respiratory disease, autoimune disease, skin disease, infection, sleep or psychiatric disorders.
These types of patients were used as labels in a new adapted version of the dataset, which included a different set of features suitable for a real-time detection. This new version was rearranged into a time series format where each entry contained an individual historical context of the past year of purchases. The final features used in the drug abuse detection module were: dosage variations between the different seasons, dosage variation compared with the previous month, dosage variation compared with the equivalent month of the previous year, and the second level ATC code of the main active substance of the product being purchased.
This adapted version of the dataset was used to train a supervised classification model, which identifies the type of patient performing the current purchase according to the individual historical context. Then, the type of patient was added as a feature, and an unsupervised anomaly detection model was trained to detect if the current purchase is a possible case of overmedication. Based on the confidence score predictions of the anomaly detection model, an alert is created with the risk of abuse of that group of substances for that individual patient. Since an anomalous purchase will have scores below 0 and close to −1, these negative values are converted to a drug abuse risk percentage in the [0, 1] format, where 0 is confidently a regular purchase and 1 is a definite case of abuse.
For a deployment of the system in real pharmacies, the features are calculated in real-time using the details of the current purchase and the individual historical context, which is provided locally by the pharmacy database without any patient identifiers being sent to the drug abuse detection module. The utilized classification and anomaly detection models were light gradient boosting machine and isolation forest, respectively, due to the good experimental results that will be detailed in the following section.

3.2.3. Model Cross-Validation

To ensure that the most suitable machine learning models were selected for deployment in the DSS, a standard performance evaluation was conducted with multiple supervised classification models. A 10-fold cross-validation was performed with the utilized dataset of 200 patients for several algorithms, including K-Nearest Neighbours (KNN), Support Vector Machine (SVM), Decision Tree (DT), Random Forest (RF), Extreme Gradient Boosting (XGB), and Light Gradient Boosting Machine (LGBM). The latter achieved the highest macro-averaged f1-score in the experiments, a value of 99.61%, so it can be reliably used to determine the cluster to which a patient belongs to, while remaining lightweight and computationally efficient. The results of the analyzed machine learning models are summarized in Figure 5.
By using the knowledge of the patient type provided this clustering approach, pharmacists can identify valuable patterns and trends within the patient population, facilitating proactive interventions and early detection of potential health risks. Additionally, pharmacies and para-pharmacies may also use these type of patient predictions to customize their services, such as developing personalized care plans, suggesting suitable medications, and implementing targeted preventive measures.

4. Case Study

The PharmiTech tool was integrated in four Portuguese pharmacies in a test environment. A real-time detection for every patient purchase was performed using automatically provided input data that was synchronized from the pharmacy’s purchases software. To demonstrate the reliability of the PharmiTech tool, but still preserve the privacy and confidentiality of the personal data of real patients, its capabilities were showcased through a case study with simulated scenarios based on an anonymized purchase history. The data was directly provided through the graphical user interface instead of through the automated synchronization, to enable the pharmacists to manually insert the behaviour of a patient into the DSS and validate the provided alerts.
In this case study, Mrs. Ana is a 66-year-old female diagnosed with atrial fibrillation. She visits the pharmacy to purchase the prescribed medicine, specifically warfarin. As a precautionary measure, the pharmacist uses the PharmiTech tool to identify any potential interactions between warfarin and herbs, filtering them to provide Mrs. Ana with relevant information related to her pathologies. Upon logging into the system, the pharmacist is presented with three options on the main interface, as showcased in Figure 6. This main page is crucial for guiding the pharmacist through the system’s functionalities in a user-friendly manner. By offering clear choices, it ensures that the pharmacist can quickly access the specific tool needed to check for HDIs, and analyze drug abuse risk.

4.1. Herb-Drug Interaction Detection

The pharmacist selects the “List all possible interactions” option to investigate any potential HDI. When using this option, it is important to provide the name of the drug to be analyzed, along with relevant patient information such as age, gender, and any associated medical conditions. Considering this use case, the patient has 66 years old, female, and suffers from both atrial fibrillation and asthma. Thus, the pharmacist enters this information in the system. Under the pathologies section, he needs to select “Cardiovascular” and “Respiratory” options, as demonstrated in Figure 7.
Upon clicking the “Click here” option, a pop-window with a table is displayed, presenting a list of herbs that interact with the drug warfarin. The table provides essential information to the pharmacist, including the scientific and common names of the herbs, the clinical outcome resulting from the interaction, the significance value, and the level of interaction. Figure 8 provides a visual representation of this information available to the pharmacist. The system has detected three different HDIs. These interactions involve the herbs Goji berry, Chamomille, and Korean red ginseng. Simultaneous use of warfarin and Matricaria Chamomilla herb is linked to a 50% hazard percentage, indicating a moderate level of interaction. This interaction may lead to potential adverse effects like elevated International Normalised Ratio (INR) levels and an increased risk of bleeding. The INR blood test gauges an individual’s blood coagulation rate. When an individual’s INR test result surpasses their designated target range, it signifies that their blood is coagulating at a slower pace, heightening the likelihood of bleeding [32,33,34].
Additionally, the interaction with Goji berry is of significant concern as it presents a high risk, leading to symptoms such as bruising, echymosis, pistaxis, hematochezia, and an elevation in INR. Although this HDI has a significance value of 0% due to its limited documentation in the literature (reported only once), it is important to inform the patient about it given the potential symptoms associated with it. On the other hand, the literature reports no effect or hazard level associated with the interaction between Korean red ginseng and the drug warfarin. Considering the available information, the pharmacist provides Mrs. Ana with clear and straightforward guidance on the precautions she should take.

4.2. Drug Abuse Detection

Another patient of this case study, Mrs. Ruth, is a 69-year-old patient diagnosed with high cholesterol and elevated blood triglyceride levels who visited the pharmacy to make a combined purchase of paracetamol and simvastatin. These medications have been part of her regular purchases over the past year.
As a precautionary measure, the pharmacist wanted to check checked if there were any anomalies with the dosages of this purchase, according to the type of patients she belonged to. To accomplish this, the pharmacist clicks on option “Deal with medication abuse”, represented in Figure 6, and inserts the relevant information. This information, represented in Figure 9, includes the historical context-ware prediction of the type of patient, considering the dosages of the past purchases that were recorded and safely stored in the pharmacy’s database. Even though these past purchases were of different products, their active substances were also paracetamol or simvastatin, so they were automatically included in the context to improve the reliability of the prediction. The patient’s cardiovascular issues were correctly predicted and the system assigned her to patient type 2, which corresponds to patients with cardiovascular diseases, diabetes, sleep or psychiatric disorders.
Regarding the drugs of the current purchase, a possible overmedication was reported with a 66% risk in a higher than usual dosages of paracetamol, which significantly increased the dosages in comparison with the patient’s previous purchases and with the usual purchase behaviour of this substance by type 2. On the other hand, simvastatin was assigned a very low risk of 0.8% because the dosages corresponded to the regular patterns and trends of type 2. Even though these predictions were performed using a simulated purchase history, the real purchase history of a patient can be provided to the system in real-time when a purchase is being made in a certain pharmacy. Therefore, this module is capable of automatically detecting anomalous purchase behaviour in regular and sporadic purchases, providing the pharmacist with a reliable risk indicator of possible prescription drug abuse behaviour.

5. Conclusions

This paper presents the PharmiTech tool, a CDSS designed to address the challenges faced by pharmacists in ensuring patient safety and optimizing medication management. At this moment, PharmiTech comprises two modules that address the detection of HDIs and prescription drug abuse through AI-driven solutions. These tool is capable of converting large amounts of data with scientific evidence into actionable knowledge for pharmacies and para-pharmacies. The system’s user-friendly interface and distinct use cases make it a practical tool for healthcare professionals to use in real-time to assist different patient populations, a fact substantiated by successful testing in four different pharmacies in Portugal. Furthermore, it is important to highlight that the PharmiTech tool offers an Application Programming Interface (API) that enhances its adaptability and integration capabilities, promoting seamless collaboration with other healthcare systems and technologies.
The performed case study considered simulated scenarios to preserve the privacy of the personal data of real patients. Utilizing the PharmiTech tool, the pharmacist reported interactions with warfarin and chamomile, indicating a moderate risk. Additionally, interactions with Goji berry posed a high risk, while no risk was detected with Korean red ginseng. Afterwards, the pharmacist was able to share this information with the patient in a clear and simple way. Furthermore, possible overmedication was reported with a 66% risk in a purchase of a higher than usual quantity of paracetamol, but a regular purchase of simvastatin was assigned a very low risk of 0.8%.
Overall, the PharmiTech tool offers a range of benefits. It enhances patient safety and prevents overmedication, providing accessible information. This technology empowers healthcare professionals to make well-informed decisions, ultimately improving the quality of care provided to patients. Additionally, by closely monitoring customer interactions and observing deviations from typical patterns, pharmacists can identify irregularities that may suggest misuse or abuse of medications with the drug abuse detection module. Anomalous behaviour may include frequent and excessive prescription refills, early requests for refills, multiple visits to different pharmacies, or attempts to obtain medications without a valid prescription. These behaviours, when detected and analyzed systematically, can serve as warning signs for potential drug abuse. By leveraging ML algorithms and providing historical context, it is possible to detect and alert to anomalous behaviour, enabling timely intervention, counseling, and referral to appropriate healthcare professionals for further assessment and support. This proactive approach not only helps protect patient safety but also contributes to the overall well-being and effective management of medication usage.
Despite its benefits, like any CDSS, PharmiTech has limitations. Although the tool is very user-friendly and straightforward, the effectiveness of PharmiTech depends not only on the technology but also on the pharmacists’ ability to fully understand and integrate it into their routine practice. Raising awareness among pharmacists about its features and benefits will be key to maximizing its impact on patient safety and medication management. Furthermore, the developed CDSS has a drawback concerning its knowledge base size, as it currently comprises only 234 interactions. To expand this knowledge base, a recurring literature review would be necessary to keep it up-to-date. Nevertheless, as discussed, certain text mining tools have been successfully applied in the field of HDIs and DDIs. Therefore, a promising direction for future work would be to utilize these techniques to extract and identify interactions from studies, which would enhance the efficiency of incorporating new interactions into the system’s knowledge base. Additionally, the frequency of updates can be customized according to the needs of each pharmacy utilizing the tool. Pharmacies will have the flexibility to define their own update criteria, ensuring that the knowledge base remains aligned with their operational requirements while maintaining the system’s relevance and accuracy.
Moreover, it is is important to note that Pharmiech can be further enhanced with expanding the available data and incorporating more real-world cases. The classification models used in the system current version were based on a relatively small dataset of 200 patients over three years, approximately. In the future, it is important to obtain a larger dataset with more purchases over a longer period of time to provide more comprehensive experiments with a larger patient population. Moreover, the system is prepared to integrate additional modules on topics of interest to pharmacists, such as the detection of DDIs. A promising direction for future work would be to utilize text mining techniques to extract and identify interactions from studies and enhance the efficiency of incorporating new interactions into the knowledge base.

Author Contributions

Conceptualization, A.M. and J.V.; methodology, A.M. and J.V.; validation, E.M. and I.P.; investigation, A.M. and J.V.; writing, A.M. and J.V.; supervision, E.M.; project administration, I.P.; funding acquisition, I.P. All authors have read and agreed to the published version of the manuscript.

Funding

This work was done and funded in the scope of the ForPharmacy project (P2020-COMPETE-FEDER no. 070053). This work was also supported by UIDB/00760/2020.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

Restrictions apply to the availability of the data. Requests to access the dataset should be directed to the project coordinator.

Acknowledgments

The authors would like to acknowledge the help provided by André Dias to analyze the distinctive characteristics of the patient clusters.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Curtain, C.; Peterson, G.M. Review of computerized clinical decision support in community pharmacy. J. Clin. Pharm. Ther. 2014, 39, 343–348. [Google Scholar] [CrossRef] [PubMed]
  2. Sutton, R.T.; Pincock, D.; Baumgart, D.C.; Sadowski, D.C.; Fedorak, R.N.; Kroeker, K.I. An overview of clinical decision support systems: Benefits, risks, and strategies for success. NPJ Digit. Med. 2020, 3, 17. [Google Scholar] [CrossRef] [PubMed]
  3. Armando, L.G.; Miglio, G.; de Cosmo, P.; Cena, C. Clinical decision support systems to improve drug prescription and therapy optimisation in clinical practice: A scoping review. BMJ Health Care Inform. 2023, 30, e100683. [Google Scholar] [CrossRef] [PubMed]
  4. Zhong, Y.; Zheng, H.; Chen, X.; Zhao, Y.; Gao, T.; Dong, H.; Luo, H.; Weng, Z. DDI-GCN: Drug-drug interaction prediction via explainable graph convolutional networks. Artif. Intell. Med. 2023, 144, 102640. [Google Scholar] [CrossRef]
  5. Cai, R.; Liu, M.; Hu, Y.; Melton, B.L.; Matheny, M.E.; Xu, H.; Duan, L.; Waitman, L.R. Identification of adverse drug-drug interactions through causal association rule discovery from spontaneous adverse event reports. Artif. Intell. Med. 2017, 76, 7–15. [Google Scholar] [CrossRef]
  6. Cuvelier, E.; Robert, L.; Musy, E.; Rousselière, C.; Marcilly, R.; Gautier, S.; Odou, P.; Beuscart, J.B.; Décaudin, B. The clinical pharmacist’s role in enhancing the relevance of a clinical decision support system. Int. J. Med Inform. 2021, 155, 104568. [Google Scholar] [CrossRef]
  7. Hines, L.; Saverno, K.R.; Warholak, T.L.; Taylor, A.; Grizzle, A.J.; Murphy, J.E.; Malone, D.C. Pharmacists’ awareness of clinical decision support in pharmacy information systems: An exploratory evaluation. Res. Soc. Adm. Pharm. 2011, 7, 359–368. [Google Scholar] [CrossRef]
  8. Fugh-Berman, A. Herb-drug interactions. Lancet 2000, 355, 134–138. [Google Scholar] [CrossRef]
  9. Posadzki, P.; Watson, L.K.; Ernst, E. Herb—Drug interactions: An overview of systematic reviews. Br. J. Clin. Pharmacol. 2013, 75, 603–618. [Google Scholar] [CrossRef]
  10. Martins, A.; Costa, F.; Maia, E.; Praça, I.; Lages, M.; Pontes, C.; Guarino, M. A Clinical Decision Support System to Reduce Herb-Drug Interaction at Community Pharmacies: A Scoping Review. Available online: https://preprints.jmir.org/preprint/47649 (accessed on 1 January 2024).
  11. Brantley, S.; Argikar, A.; Lin, Y.; Nagar, S.; Paine, M. Herb-Drug Interactions: Challenges and Opportunities for Improved Predictions. Drug Metab. Dispos. Biol. Fate Chem. 2013, 42, 301–317. [Google Scholar] [CrossRef]
  12. Trinh, K.; Pham, D.; Le, L. Semantic Relation Extraction for Herb-Drug Interactions from the Biomedical Literature Using an Unsupervised Learning Approach. In Proceedings of the 2018 IEEE 18th International Conference on Bioinformatics and Bioengineering (BIBE), Taichung, Taiwan, 29–31 October 2018; pp. 334–337. [Google Scholar] [CrossRef]
  13. Qiao, Z.; Chai, T.; Zhang, Q.; Zhou, X.; Chu, Z. Predicting potential drug abusers using machine learning techniques. In Proceedings of the 2019 International Conference on Intelligent Informatics and Biomedical Sciences (ICIIBMS), Shanghai, China, 21–24 November 2019; pp. 283–286. [Google Scholar] [CrossRef]
  14. Deo, R.C. Machine Learning in Medicine. Circulation 2015, 132, 1920–1930. [Google Scholar] [CrossRef] [PubMed]
  15. Harnett, J.; Ung, C.; Hu, H.; Sultani, M.; Desselle, S. Advancing the pharmacist’s role in promoting the appropriate and safe use of dietary supplements. Complement. Ther. Med. 2019, 44, 174–181. [Google Scholar] [CrossRef] [PubMed]
  16. Barenholtz, E.; Fitzgerald, N.D.; Hahn, W.E. Machine-learning approaches to substance-abuse research: Emerging trends and their implications. Curr. Opin. Psychiatry 2020, 33, 334–342. [Google Scholar] [CrossRef] [PubMed]
  17. Zhang, Y.; Ip, C.M.; Lai, Y.S.; Zuo, Z. Overview of Current Herb–Drug Interaction Databases. Drug Metab. Dispos. 2022, 50, 86–94. [Google Scholar] [CrossRef]
  18. Wang, L.L.; Tafjord, O.; Cohan, A.; Jain, S.; Skjonsberg, S.; Schoenick, C.; Botner, N.; Ammar, W. SUPP.AI: Finding evidence for supplement-drug interactions. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, Online, 5–10 July 2020; pp. 362–371. [Google Scholar] [CrossRef]
  19. Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv 2019. [Google Scholar] [CrossRef]
  20. Lin, K.; Friedman, C.; Finkelstein, J. An automated system for retrieving herb-drug interaction related articles from MEDLINE. AMIA Jt. Summits Transl. Sci. Proceedings. AMIA Summit Transl. Sci. 2016, 2016, 140–149. [Google Scholar]
  21. Haynes, B.; McKibbon, K.; Wilczynski, N.; Walter, S.; Werre, S. Optimal Search Strategies for Retrieving Scientifically Strong Studies of Treatment from MEDLINE. BMJ 2005, 330, 1179. [Google Scholar] [CrossRef]
  22. Abdi, H.; Williams, L.J. Principal component analysis. WIREs Comput. Stat. 2010, 2, 433–459. [Google Scholar] [CrossRef]
  23. Cnudde, A.; Watrin, P.; Souard, F. HDI Highlighter, The First Intelligent Tool to Screen the Literature on Herb-Drug Interactions. Clin. Pharmacokinet. 2022, 61, 761–788. [Google Scholar] [CrossRef]
  24. Choi, Y.H.; Chin, Y.W. Multifaceted Factors Causing Conflicting Outcomes in Herb-Drug Interactions. Pharmaceutics 2020, 13, 43. [Google Scholar] [CrossRef]
  25. Prely, H.; Herledan, C.; Caffin, A.G.; Baudouin, A.; Larbre, V.; Maire, M.; Schwiertz, V.; Vantard, N.; Ranchon, F.; Rioufol, C. Real-life drug–drug and herb–drug interactions in outpatients taking oral anticancer drugs: Comparison with databases. J. Cancer Res. Clin. Oncol. 2022, 148, 707–718. [Google Scholar] [CrossRef] [PubMed]
  26. Martins, A.; Maia, E.; Praça, I. Herb–Drug Interactions: A Holistic Decision Support System in Healthcare. In Proceedings of the 2022 IEEE International Conference on E-health Networking, Application & Services (HealthCom), Genoa, Italy, 17–19 October 2022; pp. 1–6. [Google Scholar] [CrossRef]
  27. European Health Data Space Regulation Proposal. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:52022PC0197 (accessed on 1 January 2024).
  28. Infarmed - National Authority of Medicines and Health Products. Available online: https://www.infarmed.pt/web/infarmed/servicos-on-line/pesquisa-do-medicamento (accessed on 1 January 2024).
  29. Anatomical Therapeutic Chemical ATC Classification. Available online: https://www.who.int/tools/atc-ddd-toolkit/atc-classification (accessed on 1 January 2024).
  30. MacQueen, J. Some methods for classification and analysis of multivariate observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, Oakland, CA, USA, 1 January 1967; Volume 1, pp. 281–297. [Google Scholar]
  31. Pearson, K. LIII. On lines and planes of closest fit to systems of points in space. Lond. Edinb. Dublin Philos. Mag. J. Sci. 1901, 2, 559–572. [Google Scholar] [CrossRef]
  32. Milić, N.; Milošević, N.; Kon, S.G.; Božić, T.; Abenavoli, L.; Borrelli, F. Warfarin Interactions with Medicinal Herbs. Nat. Prod. Commun. 2014, 9, 1934578X1400900835. [Google Scholar] [CrossRef]
  33. Segal, R.; Pilote, L. Warfarin interaction with Matricaria chamomilla. Cmaj 2006, 174, 1281–1282. [Google Scholar] [CrossRef]
  34. International Normalised Ratio INR Test. Available online: https://www.healthdirect.gov.au/international-normalised-ratio-INR-test (accessed on 1 January 2024).
Figure 1. Architectural design of PharmiTech.
Figure 1. Architectural design of PharmiTech.
Applsci 14 08838 g001
Figure 2. Herb-Drug Interaction detection module.
Figure 2. Herb-Drug Interaction detection module.
Applsci 14 08838 g002
Figure 3. Two-dimensional representation of the patient’s behaviour.
Figure 3. Two-dimensional representation of the patient’s behaviour.
Applsci 14 08838 g003
Figure 4. Demographic information of each cluster.
Figure 4. Demographic information of each cluster.
Applsci 14 08838 g004
Figure 5. Model 10-fold cross-validation.
Figure 5. Model 10-fold cross-validation.
Applsci 14 08838 g005
Figure 6. ForPharmacy Decision Support System Use Case.
Figure 6. ForPharmacy Decision Support System Use Case.
Applsci 14 08838 g006
Figure 7. Selection of the attributes needed to evaluate the interaction.
Figure 7. Selection of the attributes needed to evaluate the interaction.
Applsci 14 08838 g007
Figure 8. Herb details regarding the interactions with warfarin.
Figure 8. Herb details regarding the interactions with warfarin.
Applsci 14 08838 g008
Figure 9. Reported risks regarding potentially drug abuses.
Figure 9. Reported risks regarding potentially drug abuses.
Applsci 14 08838 g009
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Martins, A.; Vitorino, J.; Maia, E.; Praça, I. PharmiTech: Addressing Polypharmacy Challenges through AI-Driven Solutions. Appl. Sci. 2024, 14, 8838. https://doi.org/10.3390/app14198838

AMA Style

Martins A, Vitorino J, Maia E, Praça I. PharmiTech: Addressing Polypharmacy Challenges through AI-Driven Solutions. Applied Sciences. 2024; 14(19):8838. https://doi.org/10.3390/app14198838

Chicago/Turabian Style

Martins, Andreia, João Vitorino, Eva Maia, and Isabel Praça. 2024. "PharmiTech: Addressing Polypharmacy Challenges through AI-Driven Solutions" Applied Sciences 14, no. 19: 8838. https://doi.org/10.3390/app14198838

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop