question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Adrian Haws commented

Problem getting companions into a model correctly

In the attached model, I am having trouble getting the companions into the model. I think the problem is with the fact that this model includes no show patients and a sign in location where a patient goes if the registration clerks are busy at the time.

I have a model of another clinic where the no-shows are not included and patients wait in a waiting line for the next registration clerk. I have no problem with the companions included in that model.companions.fsm

Thanks,

Tee

FlexSim HC 5.1.0
healthcarecompanionsflexsim hc 5.1
companions.fsm (2.7 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.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

I don't see where in this model you're trying to create companions.

0 Likes 0 ·
Adrian Haws avatar image
0 Likes"
Adrian Haws answered Adrian Haws commented

@Tee Hiett

I find that it's easier to understand and control the companion activities if you simply create the companions in a separate patient track and use the "Start Activity on a Companion" option within activity triggers. For example, instead of dispatching companions, you can simply create a companion and start an activity when your patient travels to its first location. If a patient's location can vary, simply have each branch of logic start a different activity on the companion. Thus a companion can mirror the effect of "following" the patient to the waiting room, then the patient's exit activity can start the companion's exit activity.

Doing it this way will resolve any problems with having decision points or different activities before the waiting room. You can also create companions after the decision is made for patients to exit early (no-show patients).

See attached model for an example and this question for further explanation.


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

Tee Hiett avatar image Tee Hiett commented ·

Adrian,

Thanks for your help with the model.I made a few changes in your model, which I have attached in case anyone following this would like to see the results (so far :-)).

First, using your approach, I added no-show patients, which I forgot to include in the first model I submitted.I began with a Global Variable name PercentNoshow, which is set to 18. This is used to set the patient label NoShow to 0 or 1 in the Activity Started Trigger of Activity 1.

In the Activity Finished Trigger of Activity 1, custom code is used to create companions for patients that actually arrive and no companions for no-shows.The number of companions was changed from 1 to P(50,0,35,1,15,2) to reflect the actual activity in this process.This required two additional patient tracks and two additional PCI’s for companion 2 and companion 3.

Activity 5 was eliminated since it had no effect on the model.

The Start an activity for companions on the ArrivalSpot, just inside the arrival doors, was changed from the On Exit trigger to the On Entry trigger to make the flow smoother.

On the ReunionPoint near the waiting room, the Sent Messages in the On Entry and On Exit triggers were deleted since they weren’t used anyway.

In Activity 140, The Start an activity for companions was move from the Activity Finished Trigger to the Activity Started Trigger to adjust the space between the companion and the patient as they exit.

Cliff,

Your second paragraph regarding the use of “Dispatch companions” certainly rings a bell with me.When I started this model I was planning to have the companion accompanied the patient until the patient went into the waiting room and then stay in the waiting room until the patient came back from the exam room.Just as you stated, when a patient the entered the model, I didn’t know where the patient was going to register or sign in.It got fairly complicated.

Then, Adrian introduce me to using a companion track with activities for the companions which caused me to see the potential for just having the companions accompany the patient to the registration area and then continued to the waiting room. Really seems to be working well. So I too am a fan of defining the companion’s activities on the companion track. This approach really does seem much cleaner and well-organized as opposed to dispatching companions.

This process has helped me better understand the inclusion of companions in a model.This will make a great addition to our modeling efforts particular since we can easily turn the companions on or off within a model.

Again, thanks to Adrian and to you for you help.I am a fan of FlexSim Answers.

Tee

PS I reposted this answer as I posted it to the wrong question yesterday.

3278-companions-2-2.fsm

1 Like 1 ·
Tee Hiett avatar image Tee Hiett commented ·

2840-companions-2.fsm

Still struggling with getting companions into the model correctly

In the attached model, I have created an ArrivalSpot area just inside the elevator doors where one companion gets created when the patient enters the area.When the patient exits the area, the companion is dispatched to go to the waiting room.I tried creating an activity on the Companion track to send the companion to the waiting room but I couldn’t get that to work either. The patient and the companion walk to node NN42 where the patient walks to Reg1 and the companion continues to the waiting room. When the patient gets to Reg1, he immediately turns away from the registration desk (instead of staying there to be registered) and walks to NN24. At this point, an error is thrown and the program stops.

I was going to use basically the same process to have the patient leave the bed and walk to the RP_1 area just outside of the urology waiting room.

