question

Emanuela M avatar image
0 Likes"
Emanuela M asked Emanuela M answered

Location Shift Availability and Dashboard

I have a question. I am modeling a Cardiology Department, in which there is a Cath Lab (Angiogram Area in the model) which is available from Mon-Fri from 8AM to 17 PM, but it can be opened for Urgent Patients, hence for some of the PCI I modeled. I selected the Stop Arrival type for stop object flow of the Cath Lab and I added any time Less Urgent or Elective patients need operation to check the Angiogram Area availability, inserting the first available location in activity start condition. In this way Urgent patients will not wait, but the other will follow the schedule availability of the lab, right?

I have noticed that it there may be also another problem, since if I let the simulation go, after a while patients remain stuck in the entrance, since some of the patients remain more than the inserted process time in the Lab. Is this a problem related to shift of the Cath Lab?

Then, I don't know if it is related or not with this problems with the Lab, but some of the dashboard I created are not updated during the simulation. What is the problem?

I attached my model:

last-version.fsm

Thank you!

FlexSim HC 5.3.10
locationresource locationdash
errore-1.png (10.5 KiB)
errore2.png (25.8 KiB)
last-version.fsm (1.0 MiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Cliff King avatar image
0 Likes"
Cliff King answered Cliff King edited

I wish I had remembered this sample model (see attached) originally. It would have saved us both time!

It addresses this situation exactly, I believe. It even addresses how to reevaluate the condition when the target destination becomes available again. It's all done with connections! You'll understand what I mean after you open the sample model and read what is written in the dashboard model description text.

Sorry this has taken several days to resolve, but hopefully this will be the solution you are looking for. Let me know if you need more help.

p.s. Be sure and make the required additional connections in the FlowChart tool and while you're there, you might want to clean up some of the unnecessary connections. Remember, you don't need to make connections between locations that just the staff travel between like the off schedule area, and I don't think you want connections to your arrival door, do you? You can also resize your area blocks in the flowchart view to better read the names of the areas.

modeling-emergency-care-units-with-scheduled-open.fsm


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Emanuela M avatar image
0 Likes"
Emanuela M answered

I think I have fixed it! Thank you.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Emanuela M avatar image
0 Likes"
Emanuela M answered Cliff King commented

After some hours I have changed my model, accordingly to the ones posted; the only thing I didn't get it was the zero flag meaning in the activity 70. Let me explain better, I have regulated destination conditions for less urgent and electives (the ones that need to wait for availability) in this way:

Whereas it is slightly different in the model you attached. Do I have to introduce the zero flag like in the picture below substituing AngiogramArea to ExpressCare and UTIC to StandardCare to make it work properly?

Or because in your model there is a check on the availability of two different location,do I have to add the zero flag right after the first getavailable condition as follow?

Apart from this, I think there is something wrong in my model, especially with elective track, since I see that they are stuck under surgery and I cannot understand why, since there is a fixed time for the operation. What do you think I should check? I already checked predecessor box and the rest of my common mistakes ahhaha


errore-3.png (31.9 KiB)
4.png (19.1 KiB)
5.png (29.5 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Cliff King avatar image Cliff King commented ·

In the example model I sent, there are two places where a choice needs to be made based on time of day and availability of two areas:

  1. In the Next Activity field of activity 30 when the patient first arrives. One of three activity ID's will be returned that will cause the patient to either go to express, standard or the waiting room.
  2. In the Patient Destination field of activity 70. This activity only gets kicked off for those patients who go to the waiting room via activity 60. The Patient Destination field is different from most other fields in that it can be reevaluated automatically if a zero is returned the first (or previous) time it is evaluated. If this field returns a zero when it's evaluated, the patient will stay where they are and wait. Whenever any patient vacates a downstream location (in other words, a location that is connected via the Flowchart tool to the location patients are currently waiting in), the software will automatically reevaluate the Patient Destination field of any waiting upstream patients who temporarily have a zero value for their target destination and then if the reevaluation returns a valid destination instead of a zero, the patient will start walking (or escorted) to the destination.

When patients are "stuck", it's usually due to one of the following problems:

  1. there's no connection between the location the patient is in and the target destination they've been assigned (use Flowchart tool to debug)
  2. the patient hasn't been assigned a valid patient destination (use Patient Activity Table in Debug > Object Tracker menu to debug)
  3. there's no room in the area or location where they've been assigned to go
  4. no activity has been kicked off for the patient (use Debug > Object Tracker menu to debug)
  5. they're waiting for a staff member to take them somewhere (use Debug > Object Tracker menu to debug)
0 Likes 0 ·
Emanuela M avatar image
0 Likes"
Emanuela M answered

Thank you @Cliff King! I will check it immediately to see if I can make it works :)

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Emanuela M avatar image
0 Likes"
Emanuela M answered Emanuela M edited

I think I have another problem. I deleted the Shift Schedule for the Cath Lab and added the conditional destination for the patients that cannot enter the Lab if it is already occupied or if it is not in its opening hours through the following code:

(getcensus(AngiogramArea)<1) && (gethour(getsimtime()) > 8 && gethour(getsimtime()) < 17)

The problem is, that I have to create a sort of while loop to evaluate this condition, since I create a Decision Point with two possible alternatives:

  1. Transportation Cath Lab if the condition is satisfied;
  2. Waiting in their area UNTIL the contition is satsfied. I cannot estimate a time for this process, since it depends on the availability of Lab and the time of the simulation.

Similarly, if I try to aply the condition on the destination, if the condition is not true it will just associate a different location and not wait untile the Lab is available.

How can i fix this? Is there a way to introduce an while condition for this situation?

Moreover, this is not working for Urgent patient, which should at maximum wait for 30 min in DEA irrespectively of time/date. This is the error showing me after having let the simulation run for a while:

last-version.fsm


1.png (46.2 KiB)
2.png (116.7 KiB)
last-version.fsm (1.0 MiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Cliff King avatar image
0 Likes"
Cliff King answered Cliff King commented

I think the best way to handle conditional use of an area is with conditional routing within the patient track itself. This can be done with either a Decision Point activity that decides whether to use one of two downstream activities based on patient type and current time of day, or it could be handled with a conditional statement in the Destination field of a single activity that is also based on patient type and current time of day. The conditional statement may have the following elements:

getlabel(patient, "PCI") == 1 && gethour(getsimtime()) > 8

A more complex statement may look like the following. The && is a logical AND. The || is a logical OR.

(getlabel(patient, "PCI") == 1 || getlabel(patient, "PCI") == 3) && (gethour(getsimtime()) > 8 && gethour(getsimtime()) < 17)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Emanuela M avatar image Emanuela M commented ·

Thank you. So that’s why I have a constant error ( like arrival stop to an invalid object) because I cannot regulate it with activity start condition?

0 Likes 0 ·
Cliff King avatar image Cliff King Emanuela M commented ·

You won't be able to totally regulate it with a start condition due to the timing of when the activity start condition field is checked. The error was due more to the fact that the arrival stop option applies to the stopping of an inter-arrival process on an arrival door object. A more applicable option for standard locations is the stop input option.

0 Likes 0 ·