Monitoring Expiration and Beyond-Use Dates of Non-Compounded Drugs Through Rule-Based and Machine Learning Approaches
Abstract
Public knowledge regarding the time limit for drug usage is still limited, despite existing educational efforts. Many people rely solely on the Expiration Date (ED) stated on the primary packaging, which indicates the post-production shelf life. However, once the packaging is opened, the usage limit no longer refers to the ED, but instead to the Beyond Use Date (BUD), which depends on the drug type, time, form, aroma, and color. The application of a Rule-Based Expert System, through a series of IF-THEN rules and machine learning. Three methods were used: decision tree (DT), Gaussian Naive Bayes (GBN), and K-Nearest Neighbor (KNN). The results showed that the decision tree method (95%), the GBN method (94%), and the KNN method (81%) can assist in monitoring drug use limits, minimizing losses, and enhancing user awareness and compliance to prevent medication errors.
Keywords
Full Text:
PDFReferences
A. Jafarzadeh, A. Mahboub-Ahari, M. Najafi, M. Yousefi, and K. Dalal, “Medicine storage, wastage, and associated determinants among urban households: a systematic review and meta-analysis of household surveys,” BMC Public Health, vol. 21, no. 1, Dec. 2021, doi: 10.1186/s12889-021-11100-4.
A. E. Ikwara and H. Atwijukiire, “Self-medication and medication storage practices among Lira University students in Lira city, Northern Uganda,” Front. Public Health, vol. 11, pp. 1–10, Nov. 2023, doi: 10.3389/fpubh.2023.1259279.
S. M. Mohamed, “Frequency of use of non-prescribed medication among population sample from Al Madina City and its impact on quality of care in Saudi Arabia,” International Journal of Health Sciences (IJHS), vol. 12, no. 5, pp. 3–9, 2018.
H. Chongloi, K. Divya, S. Deepthi, and V. B A, “Non-Prescription Medications Safety And Awareness,” Int. J. of Pharm. Sci, vol. 2, no. 9, pp. 1230–1238, 2024, doi: 10.5281/zenodo.13834255.
C. T. Chacko, D. Prakash, L. Joseph, A. Shabaraya, and C. Author, “A Review on the Attitude and Practice on Self Medication, Storage and Disposal of Drugs in a Community,” International Journal of Research and Review (ijrrjournal.com), vol. 7, no. 8, pp. 122–129, 2020.
B. KM, M. S. Kumar, R. Reji, A. Kumar, H. Doddayya, and M. S. M, “A Household Survey on Extend of Home Medication Utilization and Storage Habits –A Cross Sectional Survey,” Saudi Journal of Medical and Pharmaceutical Sciences, vol. 9, no. 07, pp. 470–476, Jul. 2023, doi: 10.36348/sjmps.2023.v09i07.016.
United States Pharmacopeia, “Pharmaceutical Compounding - Nonsterile Preparations,” 2020, ch. General Chapters 795. Accessed: Aug. 19, 2025. [Online]. Available: https://www.uspnf.com/sites/default/files/usp_pdf/EN/USPNF/revisions/gc-795-rb-notice-20200424.pdf
R. A. Despott, P. Vella Bonanno, and C. Gauci, “Risk Management of Medication Errors: Improving the Quality of Pharmacotherapeutic Practice,” Pharmacol. Res. Perspect., vol. 13, no. 3, pp. 1–12, Jun. 2025, doi: 10.1002/prp2.70093.
D. Ristian Octavia, S. Niken Purwandini, M. Hilaria, and D. P. Pangestu, “Medication Error at the Prescribing Phase,” Health Information Journal, vol. 19, no. 1, pp. 12–19, 2021, doi: 10.31965/infokes.Vol.
Ministry of Health Republic of Indonesia, “Regulation of Indonesian Ministry of Health No. 34 on Pharmaceutical Service Standards in Primary Clinics.,” 2021.
F. Cokro, M. A. Chiara, S. T. Arrang, and O. S. Hendra, “Indonesian Pharmacists’ Application of Beyond-Use Date Interventions to Patients and Its Contributing Factors: A Cross-Sectional Study,” Hosp. Pharm., vol. 58, no. 6, pp. 628–633, Dec. 2023, doi: 10.1177/00185787231179833.
F. Cokro, S. T. Arrang, J. A. N. Solang, and P. Sekarsari, “The Beyond-Use Date Perception of Drugs in North Jakarta, Indonesia,” Indonesian Journal of Clinical Pharmacy, vol. 10, no. 3, pp. 172–179, Sep. 2021, doi: 10.15416/ijcp.2021.10.3.172.
M. S. Wolf et al., “A Patient-Centered Prescription Drug Label to Promote Appropriate Medication Use and Adherence,” J. Gen. Intern. Med., vol. 31, no. 12, pp. 1482–1489, Dec. 2016, doi: 10.1007/s11606-016-3816-x.
D. Gikonyo, A. Gikonyo, D. Luvayo, and P. Ponoth, “Drug expiry debate: The myth and the reality,” Sep. 01, 2019, Makerere University, Medical School. doi: 10.4314/ahs.v19i3.49.
V. Kushwaha, P. Agrawal, B. Pathak, H. Vekaria, and S. Siddiqui, “Effectiveness, Safety and Disposal of Medications Beyond Expiry Dates: Brief Review,” Int. J. Pharm. Sci. Rev. Res., vol. ISSN, no. 4, pp. 105–108, 2025, doi: 10.47583/ijpsrr.2025.v85i04.015.
L. Eltaib, S. A. Alanazi, and S. E. Ali, “Practices and attitudes concerning expiration date, unused, and expired medication disposal,” Int. J. Med. Sci. Public Health, no. 0, pp. 431–438, 2020, doi: 10.5455/ijmsph.2020.06099202010082020.
Isnenia and S. Julaiha, “Mother’s Knowledge of Expiration Dates, Beyond-Use Date (BUD), and Storage Conditions for Compounding and Non-Compounding Drugs,” vol. 14, no. 1, pp. 74–83, 2024, doi: 10.22435/jki.v14i1.6634.
W. Alfianna et al., “The Effect of Poster Education on Public Knowledge of Beyond-Use Dates in Bekasi Regency,” International Journal of Health and Science, vol. 4, no. 3, pp. 2808–7380, 2024, doi: 10.54543/kesans.v4i3.407.
P. Agrawal, V. Kushwaha, G. Singh Rana, B. K. Shoraisham, and S. Chandra, “The Truth About Expired Drugs: An In-Depth Review,” Certified Journal │ Agrawal et al. World Journal of Pharmaceutical Research, vol. 12, pp. 200–214, 2023, doi: 10.20959/wjpr202321-30355.
Z. H. Nodeh, M. Hosseini, M. F. Khoshknab, S. Shirozhan, and H. R. Khankeh, “A scoping review of individual health responsibility: A context base concept,” J. Educ. Health Promot., vol. 13, no. 1, pp. 1–8, May 2024, doi: 10.4103/jehp.jehp_565_23.
T. Schramme, “Health as Complete Well-Being: The WHO Definition and Beyond,” Public Health Ethics, vol. 16, no. 3, pp. 210–218, Nov. 2023, doi: 10.1093/phe/phad017.
M. Ramalingam, R. Puviarasi, N. Diyana Afiqah Binti Zakaria, and E. Chinnavan, “Developing Mobile Application For Medicine Expiry Date detection,” International Journal of Pure and Applied Mathematics, vol. 119, no. 16, pp. 3895–3901, 2018, [Online]. Available: http://www.acadpubl.eu/hub/
E. Deepika, B. R. Devi, Sartitha. B, Begum. B, and K. V. Kumar, “Health Monitoring System Using Rule Based Expert System,” International Journal of Creative Research Thoughts, vol. 8, pp. 2320–28820, 2020, [Online]. Available: www.ijcrt.org
M. N. O. Sadiku, K. B. Olanrewaju, E. A. Dada, and S. M. Musa, “Expert Systems in Healthcare,” Journal of Scientific and Engineering Research, vol. 2021, no. 2, pp. 218–222, 2021, [Online]. Available: www.jsaer.com
B. Silva, F. Hak, T. Guimaraes, M. Manuel, and M. F. Santos, “Rule-based System for Effective Clinical Decision Support,” in Procedia Computer Science, Elsevier B.V., 2023, pp. 880–885. doi: 10.1016/j.procs.2023.03.119.
M. Marfuah, “Implementation of Rule-Based Expert Systems for Real-Time Monitoring of Criminal Case Resolution Using Radio Frequency Identification Technology,” Journal Of Business Information Systems, vol. 7, no. 1, pp. 73–79, May 2017, doi: 10.21456/vol7iss1pp73-79.
B. Reddy and R. Fields, “From Past to Present A Compre hensive Technical Review of Rule-based Expert Systems from 1980-2021,” in Proceedings of the 2022 ACMSE Conference - ACMSE 2022: The Annual ACM Southeast Conference, Association for Computing Machinery, Inc, Apr. 2022, pp. 167–172. doi: 10.1145/3476883.3520211.
G. Aguilera-Venegas, E. Roanes-Lozano, G. Rojo-Martínez, and J. L. Galán-García, “A proposal of a mixed diagnostic system based on decision trees and probabilistic experts rules,” J. Comput. Appl. Math., vol. 427, Aug. 2023, doi: 10.1016/j.cam.2023.115130.
F. Cokro, M. A. Chiara, S. T. Arrang, and O. S. Hendra, “Indonesian Pharmacists’ Application of Beyond-Use Date Interventions to Patients and Its Contributing Factors: A Cross-Sectional Study,” Hosp. Pharm., vol. 58, no. 6, pp. 628–633, Dec. 2023, doi: 10.1177/00185787231179833.
E. M. Mustafa, M. M. Saad, and L. W. Rizkallah, “Building an enhanced case-based reasoning and rule-based systems for medical diagnosis,” Journal of Engineering and Applied Science, vol. 70, no. 1, Dec. 2023, doi: 10.1186/s44147-023-00315-4.
P. K. Maduri, P. Dhiman, R. Srivastava, and R. Singh, “Autonomous Crop Prediction System using Machine Learning,” 2024.
F. Aldi, I. Nozomi, and S. Soeheri, “Comparison of Drug Type Classification Performance Using KNN Algorithm,” SinkrOn, vol. 7, no. 3, pp. 1028–1034, Jul. 2022, doi: 10.33395/sinkron.v7i3.11487.
I. Ihsan, Y. Wirasasmita, and Sarni, “Profile Of Waiting Time For Compounded And Non-Combounded Prescription Services At Siko Community Health Center, North Ternate District,” International Jornal Of Multidiciplynary Leaners, vol. 1, no. 2, pp. 111–15, 2024.
J. Fournier, L. Barret, C. Khouri, F. Naudet, R. Boussageon, and M. Roustit, “The evidence base of the 10 most prescribed drugs in England, France, and the United States: a scoping review,” J. Clin. Epidemiol., vol. 174, pp. 1–11, Oct. 2024, doi: 10.1016/j.jclinepi.2024.111478.
Unites States Pharmacopeia, “USP Compounding Standards and Beyond-Use Dates (BUDs),” Jun. 2019. Accessed: Aug. 20, 2025. [Online]. Available: https://www.usp.org/sites/default/files/usp/document/our-work/compounding/usp-bud-factsheet.pdf
D. Janjanam, B. Ganesh, and L. Manjunatha, “Design of an expert system architecture: An overview,” in Journal of Physics: Conference Series, Purpose-Led Publishing, Feb. 2021, pp. 1–7. doi: 10.1088/1742-6596/1767/1/012036.
L. Sumaryanti, T. Istanto, and S. Pare, “Rule Based Method in Expert System for Detection Pests and Diseases of Corn,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Jul. 2020, pp. 1–9. doi: 10.1088/1742-6596/1569/2/022023.
Z. Zeng, Q. Cheng, and Y. Si, “Logical Rule-Based Knowledge Graph Reasoning: A Comprehensive Survey,” Mathematics, vol. 11, no. 21, pp. 1–37, Nov. 2023, doi: 10.3390/math11214486.
B. T. Jijo and A. M. Abdulazeez, “Classification Based on Decision Tree Algorithm for Machine Learning,” Journal of Applied Science and Technology Trends, vol. 2, no. 1, pp. 20–28, Jan. 2021, doi: 10.38094/jastt20165.
A. K. Srivastava, B. K. Singh, and S. Gupta, “Prediction of Tool Wear Using Machine Learning Approaches for Machining on Lathe Machine,” 2023.
Z. M. Radeef, S. H. Hashem, and E. K. Gbashi, “New Feature Selection Using Principal Component Analysis,” Journal of Soft Computing and Computer Applications, vol. 1, no. 2, Dec. 2024, doi: 10.70403/3008-1084.1012.
O. Peretz, M. Koren, and O. Koren, “Naive Bayes classifier – An ensemble procedure for recall and precision enrichment,” Eng. Appl. Artif. Intell., vol. 136, Oct. 2024, doi: 10.1016/j.engappai.2024.108972.
L. Rusdiana and M. Marfuah, “The Application of Determining Students’ Graduation Status of STMIK Palangkaraya Using K-Nearest Neighbors Method,” in IOP Conference Series: Earth and Environmental Science, Institute of Physics Publishing, Dec. 2017. doi: 10.1088/1755-1315/97/1/012040.
J. Joosten, A. E. Permanasari, and T. B. Adji, “The use of decision table for reducing complex rules in software testing,” in IOP Conference Series: Materials Science and Engineering, Institute of Physics Publishing, Jan. 2020, pp. 1–8. doi: 10.1088/1757-899X/732/1/012086.
J. A. Whittaker, How to Break Software: A Practical Guide to Testing, 1st ed. P&C ECS, 2002. [Online]. Available: https://www.researchgate.net/publication/268043176
M. Sholeh, I. Gisfas, Cahiman, and M. A. Fauzi, “Black Box Testing on ukmbantul.com Page with Boundary Value Analysis and Equivalence Partitioning Methods,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Mar. 2021. doi: 10.1088/1742-6596/1823/1/012029.
X. Guo, H. Okamura, and T. Dohi, “Optimal test case generation for boundary value analysis,” Software Quality Journal, vol. 32, no. 2, pp. 543–566, Jun. 2024, doi: 10.1007/s11219-023-09659-9.
F. Dobslaw, F. G. D. O. Neto, and R. Feldt, “Boundary Value Exploration for Software Analysis,” in IEEE International Conference on Sofware Testing, Ferification and Validation Worshops (ICSTW), 2020, pp. 346–353.
DOI: https://doi.org/10.55311/aiocsit.v7i1.392
Refbacks
- There are currently no refbacks.



