medizininformatik-initiative / sq2cql

1 stars 1 forks source link

Fix Duplicate Expression Definitions in Unfiltered Context #100

Closed alexanderkiel closed 6 months ago

alexanderkiel commented 6 months ago

If we create expression definitions in unfiltered context while processing MedicationAdministration criteria, it's possible that we create duplicates if more than one MedicationAdministration criteria with the same code was found in the structured query.

The solution is to simply use a set for the expression definitions of the unfiltered context. That will work as long as the name of such expression definitions corresponds to the content of the expression.