Case Study
Bringing production-grade Shiny practices with {rhino} for complex scenario modeling.
Health Policy Analysis (HPA), a consulting firm specializing in healthcare systems, needed to enhance their existing Shiny application to be enterprise-ready and support complex scenario modeling. Their R/Shiny team needed assistance with transitioning the app to the {rhino} framework and meeting enterprise standards.
This partnership resulted in an overhaul of HPA's application, implementing rigorous testing, continuous integration, and an improved user interface design. This resulted in significant performance improvements, better scalability to handle larger datasets, and interactive visualizations crucial for healthcare planning and decision-making.
Health Policy Analysis developed a Shiny app for a Government Health Agency in Australia that facilitates informed decision-making and clinical service planning for health services.
The projections are produced for different jurisdictions in Australia based on population estimates and rates of hospital episodes per population for clinical and age groups. Additional parameters are modeled, allowing Health Planners to gain more insights from the data.
The app allows Health Planners to adjust underlying assumptions and observe how these modifications might impact future years. For instance, closing a hospital can drastically affect patient flow from different regions. Such changes can be modeled within the app, allowing Health Planners to analyze a variety of Scenarios.
Analyses conducted in the app by Health Planners help health services make decisions on how to adjust their services to accommodate projected changes. It helps them to plan new facilities or to see how many beds they need to meet the demand.
Health Policy Analysis built the app with the {golem} framework. As the app grew in complexity and became more difficult to manage, the complexity of user interactions and data manipulation proved challenging.
The size of the underlying data required optimizations in the app for it to be able to provide smooth operation for its users. HPA refactored the app to use {rhino} instead of {golem} and reached out to Appsilon to help advance their app.
Key Initiatives
The application underwent a major refactoring. Introduction of a new process of creating database views triggered changes in both code architecture and the user interface.
The focus was to split the app code into separate steps of the underlying business process that allows developers to work on pieces of the process in isolation. Such design also facilitates automated testing which was one of the goals of the cooperation.
Appsilon worked with HPA to build a framework used to define and implement Scenarios. Usage of automated testing facilitated discussions on how Scenarios should work. It helped to see if the implementation yielded correct results for different use cases, simulating how Health Planners will use this feature.
This approach aided cooperation between both parties; the HPA Team provided the rules of business logic on how Scenarios should modify the data, and the Appsilon Team carried out the implementation and made them accessible via the user interface.
To preserve data between sessions, users previously had to export data to Excel and reupload it on the next run. Appsilon leveraged Pins on Posit Connect to automatically save and restore all created database views and Scenarios for logged in users, simplifying the workflow.
Appsilon’s Team helped HPA deliver the app to the health agency with major usability improvements, and automated testing of the interface and business logic.
The modularized codebase has a smaller lead time for changes. Personalized R/Shiny training provided by Appsilon further improved the confidence that the app can be maintained and extended by the HPA Team on their own.
The collaboration between Health Policy Analysis (HPA) and Appsilon resulted in substantial improvements to their Shiny application. Some of these results include:
Collaborating with Appsilon enabled us to leverage their expertise to make our app enterprise-ready. While the HPA team already possessed strong skills and a solid track record in Shiny development, this project elevated our capabilities to the next level. The Appsilon team was highly collaborative, responsive, and professional, making it a pleasure to work with them. Through this partnership, the HPA team gained substantial knowledge, and our clients are extremely satisfied with the final app.
- Jim Pearse, Director, HPA
From advanced analytics to platform development and pharma consulting, we craft solutions tailored to your needs.
Talk to our Experts