|
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,
Hey Edgar,CONGRATULATIONS!!!
I found the solution.
Thank you very much!According to [1],Given the PYSON statement:Get(Eval('context', {}), 'company', 0))
Eval()
checks the evaluation context for a variablecontext
if defined, return the variablecontext
, otherwise return an empty dictionary{}
.Get()
checks the former resulting dictionary and returns the value of the key'company'
, otherwise it returns the number0
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.
Let me know in you you have any questions.
All the best
Edgar
[Prev in Thread] | Current Thread | [Next in Thread] |