21
Patient-centered simulation tool for aiding in hospital management L. Moreno a, * , R.M. Aguilar a , C.A. Mart ın a , J.D. Pi ~ neiro a , J.I. Est evez a , J.F. Sigut a , J.L. S anchez a , V.I. Jim enez b a Department of Applied Physics, University of La Laguna, La Laguna, Tenerife, Canary Islands, Spain b Department of Applied Economics, University of La Laguna, La Laguna, Tenerife, Canary Islands, Spain Received 2 May 1998; received in revised form 21 January 1999 Abstract The study of a particular complex system by means of computer simulation is described in this paper. Hospitals are chosen as target systems where the proposed methodology is applied. In order to choose the right decisions, hospital managers need all the information about the functioning of the organization. This research project presents a simulation tool that allows virtual societies such as hospitals to be implemented. In this way, the study of emergent behav- iors in these systems can be carried out. The methodology used to model the hospital is process oriented. This approach allows us to implement a patient-centered simulation tool. Ó 1999 Elsevier Science B.V. All rights reserved. Keywords: Microsimulation; Process oriented simulation; Hospital management; Decision-making 1. Introduction Simulation is experimentation with models. A model is a representation of specific properties of the original system. Simulation uses a model to perform experiments over a simplified system (the model) where the behavior of the complex system can be imitated. This methodology (modeling–simulation) allows us to study the sys- tem performance under many varying circumstances [1]. This paper explains how the study of a hospital can be performed by means of computer simulation. A deep observation of the studied organization is the first step of the process. This analysis will determine specifications and guidelines followed in the rest of stages. Afterwards, the model is constructed and implemented on the www.elsevier.nl/locate/simpra Simulation Practice and Theory 7 (1999) 373–393 * Corresponding author. Fax: +34-922-635-476; e-mail: [email protected] 0928-4869/99/$ – see front matter Ó 1999 Elsevier Science B.V. All rights reserved. PII: S 0 9 2 8 - 4 8 6 9 ( 9 9 ) 0 0 0 0 7 - 5

Patient-centered simulation tool for aiding in hospital management

Embed Size (px)

Citation preview

Patient-centered simulation tool for aiding inhospital management

L. Moreno a,*, R.M. Aguilar a, C.A. Mart�õn a, J.D. Pi~neiro a,J.I. Est�evez a, J.F. Sigut a, J.L. S�anchez a, V.I. Jim�enez b

a Department of Applied Physics, University of La Laguna, La Laguna, Tenerife, Canary Islands, Spainb Department of Applied Economics, University of La Laguna, La Laguna, Tenerife, Canary Islands, Spain

Received 2 May 1998; received in revised form 21 January 1999

Abstract

The study of a particular complex system by means of computer simulation is described in

this paper. Hospitals are chosen as target systems where the proposed methodology is applied.

In order to choose the right decisions, hospital managers need all the information about the

functioning of the organization. This research project presents a simulation tool that allows

virtual societies such as hospitals to be implemented. In this way, the study of emergent behav-

iors in these systems can be carried out. The methodology used to model the hospital is process

oriented. This approach allows us to implement a patient-centered simulation tool. Ó 1999

Elsevier Science B.V. All rights reserved.

Keywords: Microsimulation; Process oriented simulation; Hospital management; Decision-making

1. Introduction

Simulation is experimentation with models. A model is a representation of speci®cproperties of the original system. Simulation uses a model to perform experimentsover a simpli®ed system (the model) where the behavior of the complex systemcan be imitated. This methodology (modeling±simulation) allows us to study the sys-tem performance under many varying circumstances [1].

This paper explains how the study of a hospital can be performed by means ofcomputer simulation. A deep observation of the studied organization is the ®rst stepof the process. This analysis will determine speci®cations and guidelines followed inthe rest of stages. Afterwards, the model is constructed and implemented on the

www.elsevier.nl/locate/simpra

Simulation Practice and Theory 7 (1999) 373±393

* Corresponding author. Fax: +34-922-635-476; e-mail: [email protected]

0928-4869/99/$ ± see front matter Ó 1999 Elsevier Science B.V. All rights reserved.

PII: S 0 9 2 8 - 4 8 6 9 ( 9 9 ) 0 0 0 0 7 - 5

computer. Once the crucial stages of validation and veri®cation have been perform-ed, the whole process could be started again with additional information and otherrequirements. When some previously de®ned performance benchmarks are met inthe last stage of the cycle, the simulation system is ready to be used by the hospitalmanagement [2].

The philosophy followed in the designing of this system must be understood in theframework of the study of complex organization as hospitals. A classical view of theorganization is task-oriented, while a more modern and e�ective approach makes ofthe organization a process-oriented system.

From a classical point of view organization structures are based on the principleof the division of labor. This principle asserts that some number of specialized work-ers, each one performing a single task in the production process, can obtain far moreresults in a day than the same number of generalist, each engaged in the whole pro-duction process. For this reason, the organizational model developed is a set of spe-cialized workers who are controlled and organized by a supervisor. However, thisway of consideration of the system has several drawbacks. As the number of tasksgrows the overall processes of producing a product or delivering a service becomevery complex, and managing such processes become more di�cult. In addition, thereare a number of elements in the organization environment with a signi®cant role thatmust not be undervalued.

Customers: Customers tell suppliers what they want, when they want it, how theywant it, and what they will pay for it. There are not conformist customers and theorganization must be customer centered.

Competition: The company that gets to market with an acceptable product or ser-vice at the best price will obtain the biggest sale.

