question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Matthew Gillespie commented

How do I get the Appointment time into a patient label?

arrivalschedule.jpg

I am using the appointment schedule shown in the attached jpg file. I would like to capture the first column value as the Appointment Time for the patient.

Thanks

Tee

FlexSim 19.1.1
patient labelsversion 19.2.1
arrivalschedule.jpg (119.7 KiB)
· 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.

Tee Hiett avatar image Tee Hiett commented ·

I guess my question is — How do I get access to the Start Time label which is imported from Excel from what I can see?

0 Likes 0 ·

1 Answer

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

Unfortunately, I don't see a good way to do this right now.

I think the best thing to do in this case would be to add another column in Excel and duplicate the first column data in this row. That way when you import the file you get another Label column in the Date Time Source's table.

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

I can do that. This will import the appointment time in minutes of the day

Since patient arrival times are variable, the patient will not arrive at exactly the appointment time. I can record the patient arrival time in a label on the patient with Model.time. This will produce the patient arrival time in simulation minutes not minutes of the day.

What I want to do is to compare the patient's arrival time with the appointment have and use that information in taking the patient from the waiting room. For example, if the patient arrives 30 minutes before the appointment time I do not want that patient go back to the treatment area if there are other patients who have an appointment time before that patients appointment time.

I was thinking about using a "on reset" command such as "(Model.dateTime.hour * 60) + Model.dateTime.minute" to put the simulation start time into a global variable and use that information to adjust the ArrTime or the ApptTime.

Any suggestions? and how do I produce the "on reset" command in Version 19.210?

Thanks,

Tee

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Tee Hiett commented ·

Oh! If you want the number value of the arrival time that's not too hard to do. On the DateTime Source activity add a label under the Assign Labels to Created Tokens section and use this line of code for the Value:

Table(getvarnode(activity, "arrivals"))[rowNumber][1]

See this example model too:

appttime.fsm

0 Likes 0 ·
appttime.fsm (33.3 KiB)