Skip to content

When adding an empty additional-binding extension to a binding element the validator does not report the missing mandatory elements #544

@Rob5045

Description

@Rob5045

Consider the following (empty) additional binding extension:

<binding>
  <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding"/>
  <strength value="preferred"/>
</binding>

The legacy validator reports the 2 required missing fields:

Message  : Instance count for 'Extension.extension:purpose' is 0, which is not within the specified cardinality of 1..1
Context  : StructureDefinition.differential[0].element[0].binding[0].extension[0]

Message  : Instance count for 'Extension.extension:valueSet' is 0, which is not within the specified cardinality of 1..1
Context  : StructureDefinition.differential[0].element[0].binding[0].extension[0]

However the Firely validator does not.
When the additional binding extension is not empty then the Firely validator does report the 2 required fields.

<binding>
  <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
     <extension url="documentation">
       <valueMarkdown value="Test"/>
    </extension>
  </extension>
  <strength value="preferred"/>
</binding>

Message  : Instance count is 0, which is not within the specified cardinality of 1..1 (for slice purpose)
Context  : StructureDefinition.differential[0].element[0].binding[0].extension[0].extension

Message  : Instance count is 0, which is not within the specified cardinality of 1..1 (for slice valueSet)
Context  : StructureDefinition.differential[0].element[0].binding[0].extension[0].extension

This issue may apply in general to extensions with mandatory fields but I have not checked that.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions