question

Ksenia F avatar image
0 Likes"
Ksenia F asked Yulia K commented

Track the intersection of different patient flows

Hi!

There is a task to track the intersection of different patient flows. How can this be done? Perhaps using dashboards? Thanks.

FlexSim 21.0.1
healthcareflexsim 21.0.1
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

@Ksenia F Could you give is a little bit more detail about what you want to see/track - in an example ideally?

0 Likes 0 ·
Ksenia F avatar image Ksenia F Jason Lightfoot ♦ commented ·

I have a model with different patient flows (planned and emergency). I am changing the location of offices and entrances to reduce the number of intersections within the department. What dashboards can be used to track this and ultimately provide the best option. I understand that you can just look at the model and follow the patients visually, but I would like to use graphs.

Test1.fsm

0 Likes 0 ·
test1.fsm (590.3 KiB)
Jeanette F avatar image
1 Like"
Jeanette F answered Yulia K commented

Hello @Ksenia F,

I took your model and implemented several things from this post and model.

The model uses an agent proximity system to detect when a planned patient comes within 2 meters of an emergency patient. I created a second label set so that patients that are planned (Emergency = 0) and emergency patients (Emergency = 1) can be distinguished from each other. The patients are added to the agent system at the beginning of their process flows. The rules specified in the proximity system are to ensure that only data is received from one of the patients in the case of an interaction of planned and emergency patients.

When an emergency patient enters the proximity of a planned patient a trigger is sent to a visual object that draws a disk at that interaction so you know where the patient is interacting in the model.

Here is the model for you to reference.

HC Agent proximity system statistics and heat map.fsm


· 9
5 |100000

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

Ksenia F avatar image Ksenia F commented ·

Hello @Jeanette F !

Yes, this is exactly what I need. I am currently trying to port this method to another more complex model where 3 threads are involved. And I got this error: "time: 0.000000 exception: FlexScript exception: MODEL: / Tools / ProcessFlow / Плановые / Assign Labels> labels / 1/2

time: 0.000000 exception: FlexScript exception: MODEL: / Tools / ProcessFlow / Плановые / Custom Code> variables / codeNode ".

I don't understand how to remove it. I am attaching the model for better understanding. Thanks!

Agentmodel.fsm

0 Likes 0 ·
agentmodel.fsm (505.3 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Ksenia F commented ·

When you assign the agent label you have a spelling mistake "ProxinitySystem" should be "ProximitySystem"

0 Likes 0 ·
Ksenia F avatar image Ksenia F Jason Lightfoot ♦ commented ·

@jason.lightfoot thank you!

0 Likes 0 ·
Ksenia F avatar image Ksenia F commented ·

Hello @Jeanette F!

I am having a problem trying to apply this method in a model with 3 patient streams. I think I followed the sequence exactly, but the statistical table is not populated and does not recognize intersections. What could be the mistake? I attach the model.

agentmodel.fsm

0 Likes 0 ·
agentmodel.fsm (576.4 KiB)
Jeanette F avatar image Jeanette F ♦♦ Ksenia F commented ·

Hello @Ksenia F,

I don't see where you assign the label Planned in your label sets or on the patients in the process flow. You can add them in a label set by going to People Settings in the Toolbox. This is the label you use in the Agent System to collect data from only planned patients who encounter emergency patients.

Also in the statistics collector Proximity Times you have to select what event will trigger what in the columns tab. The On Enter Proximity event will update the EnterTime. The On Exit Proximity Event will update the Exit Time and Duration.

agentmodel_v1.fsm

0 Likes 0 ·
Ksenia F avatar image Ksenia F Jeanette F ♦♦ commented ·

Thanks for the help @Jeanette F!.

0 Likes 0 ·
Yulia K avatar image Yulia K commented ·
Hello @Jeanette F !
I opened a model which you implemented your idea. I noticed that a red circle appears next to the elevator (at about 08:11), although the intersection occurred elsewhere. Could it be a mistake when describing the "on draw" trigger? When I used your idea on my model, a similar nuisance arose (the intersection was fixed in a place where it could not be). Thank you in advance!
0 Likes 0 ·
1.jpg (59.5 KiB)
Jeanette F avatar image Jeanette F ♦♦ Yulia K commented ·

Hello @Yulia K and @Ksenia F,

This problem was occurring because when the patient is at a location their coordinates become relative to the objects location rather than to the model.

For example, here are the coordinates for the reception desk.

Here are the coordinates for the patient at the desk.

So the code in the visual tool Heat Map On Message Trigger needs to be altered. The line that sets the position needs to be.

Vec3 pos = fromObject.getLocation(0.5, 0.5, 0.0).project(fromObject.up, model());

Here is the updated model for you to reference.

HC Agent proximity system statistics and heat map.fsm

1 Like 1 ·
Yulia K avatar image Yulia K Jeanette F ♦♦ commented ·

Thank you. This solved my problem.

0 Likes 0 ·
Cliff King avatar image
0 Likes"
Cliff King answered Ksenia F commented

Would the heatmaps available with A* give you what you need? There are several options for how to display the color gradients and there are even ways to extract the data behind the color gradients if you like (search for heatmaps in Answers for how to do this).


1612809296870.png (35.7 KiB)
1612809326639.png (1.4 MiB)
· 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.

Ksenia F avatar image Ksenia F commented ·

Thanks for the idea, @Cliff King

But, heatmaps shows staff + patients workload, and my task is to show the places where patients of different patient flows intersect. Can this be done? Thank you in advance!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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