question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

Utilization For Location Chair

I have a schedule of patient arrival from 8 AM to 2 PM daily basis. That is the working hours of clinic. But while calculating utilization of clinic, it is showing chart based on 24 hours a day. How can we change it based on working hours? Also, is there any way to make this option dynamic so that depending on working hours, utilization can be calculated?

FlexSim 21.1.2
chair utililizationworking hours
· 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.

Ankur A3 avatar image Ankur A3 commented ·

Please find model attached here.Test1.fsm

0 Likes 0 ·
test1.fsm (63.0 KiB)

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Ankur A3 commented

One possible way to achieve this would be to set the state of the location to some value that is not normally within the range of the HC states. For the chair this could be state "3" for example. The time spend in such a state will not appear in the person tables and as such also not count towards any statistics derived from them.

The issue however is that you would have to account for the possibility of the location state changing after the shift has ended (a patient only leaving some time after the shift ends). This would cause the state to be updated to a "normal" state again.

The, in my opinion, better solution is to customize the state chart instead. As a first step, select "Compare hours of the day" in the options. This will make the following changes easier. Next "install" the charts components. This will create a statistics collector and a calculated table in the toolbox.

1650365885278.png

1650365900149.png

Open the calculated table and navigate to the "Calculations" tab. Because we changed the chart to "Compare hours of the day", a lot of the needed syntax is already in place in the query. Click on the "Enable direct editing" button. This allows you to directly edit the SQL query the table is performing, though it will also disable the interface to automatically generate the query based on menu options.

Then make the following changes:

- Replace the "toString()" part in the first row with "hour".
Instead of taking the current datetime of the model and converting it to text that displays the full hour, this will convert the time into a numerical hour value.

- Add the clause "WHERE Hour >= 8 AND Hour < 14"
Because "Hour" is now a numerical value, we can apply a condition that it has to be equal or larger than 8 but smaller than 14. In other words, only data from the active shift will be used.

- Remove the last line ("GROUP BY")
The calculated table should only have a single row, not be split by the hour value.

1650366698125.png

Instead of writing the shift start and end time directly into the query, you can also read them from somewhere else in the model by enclosing the necessary flexscript code in curly braces. In the picture below I read them from the parameter table for example.

1650366682875.png

The calculated table (and with it the connected chart) will now only take into account the active hours.

shiftStats_fm.fsm


1650365885278.png (3.0 KiB)
1650365900149.png (7.2 KiB)
1650366682875.png (13.7 KiB)
1650366698125.png (48.7 KiB)
shiftstats-fm.fsm (65.9 KiB)
· 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.

Ankur A3 avatar image Ankur A3 commented ·

Hi Felix,

Thank you for your answer!

I would like to ask one more question if I may.

I have schedules for multiple providers in clinic. For eg:

8:00 AM - 8:30 AM Provider-1 Chair-1

8:30 AM - 9:00 AM Provider-1 Chair-1

8:00 AM - 8:30 AM Provider-2 Chair-2

8:30 AM - 9:00 AM Provider-2 Chair-2

I tried entering same schedule in date time source activity in process flow. But it is not generating tokens. Only working with different source activity for each provider.

Can you help me out how we can enter this schedule at one place and generate tokens for multiple providers?


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ankur A3 commented ·

Your method should normally work. Once reset the model once the schedule rows should re-order themselves in ascending order based on the arrival time and create the specified quantity of tokens for each row.

1650434529336.png

1650434574736.png

It's difficult to say what might be going wrong in your case without seeing your model. Could you maybe share it or at least a screenshot that shows the settings of your source activity?

0 Likes 0 ·
1650434529336.png (18.1 KiB)
1650434574736.png (4.4 KiB)
Ankur A3 avatar image Ankur A3 Felix Möhlmann commented ·

Thanks Felix! It is working now. I think there was some other issue when it was not working.

I am facing one more issue if you can help in that. While writing TimeIn and TimeOut in global table "TrackTime", I am using Model.dateTime since I want the date and time both. But It is not giving the time with right result. Can you help me to find what is going wrong here?

I have attached model for your reference.

Thank you!Test1.2.fsm

0 Likes 0 ·
test12.fsm (64.1 KiB)
Show more comments