# How i can restrict doctor in appointment form that he can view its own appointments

**URL:** https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077
**Category:** Developer
**Created:** [March 11, 2024, 10:00am UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077 "2024-03-11T10:00:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![abdul](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/dfb087/32.png) [@abdul](https://discuss.tryton.org/u/abdul)
#### Post date: [March 11, 2024, 10:00am UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077/1 "2024-03-11T10:00:51Z")

</div>

How i can restrict doctor in appointment form that he can view its own appointments. doctor login with his/her user and view own appointments. Thanks

---

<div class="post-metadata">

### Author: ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)
#### Post date: [March 11, 2024, 3:36pm UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077/2 "2024-03-11T15:36:27Z")

</div>

As you are talking about Doctors and Appointments, if you are using [https://www.gnuhealth.org/](https://www.gnuhealth.org/) then you may find it better to ask there, as they may have already considered / setup something to do this.

Tryton provides a few different ways of [restricting user’s access to data](https://docs.tryton.org/latest/server/topics/access_rights.html). If you really want to restrict doctors to only their own appointments, you should be able to do this using _Record Rules_. However hiding the other doctors appointments this way would make them totally inaccessible to other doctors (and may require some custom code).

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [March 11, 2024, 3:45pm UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077/3 "2024-03-11T15:45:07Z")

</div>

If you do not want to be too restrictive, you could just add a `search_value` on the action that opens appointments.

---

<div class="post-metadata">

### Author: ![abdul](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/dfb087/32.png) [@abdul](https://discuss.tryton.org/u/abdul)
#### Post date: [March 12, 2024, 3:59am UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077/4 "2024-03-12T03:59:08Z")

</div>

i want to restrict doctor or health professional to only see his own appointments.  
`domain = [(<field name>, <operator>, <operand>)]` how i can add operand as user

---

<div class="post-metadata">

### Author: ![abdul](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/dfb087/32.png) [@abdul](https://discuss.tryton.org/u/abdul)
#### Post date: [March 12, 2024, 3:59am UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077/5 "2024-03-12T03:59:43Z")

</div>

i want to restrict doctor or health professional to only see his own appointments.  
domain = [(, , )] how i can add operand as user

---

<div class="post-metadata">

### Author: ![fransuar](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/f/59ef9b/32.png) [@fransuar](https://discuss.tryton.org/u/fransuar)
#### Post date: [November 2, 2025, 9:31pm UTC](https://discuss.tryton.org/t/how-i-can-restrict-doctor-in-appointment-form-that-he-can-view-its-own-appointments/7077/6 "2025-11-02T21:31:17Z")

</div>

Hi. I recently suggested this feature on gnuhealth project.

> **[add my\_appointment function field to Appointment model. Access rights defined](https://codeberg.org/gnuhealth/his/pulls/157)**
>
> Add my\_appointment function field to Appointment model. Add My Appointments menu. Add access rights to health\_admin and health\_doctor group. Add a new group, my\_appointment, in manner to add another users outside health\_admin and health\_doctor to...

If it is not approved, maybe you could addapted to your implementation.  
Kind regards
