Hide Tabs/form/pagex within model and model within model hiding feature

There is a main model Prescription Order model and there is a sub-model prescription order line and there are many tabs/pages within one notebook page like Vitals Page, Medication Tab, Diagnosis that are called from other models like gnuhealth.conditions model…
Now I just required is to hide diagnosis tab from one of the doctor and at the same time I have to show this Diagnosis tab to someone else doctor…

What is the proposed possible solution We can do so we can achieve?

I think it depends on the complexity of the calculation of the visible state.
If it is complex, you should define a Boolean Function field that compute if the tab is visible or not. This Function must have a getter named on_change_with_... to ensure to update the value when the form is filled.
Than use an PYSON expression based on this Function field to set the visibility of the page via the view_attributes method.
If it can be expressed as simple PYSON expression, skip the Function field.