I'm building a model of a surgery process in a hospital.
In my model I have an arrival list that creates 3 patients each day with different labels:
- BMI
- Diabetes
- SDK
- Cemented
After the arrival, the patients will enter a multi-server representing the pre-surgery process and afterwards they will enter a single server representing the surgery room.
I want to replicate some of the patient sequencing considerations they make:
If any patient has the "Diabetes" label:
- That patient should be scheduled first, regardless of any other labels.
If this first patient has "Diabetes" and one of the remaining two patients has a "BMI" > 40, then the patient with "BMI" > 40 should be scheduled second. For the third patient, choose someone with the "SDK" label and a "BMI" < 40, or with the "Cemented" label and a "BMI" < 40. If neither of these conditions is met, select any patient with a "BMI" < 40.
If the first patient has "Diabetes," and neither of the other two patients has a "BMI" > 40, then schedule the patient with the "SDK" label second. If no patient has the "SDK" label, select one with the "Cemented" label. If neither of these labels is present, choose any patient with a "BMI" < 40 for both the second and third slots.
- Choose one of them to be the first patient of the day and the other as the second.
If one of these two patients also has a "BMI" > 40, that patient should be scheduled first, with the other "Diabetes" patient second.
For the third patient, choose any remaining patient with a "BMI" < 40.
- Schedule the patient with a "BMI" > 40 first.
For the second patient, choose one with the "SDK" label.
For the third, pick another patient with the "SDK" label or any remaining patient.
- Schedule a patient with the "SDK" label first.
For the second patient, choose another patient with the "SDK" label. If there are no more "SDK" patients, select any available patient.
For the third patient, choose any remaining patient.
Also I would like to put some constraints on the model as a whole such as:
- Maximum 3 patients a day with the label “Cemented” in total.
Maximum one patient with label “BMI” > 40
I have experimented with the condition control atom for this, but I cannot seem to close input of one type of patients while allowing the others.