How can I use 4 location “Selection Prioritys” ?

How can I use 4 location “Selection Prioritys” ?

jim_montgomery
Not applicable
1,412 Views
6 Replies
Message 1 of 7

How can I use 4 location “Selection Prioritys” ?

jim_montgomery
Not applicable

[ FlexSim HC 5.1.0 ]

At my locations, I would like to use 4 Selection Priorities in the Configurable Entrance Criteria, but the default editable parameters limit me to 3. Could you please advise me on how the FlexScript should be edited to accomplish this?

Here are my desired 4 priorities:

Selection Priority 1. Patient is assigned label value “PCI” = 1 ….. getlabel(patient, "PCI") == 1

Selection Priority 2. Patient is assigned label value “a_EMS_Pt” = 1…. getlabel(patient, "a_EMS_Pt") == 1

Selection Priority 3. Patient with the highest value of label “a_Rm_Priority” …. getlabel(patient, "a_Rm_Priority"

Selection Priority 4. Patient who has been waiting the longest…. time() - get(stats_lastmovetime(patient))

Here are the existing 3 priorities:

Selection Priority 1. Patient is assigned label value “a_EMS_Pt” = 1…. getlabel(patient, "a_EMS_Pt") == 1

Selection Priority 2. Patient with the highest value of label “a_Rm_Priority” …. getlabel(patient, "a_Rm_Priority"

Selection Priority 3. Patient who has been waiting the longest…. time() - get(stats_lastmovetime(patient))

….And attached below is the existing FlexScript:

flex-script-from-bed-location-entrance-criteria.pdf

@lou.keller

0 Likes
Accepted solutions (1)
1,413 Views
6 Replies
Replies (6)
Message 2 of 7

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

Your first two aren't priorities, they're criteria. You can add these two conditions to the Criteria section by ANDing (&&) them with the ASSIGNED_HERE condition.

4849-entrancecriteria.png



Matthew Gillespie
FlexSim Software Developer

Message 3 of 7

jim_montgomery
Not applicable

Thank you for getting back to me, Matthew. Actually, (assuming I understand the definition of criteria) the first two are not criteria. If the PCI is not equal to 1, the patients are not prohibited from entering the location....they just enter at a reduced priority to PCI = 1. Likewise, if a patient is not an EMS patient, he is not prohibited from entering.....he just have lower priority.

0 Likes
Message 4 of 7

Matthew_Gillespie
Autodesk
Autodesk

You're right, I made a bad assumption. I've attached a .txt file with the updated code.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 5 of 7

jim_montgomery
Not applicable

Thanks, Matthew, So I'm assuming that I only have to insert the following 4 priority specifications into your updated code at these locations to make it work?

/**\n\nEntrance Criteria: */ #define SELECTION_CRITERIA /**/ASSIGNED_HERE/**list:ASSIGNED_HERE~getlabel(patient, "PCI") > 3~getcensus(otherArea) < 20~ASSIGNED_HERE && getlabel(patient, "PCI") == 3*/

/**\n\nSelection Priority 1: */ #define SELECTION_PRIORITY1 /**/getlabel(patient, "PCI") == 1/**list:NOT_USED~getlabel(patient, "Acuity")~time() - get(stats_lastmovetime(patient))~time() - getcreationtime(patient)~time() - getvarnum(patient, VAR_LastReleaseTime)*/

/**\n\nSelection Priority 2: */ #define SELECTION_PRIORITY2 /**/getlabel(patient, "a_EMS_Pt") == 1 /**list:NOT_USED~getlabel(patient, "Acuity")~time() - get(stats_lastmovetime(patient))~time() - getcreationtime(patient)~time() - getvarnum(patient, VAR_LastReleaseTime)*/

/**\n\nSelection Priority 3: */ #define SELECTION_PRIORITY3 /**/getlabel(patient, "a_Rm_Priority") /**list:NOT_USED~getlabel(patient, "Acuity")~time() - get(stats_lastmovetime(patient))~time() - getcreationtime(patient)~time() - getvarnum(patient, VAR_LastReleaseTime)*/

/**\n\nSelection Priority 4: */ #define SELECTION_PRIORITY4 /**/time() - get(stats_lastmovetime(patient))/**list:NOT_USED~getlabel(patient, "Acuity")~time() - get(stats_lastmovetime(patient))~time() - getcreationtime(patient)~time() - getvarnum(patient, VAR_LastReleaseTime)*/

0 Likes
Message 6 of 7

Matthew_Gillespie
Autodesk
Autodesk

Yes, you use it exactly like you would before.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 7 of 7

jim_montgomery
Not applicable

OK Will do. Thank you, Matthew.

0 Likes