FHIR Chat · value or child or Null? · implementers

Stream: implementers

Topic: value or child or Null?


view this post on Zulip Alexander Henket (Jun 19 2018 at 12:43):

We have V3 input that we create FHIR output for. Sometimes this input has NullFlavors present with an explanation of why the value is not present. If I don't have data, but I know why, I'd like to state that.

In FHIR an element SHALL have a @value or a child element and the .Net validator errors on a construct like this.

<route>
<extension url="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor">
<valueCode="NAV"/>
</extension>
</route>

The official invariant in FHIR will not bark, because extension is a child element, but the .Net validator will.

ele-1: All FHIR elements must have a @value or children (expression : hasValue() | (children().count() > id.count()))

Who is right? @Ewout Kramer, @Grahame Grieve?

view this post on Zulip Lloyd McKenzie (Jun 19 2018 at 12:54):

Including an extension means "route" has a child. And that child has a value. So the invariant is satisfied. If the .Net validator complains, it's in error.

view this post on Zulip Grahame Grieve (Jun 19 2018 at 13:43):

yes. .net validator is wrong. but I think the problem is deeper than that around an edge case issue in FHIRPath that is clarified in the forth coming FHIRPath spec

view this post on Zulip Alexander Henket (Jun 19 2018 at 13:59):

@Grahame Grieve does that mean that R4 will raise an error with that change implemented, or will the current status quo remain in place (@value or child, regardless what type)

view this post on Zulip Grahame Grieve (Jun 19 2018 at 17:46):

umm i'm not sure

view this post on Zulip Ewout Kramer (Jul 02 2018 at 10:00):

The only reason the .NET validator would draw wrong conclusions here is if the FHIRPath statement is incorrect - at least as far as I can see in the code. Now, there have been some problems with ele-1 since the publication of STU3.

I have heard that we have released some tools with an older version (pre-technical update) of STU3, which had an incorrect FHIRPath statement for ele-1. Also, the current one still is incorrect (it uses a | where it really means or). @Alexander Henket: if you could give me more details about when this exactly occurs, I can probably determine the cause.

view this post on Zulip Alexander Henket (Jul 02 2018 at 10:12):

This is Simplifier validation. JIRA SD-138. @Arianne van de Wetering Do you have a full example for Ewout

view this post on Zulip Arianne van de Wetering (Jul 02 2018 at 13:48):

This is Simplifier validation. JIRA SD-138. @Arianne van de Wetering Do you have a full example for Ewout

Done, in a private message to Ewout
:wink:


Last updated: Apr 12 2022 at 19:14 UTC