question

Santi avatar image
0 Likes"
Santi asked Jason Lightfoot commented

Add a task to MD without holding up patient

After a doctor examines a patient, I'd like the doctor to return to her desk, and perform a charting task. In my first attempts, the patient would stay in the exam room until the doctor finished charting.
I'm not sure if this is the right approach, but I used the Split activity so that the patient is escorted out of the exam room (by an RN) as soon as the doctor finishes the exam.
I have 2 problems (and I'm not even sure if I'm supposed to be using the Split for this in the first place):
1. The doctor doesn't actually perform the charting task. Her state is stuck on "PerformingTask - Acquired"

2. I couldn't figure out how to get the doctor to return to her idle location (desk). So for now I'm sending her to a floor spot to perform the charting.

Any help is greatly appreciated!
Here's my model:
Model 007.fsm

FlexSim 23.2.0
independent taskperform taskreturn to idle location
model-007.fsm (2.9 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hi @Santi, was Matthew Gillespie's answer helpful? If so, please click the "Accept" button at the bottom. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

model-007_2.fsm

1) I would use the Split and Join activities so that the MD can begin charting at the same time the patient begins their checkout process. However, I would also use a Remove Patient activity with the Remove Statistically Only checkbox checked. That way the stats are updated as soon as the patient is ready to leave the model, but doesn't get physically removed until the MD is done charting.

1694632493788.png

You can then remove them completely after the Join.

1694632529223.png

2) To get the MD to return to their desk I added a Desk label to the MDs that points at their desk. (I also updated their Idle Location variable to use the Desk label too) Then, in the MD to Office you can reference that label.

1694632651071.png



1694632493788.png (15.3 KiB)
1694632529223.png (20.8 KiB)
1694632651071.png (12.9 KiB)
model-007-2.fsm (2.9 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.

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

You can't remove the patient object until after their process is complete - as soon as you do, the patient instance is removed from the process flow taking all tokens with it. Use a join to coordinate the completion of the invoked process and the removal of the instance.

· 4
5 |100000

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

Santi avatar image Santi commented ·

Thanks Jason,

I came across this post, which seems to provide a solution:
https://answers.flexsim.com/questions/89212/continue-activity-after-patient-leaves.html

It seems to work, please see attached model:

Model 008.fsm

But I noticed that when tracking events in a statistics collector, I can't figure out how to access the token that is created for the general process flow ChartingProcessFlow.

In the CareVsTime statistics collector:

1694495017739.png

I tried Token.Staff, and many other failed attempts at getting the name of the MD that performs the charting activity.

I'd like the statistics collector to show "MD 4" as shown in the example below.
I typed in MD4 in red, to illustrate the desired result. Instead it shows 0.

1694495157928.png

The token is new, and therefore no longer associated with the patient flow, no?
Therefore, how do I get this data (the name of the doctor) from an event (charting) in a general process flow (ChartingProcessFlow)?

0 Likes 0 ·
1694495017739.png (29.2 KiB)
1694495157928.png (41.6 KiB)
model-008.fsm (3.0 MiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Santi commented ·

Why did you choose that 'solution'? Why would the join step before removing the patient not work for you? Such a simple step.

0 Likes 0 ·
Santi avatar image Santi Jason Lightfoot ♦ commented ·

Hi Jason,

I'm unfamiliar with using split and join.
I used the Two Staff Meet activity as a reference, and tried a few times, but couldn't get the result I needed. The patient waits in the exam room until the doctor finished charting. I want the patient to leave as soon as the doctor finishes examining her/him.

For instance, I add the join before removing the patient, like this:

1694530513403.png

When I run the simulation, the doctor does the charting, and the patient is escorted out. But once the doctor finishes charting, he/she stays stuck there, instead of either returning to the idle position, or examining the next available patient:

1694530493174.png

I agree that this approach is cleaner. I just can't get it to work.
This is why I went with the other 'solution'.

Here's my model with the attempt to use Join:
Model 007b.fsm

I'm still quite new to FlexSim. I might be making a very simple mistake. Do you happen to have an example that shows how Split and Join can be used for this?

I also still can't figure out how to get the doctors to walk to their idle position to perform the charting. I understand that the idle position property was introduced in a relatively recent version of FlexSim (correct?), and couldn't find any documentation on it.

I'm very grateful for your guidance so far.
Any further help is so very much appreciated!

0 Likes 0 ·
1694530493174.png (208.6 KiB)
1694530513403.png (25.6 KiB)
model-007b.fsm (2.9 MiB)
Show more comments

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.