Pharosight: A Shiny-Based Interactive Platform With LLM-Enhanced Analyses and Predictive Modeling for Real-World Prescription Data
Author(s)
Máté Szilcz, PhD1, Parissa Naghipour, MSc2.
1Medical Epidemiology and Biostatistics, Karolinska Institutet, Stockholm, Sweden, 2Viti Science AB, Stockholm, Sweden.
1Medical Epidemiology and Biostatistics, Karolinska Institutet, Stockholm, Sweden, 2Viti Science AB, Stockholm, Sweden.
OBJECTIVES: Real-world prescription data play a pivotal role in understanding medication utilization trends, treatment switches and adherence patterns. While commercial software for these analyses often lacks flexibility and advanced functionality, existing open-source solutions typically require significant methodological expertise and programming skills. Our objective was to develop an intuitive Shiny-based application (Pharosight) augmented by large language model (LLM) capabilities for exploring and visualizing real-world prescription data.
METHODS: Pharosight was developed as a cloud-based platform using R (v4.3.1) and Shiny, drawing on data from the Swedish Prescribed Drug Register. Dynamic visualizations (based on the plotly and ggplot2 packages) and LLM-based functionalities were integrated into the web application. These LLM components provide textual summaries of interactive figures, guide users through statistical interpretations, and support natural language queries for rapid calculations (e.g., incidence rates, comparative statistics). Additionally, predictive models leveraging time-series methods were implemented to forecast future prevalence and incidence of drug use, enabling real-time projection of medication utilization patterns.
RESULTS: In pilot testing with diverse stakeholders (researchers, healthcare providers, and pharmaceutical company representatives), Pharosight generated actionable insights, identified prescribing trends, and highlighted variations in drug utilization. Users reported that LLM-generated summaries and one-click calculations facilitated deeper understanding of observed trends, while the predictive models offered valuable foresight into future prescribing patterns. However, a few users noted occasional ambiguities or oversimplifications in the LLM-generated summaries, pointing to the need for more robust contextualization and continuous refinement of the platform’s automated interpretations. Preliminary feedback otherwise emphasized the platform’s ease of use and its potential to guide hypothesis-driven research.
CONCLUSIONS: Pharosight combines interactive data visualization, LLM-assisted interpretation, and predictive modeling to support efficient, engaging exploration of real-world prescription data by non-expert users. Future directions include expanding the LLM’s domain-specific capabilities to further advance pharmacoepidemiologic research.
METHODS: Pharosight was developed as a cloud-based platform using R (v4.3.1) and Shiny, drawing on data from the Swedish Prescribed Drug Register. Dynamic visualizations (based on the plotly and ggplot2 packages) and LLM-based functionalities were integrated into the web application. These LLM components provide textual summaries of interactive figures, guide users through statistical interpretations, and support natural language queries for rapid calculations (e.g., incidence rates, comparative statistics). Additionally, predictive models leveraging time-series methods were implemented to forecast future prevalence and incidence of drug use, enabling real-time projection of medication utilization patterns.
RESULTS: In pilot testing with diverse stakeholders (researchers, healthcare providers, and pharmaceutical company representatives), Pharosight generated actionable insights, identified prescribing trends, and highlighted variations in drug utilization. Users reported that LLM-generated summaries and one-click calculations facilitated deeper understanding of observed trends, while the predictive models offered valuable foresight into future prescribing patterns. However, a few users noted occasional ambiguities or oversimplifications in the LLM-generated summaries, pointing to the need for more robust contextualization and continuous refinement of the platform’s automated interpretations. Preliminary feedback otherwise emphasized the platform’s ease of use and its potential to guide hypothesis-driven research.
CONCLUSIONS: Pharosight combines interactive data visualization, LLM-assisted interpretation, and predictive modeling to support efficient, engaging exploration of real-world prescription data by non-expert users. Future directions include expanding the LLM’s domain-specific capabilities to further advance pharmacoepidemiologic research.
Conference/Value in Health Info
2025-11, ISPOR Europe 2025, Glasgow, Scotland
Value in Health, Volume 28, Issue S2
Code
EPH180
Topic
Epidemiology & Public Health, Health Service Delivery & Process of Care, Organizational Practices
Topic Subcategory
Safety & Pharmacoepidemiology
Disease
No Additional Disease & Conditions/Specialized Treatment Areas