Link a current user to a attribute in xpath

I encountered a problem while i was setting up entity access. I my case, a doctor must see all patients assigned to him in a form. I have set up a patient form which displays all patients in the system. Each patients is assigned to a doctor (the doctor has a ID). Now the question is: How to model the system in a way the doctor logins with his ID had only sees to him assigned patients? I have made up a security on entity patient where the doctor can read and write the information of the patient. But i think i have to make a Xpath constraint. So I have created this: [MyFirstModule.Doctor_Patient/MyFirstModule.Doctor/employeeID=[System.owner='[%CurrentUser%]'] but it does give an error called: no viable input after '['. I think the system does not recognize the current users login ID (which is the same as its employeeID) Can somebody help me out? Thank you in advance,
1 answers

Try [MyFirstModule.Doctor_Patient = '[%CurrentUser%]']