when patient booked the appointment with specific doctor that doctor only need see that his patient details not other doctor patient details

Hi I have an application where patient is Creating appointment with Doctor , it need  go to that specific doctor only (There are multiple  doctors so  only that Specific doctor need to see the appointments not others doctor patient details) how can this be achieved?
2 answers

You can arrange this by correctly setting the accessrules of the appointment. The appointment should only be visible to the doctor if the doctor that is assigned to that appointment is the current user.

To do that add an accessrule for the doctor’s userrole and add an xpath-contraint like this:

Hereby I assume that you have a pretty domainmodel with an entity for ‘ Appointment’, which has an association to some person-entity, presumably called ‘Doctor’.




Hi Pujitha,

               I am Jhansi!!

               Above solution is applicable when your domain model looks as mine. If not useful let me know how your domain model is so I can check and let you know where the exact issue is:

To even start with the project: I have 2 user roles

  1. Doctor
  2. Patient

Domain Model:

Both are associated to account entity from administration module.

I renamed the association to indicate to which account user role is related.

Appointment_Doctor : It holds the Doctors Name.

Appointment_Patient: It holds the Patient Name.

Below is the screenshot for appointments displayed for patients

From the above there are 2 important things to be noted.

1 To display the list of appointments to patients

2 Create appointment button

Create appointment page looks like below:

Account is the list

The field doctor is reference selector:

The data source is the display of the selected doctor name

Selectable objects tab holds a microflow(GetlistOfDoctors) in order to retrieve the list of doctors available:

On saving the appointment associated the current user – patient in the Appointment_patient. Which looks like below.


For a doctor to view the appointment, it will run a microflow to fetch the appointments that have the Appointment_Doctor as current logged in user

By using the above microflow we can only see appointments that are associated to the particular doctor.

Pages will be controlled based on the user role.

 Do let me know if you did not get any step.

Hope this helps!!!