ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
|
Downloads |
FlexSim HC: Q&A Questions about FlexSim Healthcare |
#1
|
|||
|
|||
Creating different Patients (male, female, boy, girl...) without using a Label in Patient Classification
Hello,
I had the idea to create a Label column callend Gender in my Patient Arrivals and using multiple OnCreation Triggers with Change Patient Visuals. But this seems only to work with the Labels defined and assigned to the Tracks. I have already 6 patient tracks and defined by analysis and treatment function (already some grouped to reduce the number). Using the standard way would mean multiplying the tracks by 2 (female, male) , 3 (adult, child). Is there a more handy way to achive this? Regards, Peter |
#2
|
||||
|
||||
I'm not sure what your full intent is. You mentioned using a patient label called "Gender" that you could declare values for in Patient Arrivals. Yes this is possible to do directly using the Appointments tab of the Patient Arrivals Properties window. You could also set values in the OnCreation trigger of the Patient Arrivals object if you did not want to use the Appointments tab to define your patient arrivals. Keep in mind that you do not want to create the "Gender" label in the Patient Arrivals object, you simply want to set the label's value there. You should always create patient labels in the Patient Classifications tab of the Patient Track Manager.
When planning to use labels, you need to decide what type of label it should be: text or number. If I'm going to use a patient label to store a location reference (e.g. a label named "Room"), then I like to make it a text based label so that I can set the label to the name of actual locations in the model. This way I can directly use the "Based on patient label" option available in the Patient Destination field to reference the "Room" label in making a decision where the patient should go. Similarly, if I'm going to use a patient label to store a reference to a specific doctor I want a patient to see during their visit to a clinic, I'll use a label named "Doctor" that is text based so that I can set the label to the names of actual doctors I've created in the model. Then I can directly use the "Assign Staff Based on Patient's Label" option in the Activity Started Trigger for an activity where the patient is seen by the doctor. In your case, I'm not real clear how you plan on using the "Gender" label, so I can't yet suggest the data type for this variable. You could use number's such as 1,2,3,4 to represent Man,Woman,Boy,Girl, or you could write the names as is in a text based label. You'll have to explain to me what you'd like to achieve with the label. Because you mentioned something about using the the "Change Patient Visuals", I'm assuming it is your desire to change what your patients look like dynamically during a model run after they've already arrived into the model rather than have to create individual tracks up front just to get several different looking patients in the model. Well you don't necessarily need to use a "Gender" label to be able to "Change Patient Visuals". You could for instance write duniform(1,4) for the "New body:" entry in the "Change Patient Visuals" option. If you did have a number based "Gender" label defined on your patients with values of 1,2,3,4 then you could write getlabelnum(patient,"Gender") in the field. I should also point out that the "Change Patient Visuals" option is found in the Activity Finished Trigger of an activity which might be a more convenient place than the OnCreation trigger of the Patient Arrivals object. And finally, I want to put in a word of caution. I always suggest that users do not use the "Change Patient Visuals" option if possible because of the incredible amount of overhead associated with the option that can drastically slow down the computation and animation of a model. If all you need to do is change the patient's shirt color, then I would suggest the use of the "Set Color" option instead. |
#3
|
|||
|
|||
Cliff,
I do have a long list of appointments and I know to each appointment if it is a woman, man, boy or girl. I want to create the appropiate patient visual when they start comming into the model. I did add a additional column in the Appointments tab and copied the numbers 1-4 from my excel data base in to the column. Then I used four times the OnCreation trigger "Change Patient Visuals" with getlabelnum(patient,"Gender")==<1-4> 1=Man, ... But wenn I run the model I get the error message: Flexscript Error MAIN:/project/model/PatientArrivals1>variables/OnCreationTrigger line 437 syntax error, unexpected '}', expecting end of code check for the proper number of parentheses/braces Could not finish parsing because of previous errors. |
#4
|
||||
|
||||
You don't need four separate instances of the "Change Patient Visuals" option in the OnCreation trigger field. You can simply use the value of the "Gender" label (e.g. 1,2,3 and 4) to define the patient's body as shown in the attached image. If you open the code editor for the chosen option you will will see a list of #define statements enumerating the various selections for patient body types. For instance, MAN is represented by a value of 1, WOMAN by a value of 2, etc. This is why we can use the label value to define the body type.
|
The Following 4 Users Say Thank You to Cliff King For This Useful Post: | ||
RalfGruber (03-04-2014) |
#5
|
|||
|
|||
Thanks, with Change patient's body set to YES and declaring the label in the Patient Classification of the Track Manager (I had some how manged to type in the name Gender in the column of the Appointments, before without doing this) it works.
Now they all appear with blue jeans, before I gave the trousers colors in the Tracks (because they can't be changed in the Set Patient Visuals) to distinguish the PCIs. After the MRI Activity I change the shirt color to green. Up to that Activity I use now the OnExit Trigger with set color which gives me a shirt color depending on the Palette # chosen - the good thing is it matches the model census dashboard graph. Last edited by Cliff King; 03-07-2014 at 08:55 AM. |
Tags |
gender, label, on creation trigger, patient visuals |
Thread | Thread Starter | Forum | Replies | Last Post |
Patients and Flowitems - using medical records to control patient flow | Lou Keller | FlexSim HC: Tips & Techniques | 0 | 12-24-2013 03:41 PM |
Escorted Patients Getting out of Bed | michaelsmith | FlexSim HC: Q&A | 1 | 08-22-2013 02:13 PM |
how to create patients dynamically | Pablo Concha | FlexSim HC: Q&A | 3 | 04-11-2013 05:25 PM |
Moving item into patient | David Chan | FlexSim HC: Q&A | 6 | 06-15-2010 08:35 AM |
Female Operator? | JMEngelhart | Q&A | 3 | 07-13-2009 08:26 AM |