Computer-Assisted Simulations Using R and RStudio to Assist in Operations Research and Analysis in the Context of Clinical Laboratory Management

A Gentle Introduction and Simple Guide for Pathologists and Laboratory Professionals

Authors

DOI:

https://doi.org/10.21141/PJP.2024.14

Abstract

Operations research (OR) is a valuable yet underutilized field in clinical laboratory management, offering practical solutions to optimize workflows, resource allocation, and decision-making. Despite its potential, the adoption of OR methodologies remain limited due to a lack of training and familiarity among pathologists and laboratory professionals. This paper addresses this gap by presenting an accessible introduction and practical guide to analyzing operations research problems in clinical laboratories using computer-assisted simulations in R, implemented within the R Studio environment.

 

The proposed framework emphasizes simplicity and flexibility, leveraging the extensive capabilities of base R to model and analyze critical OR questions. The paper outlines step-by-step methods for defining problems, constructing simulation models, and interpreting results, ensuring that readers can replicate and adapt these techniques to their unique laboratory contexts.

 

Key features of the framework include its emphasis on reproducibility, customization, and the integration of data-driven insights into decision-making processes. Case studies and examples drawn from real-world laboratory scenarios illustrate the application of R simulations to address challenges such as minimizing turnaround times, balancing staffing levels, and managing inventory efficiently.

 

This guide aims to empower laboratory professionals and pathologists with the tools and skills to integrate operations research into their practice, fostering a culture of innovation and efficiency in clinical settings. By bridging the gap between OR theory and practical application, this paper contributes to the broader adoption of computational approaches in laboratory management, ultimately enhancing the quality and sustainability of healthcare services.

Downloads

Download data is not yet available.

Author Biographies

Mark Angelo Ang, University of the Philippines Manila

Associate Professor, Department of Pathology, College of Medicine, University of the Philippines Manila

Department of Laboratories, Asian Hospital and Medical Center, Muntinlupa, Philippines

 

Karen Cybelle Sotalbo, University of the Philippines Manila

Medical Specialist and Head, Division of Surgical Pathology, Department of Laboratories,  Philippine General Hospital, University of the Philippines Manila

Graduate Student, Master of Hospital Administration, College of Public Health, University of the Philippines Manila

Clinical Associate Professor, Department of Pathology, College of Medicine, University of the Philippines

References

Banks J, Carson JS, Nelson BL, David MN. Discrete-event system simulation. 5th ed. Upper Saddle River: Prentice Hall; 2010.

Green LV. Using operations research to reduce delays for healthcare. In: Chen ZL, Raghavan S, Gray P, Greenberg HJ, eds. State-of-the-art decision-making tools in the information-intensive age. INFORMS. https://doi.org/10.1287/educ.1080.0049 DOI: https://doi.org/10.1287/educ.1080.0049

Green LV. OM Forum—The vital role of operations analysis in improving healthcare delivery. M&SOM, INFORMS. 2012;14(4):488–94. https://doi.org/10.1287/msom.1120.0397 DOI: https://doi.org/10.1287/msom.1120.0397

Ucar I, Smeets B, Azcorra A. simmer: discrete-event simulation for R. J Stat Softw. 2019;90(2):1-30. https://doi.org/10.18637/jss.v090.i02 DOI: https://doi.org/10.18637/jss.v090.i02

Dibba F, Herulambang W, Setyatama F. Reagent stock prediction using Monte Carlo method at Populer Clinical Laboratory Surabaya. J Electr Eng Comput Sci. 2023;7(2):1329–36. https://doi.org/10.54732/jeecs.v7i2.27 DOI: https://doi.org/10.54732/jeecs.v7i2.27

Hussain MR, Hussain ME. A new neuroinformatics approach to optimize diagnosis cost in neurology: an operational research tool. iJOE. 2019;15(06):31-52. https://doi.org/10.3991/ijoe.v15i06.10141 DOI: https://doi.org/10.3991/ijoe.v15i06.10141

Khan M, Khalid P, Almorsy L, Khalifa M. Improving timeliness of diagnostic healthcare services: effective strategies and recommendations. Stud Health Technol Inform. 2016;226:183-6. https://pubmed.ncbi.nlm.nih.gov/27350499

Pierskalla WP, Brailer DJ. Chapter 13 Applications of operations research in health care delivery. In: Handbooks in operations research and management science. 1994;6:469-505. https://doi.org/10.1016/S0927-0507(05)80094-5 DOI: https://doi.org/10.1016/S0927-0507(05)80094-5

