Relation manager pulls wrong data

I have built a demo EHR system around medical records- I may not have architectured this correctly but i want to have appointments and prescriptions link so when a patient gets prescribed something its linked to an appointment, doctor, patient. i created PrescriptionsRelationManager which when i added to my ViewAppointment page it loads information about appointments rather than prescriptions?
Was this page helpful?