Stream: fhirpath
Topic: bld-9 incorrect?
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 false
instead 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()
?
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
Bryn Rhodes (Feb 10 2022 at 16:31):
Agree, that constraint should account for the case that fullUrl is not present.
Lloyd McKenzie (Feb 10 2022 at 21:17):
@Marten Smits, can you submit a change request?
Marten Smits (Feb 10 2022 at 21:52):
Will do!
Marten Smits (Feb 10 2022 at 22:28):
Done: https://jira.hl7.org/browse/FHIR-36006
Brian Postlethwaite (Feb 10 2022 at 23:51):
How's that not been breaking things like HAPI if that's the case?
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()
Ewout Kramer (Feb 15 2022 at 08:12):
Yeah, the implies
is nice.
Last updated: Apr 12 2022 at 19:14 UTC