Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator incorrectly signals element containing just an extension as error #625

Closed
mbaltus opened this issue Jun 25, 2018 · 4 comments
Closed
Labels

Comments

@mbaltus
Copy link
Member

mbaltus commented Jun 25, 2018

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.

See also discussion on Zulip: https://chat.fhir.org/#narrow/stream/4-implementers/subject/value.20or.20child.20or.20Null.3F

@ahenket
Copy link

ahenket commented Jun 27, 2018

Another example would be a masked identifier:

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

or a positive infinity value in a range:

  <valueRange>
      <low>
          <value value="1"/>
      </low>
      <high>
          <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor">
              <valueCode value="PINF"/>
          </extension>
      </high>
  </valueRange>

@ewoutkramer
Copy link
Member

This is a bit confusing to me, since the error that @ahenket reported is about the validator returning "No code found in instance" in these cases, not "an element SHALL have a @value or a child element" (which comes from invariant ele-1).

@ewoutkramer
Copy link
Member

So, I have probably created a duplicate here (#632)

@ewoutkramer
Copy link
Member

I cannot reproduce @mbaltus behaviour, but I can totally reprodue the "no code found in instance" (#632). I will mark this as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants