ThinkSoft

Selecting a unique list AS a related TO

Discussion created by ThinkSoft on Dec 16, 2016
Latest reply on Dec 16, 2016 by ThinkSoft

G'day Friends I have a dilemma.

the design of the database is this:  Where Contacts are abstracted as Patient, Doctor and Specialist.

Screen Shot 2016-12-17 at 3.56.44 pm.png

A Patient may present to a doctor for multiple cases

Each case may have multiple meetings

Each meeting MAY or MAY NOT have the same Specialist in attendance.

Specialists do not get involved with the case until the meeting.

Conversely this means that a specialist attends meetings that are part of cases for patients.

At this point I can connect to display all the patients that the specialist has attended in the TO SpecialistPatients ( this should be name SpecialistCasesPatients - to be pedantic ) - however, this may ( sorry, does )  contain duplicate entries.

 

My request of all you wonderfully smart folk out there is how to create a new TO that shows a unique list of patients attached to the specialist.

 

These are relevant current relationships:

All current relationships are single conditions.

 

Contacts::CONTACT_ID

 

SpecialistMeetings::MEETING_ID
SpecialistMeetings::Patient_ID  --> Contacts::CONTACT_ID 

SpecialistMeetings::Doctor_ID  --> Contacts::CONTACT_ID

SpecialistMeetings::CASE_ID

 

Specialist Cases::CASE_ID

Specialist Cases::Doctor_ID  --> Contacts::CONTACT_ID

Specialist Cases::Patient_ID  --> SpecialistPatients::CONTACT_ID

 

SpecialistPatients::CONTACT_ID

 

==============================================

Please do not tell me to change the structure of the database - this is how it is...

 

Yours in wild eager anticipatory gratitude.

 

Tony

Outcomes