question

dougdurbin avatar image
0 Likes"
dougdurbin asked Parker S edited

Continue Activity After Patient Leaves

In my model after the patient visit I want the staff to do some extra activities after the patient leaves. The problem I'm having is keeping the green token available after the patient is escorted to the exit. I've done this before and split the token so that the patient walks out by themselves and the staff completes some other tasks. However, in this case, after the patient is escorted out, the staff will not start the other activities. After the escort activity, I have the remove patient and sink activities. I have a token split right before the escort activity but the token will sink on the "split activities" after the escort activity. An option would be to not remove the patient and sink and just have those 2 activities happen after the staff activities but might mess up performance metrics. I've thought about creating tokens as well but I can't seem to get that quite right. Is there a better way that I'm not thinking of to continue activities for staff after the patient leaves? (e.g. cleaning an acquired room after patient exits the model, which I assume is released as the patient exits and is not acquired anymore)

FlexSim 20.1.3
flexsim 20.1.3activities
· 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.

Tee Hiett avatar image Tee Hiett commented ·

Check out the Model at this thread for splitting and holding the patient, if necessary, until the MD finishes his notes. @tee.hiett

0 Likes 0 ·
Cliff King avatar image
1 Like"
Cliff King answered Parker S edited

You're thinking like a master Doug! I've been going through my own parallel learning process over here, and this is what I've learned:

1. If all you want to do is use the same staff member who works on the patient to do the cleaning after the patient leaves, then it's less work to use the standard maintenance feature on patient locations and set a label on the location before the patient leaves to record which staff member is being used. Unfortunately, there's not a picklist option in the maintenance staff field to do this automatically (I will talk to @matthew.gillespie about the possibility of passing more information into that field and the others for maintenance). Here's an example model of this approach.

Standard_Maintenance_Option_to_Clean_Room_with_Last_Used_Staff.fsm

2. It's impossible to continue activities in a patient flow after the patient leaves the model because the instance of the patient flow associated with the patient is destroyed. Therefore, it's necessary to use a general process flow that's kicked off by a Create Token activity in the patient flow. Here's an example model of this approach that is much easier to follow than the one referenced in the previous post I gave you. It also handles the releasing and reacquiring of the bed and nurse better so that a new entering patient doesn't jump in a vacated bed before it is cleaned. There are lots of steps in this approach, so review it carefully. Also note how I position the Create Token activity before releasing resources, and how in the general process flow that has to reacquire the bed and nurse I use a higher priority (151) so the requests are put to the top of the queue ahead of those requests generated by new patients entering.

General_Process_Flow_to_Clean_Room_After_Patient_Leaves.fsm

3. Do like @tee.hiett suggested and don't let the patient leave the model until after all the "post departure" activities have completed. In this case, you must be sure and manage your patient statistics correctly. For instance, instead of using the default People Staytime charts to get patient LOS, but instead put a milestone in your patient flow to define a "Departure" milestone at a point when the patients theoretically leaves the system and then use the Milestone-Milestone chart to get LOS. Any other metrics that are based on the time a patient is "in" the model will need to be modified as well.

I also wanted to add the following feedback about charts for option 3 that Jordan Johnson mentioned to me:

The person states would also be affected; you'd probably want to put the person in an excluded state somehow, so that those stats wouldn't be affected.

The model census (bar chart or histogram) may also have trouble. You'd need to set a label on the person when they finish, and then filter out everyone with that label.

I don't think it would effect any other charts.


· 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.

dougdurbin avatar image dougdurbin commented ·

It seems like the first approach is working well, the problem I'm having is that the patient acquires 2 locations. The process flow is as follows: patient roomed into exam room, then taken to procedure room while still holding on to the exam room (for purposes of maintenance, etc), then the nurse cleans either room first then cleans the other room. Could you attach an example for this case? I'm attempting to add another label with "patient.locations[2]" since it creates an array but it is throwing a code. Basically I'm trying to create a label with both acquired rooms so the nurse can clean both at the end of the visit through the maintenance option.

0 Likes 0 ·
Cliff King avatar image Cliff King dougdurbin commented ·

The first approach uses the standard maintenance option on the locations themselves, so I don't understand why you're attempting to save a reference to the location. The locations know who they are and all the behavior for cleaning themselves after the patient leaves is in a process flow of the location itself. You can view the process flow by clicking the location and then clicking the Open Process Flow View button in the Quick Properties pane. By the way, there's even an option to download that process view and make changes applicable to your model if you ever want to modify something in there. I haven't done that yet, but Brittany tells me she has.

Based on your short description, I don't know why both rooms aren't naturally being cleaned when the patient leaves them. If you're still having a problem, and can't send me your actual model, then try modifying the example model I made to demo the situation and I'll work on that one.

0 Likes 0 ·
dougdurbin avatar image dougdurbin Cliff King commented ·

I've attached my model to this reply. So I have assigned a label in the process box "nurse escort then initial assessment" as well as "nurse discharges patient" after the first decision activity. Because I have multiple acquires and releases of patients, I figured in the "nurse discharges patient" process box that it would overwrite the original label in the "nurse escort then initial assessment" box, but it may be redundant. It seems to work this way until the patient has to go to the orange clinic rooms (procedure rooms). After the patient leaves after the procedure rooms, none of the rooms (procedure nor exam) are cleaned. At 9:05, on exam table 2, you can see it works. For the other patients who need a biopsy (procedure) done, it's as if the exam rooms never get cleaned, but the procedure rooms do.

As an aside, in previous examples it seems as if the patient walks out by themselves it's easy to start activities after the patient leaves. However, it seems to not work if the patient was escorted out by the staff.

Lean Simulation Model Baseline.fsm

0 Likes 0 ·
Show more comments
Cliff King avatar image
0 Likes"
Cliff King answered Cliff King converted comment to answer

This other post solves it by putting the activities for cleaning the room in a general process flow rather than in the patient instance flow. As you (and he) discovered, the token created with either a Split or the Create Token activity is destroyed when the patient is removed. This is because the whole instance flow is destroyed at that time. I'd still like to get @matthew.gillespie to weigh in on this when he returns to work.

https://answers.flexsim.com/questions/86002/how-to-manage-in-maintenance-on-release.html

· 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.

dougdurbin avatar image dougdurbin commented ·

I've tried this solution and it works for that purpose and have done something similar before. For my scenario, I have the nurse escorting the patient to the exit and then have the Remove Patient activity. This removes all associated tokens as well, even if I create tokens or split them. I wonder if there is a way to create a token separate of the parent token that won't go away after the remove patient activity. Maybe being able to start an independent activity in a general process flow regardless of the parent token? Another potential option would be an Event Triggered Source that creates a token when a certain event in the patient flow happens (e.g. when the patient flow token passes through an activity)?

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.