FirelyTeam / firely-cql-sdk

BSD 3-Clause "New" or "Revised" License
26 stars 15 forks source link

concept equality unit test #352

Open richfirely opened 1 month ago

richfirely commented 1 month ago

According to the CQL spec:

https://cql.hl7.org/02-authorsguide.html#comparison-operators

Quote: For Concept values, equivalence means the values have at least one equivalent code.

I created a test measure that used the exact examples in this unit test and it failed. I also tested this with java and it works.

The part that is unclear is if code should be equivalent to concept when the code matches at least one code in the concept. I couldn't find that in the spec. @EvanMachusak do you know?

EvanMachusakNCQA commented 1 month ago

Yes, equivalence is a commutative operator. (x ~ y) ~ (y ~ x) for all x and y.