Case Study: Simple Health Clinic Model

Submitted: 24 Jul 2017

Operations Research Topics: SimulationModelling

Application Areas: Healthcare

Contents

Problem Description

In a simple model of a health clinic, patients arrive, wait to receive treatment, receive treatment, and leave.

Common questions asked by clinic management are: "How long do our patients wait before being seen? How long are they at the clinic? How big does my waiting room need to be? ".

In this case study we are going to consider a simple health clinic model in which patients arrive every 20 mins on average. Once the doctor is ready to see them they take 2 minutes getting to the doctor’s office and treatment takes between 5 and 30 minutes, with the usual treatment time of 10 minutes and the average treatment time of 15 minutes.

The goal of this simulation study is to analyse the effects of different arrival and service distributions on the average time patients spend:

  1. waiting for treatment; and
  2. in the clinic; and the average length of the patient queue (which informs waiting room size).

Return to top

Problem Formulation

In order to formulate a simulation model we specify the following components:

  1. Background – problem description
  2. Objectives of the study
  3. Expected benefits
  4. The CM: inputs, outputs, content, assumptions, simplifications
  5. Experiments to run

Components 1 (Background – problem description) and 2 (Objectives of the study) are given in the Problem Description section (see paragraph describing the goal of the simulation study to identify study objectives).

The Expected benefits (component 3) are a virtual environment for evaluating patient waiting times, total time patients spend in the clinic, and the number of patients waiting for treatment. This environment can be used to experiment with changes to the clinic, including the effect of variability in arrivals and treatment times.

The CM content is specified using the following components:

  1. Component List
  2. Process flow diagram
  3. Logic flow diagram
  4. Activity cycle diagram

Component List

The components of the Simple Health Clinic model are:

  • Patients with their (inter)arrival times
  • Doctor with their treatment times
  • Waiting room with its capacity

Process flow diagram

ProcessFlowDiagram.png

Logic Flow Diagram Activity Cycle Diagram
LogicFlowDiagram.pngActivityCycleDiagram.png

Once the content has been established (note this is usually an iterative process) we can identify the inputs and outputs: interarrival times, treatment times, waiting times (Patient arrives to Doctor sees patient), total clinic time (Patient arrives to Outside), number in waiting room.

Assumptions are used to define stochasticity (e.g., Exponential interarrivals, Triangular treatment times) and the simplifications keep the system simple (e.g., one doctor on all day, no registration, no prioritisation).

Return to top

Computational Model

We use JaamSim version 2017-06 to implement our conceptual model. First, run the JaamSim executable (JaamSim2017-06.exe).

JaamSim.png

Next, we create the components: Patients; Doctor; and Waiting room. We expand the Process Flow model palette (in the Model Builder) window and drag the SimEntity object onto the view (View1 window).

ModelPalette.pngProcessFlow.pngSimEntity.png

Then, select SimEntity1 from the Process Flow > SimEntity object list in the Object Selector window and wait briefly until you can change the name of the object to PatientEntity.

PatientEntity.png

Now, we want an image to use for a patient. Download patient.png (icon made by Freepik from www.flaticon.com). Then, right click on PatientEntity and select Change Graphics. Click on Import and navigate to your downloaded patient.png, import it and accept the change. You will see patient.png looking a little “flattened” as it is essentially a “tile” in 3D.

ChangeGraphics.pngPatientImage.pngPatientEntityAdded.png

Save your simulation (it will create a .cfg file that can be loaded into JaamSim).

Next, we add the Doctor. Go back to the Process Flow model palette (in the Model Builder window) and drag a Server object onto the View1 window.

Server.png

Now change the name of the Server to be Doctor, download the doctor.png, and change the Doctor graphics to be doctor.png.

DoctorEntity.pngDoctorImage.pngDoctorAdded.png

Save your simulation.

Finally, add the Waiting Room by adding a Queue from the Process Flow model palette and renaming it WaitingRoom.

WaitingRoom.png

Save your simulation.

Now that the components are present, we will add the process and logic to the model. First, we want to observe the PatientEntity in 4 states: Arrive, Wait, Treat, and Leave. We click on the PatientEntity object (in Object Selector > Process Flow > SimEntity), go to the Input Editor and enter the set of patient states { Arrive Wait Treat Leave }.

PatientStates.png

We have finished our definition of the model components, so we turn to the Simple Health Clinic process flow.

From the Process Flow palette we add an EntityGenerator, EntitySink, and 2 EntityConveyors. We name these objects PatientGenerator, PatientSink, ArriveToTreat, and TreatToLeave respectively.

Once you have added objects, the easiest way to get them positioned properly is to edit the Graphics > Position in the Input Editor window. Edit the positions or points’ positions (for the EntityConveyors) as follows:

Object Graphics
PatientEntity Position = -1 1 0 m, Alignment = 0 0 0
PatientGenerator Position = 1 1.5 0 m
PatientSink Position = 5.5 1.5 0 m
Doctor Position = 3 1.5 0 m
WaitingRoom Position = 3.5 0.5 0 m
ArriveToTreat Points = { 1 1.5 0.000 m } { 3 1.5 0.000 m }, DisplayModel = ArrowModelDefault
TreatToLeave Points = { 4 1.5 0.000 m } { 5 1.5 0.000 m }, DisplayModel = ArrowModelDefault

The layout of the model should look like

SHCProcess.png

Save your simulation.

Now the process flow has been completed, we need to define the logic flow.

This is achieved by setting the entity type generated by PatientGenerator, NextComponent on the objects and also defining how the WaitingRoom queue is used. We also track the state of entities using StateAssignment of various objects.

Edit the Key Inputs of the objects (in the Input Editor window) as follows:

Object Key Inputs
PatientGenerator PrototypeEntity = PatientEntity, NextComponent = ArriveToTreat
Doctor NextComponent = TreatToLeave, WaitQueue = WaitingRoom, StateAssignment = Treat
WaitingRoom StateAssignment = Wait
ArriveToTreat NextComponent = Doctor, StateAssignment = Arrive
TreatToLeave NextComponent = PatientSink, StateAssignment = Leave

PatientGeneratorLogic.png

Save your simulation.

Now that the process and logic flows are complete, we need to put data into our model. We set the first arrival time, interarrival time, service time and travel times of the objects.

Object Key Inputs
PatientGenerator FirstArrivalTime = 20 min, InterArrivalTime = 20 min
Doctor ServiceTime = 15 min
ArriveToTreat TravelTime = 2 min
TreatToLeave TravelTime = 2 s

Save your simulation.

Finally, you can run your model and see patients arriving and being treated by the doctor. Click on the run icon and set the speed up to be 256.

SpeedUp.png

Running.png

Return to top

Results

The results...

Return to top

Conclusions

In conclusion...

Return to top

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng doctor.png r1 manage 4.5 K 2017-08-14 - 03:28 MichaelOSullivan  
PNGpng patient.png r1 manage 5.2 K 2017-08-14 - 01:29 MichaelOSullivan  
Edit | Attach | Watch | Print version | History: r13 | r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 2017-08-14 - MichaelOSullivan
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback