mendix time availability configure

0
I am working on an Appointments application and for this I want to make sure that the availability of a doctor is adjusted as soon as he is linked to an appointment. If an employee schedules an appointment with a customer, the employee links the appointment to the relevant customer and therefore also to a doctor. I want to make sure that a doctor cannot be double booked. Can someone help me with this. I wait patiently for your answers. Thanks in advance.
asked
4 answers
1

Hi Emre,

What you can do is:

Make sure you have a start date and end date attribute for the appointment entity.

request all appointments that belong to that particular doctor on that specific date/time frame.

If empty there are no appointments for that time so it is safe to book.

If this is unclear or not the answer you are looking for, please let me know

answered
0

were do I use this microflow can you give me an example.

answered
0

Hi Emre,


I believe the domain model should look like this


When the employee makes a doctor’s appointment, he selects the doctor, the customer and the date, begin time, end time.
With a microflow we can check if this doctor has already an appointment for the same date within the period selected , if so we can inform with a message (and don’t commit the object schedule).

For instance:



In the retrieve activity should have a Xpath constraint:
[Notifications.Schedule_Doctor = $Doctor]

and similar to this:



I hope that helps, 

please let me know if you achieve and the solution :)

 

answered
0

Depends on what exactly you want, what your page looks like etc.

From what I can see now is that the microflow has to get its parameters filled first. So on the page there must be a object that gives you those fields.

 

answered