Changes: Changes are pervasive and persistent. With the globalization of theeconomy, companies have a greater number of competitors that may introduce prod-uct and service innovations to the market. The rapidity of technological changes alsopromotes innovations.

For these reasons, task-oriented jobs in today's world are obsolete. Instead, com-panies must organize work around processes [3].

The hospital, as a complex service organization, is immersed in this innovationprocess. The new organization will produce ¯exible, decentralized and customer fo-cused structures that are engaged to quality and e�ciency of the results. In order toreach this objective, multidisciplinary teams must have integrated intensive andavailable information.

Creative application of information technology is a keystone to reach the desiredchanges. In the sanitary area many e�orts have been made in order to develop infor-mation systems that allow data to be stored and processed in a structured way. Thesesystems are designed from the point of view of the problems to be solved. Another de-sirable feature of these solutions is the isolation of the obtained strategies from partic-ular implementation methods. To get this, models describing di�erent situations arebased on patterns (a pattern is an element that has been useful to solve a problem ina particular framework). These models should lead to direct implementations wherereusing of the components or patterns in other programs can be easily performed [4].

374 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

This research line is oriented to get improvements in the development of informa-tion management systems. The analysis of the information ¯ow, as a ®rst stage in thedevelopment of any projected system, is performed through the application of sim-ulation as an essential tool to acquire knowledge about complex systems. This ap-proach facilitates the creation of virtual societies (hospital) where the study ofemergent behaviors can be carried out. That is, the goal is to create an informationsystem with the capability to generate the dynamics of the organization under study.

A tool like this is needed because hospitals are very complex systems composed ofmany parts with many interrelations between them, so that the knowledge abouteach one of them is not enough to determine the global behavior. Simulation allowsus to obtain the emergent behavior of the complete system.

The management sta� can use the model to acquire an exhaustive knowledgeabout the way in which the organization works. Thus obtained information canbe used to detect bottlenecks and to observe the consequences of possible control ac-tions oriented to avoid undesirable behaviors.

This paper describes a management tool that supplies hospital administrator withinformation about the whole hospital. This tool has been designed taking into con-sideration that each hospital has its own particularities. For this reason, the applica-tion is prepared to set up in accordance with the needs of each hospital. In addition,this information is available in di�erent granularity levels depending on the userneeds. For example, the hospital administrator could need information about the av-erage time of a speci®c queue (large-grained information). On the other hand, thedoctor needs to know the patient medical history (®ne-grained information).

2. Hospital analysis

In order to follow this strategy we begin performing a diagnosis of the organiza-tion where all the elements with some in¯uence over the objectives are taken intoconsideration. Modeling is performed once a preliminary view of the whole systemhas been obtained. This stage must lead us to obtain a model where the consideredbehaviors are reproduced with the required ®delity.

Hospital director makes decisions about multiple aspects of the organization everyday. These decisions, where a large number of variables with strong interrelationshipsare taken into account, a�ect greatly the correct functioning of the hospital complex.This situation complicates the decision-making process. It is necessary to have themanager provided with complete information about the actual state of the hospital,so that he/she can choose the optimal alternatives. Other point to be considered hereis that the director does not have enough time to fully analyze the information. Con-sequently, these decisions are made using a reduced number of variables due to thelimited human capacity to analyze a huge amount of information. As a natural con-sequence the risk that non-considered e�ects could lead the hospital to undesirablesituations is increased. Because of this, it seems clear that an e�cient information sys-tem that allows us to analyze the consequences of the actions without disturbing thereal hospital would be very useful in the decision-making process [5].

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 375

Hospital management, like any other service organization, must be guided toachieve the most e�cient use of the available resources [6]. The objective to bereached is to maintain an adequate performance level by means of the proper redis-tribution of the hospital's resources. The selected performance parameters are theaverage time values that the patients have to wait to receive attention in a speci®chospital unit. These queues are generated by the unavailability of resources. Conse-quently, the director's daily work is to observe the queue values in di�erent servicesand to take proper action with the available resources when a situation becomes cri-tical. This intervention will correct the hospital function and lead performanceparameters to acceptable values.

