FHIR Chat · type check for =? · fhirpath

Stream: fhirpath

Topic: type check for =?


view this post on Zulip Paul Lynch (Sep 04 2018 at 17:06):

Unlike "6.2 Comparison", I don't see any requirement about the types matching for the operators in "6.1 Equality" (=, !=, ~, and !~). Must the types match for two items to be '=' ?

view this post on Zulip Grahame Grieve (Sep 04 2018 at 21:02):

tha

view this post on Zulip Grahame Grieve (Sep 04 2018 at 21:03):

that's tricky. I ignore type differences in primitives. otherwise they must match.

view this post on Zulip Grahame Grieve (Sep 04 2018 at 21:03):

I think

view this post on Zulip Bryn Rhodes (Sep 04 2018 at 21:07):

There is certainly the implication that the types must be the same, the spec says "otherwise, equals returns false".

view this post on Zulip Bryn Rhodes (Sep 04 2018 at 21:07):

Definitely worth a clarification though.

view this post on Zulip Paul Lynch (Sep 04 2018 at 22:24):

The "otherwise, returns false" follows a list of things that don't mention checking types. It mentions checking whether things are "equal", but JavaScript returns true for 1 == "1". So, if it was the intent that FHIRPath would return false in that case, yes, it would be very helpful to have that clarified. Should I open a GForge ticket?

view this post on Zulip Grahame Grieve (Sep 04 2018 at 22:59):

yes

view this post on Zulip Paul Lynch (Sep 05 2018 at 16:53):

GF#17799


Last updated: Apr 12 2022 at 19:14 UTC