From EHRs to Forecasts: A Pathway to Enhanced Prediction of Medication Demand

Date of Award


Document Type


Degree Name

Master of Science in Computer Vision


Computer Vision

First Advisor

Dr. Mohammad Yaqub

Second Advisor

Dr. Karthik Nandakumar


This thesis delves into the critical and evolving field of pharmaceutical demand forecasting, with a special emphasis on Tacrolimus, an immunosuppressant that plays a vital role in the success of organ transplantation. Central to this work is the novel integration of Electronic Health Records (EHR) into the prediction process. The work is set against the backdrop of increasing global prevalence of Chronic Kidney Disease (CKD), that often necessitates kidney transplantation, with a focus on the United Arab Emirates. Consequently, the demand for immunosuppressants like Tacrolimus has grown significantly, underscoring the importance of precise and efficient demand forecasting to ensure optimal patient outcomes and effective utilization of healthcare resources. The integration of EHR data represents a pioneering approach in the field, considering that previous methods did not explore its potential and rather relied heavily on historical sales data. The thesis begins by providing a thorough analysis and comparison of existing literature in pharmaceutical demand forecasting, focusing on methodologies, datasets, and evaluation metrics previously employed. This literature review sets the stage for understanding the current landscape and identifying gaps in the field. The thesis then describes the data tables sourced from the EHR system used in the study and addresses the preprocessing challenges. It examines preliminary experiments that, although not successful, offered insights leading to the development of the final approach. The research advances by detailing a methodology that leverages EHR data exclusively, eliminating the need for additional inventory or lead time data. This simplifies the forecasting process and enhances its applicability and relevance of the methodology. The methodology details the feature engineering that was developed and performed to extract the necessary variables from the EHR tables, making the approach adaptable to other EHR systems. This process also involves feature selection to retain only statistically significant variables, reducing feature count by two-thirds. Finally, a powerful tool is identified that can significantly streamline and expedite prototyping, testing, and deployment. Significantly, the methodology was rigorously tested and validated to ensure its robustness and reliability. This validation paves the way for future research, offering comprehensive algorithm recommendations based on the number of years that the database covers to enable replication and adaptation in different hospital settings. The thesis proposes a method based on linear regression with conditional detrending and deseasonalization. Compared to relying solely on time as a feature, the Root Mean Square Error (RMSE) is decreased by almost 45\% by using the proposed model. Furthermore, the current system, which employs a moving average, produces an RMSE that is more than 2.5 times higher than that of the proposed model. In conclusion, this thesis presents a comprehensive and innovative approach to pharmaceutical demand forecasting, particularly for transplant medications. Its findings and methodologies have the potential to significantly impact how healthcare providers manage the availability and supply of critical medicines, thereby improving healthcare outcomes and resource efficiency. The inclusion of thorough testing and detailed recommendations for future research further enriches the work, making this work a significant resource for scholars in the field.


Thesis submitted to the Deanship of Graduate and Postdoctoral Studies

In partial fulfilment of the requirements for the M.Sc degree in Computer Vision

Advisors: Mohammad Yaqub, Karthik Nandakumar

with 2 years embargo period

This document is currently not available here.