Dear Brittany Curet,
If you have both MedicationOrder and MEDALLERGY as parameter you can use a decision with $MedicationOrder/Medication Name = $MEDALLERGY/Allergy Medication and set logic for true and false.
If you have only MedicationOrder as parameter you can use retrieve action to retrieve MEDALLERGY from the database using XPath [Allergy Medication = $MedicationOrder/Medication Name] you will get the list of MEDALLERGY and implement your logic with it.
Hope my answer helps, reach me out for any queries.
Dear Brittany Curet,
Since you already have the list of MEDALLERGY objects for a specific person and when you receive a new MEDICATIONORDER, you can easily do a retrieval of the MEDALLERGY object and select range as first form the database using the below XPATH constraint.
[Account_Medallergy = $Person]
[MedicationName = $MedicationOrder/MedicationName]
If the list is empty, then the person doesnot have any allergy to the specific medication. If the list is NOT empty, then allergy exists.
Note - Here person is the account for which MEDICATIONORDER is being made.
Hope this helps.
Regards
Praharaj