Staff required for a limited time (percentage of patient activity duration)

Staff required for a limited time (percentage of patient activity duration)

laetitia_thomas
Not applicable
11 Views
2 Replies
Message 1 of 3

Staff required for a limited time (percentage of patient activity duration)

laetitia_thomas
Not applicable

[ FlexSim HC 5.3.2 ]

Hi,

I would like to request a staff (nurse and/or MD) during a patient activity. This resource should begin his task at the begining of patient activity, but finish his task before the end of patient activity (for example after 50% of patient activity total duration).

I know that I could approach this logic by addind sub-activity, some which request staff and other that doesn't (the total duration of the activity would then be splitted between all sub-activites), but for multiple reason, I would like to keep a single activity.

Another way will be using global processes, but I need the patient to be in state "waiting for resource" if the resources aren't available.

Does someboy have an idea on how I can code that ?

Thanks a lot for the help !

Laetitia

0 Likes
Accepted solutions (1)
12 Views
2 Replies
Replies (2)
Message 2 of 3

cliff_king
Not applicable

You might be able to achieve what you desire with one activity by using the Custom Activity type. We added several new pick list options in the Activity Started Trigger field that are intended for use with Custom activities that can provide a starting point for the code you will need to use.

Message 3 of 3

laetitia_thomas
Not applicable
Accepted solution

@Cliff King

As you advised, I used a custom activity type, and added a modified version of the "imitate a Process activity" function in the Activity Started trigger.

Description of the model: 2 resources are needed to begin the exam activity, the nurse is needed only for 25% of the total duration, the MD for 50% of the duration.

All the lines changed in the Activity Started Trigger Function begin with /**/. I had to remove the synchronisation tasks at the end so all staff could leave the patient as soon as their task is finished. When the process can begin, I send a delayed message to the patient (the activity will end when the patient receives the message - I copied this logic from the case where no staff is needed). As my model doesn't include preemption tasks, I think that will be ok ?

I also had to add a message trigger function for all patients following the track, so I directly wrote the code in the PatientBin/Track1/Track1>variables/messagetrigger. This function allows me to modify the patient state (as I understand, in the "standard" version of the "Initate a process activity", the process start function is included in the "PatientOnMessageTrigger" function, which is called in the callsubtask).

I attached the current version of this model.

Please let me know if you noticed errors or if you have ideas on how I can improve it !

test-duree-staff-50-duree-patient.fsm

0 Likes