Testing SimPy, a Library for Patient-Level Simulations in Python: An Application to Resource Management in Healthcare Systems

Author(s)

Felizzi F
EIT Health, Basel, BS, Switzerland

OBJECTIVES: The NICE Decision Support Unit presented a Technical Support Document report to carry out patient-level simulations for cost-effectiveness modeling in R, VBA and Simul8. We tested the SimPy Python library and discuss its use. In the light of the bottlenecks which emerged after the COVID-19 pandemic, we applied SimPy to a real-world scenario of an ophthalmic clinic.

METHODS: The SimPy library enabled the creation of processes defined by Python generator functions. In SimPy one can DEFINE resources, such as specialists, available slots for visits, and create instances of these resources with their capacity. One can REQUEST or RELEASE resources, such as the arrival and dismissal of patients, PRIORITIZE resources, CAPACITY management, i.e. the dynamic evolution of additional resources being provided on a bespoke manner and SYNCHRONIZATION between resources. It provides tools for collecting and analyzing STATISTICS during the simulation, such as data on resource utilization, waiting times, queue lengths, or any other relevant metrics to evaluate and optimize healthcare processes.

RESULTS: Unlike R, Python is an object-oriented programming (OOP) language. The key feature of encapsulation helps define methods in resource classes to handle interactions such as a patient being assigned to a bed. These interactions can be encapsulated within the objects, making the simulation logic more intuitive and maintainable.

Inheritance and polymorphism enable capturing common characteristics, while allowing for specialization and the uniform treatment of objects of different resources with similar behavior. OOP promotes modularity, reusable classes representing common healthcare resource patterns can be combined to build more complex simulations.

CONCLUSIONS: The use of SimPy provided to be a very handy and easy to learn Python library when performing a patient-level simulation. In the light of the popularity of Python, the health economics modeling community should explore the advantages of embracing its use.

Conference/Value in Health Info

2023-11, ISPOR Europe 2023, Copenhagen, Denmark

Value in Health, Volume 26, Issue 11, S2 (December 2023)

Acceptance Code

P4

Topic

Economic Evaluation, Methodological & Statistical Research

Topic Subcategory

Artificial Intelligence, Machine Learning, Predictive Analytics, Cost-comparison, Effectiveness, Utility, Benefit Analysis

Disease

no-additional-disease-conditions-specialized-treatment-areas

Explore Related HEOR by Topic


Your browser is out-of-date

ISPOR recommends that you update your browser for more security, speed and the best experience on ispor.org. Update my browser now

×