FHIR Chat · bld-9 incorrect? · fhirpath

Stream: fhirpath

Topic: bld-9 incorrect?


view this post on Zulip Marten Smits (Feb 10 2022 at 16:17):

I'm currently implementing logic in the .NET validator that invariants that result in empty, evaluate to falseinstead of true, based on this topic here:
https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Period.20Datatype.20Invariant

While running our unit tests after this fix, validation of Bundles that have entries without a fullUrl result in false, because bld-8 (fullUrl.contains('/_history/').not()) goes off.

Shouldn't this invariant be fullUrl.exists.not() or fullUrl.contains('/_history/').not() instead of just fullUrl.contains('/_history/').not()?

view this post on Zulip Lloyd McKenzie (Feb 10 2022 at 16:21):

If this is an issue, we need to get the fix into R4B... @Bryn Rhodes @Grahame Grieve

view this post on Zulip Bryn Rhodes (Feb 10 2022 at 16:31):

Agree, that constraint should account for the case that fullUrl is not present.

view this post on Zulip Lloyd McKenzie (Feb 10 2022 at 21:17):

@Marten Smits, can you submit a change request?

view this post on Zulip Marten Smits (Feb 10 2022 at 21:52):

Will do!

view this post on Zulip Marten Smits (Feb 10 2022 at 22:28):

Done: https://jira.hl7.org/browse/FHIR-36006

view this post on Zulip Brian Postlethwaite (Feb 10 2022 at 23:51):

How's that not been breaking things like HAPI if that's the case?

view this post on Zulip Josh Mandel (Feb 11 2022 at 03:20):

Wow, that is a fun gotcha. Fwiw I find the "implies" syntax a bit more readable:

fullUrl.exists() implies fullUrl.contains('/_history/').not()

Or if you want terse:

fullUrl.contains('/_history/').allFalse()

view this post on Zulip Ewout Kramer (Feb 15 2022 at 08:12):

Yeah, the implies is nice.


Last updated: Apr 12 2022 at 19:14 UTC