Development of a Smart Monitoring System for Expired Drugs Using the Random Forest Algorithm for Classifying the Risk Level of Expired Drugs
Keywords:
Smart Monitoring, expired drugs, Random Forest, risk classification, machine learningAbstract
Expired drug management is an important aspect of pharmaceutical inventory management because it affects healthcare service quality and operational efficiency. Previous studies mainly used forecasting approaches such as the Autoregressive Integrated Moving Average (ARIMA) method to predict the number of drugs approaching expiration, but these approaches could not provide risk information at the individual drug-item level. Therefore, this study aims to develop a Smart Monitoring System for Expired Drugs by integrating the Random Forest algorithm to classify expiration risk levels as a decision support system. The study employed a synthetic dataset consisting of 500 records developed based on common pharmaceutical inventory characteristics as a proof of concept due to limited access to sensitive operational data. The research process included dataset generation, data preprocessing, categorical transformation using One-Hot Encoding, Random Forest model training, model evaluation, and integration of the trained model into the Smart Monitoring application. The model was evaluated using Accuracy, Precision, Recall, and F1-Score metrics. Experimental results showed that the Random Forest model achieved an Accuracy of 87.00%, Precision of 87.97%, Recall of 87.00%, and F1-Score of 86.80%. Feature Importance analysis indicated that remaining shelf life, stock quantity, and price were the most influential factors in risk classification. The integration of Random Forest successfully transformed the system from a monitoring tool into a decision support system that assists pharmacy personnel in prioritizing drug distribution and inventory management. However, the findings remain at the proof-of-concept stage and require further validation using real operational data from pharmacies and hospitals.

