How to restrict patient appointments doctor wise

How can i set up user permissions so that a healthcare worker can only see appointments for him or his department?

I have set up the following user permissions, but they don’t work.

You can add query conditions for Patient Appointment in hooks.py file.

In query conditions, you can add a condition to filter out appoints for the current logged in doctors. This way, current logged in user can see only his appointments.

I simply agree for custom solution.

But, as described in question & as intended (obviously that’s why user permissions exist), should work, isn’t it?

@asharamseervi Yes, your are right.

By default, a healthcare worker should see only his appointments. Due to a bug, it is showing all appointments.

For now, you can disable ignore_user_permissions flag on practitioner field & department field. Once these flags are set, the above user permissions will work.

This issue is fixed and pushed to develop branch. It will be available in the next version.

https://github.com/frappe/erpnext/pull/27129