health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] Restricting doctors access to patient history


From: Edgar Hagenbichler
Subject: Re: [Health] Restricting doctors access to patient history
Date: Tue, 1 Sep 2020 19:50:28 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Hey Humberto,

Am 01.09.2020 um 19:36 schrieb Humberto Freitas:
Hey Edgar,

I found the solution.

CONGRATULATIONS!!!

According to [1],
Given the PYSON statement:
Get(Eval('context', {}), 'company', 0))

Eval() checks the evaluation context for a variable context if defined, return the variable context, otherwise return an empty dictionary {}. Get() checks the former resulting dictionary and returns the value of the key 'company', otherwise it returns the number 0

So, in my case, if a doctor wants to only fetch his/her appointments, the PYSON statement would be: [['healthprof', '=', Get(Eval('user', {}), ‘employee', None)]]. Thus, only the appointments in which are created by the doctor will be fetched.

[1] https://docs.tryton.org/projects/server/en/latest/topics/pyson.html#pyson-examples

Let me know in you you have any questions.

Thank you very much!

All the best

Edgar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]