In order to solve the problems the hospital administrator needs a tool with a dou-ble function. On one hand, it allows him/her to obtain summarized informationabout the system state (length of system's queue) through graphs and reports. Thatis, the tool automatically analyzes and prepares the hospital information in order tofacilitate its study by the management. On the other hand, the tool will allow him/herto try di�erent control actions (resources redistribution) so that the manager can ob-serve the e�ects of the new actions. Therefore, the best decision to approach each sit-uation can be taken because the evolution of the system has been previouslypredicted. The simulation tool is a piece of software which has the above doublefunction. This application will help the hospital administrator in the daily decisions.

Once the importance of a simulation tool to aid in the hospital management hasbeen clari®ed, the next stages are designing and implementing. The ®rst step is mod-eling of the system. This work will be guided by the administrator's needs:· knowledge about hospital performance (state of its queues),· knowledge about availability of resources,· knowledge about the e�ects of the control actions.

3. Hospital modeling

The reduction technique or subsystem modeling (divide and conquer) is used be-cause the hospital is a complex system. In this approach the system is divided into agroup of less complex subsystems. Each of these subsystems is modeled, and an over-all system model is constructed by linking the subsystem models appropriately [7,8].

In order to identify the di�erent subsystems which form the hospital we use afunctional approach. The hospital has the following functional breakdown shownin Fig. 1.

Subsystem 1 represents the dynamic model of the hospital where di�erent subsys-tems and their relationships are described. In this case, relations between subsystemsare motivated by the patient ¯ow through them. The input of the ®rst subsystem, onone hand, is the patient arrivals to the hospital that are supposed to be non-control-lable. On the other hand, the second input comprises the control actions executed bythe management such as redistribution and increasing of material and human re-sources. Management uses these actions to approximate the hospital to a state ofmaximum performance. There are several internal variables such as average waiting

376 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

times obtained through di�erent kind of measurements, such as the time taken fromthe arrival to the ®st received attention, or from the arrival to the admission at theoperating theatre. These variables are the outputs of this subsystem. The hospital ad-ministrator interprets these magnitudes in order to get valuable information aboutthe state and performance of the system.

Subsystem 2 models the hospital's human resources and it is a static model thatshows which human resources are used during a speci®c period of time. Subsysteminputs are based on up-to-date contracts that are performed by subsystem 3 in orderto correct the hospital function. The set of available resources at the current time isthe output of this subsystem. The implementation of this subsystem should allow usto record, read and modify any information concerning human resources at eachunit. For this reason, we use a database that allows us to store all the informationin a structured way.

Subsystem 3 models hospital management. Its inputs, on one hand, are the queuevalues. These queues have been created because of the limitations in the number ofresources available to attend a large number of patients. On the other hand, the sec-ond input is the human resources available at each time that are needed when an im-provement of the hospital performance is required. Subsystem 3 output is the controlaction (resources redistribution) which is necessary in order to correct the hospitalfunction.

Although the simulation stage is explained here as an isolated tool, later on it willbe incorporated to a more sophisticated system ruled by a Knowledge-Based System(KBS). The role of the whole system is aiding the hospital administrator in the de-cision-making task [9]. It is a fact that hospital managers do their jobs taking as afundamental support their acquired heuristic knowledge. This knowledge has a high

Fig. 1. Block diagram of the hospital management.

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 377

cost because it is only acquired after a long experience, learning the responses of thehospital organization to many di�erent situations. This fact is our motivation to se-lect KBS as a tool to help in the decision- making process. This KBS is not only ableto propose solutions but to test them also. In this sense, simulation of the dynamicsof the hospital is a fundamental element in the prediction of the consequences thatarose after the selection of a particular solution. This allows us to select the strategythat carries the hospital to a better suited state. The importance of a previous know-ledge about the consequences of proposed control actions is clear if we think thatmost of the projects related with major changes a�ecting hospital functioning arenot tried because of the risk of decreasing the performance of the patient attendingprocess.

The KBS must realize a process of resources distribution and necessary services tomeet determined objectives according to the chosen priorities. These actions will al-low the hospital to have the desired state. The problem-solving method to use is ``De-cision-Making'' [10]. The decision-making task is divided into four subtasks:monitoring, diagnosis, prediction and design. The ®rst step in the decision-makingtask is to realize a system's state monitoring periodically and to study several param-eters which indicate the system's state. If some parameter is out of bounds the KBSmust realize a diagnosis task. This task detects current problems. Then, the predic-tion task predicts control actions and estimates the e�ect of these control actions. Fi-nally, the design task analyzes the local control actions and generates the globalsolution (combination of local solutions in order to have a good result in a cost func-tion or quality index). This solution is analyzed to verify whether it satis®es compa-tibility constraints.

3.1. Scheme of the patient ¯ow through the hospital

The hospital administrator needs updated information about the state of the hos-pital. For this reason, we perform a microsimulation of the system. This techniqueallows us to know all the information relative to each patient and the e�ects that eachpatient produces on the system. The knowledge of the detailed information abouteach element that takes part in the dynamics of the systems has two advantages.Firstly, managed care makes use of information systems to plan the hospital func-tioning. Taking as starting point a very detailed picture of the organization, the man-agement sta� is less restricted in the detection, prediction, analysis and solving ofproblems. Secondly, this approach makes possible a customer oriented management,because the particular information about each patient is stored and analyzed. How-ever, this approach has two drawbacks: it requires excessive computer memory andthe run time is very slow. A strategy to overcome these problems has been designed.

Fig. 1 shows the block diagram of the hospital management. In this scheme, sub-system 1 represents a dynamic model of the hospital. It is formed by a set of subsys-tems and its interrelationships. In order to identify the set of involved subsystems wehave observed the patient ¯ow through the hospital. That is, subsystems are de®nedaccording to the di�erent units where patients require services. Fig. 2 shows thepatient ¯ow through di�erent hospital services.

378 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

Fig. 2. Scheme of the patient ¯ow of Nuestra Se~nora de Candelaria Hospital.

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 379

Patients requiring treatment are modeled as an uncontrolled input of this dynamicmodel. Each patient arrives to the hospital once a doctor at a clinic determines thathe/she must go to the hospital. Then, patients go to surgical consulting or medicalconsulting once the type of pathology is known.

First consulting is the service where patients are attended, the ®rst time they arriveat the hospital. The sta� belonging to this unit records the patients medical historyand determines the set of clinical tests that must be performed.

Central Services is the unit where clinical tests (laboratory, neurophysiology, ra-diology,. . .) are carried out. It must be clari®ed that these services do not have theirown patients because they attend patients from other hospital services (surgical ormedical).

Successive Consulting receives patients once clinical test results are known. Inthese services the medical sta� studies the tests and determines the treatment ofthe patient. Sometimes patients must be sent back to Central Services because otherclinical tests are required. Patients are attended at this unit during the treatment andthey do not leave this service unless they are healthy or they have to be admitted inthe ward.

If the patients are admitted in the ward because of the detection of a medicalpathology, they must wait for a free bed in medical admissions. They will leave thehospital when the prescribed treatment has been ®nished.

However, if the patients enter the ward with a surgical pathology, they must waitfor a free bed in surgical admittance. Patients are prepared for their entrance into theoperation theatre while they are in the ward. Then, they go to the Post-AnestheticCare Unit (P.A.C.U.) after they have been operated on. The next step is to returnto the ward. Finally, they leave the hospital when they are healthy.

It must be noted that patients are treated at the Intensive Care Unit (I.C.U.) atany time if their condition is worsening. They return to the ward when they haveimproved.

Patients can arrive to the hospital from the Emergency Department. Central Ser-vices or Emergency Central Services perform clinical tests and patients are diag-nosed. They leave the hospital or enter into the ward depending upon their illness.Patients go to the emergency operating theatre if they need immediate attention.Patients go to P.A.C.U. and the ward when the operation is ®nished.

4. Patient ¯ow simulation

An scheme of the patient ¯ow through the hospital services can be used as a ref-erence to develop a simulation program for this particular system. In this case, theprogram is a symbolic model of the hospital since an analytic model that describesthe patient ¯ow is not available [11].

The simulation of the hospital patient ¯ow is useful in learning how the hospitalstate changes with time. To achieve this task we must convert the patient ¯ow diagraminto an algorithmic model (computer program) which represents the model of the sys-tem. It also allows us to be aware of the state of the queues in speci®c situations.

380 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

This simulation is carried out by means of a discrete event system that changes itsstate each time a new event occurs [12]. However, there is not any equation availablethat de®nes the system state. Instead of using equations, the chosen approach is basedon the description of the sequence of actions (algorithm) that produces the events thatgenerate the system evolution. In order to acquire some knowledge about the systemand to determine suitable control actions to improve the hospital performance, it isnecessary to perform a number of well-designed experiments. A great part of the suc-cess in this task is responsibility of the particular simulation tool that we select.

Before choosing the simulation tool we must consider which pieces of the problemhave the greatest in¯uence on its selection:· In our approach, the patients are considered discrete elements and the movements

through the system are properly represented in a discrete event model. The pa-tients travel through the di�erent places (hospital units) where resources (sta�,equipment and material) are used. This de®nes the state of the system at eachinstant of time.

· The patients should be characterized by means of attributes such as the type ofclinical test they need. Hence it is necessary to de®ne attributes in each elementor object which takes part in the simulation. The values of these attributes willnot be ®xed, but they are subject to change during the simulation.

· The hospital state is in¯uenced by the actions of each individual. Therefore, wemust perform a microsimulation that allows all the information about each indi-vidual to be known.

· The simulation must run for a period of time because it allows us to accomplishdi�erent experiments. We must have the capability to return to previous situationsin order to test other control actions.

· The system state must be accessible at each moment so that the manager canchoose the best control action.

· It is necessary to collect system the statistics, because they are going to be used inthe decision-making process.The choice of the simulation tool will be in accordance with the speci®cations

above. In addition the following requirements must be taken into account:· Management of the simulation time in a simple way.· Management of priority queues that are the main structures in the system.· Generation of random variables with a priori known distributions.· Possibility to interface with other applications such as expert system shells or

databases to process the results of the simulation.· Adequate response time.· Easy debugging and user-friendly interface.

We have analyzed several tools meeting these characteristics. Basically, we canclassify these tools into two types:1. Event Oriented Simulation Tools (based on a Petri Net approach).2. Process Oriented Simulation Tools.

Initially, we tried an event oriented simulation based on Petri Nets. However, thecomplexity of the model and the ¯exibility required in a simulation as the one wewere looking for, lead us to select a process oriented methodology. This kind of sim-

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 381

ulation has the extra advantage of being oriented to the users, which is the key in amodern and innovative management strategy.

4.1. Process oriented simulation

A process is a time-ordered sequence of interrelated events separated by passagesof time. This sequence will describe the entire experience of a transaction as it movesthrough a system. When the process oriented approach is used, the modeler de®nesrepeatable sequences of steps, each representing an event or a series of events. Thistype of simulation is named microsimulation. Objects that may be required by a trans-action during its movement through the sequence of steps are de®ned as resources.

Process-Based Simulation has been used to simulate social systems (hospital).Each part of the system has a set of rules which govern how it behaves in its lifetime(patients arrival, ®rst-consulting,. . .). When we accurately represent these rules on acomputer we have created an arti®cial instantiation of this component (process).

One important feature of these kind of simulation systems is the competition by a®nite amount of resources required by di�erent processes, for instance patients wait-ing to use an X-ray device.

Clearly, the process based model captures the essence of the dynamics of a socialsystem much better than traditional modeling techniques. Traditional simulation us-es mathematical models to describe how a system behaves by means of examiningvarious particular parameters that describe the system dynamics. In many social sys-tems there are a large number of factors that a�ect the global dynamics of the sys-tem. The process of reducing these factors to a number of parameters will oftenloose the essence of what the system consists of. With process-based models, the em-phasis of the model is on the points at which processes exchange and compete forresources. This gives limited scope to the type of communication that can take placebetween entities [13,14].

Hospital is a social system where the patients represent the set of processes acquir-ing and relinquishing resources (material or human resources). This is a discreteevent system that is especially suited to be simulated by means of a process orientedapproach.

This approach de®nes each entity in the system. The program simulates the be-havior of each entity with capability to carry on multiple concurrent activities. Anobject oriented language is adequate to simulate this kind of systems. Object orientedprogramming consists of the de®nitions of various classes of objects. An object is acombination of instance variables that de®ne the object's state and methods that im-plement the object's behavior. Therefore, each entity is modeled directly as an object.Each object has its own state variables, but the class provides the generic de®nitionof its behavior [15].

4.1.1. The simulation toolOnce a process oriented methodology has been selected in order to represent the

hospital dynamic, it is necessary to determine which simulation software is bettersuited to carry out the simulation. Several commercial applications were evaluated.

382 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

The ®rst evaluated software was MEDMODEL, a simulation environment de-signed to perform the study of hospital typical activities. This application is integrat-ed in a group of programs named ProModel where other organizations are alsosupported. Hospital organizations are supported by MEDMODEL which comprisesnormal simulation tools with a graphics library which allows developers to produceclear and compressible user interfaces.

The process followed to implement a simulation system with this application be-gins with the de®nition of the locations where the considered actions take place.These actions are described in the MedModel programming language. Then, the in-volved objects, patients and resources, are de®ned. Once resource type objects arede®ned, it is possible to obtain statistics of use, for instance, occupation level, num-ber of wait states,. . . De®nition of the global model is the last task to complete. Inthis application, the description of the model can be carried out following a visualprocedure that makes use of the graphics libraries. The ®nal reports are speci®edfrom the needs of each particular simulation.

In spite of its good user interface, this application has several drawbacks in themodeling and simulation of general hospitals:

(a) Objects only support a reduced number of possible actions.(b) The process is de®ned through the graphical description of the path followedby the elements inside the organization.(c) The modeling of some details is always imposed. However, there are caseswhere these details are irrelevant for the simulation. For instance, the time takenby a patient to arrive at the waiting room of a medical department has no rele-vance in a simulation that tries to extract information about the hospital dynam-ics in a great scale.(d) Information about the objects is given through a number of pre®xed statistics.However, it is not possible to add other functions. For instance, it is not possibleto obtain the length of a waiting queue.(e) Storing the state of the system at a particular time and simulating from a statepreviously stored are very useful tools that MEDMODEL does not incorporate.(f) Communication with other applications is not supported in MEDMODEL.In general, this application is very self-contained, but without the generalization

capability that is an essential requirement for this project.The following tool evaluated was Modsim [16]. This simulation package o�ers en-

ough generalization capability and simulation facilities, so this one was the selectedtool to build our application. Modsim is a Modula-2 based language. Basically,Modsim is a general purpose, modular, object-oriented, block-structured simulationlanguage.

Modsim programs can be divided into modules forming libraries. These librariescan be compiled separately. Any part of a program can import types, variables, con-stants and procedure de®nitions from these libraries. In addition, there are standardlibraries where a number of useful objects for discrete event simulation, as queue ob-jects or resources objects, are de®ned.

Modsim is a compiled language that generates an executable ®le. This ®le can runover Windows allowing the interfacing with other applications by means of dynamic

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 383

link library (dll) and dynamic data exchange (dde). The inclusion of directly writtenC code in the sources of the Modsim application is also allowed.

This language comprises powerful and ¯exible characteristics when dealing withdiscrete event simulation. Each object has capability to carry out multiple concur-rent activities. Each one of these activities can take simulation time. Representing ofsimulated patients with di�erent states and running di�erent parts of the same pro-cess are also allowed. Mechanisms such as request and use of resources, synchroni-zation, waiting, etc., allow the di�erent instanced objects to communicate betweenthem.

Time units used by the simulation are dimensionless. They can represent whatevergranularity of time is appropriate for the simulation (years, months, days, hours,minutes, seconds,. . .). At any instant of the simulation time, it is possible that mul-tiple concurrent object activities arise, elapsing the simulation time. On traditionalsequential computer architectures, the activities that appear to be happening atthe same point of the simulation time are carried out sequentially by the computer.

Using of queue type objets (with priority, multiple servers,. . .), and resource typeobjects, which are widely used in the simulation of the patients ¯ow through thehospital, is allowed by means of the supplied libraries.

4.1.2. Implementation issuesThis software attempts to represent any hospital, so generalization capability is a

basic goal. This idea has great in¯uence over the design of the program and there areseveral rules that must be followed.

Firstly, implementation of the Hospital model must follow a well-structuredscheme so that the reusability of the code is warranted. In addition, this well-struc-tured code allows us to model di�erent Hospitals without essential modi®cations, be-cause number and composition of the objects that form each hospital are the featuresthat make the di�erence between any two particular hospitals. These objects aredescribed below:· Patient Objects: Behavior implementation describes the patient ¯ow through hos-

pital units. Their main characteristics are their related pathologies because thepatient behavior depends on them.

· Service Objects: These objects represent hospital units. There are two types: Gen-eral Service Objects and Central Service Objects. The ®rst type has its own patientsthat are characterised by a set of possible pathologies. The second one performsclinical tests on patients coming from a General Service unit. The characteristicsof the General Service Objects are the sets of pathologies that are treated, whilethe main characteristics of the Central Service objects are the sets of clinical teststhat they perform.

· Pathology Objects: These objects relate a Patient Object with the set of speci®cresources (ward, consulting,. . .) to treat its pathology.

· Clinical Test Objects: These objects are part of Central Services. They provide toPatient Objects with the information about the set of resources needed to performthese clinical tests.

384 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

· Resource Objects: These objects represent the resources that are used by the pa-tients when they go to di�erent hospital units. The characteristics of these objectsare the number of instances (resources) which are available for each pathology orclinical test and the timetable for each instance. The Patient Object must acquirethe Resource Objects in order to use them. The patient must go into a priorityFirst Input First Output (FIFO) queue when the Resource Objects are occupied.The simulation program consists of patients that arrive at the hospital with di�er-

ent pathologies. Each patient follows the process shown in Fig. 3. It is important toremark that the interrelations between patients are a consequence of the requestingof resources. The way in that the modeling±simulation technique has been performedcan be seen as a microscopic simulation [17].

Another important rule to be followed is that undesired situations should be an-ticipated and solutions for them must be provided. As an example, the deadlockproblem and its solution are described.

The sequence of processes followed by the patients shows that when one of themneeds to complete one activity (i.e. a clinical test), the necessary set of resources re-quired by the process are acquired. The obtaining of these resources could lead todeadlock troubles. For instance, a patient is in possession of one resource but needsof the resource acquired by other patient in order to complete his process, but thesecond patient cannot complete his process either because he needs of the resourcethat belongs to the ®rst patient. In order to avoid this undesired situation the follow-ing strategy has been followed. Firstly, patients are forced to acquire their resourcesalways in the same order. Secondly, the queues where patients wait have been chosenFIFO. This kind of problem could still persist so the adopted decision was to controlthe ordering of the petitions produced by the patients who are interacting at the samesimulation time.

Other requirements more related with the simulation functionality are:1. Facilities to change the number of resources belonging to a particular service so

that the same state of the system can be studied with di�erent resources distribu-tions.

2. Storing and retrieving of the system state so that a previous state can be reloadedin order to experiment with di�erent options. Because of the de®nition of state asthe minimum amount of information needed to obtain without ambiguity the fu-ture behavior of the system, a Hospital state must be composed of the completeset of patients with all their related features (i.e. ®rst consulting, kind of pathol-ogy. . .). In the same way, the complete set of human and material resources in thehospital must be added to the de®nition of any state.

3. The quantitative results extracted after simulation must be the average waitingtimes of the queues in each service:average waiting times until patients are attended by the ®rst time,average waiting times until patients enter successive consulting,average waiting times until patients enter the operating theatre.It is interesting to have a general view of the program ¯ow where the role of the

used tools is clari®ed. The program begins its execution loading the structure of thehospital (services and resources) from a database previously implemented with

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 385

Fig. 3. Flowchart of the process followed by the Patient Objects.

386 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

Microsoft Access. Communication between the Modsim program and the Access da-tabase is carried out through Dynamic Data Exchange (DDE).

The using of a speci®c database application as Microsoft Access is justi®ed by thelarge amount and complex structure of the information needed to represent one stateof the system. It must be remembered that the storing and retrieving of all that in-formation is necessary in order to simulate under di�erent simulation frameworkstaking as starting point the same state. The process starts when Modsim reinitiatesthe communication as client, requesting for the state to Access that acts as server.

After hospital initialization, the program execution is governed by the daily arriv-al of patients with di�erent kinds of pathologies. Patient's pathology establisheswhich of the services is the destination of the patient. The selected service has aset of resources that patients can consume. The clinical tests that the patient mustcomplete are indicated by the particular destination service according to the pathol-ogy. Then, a particular central service, which is provided with the necessary resourc-es to carry out the speci®ed clinical test, will be the next patient destination. Theprocess followed is shown in Fig. 3.

Waiting queues are created when a particular service has not enough free resourc-es to attend the patient's demand. The average time of a patient in the queue is theoutput of the simulation program because this quantity is clearly understood by thehospital manager in terms of how e�ciently the hospital system is working.

4.1.3. Discussion of the results4.1.3.1. Possibilities o�ered by this application. The main advantage of this tool isthat it has all the hospital information available, described in di�erent levels depend-ing on the user needs: either as a simulation tool (mode 1), or as an automatedinformation system (mode 2).

In particular, the hospital administrator uses this system as a decision-makingtool (mode 1). In order to maintain a level of e�ciency in the functioning of the or-ganization, average values of the queues must be kept within the correct range. Forthis reason, the hospital administrator needs to know these average time values(large-grained information). Once a deviation has been detected, the administratordetermines possible control actions. It is important to notice that the e�ects of theseactions can be predicted through the developed simulation tool.

In mode 2, this tool is an automated information system. It has a database wheremedical information of each patient is stored. Microscopic evolution of the systemallows all patient information to be updated. At each instant, the tool provides uswith the current medical history, analyzing the pathologies cost or the best medicalrecords, etc.

The utility of the developed application will be apparent after the following exam-ple. The considered hospital is composed of n central services, m non-central servicesand their interrelations. The detected problem could be described as follows: the av-erage waiting time in a queue belonging to a non-central service is under the mini-mum value established by the hospital manager so that an under-using of

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 387

resources arises. The situation should be corrected because it is not considered in thehospital budget previously assigned. In this case, the service is consuming more re-sources than necessary with their related costs.

At ®rst instance, the manager decides to reduce the hours devoted to patient at-tention in this service (i.e. from 5 sessions per week to 3 sessions per week). A sim-ulation of the hospital with this control action is carried out in order to know moreabout the e�ects of this change. However, the obtained results after the simulation ofa period of two months show that the problem has not been solved.

Taken into consideration that the control actions performed on the problematicservice do not produce the expected results, other services with some interrelationwith the one under study are analyzed. After careful examination of these services,an average waiting time over the expected value in the Laboratory service is detected.Therefore, as long as this service is acting as a source of patients to the unit underanalysis, it acts as a bottleneck, lowering the entrance rate to the queue under theexpected one.

This appreciation of the origin of the problem is con®rmed after simulating withanother session added to the Laboratory service. In this case, the average waitingtimes are slightly corrected. After successive experiments, the manager ®nds out thatten sessions more in the Laboratory service are needed to keep a correct behavior inthe a�ected queues.

From this example, it is clear how important is for the management sta� a toollike this one, because the in¯uence of the interrelations that determines the behaviorof the hospital can be analyzed under di�erent circumstances.

In fact, this application has been proved as a useful tool in the case of the hospitalchosen as prototype ``Hospital Nra. Sra. De la Candelaria. Tenerife'' where under-using of resources and several bottlenecks (i.e. P.A.C.U.) were discovered.

4.1.3.2. Response time analysis. Fig. 4 shows the obtained times for several exper-iments carried out with di�erent hardware support. A 100 MHz Pentium PC (32Mbytes) takes long execution times to simulate more than 20 weeks in situationswith entrances of more than 32 patients per day. Taking constant the amount ofmemory, but doubling the speed of the processor (200 MHz), the execution timeis divided by 2. A critical situation arises when the entrance rate reaches 32 pa-tients per day. At this point, the memory of the computer is run out and the swap-ping carried out by the operative system makes the simulation too slow to beuseful. In order to con®rm, the importance of the amount of memory on the re-sponse time of the simulation, the same experiments were carried out in a 200MHz Pentium with 64 Mbytes (2 times the amount of memory used in the previousexperiments).

Excessive run time is required when the hospital administrator performs the entirehospital simulation for a long period of simulation time. This e�ect is related withthe kind of simulation performed and it is a typical problem when a microsimulationapproach is chosen [17]. Microsimulation is a technique typically used for socialsystems as the hospital. It is based on the speci®c representation of each one ofthe elements of the system and its related processes. For this reason a large amount

388 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

of memory is needed to represent all the entities belonging to the system under study.Moreover, the processes followed by each one of the elements of the system must besimulated, therefore a long execution time is required when a great number of ele-ments is being considered. In the case of the hospital each patient and each resourceis stored and treated independently.

In this type of simulation technique the most important task is the management ofthe future events. At each moment, it is necessary to determine for each one of theprocesses, which of the events are going to evolve. This management is performed indi�erent ways if the chosen tool works with sequential or parallel simulation.

Fig. 4. Response time for di�erent experiments (minutes).

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 389

The designed tool carries out a sequential simulation. In this case the algorithmmanaging the events uses an ordered data structure named global event list, whereall the generated events and the time at which they must be activated are stored. Asit is shown in Fig. 5, all the objects that take part in the system and generate actionsmust be included in the list. They are ordered attending to the time at which the ac-tivities of the object must start. In this way, the object that is related with the nextactivity to be launched must be situated at the top of the list. Of course, once the®rst activity is started, the data structure must be ordered again to keep the mostimminent activity situated in ®rst place. Management of this list makes the execu-tion time longer if the number of involved objects and related activities areincreased.

Parallel simulation is an alternative strategy where the described problem issolved. In this case, each entity of the model is related with a speci®c processor.In fact, each processor has its own list where the events that are going to be executedin this particular machine are stored. The communication between processors is es-tablished through pass of messages or through a shared memory unit. The mainproblem that arises in parallel simulation is the causal restriction: the events indi�erent lists must be executed according to its related global time [18].

A possible strategy to implement parallel simulation for the hospital model is thefollowing one. Each one of the services is simulated in a client machine. Othermachine should act as a host, managing the interrelation between the di�erentservices. This type of technique is still in research.

Fig. 5. Global event list.

390 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

The implemented solution has taken the better of two approaches: micro andmacrosimulation [19]. The main problem that arises is related with the microsimula-tion because of the large amount of objects going through the system. This means acost in memory and execution time. When this cost reaches a limit considered as ex-cessive focusing on the analyzed service is the solution proposed. That is, microsim-ulation is still operating in the particular service but the rest of the hospital is viewedas a macroscopic model.

The mechanism that allows the application to switch between the microscopicmodel and the macroscopic model uses statistical distributions, and particular statis-tics as averages values. This means that in the service that has been focused a mic-rosimulation is carried out while its relation with the rest of the services of thehospital is given by the average times taken by the other services to attend thepatients.

The mixed methodology has the advantages of microsimulation because the stateof the system under study is known in detail, and the advantages of the macroscopicmodels because the execution time and the amount of memory are greatly reduced.Therefore, there is a trade-o� between the cost of the memory together with the re-quired execution time and the expected grade of detail in the information that isobtained from the simulation.

5. Conclusion

Computer simulation is an e�cient approach to the study of complex systems.This article has shown how to use it in the study of hospital management.

A computer program that simulates the patient ¯ow through di�erent hospitalunits was implemented. The hospital administrator uses this tool in two ways:· to obtain information about the hospital state through reports and graphs,· to experiment with di�erent control actions in order to know which is the correct

one in a particular simulated situation.Di�erent alternatives for the implementation were explored. However, we used a

process oriented approach. This methodology allows us to implement a patient-cen-tered simulation tool. Therefore, the needed information is made available with sev-eral levels of granularity. We used Modsim language in the development of thissystem. This package uses object oriented programming and this warrants theportability of the system.

The application has proved its utility as a valuable resource to improve the hos-pital performance. Microscopic simulation is a basic part of the selected approach. Itis clear that its main advantage is that the information of each entity in the system isavailable at each moment. However, this advantage leads to its main drawback:great requirements in memory and long execution times. The problem is tackledcombining micro and macrosimulation. A particular service is considered and its be-havior is studied through microscopic simulation while the rest of the hospital isviewed as a macroscopic model. The approach taken to carry out this idea has con-sisted of the substitution of the interrelationships between the microscopic model

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 391

and the rest of the hospital by macroscopic parameters as averages times. The appli-cation of microscopic simulation has the following advantages: it allows us to mon-itor the entire hospital and all the information of the patients is provided, especiallythe way in which they are circulating through the hospital.

Once the information obtained from the system is analyzed, the following taskscan be improved: hospital management, billing, patient treatment, etc. In addition,the standardisation of the hospital information could facilitates the sharing of datawith other hospitals.

This article has described the ®rst part of a system which purpose is to aid in hos-pital management. The construction of such a complex system requires the use of ar-ti®cial intelligence (AI) techniques that allow the expert knowledge in hospitalmanagement to be modeled. However, AI must use a hospital simulation in orderto predict the e�ects of the proposed control actions. For this reason, the simulationof the patient ¯ow must be embedded inside a KBS to take into consideration thedynamic of the hospital. AI and simulation are shown to be complementary toolsin the study of complex systems.

Acknowledgements

We are grateful to N.S. La Candelaria Hospital management sta�, especially toKaty Mary Sanchez. We thank the anonymous referees for their suggestion to im-prove this paper. This work has been supported by the Canary Islands Government,projects number PI1993/020 and PI1997/015.

References

[1] Matko, Karba, Zupancic, Simulation and Modelling of Continuous Systems, Prentice-Hall,

Englewood Cli�s, NJ, 1992.

[2] R. McHaney, Computer Simulation. A Practical Perspective, Academic Press, New York, 1991.

[3] Hammer, Champy, Reengineering the Corporation, HarperCollins, New York, 1993.

[4] M. Fowler, Analysis Patterns: Reusable Object Models, Addison±Wesley, Reading, MA, 1997.

[5] L. Moreno, J.D. Pi~neiro, R.M. Aguilar, C.A. Mart�õn, J.L. S�anchez, V.I. Jim�enez, M.A. Gonz�alez,

B. Gonz�alez, S. Rodr�õguez, Simulation as a knowledge acquisition tool in hospital management, in:

Conference on Modelling, Simulation and Optimization, The International Association of Science

and Technology for Development (IASTED), Australia, 1996.

[6] N. Guadalajara, An�alisis de Costes en los Hospitales, M/C/Q Ediciones, 1994.

[7] L. Moreno, R.M. Aguilar, C.A. Mart�õn, J.D. Pi~neiro, J.L. S�anchez, V.I. Jim�enez, M.A. Gonz�alez,

B. Rodr�õguez, S. Gonz�alez, A knowledge-based system to aid hospital management, in: World

Multiconference on Systemic, Cybernetics and Informatics, International Institute of Informatics and

Systemics (IIIS), vol. 3, Venezuela, 1997, pp. 438±445.

[8] L. Moreno, R.M. Aguilar, C.A. Mart�õn, J.D. Pi~neiro, J.L. S�anchez, V.I. Jim�enez, M.A. Gonz�alez,

B. Rodr�õguez, S. Gonz�alez, Modelling and simulation in management decision-making, in: Simulation

in the Medical Sciences Conference, The Society for Computer Simulation International (SCS),

Arizona, 1997, pp. 43±48.

[9] L. Moreno, R.M. Aguilar, C.A. Mart�õn, J.D. Pi~neiro, J.F. Sigut, C.A. Hamilton, J.I. Est�evez, V.I.

Jim�enez, B. Gonz�alez, An automated system to aid decision making in the hospital management, in:

392 L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393

International ICSC Symposium on Engineering of Intelligent Systems (EIS'98), Espa~na, vol. 3, 1998,

pp. 203±209.

[10] M. Molina, Y. Shahar, J. Cuena, M.A. Musen, A structure of problem-solving methods for real-time

decision support: modeling approaches using PROT�EG�E-II and KSM.

[11] P.A. Fishwick, Simulation Model Design and Execution. Building Digital Worlds, Prentice-Hall, New

York, 1995.

[12] W. Delaney, E. Vaccari, Dynamic Models and Discrete Event Simulation, Marcel Dekker, New

York, 1989.

[13] G.N. Gilbert, J. Doran, Simulating Societies: The Computer Simulation of Social Processes, UCL

Press, 1993.

[14] Langton, Christopher, N. Minar, R. Burkhart, The swarm simulation system: a tool for studying

complex systems, Santa Fe Institute, www.santafe.edu/projects/swarm.

[15] I. Jacobson, M. Christerson, P. Jonsson, G. �Overgaard, Object-Oriented Software Engineering. A Use

Case Driven Approach, Addison±Wesley, Reading, MA, 1992.

[16] CACI Products Company, MODSIM II, The Language for Object-Oriented Programming, 1995.

[17] A. Harding, Dynamic Microsimulation Models: Problems and Prospects, London School of

Economics, 1990.

[18] B.W. Unger, J.G. Cleary, Practical parallel discrete event simulation, ORSA Journal on Computing

3 (5) (1993) 242±244.

[19] G.J.M. Dekkers, Including macro econometric models in microsimulation models: the case of

NEDYMAS, Nordic Seminar on Microsimulation Models, 1995.

L. Moreno et al. / Simulation Practice and Theory 7 (1999) 373±393 393