I am trying to figure out how to work with an existing model. The data is in
MongoDB with embedded documents.  It is about patients would have
sub-documents.  For example.  An individual patient may have multiple
allergies. Also a patient has multiple medications.  So it is as follows:

- Patient.medications ---> multiple Medication objects

So I see where you have a simple one to one.  Typically perhaps you might
have the medication record know that it is associated with the patient, but
that is not how it is currently organized.  So the question is can I write
rules when patients.medications returns a set/ collection of medications
associated with the patient. I want to write a rule such as "if a patient is
taking medication=xxx...."

Thanks for your help.

Ray Hooker