How do I connect one entity of Medical Records to two user roles ? (a doctor user and a patient user).

 A doctor creates a medical record for a patient, and in the form for creating new objects it looks like this:   Currently, I use an xpath constraint so each dropdown can only select from the correct user type, but the medical record is only able to choose one user to associate to. I cannot choose one doctor AND one patient for the form, as choosing both then automatically disables the other option for some reason. So now currently the Medical Record entity has association to System.user, but  I want it to be able to connect to two different users with different roles, so that on the Data Grid it can show which Doctor made this record and for which Patient.
1 answers

You need 2 different associations - one for the doctor and one for the patient