Can’t get the desired records to display in a popover portal
I have these relationships
PainScore is a number from 1 - 10.
The business rules allow multiple people to create a PainScore record for each OfficeVisit.
I want to allow people to choose from existing PainScore records when they create a new PainScore record. For example, a doctor may create a PainScore record for this OfficeVisit by selecting the PainScore record created by a clerk or nurse before the doctor sees the patient. Or, the doctor may select a PainScore record from a previous visit by that Patient. That may not make sense but I’m using it to illustrate the problem.
So, I want to be able to select from a display of all the PainScore records for the Patient in the popover, regardless of who created them or during which OfficeVisit they were created.
From the OfficeVisit layout I can display all of the PainScore records related to that OfficeVisit in a popover. From a Patient layout I can display all of the PainScore records, related to that patient, from a popover. But I can’t display all the PainScore records for a Patient while in the OfficeVisit layout. I believe I need to be in the Office visit layout to create the PainScore records so the relationships are created correctly.
I tried creating a second instance of the PainScore table with PainScore::_fkPatient = Patient::_pkPatient. When that didn’t work I created a second instance of the PainScore table with PainScore::_fkPatient = OfficeVisit::_fkPatient. That didn't solve the problem either.
I appreciate your help!