Please see the screenshot. The best way to be sure that you select what you want is to limit through ‘Selectable objects’ tab. In your case I can't say what makes patient names and doctor names come together, but it can be solved this way.
You can do it by an xpath or by using a microflow that retrieves correct data.
I hope this work around works
I think what Ferhat is saying is, how do yo know what account is a doctor an what account is a patient. Do you have an attribute on account that specifies this, eg and enumeration, or you want to use the user role related to the account? Please take a look at the lecture below. It explains how to use selectable objects.
additional information can be found in the documentation