Bodtker K, Wilson L, Godolphin W. Simulation modelling to assist operational management and planning in clinical laboratories. Simulation. 1993;60(4):247–55. https://doi.org/10.1177/003754979306000405 DOI: https://doi.org/10.1177/003754979306000405

Vogt W, Braun SL, Hanssmann F, et al. Realistic modeling of clinical laboratory operation by computer simulation. Clin Chem. 1994;40(6):922–8. https://pubmed.ncbi.nlm.nih.gov/8087987 DOI: https://doi.org/10.1093/clinchem/40.6.922

Dawande PP, Wankhade RS, Akhtar FI, Noman O. Turnaround Time: an efficacy measure for medical laboratories. 2022;14(9):e28824. https://pubmed.ncbi.nlm.nih.gov/36225468 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9535613 https://doi.org/10.7759/cureus.28824 DOI: https://doi.org/10.7759/cureus.28824

Bowles J, Czekster RM, Redeker G, Webber T. A simulation study on demand disruptions and limited resources for healthcare provision. In: Lecture notes in computer science; 2021. DOI: https://doi.org/10.1007/978-3-030-70650-0_6

Mannello F, Plebani M. Current issues, challenges, and future perspectives in clinical laboratory medicine. J Clin Med. 2022 ;11(3):634. https://pubmed.ncbi.nlm.nih.gov/35160086 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8836853 https://doi.org/10.3390/jcm11030634 DOI: https://doi.org/10.3390/jcm11030634

Ritika Goel, Tanya Karn, Rahul Kushwaha, Ashima Mehta. Healthcare resource allocation optimization. IJARSCT. 2024;4(5):429–33. https://ijarsct.co.in/Paper17569.pdf DOI: https://doi.org/10.48175/IJARSCT-17569

Lippi G, Simundic AM, Plebani M. Phlebotomy, stat testing and laboratory organization: an intriguing relationship. Clin Chem Lab Med. 2012;50(12):2065–8. https://pubmed.ncbi.nlm.nih.gov/23093204 https://doi.org/10.1515/cclm-2012-0374 DOI: https://doi.org/10.1515/cclm-2012-0374

Wang J, Wang J. Real-Time adaptive allocation of emergency department resources and performance simulation based on stochastic timed petri nets. IEEE Trans Comput Soc Syst. 2023;10(4):1986–96. https://doi.org/10.1109/TCSS.2023.3266501 DOI: https://doi.org/10.1109/TCSS.2023.3266501

Wicaksono PA, Sutrisno S, Solikhin S, Aziz A. Optimizing production planning and inventory management in post-pandemic recovery using a multi-period hybrid uncertain optimization model. RAIRO Oper Res. 2024;58(5):3805–21. https://doi.org/10.1051/ro/2024136 DOI: https://doi.org/10.1051/ro/2024136

Boche B, Temam S, Kebede O. Inventory management performance for laboratory commodities and their challenges in public health facilities of Gambella Regional State, Ethiopia: a mixed cross-sectional study. Heliyon. 2022;8(11):e11357. https://pubmed.ncbi.nlm.nih.gov/36387489 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9649967 https://doi.org/10.1016/j.heliyon.2022.e11357 DOI: https://doi.org/10.1016/j.heliyon.2022.e11357

Kafoe AS. Supply chain resilience strategy for healthcare organizations: crucial steps in addressing the impact of natural Disasters. In: Burrell DN, editor. Advances in Logistics, Operations, and Management Science. IGI Global; 2024. https://doi.org/10.4018/979-8-3693-4288-6.ch001 DOI: https://doi.org/10.4018/979-8-3693-4288-6.ch001

Ofaka, Enyanwu C, Daniel NW, Sonika, Goel R. Effect of pre-analytical errors in laboratory testing facilities: the way forward. TIJPH. 2023;11(2):15–21. https://doi.org/10.21522/TIJPH.2013.11.02.Art002 DOI: https://doi.org/10.21522/TIJPH.2013.11.02.Art002

Sharma D, Cotton M. Overcoming the barriers between resource constraints and healthcare quality. Trop Doct. 2023;53(3):341–3. https://pubmed.ncbi.nlm.nih.gov/37366617 https://doi.org/10.1177/00494755231183784 DOI: https://doi.org/10.1177/00494755231183784

