Qs on Conditional Evaluation of an Unknown Number of Fields

I have a webpage that includes rows of Patient Names. Each Patient Name is in it’s own row, and beside it is a selectable button that will take me to a different screen. So if there are 5 patients there are 5 buttons, one beside each name. I need to search for a particular patient. If the patient is found, then the test would select its button.

An important point is, I will not know how many names (and therefore rows) there will be until Formal Test execution. And the number may change on each Test Run.

There are other fields/elements on the page. Hypothetically, I could search all fields, but obviously I only want to search all the Patient Name fields.

So my Qs are: (1) How would I iterate conditionally through each name field looking for the Patient? Especially because I will not know how many patients there are. And then, (2) once I find the Patient, how do I know which button to select as there may be many? A live tester (a person) would intuitively understand to select the button that is available on that row. And once again, we will have no idea how many Patients there are presented on the screen at that time.

Also, if the test iterates thru all the Patient fields and doesn’t find the particular Patient, I want the test to fail. But only after it has checked all Patient Name fields.

Also my Test Developers do not have coding experience, so the solution cannot be to code a Python script or whatever