question

David Chan avatar image
0 Likes"
David Chan asked Matthew Gillespie commented

HC: use resource based on the first resource use

Hi

How do I assign second staff group based on the first staff group used in the Processing Activity in HC?

Thanks

David

use-resource-based-on-first-resource-used.fsm

FlexSim HC 5.1.0
resource assignment
· 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.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

I'm not sure what you're asking. It looks like your model is already doing this. In activity 30 you're specifying Requirement 1 of Activity 20 which gets you the nurse used in activity 20. Do you want different behavior than that?

0 Likes 0 ·
David Chan avatar image David Chan Matthew Gillespie ♦♦ commented ·

@Matthew, what I need is if the MD Team 1 is used, RN Team must be used and same for MD Team 2. In the current model if MDTeam 1 is used, there is a possibility Team 2 RN is used. This is especially so if there are more team and more beds.

Thanks for looking into it

David

0 Likes 0 ·

1 Answer

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

You can use the following commands to get a reference to previously used staff:

int activityID = 20;
int activityRow = torownum(patient, activityID);
int reqNum = 1;

getrequiredresource(patient, activityRow, STAFF, reqNum)
getrequiredgroup(patient, activityRow, STAFF, reqNum)

The above will get you the first staff member and the first staff group used by activity 20. You can then use the returned value to determine the staff requirement of activity 30.

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

David Chan avatar image David Chan commented ·

Matthew how about getting the staff group the first rank from activity 30? So that the second rank will select the right group?

David

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ David Chan commented ·

You would need to make them two separate activities and then probably keep the first one. The staff requirements can be fulfilled in any order.

0 Likes 0 ·
David Chan avatar image David Chan commented ·

Matthew

To add on. That is in activity 30, I can choose any doc from any group of doc. But once that doc group is selected, then the RN must come from the same team.

Thanks

David

0 Likes 0 ·
David Chan avatar image David Chan commented ·

@Matthew Gillespie Thanks for your recommendation. However I was unable to use your recommendation method to get the model working. I was unable to get the resource group that is assigned by the alternative group. I only gotten is the required resource which is the specific doctor. This method will not work if I have more than one doctor in the group. If you have the time, please provide me with a sample model. Much appreciated.

Now I have work around method is to give each resource a label "team". So the first doctor and RN group is in team 1. The other will be in team 2. By having reading the label from the resource in activity 20 and have it written on the patient then I am able to read off in activity 30. Based on that label value, I think I am able to get the right resource group. Though it works, but I think should be easier method to accomplish this.

Thanks

David

0 Likes 0 ·