Lippi G, Cadamuro J, Danese E, et al. Disruption of laboratory activities during the COVID-19 Pandemic: results of an EFLM Task Force Preparation of Labs for Emergencies (TF-PLE) survey. 2023;34(3):213-9. https://pubmed.ncbi.nlm.nih.gov/37868082 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10588075 DOI: https://doi.org/10.20944/preprints202306.1592.v1

Huq Ronny FM, Sherpa T, Choesang T, Ahmad S. Looking into the Laboratory Staffing Issues that Affected Ambulatory Care Clinical Laboratory Operations during the COVID-19 Pandemic. Lab Med. 2023;54(4):e114–6. https://pubmed.ncbi.nlm.nih.gov/36282479 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9620378 https://doi.org/10.1093/labmed/lmac139 DOI: https://doi.org/10.1093/labmed/lmac139

Liu K, Liu C, Xiang X, Tian Z. Testing facility location and dynamic capacity planning for pandemics with demand uncertainty. Eur J Oper Res. 2023;304(1):150–68. https://pubmed.ncbi.nlm.nih.gov/34848916 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8613006 https://doi.org/10.1016/j.ejor.2021.11.028 DOI: https://doi.org/10.1016/j.ejor.2021.11.028

Bean L, Rosendorff A, Dallaire S, et al. eP321: Extending and adapting the functions of genetic laboratories in the continuing COVID pandemic–challenges and successes. Genet Med. 2022;24(3): S200–1. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8935068 https://doi.org/10.1016/j.gim.2022.01.356 DOI: https://doi.org/10.1016/j.gim.2022.01.356

Wilson ML. Decreasing inappropriate laboratory test utilization: controlling costs and improving quality of care. Am J Clin Pathol. 2015;143(5):614–6. https://doi.org/10.1309/AJCPHQODM9XYWLZ9 DOI: https://doi.org/10.1309/AJCPHQODM9XYWLZ9

Bello S, Adebowale AS, Dairo MD, et al. Strategies for rapid scale up of laboratory capacity in a public health emergency in a resource-constrained setting: the SARS-CoV-2 Nigeria response experience. 2023. https://doi.org/10.21203/rs.3.rs-2897840/v1 [preprint] DOI: https://doi.org/10.21203/rs.3.rs-2897840/v1

Paul II, Victoria M, Olalere OS. Patient turnaround time: concern of medical laboratory scientist. SJMLS. 2023;8(1):96–107. https://doi.org/10.4314/sokjmls.v8i1.12 DOI: https://doi.org/10.4314/sokjmls.v8i1.12

Sibley J, Quellie SG, Mendy PO, et al. Integration of quality management systems in a rural, low-resource environment: the experience at Phebe Hospital in Bong County, Liberia. GJOBOH. 2022;1(2):1-7. https://doi.org/10.36108/GJOBOH/2202.10.0210 DOI: https://doi.org/10.36108/GJOBOH/2202.10.0210

Arbiol-Roca A, Dot-Bach D. Critical issues and new trends on stat tests in clinical laboratory. EJIFCC. 2019;30(1):59–66. https://pubmed.ncbi.nlm.nih.gov/30881275 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6416811

Amilal Kulhari. Significance of linear programming for optimization. IJARSCT. 2023;3(15):179–86. DOI: https://doi.org/10.48175/IJARSCT-10899

Wang L, Zhao J. Mathematical optimization. In: Wang L, Zhao J, editors. Architecture of advanced numerical analysis systems: designing a scientific computing system using OCaml. Berkeley, CA: Apress; 2023. https://doi.org/10.1007/978-1-4842-8853-5_4. DOI: https://doi.org/10.1007/978-1-4842-8853-5_4

Chanda R, Pabalkar V, Gupta S. A study on application of linear programming on product mix for profit maximization and cost optimization. Indian J Sci Technol. 2022;15(22):1067–74. https://doi.org/10.17485/IJST/v15i22.164 DOI: https://doi.org/10.17485/IJST/v15i22.164

Vázquez-Serrano JI, Peimbert-García RE, Cárdenas-Barrón LE. Discrete-event simulation modeling in healthcare: a comprehensive review. Int J Environ Res Public Health. 2021;18(22):12262. https://pubmed.ncbi.nlm.nih.gov/34832016 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8625660 https://doi.org/10.3390/ijerph182212262 DOI: https://doi.org/10.3390/ijerph182212262

