Understanding Drug-Drug Interactions Using R Shiny

Estimated time:

When a person opens their medicine cabinet, they open the door to ingenuity: a confluence of nature and human discovery that has found cures for diseases and helps manage the ones that we do not fully understand yet.

As living conditions and medical care have improved, people are living longer than ever before. This shows that healthcare and society, in general, have advanced. As people get older, they may develop chronic conditions that need to be treated with different medications. This is where drug-drug interactions (or DDI) become a point of concern.
<blockquote>Is your documentation GxP compliant? Follow our tutorial on <a href="https://appsilon.com/gxp-compliance-in-pharma-made-easier-good-documentation-practices-with-r-markdown-and-officedown/" target="_blank" rel="noopener">officedown + rmarkdown for GxP compliance in R</a>.</blockquote>
An easily accessible, online app that allows users to check for potential drug-drug interactions can be particularly helpful for those taking multiple medications. 

Here, we present you with one such solution, built using R Shiny. Bookmark it and use it anywhere!

<ul><li><a href="#define">What is drug-drug interaction?</a></li><li><a href="#data">R Shiny and drug-drug interaction data</a></li><li><a href="#rhino">Using Rhino to develop an enterprise-grade Shiny prototype</a></li><li><a href="#dashboard">Shiny dashboard to search known drug-drug interactions</a></li><li><a href="#mobile">R Shiny on mobile</a></li><li><a href="#why">Why a Drug-Drug Interaction Shiny app is necessary</a></li></ul>

<hr />

<h2>The adverse effects of drug-drug interactions⚔️</h2>
<h3 id="define">What is drug-drug interaction?</h3>
Drug-drug interactions happen when two or more medications are taken together. In problematic cases, this can make the drugs less effective or cause negative side effects. This can be especially worrying for older adults taking multiple medications. 

DDIs can cause adverse drug events, compromise treatment, and pose significant safety risks for older adults while also having negative economic effects on the healthcare system.
<blockquote>R Shiny is found across multiple industries. See examples of <a href="https://appsilon.com/r-shiny-in-life-sciences-examples/" target="_blank" rel="noopener">R Shiny dashboards in Life Sciences</a>.</blockquote>
Most drug-drug interactions are documented and known by physicians. Physicians consider these carefully when planning treatment. This ensures that all the pieces work together and give the best possible care.
<h3>R Shiny and drug-drug interaction data</h3>
National institutes have databases of the known interactions that are studied around the world, however, this information can be difficult to find and use. Here’s where technology can help.

Our team created a Shiny web application that is searching through an extensive online database in order to identify potential adverse effects related to any given pair of drugs or active compounds. With numerous DDIs, it's tough to keep track. Our Shiny app provides a valuable resource not only for healthcare professionals and researchers but also for patients looking to gain a better understanding of the potential risks associated with different drug combinations.

<h2 id="rhino">Using Rhino to develop an enterprise-grade Drug Interaction Shiny prototype swiftly</h2>
The “Drug Interactions” dashboard was created using the Rhino package from CRAN. This allowed our team to quickly set up an initial skeleton of the dashboard that already included all the necessary tools to develop a full-stack application with modular code, SASS support, CI/CD automation, unit testing, e2e testing, and lint support.

From week 1 of our app sprint, the team could focus on integrating with external databases and on developing a clean interface. Rhino saved us time, so our team could focus on building a better product.
<h2 id="dashboard">Shiny dashboard to search known drug-drug interactions</h2>
<h3>Connecting drug databases in Shiny</h3>
The Shiny app allows the user to search for drugs and active compounds in the US National Library of Medicine and find their interactions. It communicates with different data sources to access relevant information, from the chemical description of the chemical compound via PubChem, to the interactions and their severity via RxNorm and DrugBank.

<img class="aligncenter size-full wp-image-18395" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01bb610fa9efb4cc88fb5_Drug-drug-interaction-Shiny-application.webp" alt="Drug-drug interaction Shiny dashboard view" width="1087" height="629" />
<h3>Saving user time with the Drug Interaction Shiny app</h3>
The app at its core facilitates access to this information by eliminating the complexity of searching through different databases and filtering the relevant data. In addition, the secondary drug search box will show any high-severity interactions that exist. Ultimately, the user has a better overview of drugs (or active compounds) that need to be avoided.

<iframe title="YouTube video player" src="https://www.youtube.com/embed/ne5LcbYm6qs" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<h3 id="mobile">R Shiny on mobile</h3>
Our app is designed to work efficiently on mobile devices. On mobile, users have the flexibility to access its features from virtually anywhere. Whether you're on the go, at home, or in the office, our app ensures a seamless experience across all platforms. 
<blockquote>Looking for an engaging user experience with Shiny? Try adding <a href="https://appsilon.com/infinite-scrolling-in-r-shiny/" target="_blank" rel="noopener">infinite scroll in your Shiny app</a>.</blockquote>
<h2 id="why">Why a drug-drug interaction Shiny app is necessary</h2>
Drug-drug interactions are a common occurrence in clinical practice and can have serious consequences. It is important for healthcare providers and patients to be aware of potential drug-drug interactions and to take steps to minimize their risk.
This app does not replace the primary care provider or a physician in health-related matters. Consult with your physician if you believe you are experiencing a drug interaction or if you think there is a risk of experiencing one.
<blockquote>Curious about what's possible with R Shiny and Machine Learning in the life sciences? Explore our <a href="https://www.appsilon.bio/" target="_blank" rel="noopener">Life Science website</a>.</blockquote>

*Unfortunately, the API that powered this application is no longer available, but we encourage you to explore other applications as we look for alternatives.

Contact us!
Damian's Avatar
Damian Rodziewicz
Head of Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Have questions or insights?
Engage with experts, share ideas and take your data journey to the next level!
Join Slack
Explore Possibilities

Take Your Business Further with Custom Data Solutions

Unlock the full potential of your enterprise with our data services, tailored to the unique needs of Fortune 500 companies. Elevate your strategy—connect with us today!

Talk to our Experts