AnsweredAssumed Answered

How to check for a particular combination of Child Records

Question asked by Sorbsbuster on May 15, 2010
Latest reply on May 17, 2010 by Sorbsbuster

Title

How to check for a particular combination of Child Records

Post

It seems such a simple question and concept that I'm sure you guys will make me feel foolish with the answer, but I have to admit to being stumped.

 

I have a Patient Table and a table of their Prescription Lines, related by PatientID.

 

So the records look like:

 

Patient Table      Prescription Table

 

PatientID 100     Drug A

                              Drug B

                              Drug C

 

PatientID 101     Drug A

                              Drug D

                              Drug E

 

But Drug A should NOT be prescribed in combination with Drug C, so if they appear on the same Patient's Prescription those lines should carry a warning or highlight.

---------------------------------

I have also added the obvious table of 'Exceptions' (but it hasn't helped my thinking in the slightest).  So for example the first record in the Exceptions Table shows:

Drug A

DrugC

 

The next record shows:

Drug E

Drug G

... as each of these records are undesireable combinations of drugs.  Obviously a drug could appear in several 'Exceptions' records.

--------------------------------------------

 

Can anyone help with clearing the log-jam in my mind?

 

Thanks in advance,

Alan.

Outcomes