Zhang X. Application of discrete event simulation in health care: a systematic review. BMC Health Serv Res. 2018;18(1):687. https://pubmed.ncbi.nlm.nih.gov/30180848 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6123911 https://doi.org/10.1186/s12913-018-3456-4 DOI: https://doi.org/10.1186/s12913-018-3456-4

Moyi AU, Gamagiwa KB, Ibidoja OJ, Muhammad G. Application of Queuing Theory in a University Clinic. Int J Sci Glob Sustain. 2022;8(1):1–9. https://doi.org/10.57233/ijsgs.v8i1.338 DOI: https://doi.org/10.57233/ijsgs.v8i1.338

Yadav SK, Singh G, Sarin N, Singh S, Gupta R. Optimization of manpower deployment for COVID-19 screening in a tertiary care hospital: a study of utility of queuing analysis. Disaster Med Public Health Prep. 2022;16(6):2388–92. https://pubmed.ncbi.nlm.nih.gov/34284837 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8438508 https://doi.org/10.1017/dmp.2021.228 DOI: https://doi.org/10.1017/dmp.2021.228

Metropolis N, Ulam S. The Monte Carlo method. J Am Stat Assoc. 1949;44(247):335–41. DOI: https://doi.org/10.1080/01621459.1949.10483310

Robert C, Casella G. A short history of Markov Chain Monte Carlo: subjective recollections from incomplete data. Statist Sci. 2011;26(1):102-15. https://doi.org/10.1214/10-STS351 DOI: https://doi.org/10.1214/10-STS351

Badika EM, Zyryanov DA, Babchinetsky SG. Using the python programming language in simulation modeling. CJ. 2022;7(6(68)):18–23. DOI: https://doi.org/10.52013/2658-7556-68-6-7

Staples TL. Expansion and evolution of the R programming language. R Soc Open Sci. 2023;10(4):221550. https://pubmed.ncbi.nlm.nih.gov/37063989 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10090872 https://doi.org/10.1098/rsos.221550 DOI: https://doi.org/10.1098/rsos.221550

Hoffmann GE. Simulation-based reorganization and automation planning in clinical laboratories. J Lab Autom. 1998;3(2):31–3. https://doi.org/10.1177/221106829800300209 DOI: https://doi.org/10.1177/221106829800300209

Westgard JO. Simulation and modeling for optimizing quality control and improving analytical quality assurance. Clin Chem. 1992;38(2):175–8. https://pubmed.ncbi.nlm.nih.gov/1540997 DOI: https://doi.org/10.1093/clinchem/38.2.175

Raimbault J, Pumain D. Methods for exploring simulation models. In: Geographical modeling: cities and territories, vol. 2. John Wiley & Sons, Ltd; 2019. https://doi.org/10.1002/9781119687290.ch5. DOI: https://doi.org/10.1002/9781119687290

Rece L, Vlase S, Ciuiu D, Neculoiu G, Mocanu S, Modrea A. Queueing theory-based mathematical models applied to enterprise organization and industrial production optimization. Mathematics. 2022;10(14):2520. DOI: https://doi.org/10.3390/math10142520

Sotomayor NAO, Fiestas LAZ, Vergaray EF. Optimization software in operational research analysis in a public university. Rev Geintec. 2021;11(4):3061–79. https://revistageintec.net/old/wp-content/uploads/2022/03/2350.pdf DOI: https://doi.org/10.47059/revistageintec.v11i4.2350

Castillo I, Lee T, Pinter J. Integrated software tools for the OR/MS Classroom. Algorithmic Oper Res. 2008;3(1). https://journals.lib.unb.ca/index.php/AOR/article/view/1250.

Kaseko MS. Comparative evaluation of simulation software for traffic operations; 2002. https://www.nevadadot.com/home/showdocument?id=4010

Hlupic V. Simulation software: an Operational Research Society survey of academic and industrial users. In: 2000 Winter Simulation Conference Proceedings (Cat No00CH37165). Orlando, FL, USA: IEEE; 2000. https://doi.org/10.1109/WSC.2000.899156 DOI: https://doi.org/10.1109/WSC.2000.899156

Kruger PS. Micro-computer simulation software: a review. ORiON. 1986;2(1):1-14. https://doi.org/10.5784/2-1-504 DOI: https://doi.org/10.5784/2-1-504

Dunning I, Gupta V, King A, Kung J, Lubin M, Silberholz J. A course on advanced software tools for operations research and analytics. ITE. 2015;15(2):169–79. https://doi.org/10.1287/ited.2014.0131 DOI: https://doi.org/10.1287/ited.2014.0131