As you can see, I don’t understand Companion activities very well and need help with this model.

Thanks,

Tee

0 Likes 0 ·
Adrian Haws avatar image Adrian Haws Tee Hiett commented ·
@Tee Hiett

I'm not sure exactly what was causing those errors, but I was able to implement patient companions in the way I previously described. There are just a few small changes I made to your model, and it should be fairly simple to set up the logic in the way you need.

First, I created companions in the Activity Started trigger for activity 1 of the "General" track. In this trigger I created the companion in "CompTrack_1" and set the "Number of minutes before activity begins" to a higher value than I anticipated for manually starting the activity in another trigger. I then eliminated the "Dispatch companions" logic and used "Start an activity for companions" in the On Exit trigger of the ArrivalSpot. This starts activity 10 in "CompTrack_1". It's important to make sure that your companions have a connection to their destinations in the flowchart. Activity 20 is then started on the companion when the patient exits RP_1. One other note is that the companions were originally not traveling to Neurology Wait because they were "Waiting for Area". I'm not sure why it was doing this, but I no longer had this issue after deleting the waiting room and making a new one with the same name.

I'm not sure if there is a way to have functioning companions by creating them after the patient is already in the model, but I think it's a good idea to always create the companion when the patient enters the model, as I did in the updated model. Also, I'm admittedly not familiar with the intention or implementation of the "Dispatch Companions" function. @Cliff King or @Matthew Gillespie might be able to explain that a little more.

0 Likes 0 ·
companions-2-1.fsm (2.7 MiB)
Cliff King avatar image Cliff King Adrian Haws commented ·

I too like Adrian's approach of defining the companion's activities on the companion track itself, and then simply start those activities one-by-one at their proper time using triggers defined on activities of the main patient's track. This approach just seems cleaner and better organized to me. I like to have as much of my model logic contained in the track activities as possible, with little or no logic defined on the objects out in the model space.

There might be times when you will want to use the "Dispatch companions" pick list option found in the On Message Trigger of patient location objects in the model, but typically this will only be required when you have the companion follow the main patient around the model to multiple areas containing multiple locations within each area. The complexity that's introduced by this scenario is that you typically will not know what specific location a patient, and therefore the patient's companion, will need to travel to until the patient actually begins traveling to the dynamically assigned location. In this case, you will need to use the On Exit trigger of the location the patient leaves from to send a message to the same location a fraction of a minute later that will execute the "Dispatch companions" option. At this time, the "Dispatch companions" option will know where the patient is headed and be able to direct the companion to travel to the same location. All this would be somewhat possible using the first approach defined above by Adrian, but it wouldn't be perfect. With the first approach, your only options for starting a travel activity on the companion would be in the Activity Started Trigger of the patient's travel activity, which would be too early to know where the patient is going to travel to; or in the Activity Finished Trigger of the patient's travel activity, which would make it possible to know the patient's destination, but there would be a big lag between when the patient starts walking to the destination and the companion finally does.

Tee, let us know if Adrian's simplified approach will not entirely work for what you want to do, and we'll see if we can help you with the other more complex approach!

0 Likes 0 ·
Cliff King avatar image
0 Likes"
Cliff King answered Adrian Haws commented

Look for a "Create Companions" pick list option in either the On Createion trigger of your patient arrivals object or maybe in the Activity Started/Finished Trigger for one of the activities in your other model. Somewhere you needed to first create the companions. Controlling the movement of the companions can be handled either with activities defined on the companion track itself, or with the "Start activity on companion(s)" pick list option being used in trigger fields triggered by the main patient.

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

Tee Hiett avatar image Tee Hiett commented ·

Cliff, I have tried creating companions at PatientArrivals1, in Activity 1 and in activity 10, without success. I even created an area just inside the arrival doors and tried to use it, without success.

In the attached model, I created the patients in Activity 1 and dispatch them from the arrival doors. This should help you see the kind of error I get. I just created one companion for every patient just to get the model running. I would change this to a statistical distribution, of course.

I would like for the program not to generate companions for no-show patients but generate companions for all other patient. The companion should stay with the patient until the patient goes to the waiting room. The companion should stay in the waiting room until after the patient has been seen by the nurse and then leave with the patient.

Thanks for your help.

Tee

0 Likes 0 ·
companions.fsm (2.7 MiB)
Tee Hiett avatar image Tee Hiett commented ·

Any suggestions yet?

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.