question

Roxanne Vo avatar image
0 Likes"
Roxanne Vo asked Jason Lightfoot commented

Using ports by case with female and male flow objects

Hi!

I have used "current.setVariable("itemclass", duniform(8,9));" to create males and females from one source. I also used set label by percentage at the source for three different percentages/values.


Later in the process, (in my model at the urine process) I tried to use port by case with the values I assigned at the source, but it does not seem to split accordingly.

I would really appreciate help.

I attached my model.


Milestone 3 Finaal (1).fsm

FlexSim 21.0.10
decision pointset labelmale and femalelabelbypercentagportbycase
5 |100000

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

1 Answer

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

@Roxanne Vo,

You can add a trigger on the nurses station that changes the label value on the patients after the visit them. All you need to do after that is add logic that routes the patient to PHC depending on that label. I have created a little model that shows how that works. When the items are created they are randomly given a "Type" label of 1, 2, or 3. After they go through the final processor they are given a "Type" value of 4. They then return to the original queue and are sent through the Check In processors which use a conditional send to port action which routes them to the sink. I have included my model so that you can see the way that I set up my logic.

Updating labels-JW.fsm


· 5
5 |100000

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

Jacob W2 avatar image Jacob W2 ♦ commented ·

Hi @Roxanne Vo,

The reason why the Urine test station was not correctly sending your flowitems to their intended locations was because of the labels not being named correctly. The problem is that on your source you created a label called "label1" which assigned each person to a different route after the urine test station as shown below.old-source-label.jpgurine-station-labels.jpgThe urine test station could not read that label because it was looking for a label "Type." By changing the name of the label on your source to match that of the urine test station your port by case will work. Below is an image showing how the labels could be set on the source to match the urine testing station.new-source-label.jpg

Feel free to reach out if you have any other questions.

0 Likes 0 ·
Roxanne Vo avatar image Roxanne Vo Jacob W2 ♦ commented ·

Thank you so much for the help Jacob!

Is there a way to "label"/"mark" the patients that have visited the nurses, then send them back to registration and then split the queue after registration accordingly?


From the queue after registration, I would like to send the patients that have already been through the system to the sink on the right ("Patients continue to PHC) and the rest to the three vital stations using "first available".

I just don't know how to determine whether the patient has been through the system or not?


Thanks.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Roxanne Vo commented ·
This is why you might want to consider using the process flow library for tracking patient progress through a set of activities rather than sending them through ports to various processes.


0 Likes 0 ·
Roxanne Vo avatar image Roxanne Vo commented ·

I really appreciate the clear and super helpful advice.

I have pasted a screenshot of the setup I'm working on now... There are six beds (processes), but one operator between them. However, he simpy guides the patients into the beds and then leaves to guide the next one, but is there a way to set the time the processor is involved in each process separate to the actual process time of the processor (the beds)? Because the processor's time involved in the process is MUCH shorter than the actual process time but i don't know how to deal with it.

Thanks!

1651359271624.png

0 Likes 0 ·
1651359271624.png (161.4 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Roxanne Vo commented ·
You could say that the guide is needed for setup of the processor.
0 Likes 0 ·