Archetti C, Speranza MG, Garrafa E. Managing an automated clinical laboratory: optimization challenges and opportunities. EJDP. 2020;8(1):41–60. https://doi.org/10.1007/s40070-019-00097-2 DOI: https://doi.org/10.1007/s40070-019-00097-2

Gungoren MS. Crossing the chasm: strategies for digital transformation in clinical laboratories. Clin Chem Lab Med. 2023;61(4):570–5. https://pubmed.ncbi.nlm.nih.gov/36753305 https://doi.org/10.1515/cclm-2022-1229 DOI: https://doi.org/10.1515/cclm-2022-1229

Wheeler SE, Block DR, Bunch DR, et al. Clinical laboratory informatics and analytics: challenges and opportunities. Clin Chem. 2022;68(11):1361–7. https://pubmed.ncbi.nlm.nih.gov/36264683 https://doi.org/10.1093/clinchem/hvac157 DOI: https://doi.org/10.1093/clinchem/hvac157

Ong SK, Donovan GT, Ndefru N, et al. Strengthening the clinical laboratory workforce in Cambodia: a case study of a mixed-method in-service training program to improve laboratory quality management system oversight. Hum Resour Health. 2020;18(1):84. https://pubmed.ncbi.nlm.nih.gov/33148269 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7610006 https://doi.org/10.1186/s12960-020-00521-8 DOI: https://doi.org/10.1186/s12960-020-00521-8

Crawley MJ. The R Book, 1st ed. Wiley; 2007. https://doi.org/10.1002/9780470515075 DOI: https://doi.org/10.1002/9780470515075

Anderson TR. Optimization modeling using R, 1st ed. Boca Raton: Chapman and Hall/CRC; 2022. https://doi.org/10.1201/9781003051251 DOI: https://doi.org/10.1201/9781003051251-1

Erdem Kara B. Computer adaptive testing simulations in R. Int J Assess Tool Educ. 2019;6(5):44–56. https://doi.org/10.21449/ijate.621157 DOI: https://doi.org/10.21449/ijate.621157

Hair JF, Hult GTM, Ringle CM, Sarstedt M, Danks NP, Ray S. Overview of R and RStudio. In: Partial least squares structural equation modeling (PLS-SEM) using R. Cham: Springer International Publishing; 2021. https://link.springer.com/10.1007/978-3-030-80519-7_2. DOI: https://doi.org/10.1007/978-3-030-80519-7

Zhang X, Maas Z. Using R as a simulation tool in teaching introductory statistics. Int Elect J Math Ed. 2019;14(3):599-610. https://doi.org/10.29333/iejme/5773 DOI: https://doi.org/10.29333/iejme/5773

Hofert M, Mächler M. Parallel and other simulations in R made easy: an end-to-end study. J Stat Soft. 2016;69(4):1-44. https://doi.org/10.18637/jss.v069.i04 DOI: https://doi.org/10.18637/jss.v069.i04

Wang W, Hallow K, James D. A Tutorial on RxODE: simulating differential equation pharmacometric models in R. CPT Pharmacometrics Syst Pharmacol. 2016;5(1):3–10. https://pubmed.ncbi.nlm.nih.gov/26844010 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4728294 https://doi.org/10.1002/psp4.12052 DOI: https://doi.org/10.1002/psp4.12052

R Core Team. R: a language and environment for statistical computing (v. 4.4.2). R Foundation for Statistical Computing, Vienna, Austria; 2024. https://cran.r-project.org/doc/manuals/r-release/fullrefman.pdf

Posit team. RStudio: integrated development environment for R. Posit Software, PBC, Boston, Massachusetts; 2024. http://www.posit.co/

Paterson C. Observation-enhanced verification of operational processes. PhD thesis, University of York; 2018. https://etheses.whiterose.ac.uk/23257/

Image generated by DeepAI

Downloads

Published

12/17/2024

How to Cite

Ang, M. A., & Sotalbo, K. C. (2024). Computer-Assisted Simulations Using R and RStudio to Assist in Operations Research and Analysis in the Context of Clinical Laboratory Management: A Gentle Introduction and Simple Guide for Pathologists and Laboratory Professionals. PJP, 9(2), 38–52. https://doi.org/10.21141/PJP.2024.14

Issue

Section

Feature Articles

Most read articles by the same author(s)