Skip to content
New issue

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

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

Already on GitHub? # to your account

Validator succeeds on invalid choice datatypes #622

Closed
mbaltus opened this issue Jun 19, 2018 · 3 comments
Closed

Validator succeeds on invalid choice datatypes #622

mbaltus opened this issue Jun 19, 2018 · 3 comments
Assignees

Comments

@mbaltus
Copy link
Member

mbaltus commented Jun 19, 2018

When you add an invalid type to the choices of a value[x] element in a profile, validating the StructureDefinition succeeds without any errors. See for example the attached profile, where I've added a Reference type to the Questionnaire.item.option.value[x].

MyQuestionnaire.StructureDefinition.txt

@ewoutkramer ewoutkramer added the bug label Jul 3, 2018
@ewoutkramer
Copy link
Member

This should be fixed in the 1.0 release, but it's worth verifying before I close the issue.

@ewoutkramer
Copy link
Member

I am only now reading this thoroughly, this is not about an instance conforming to a structuredefinition, this is about the fact that when you create a structuredefinition, you can use datatypes in value[x] that are not in the base for that structuredefinition.

That's right, the validator does not catch that: there simply isn't any computable rule in the FHIR spec that specifies this behaviour (e.g. using FhirPath as an invariant). It would probably will have to be hand-coded into the validator.

@mmsmits
Copy link
Member

mmsmits commented Aug 12, 2021

Authoring tools should be responsible for validating this, this is too complicated for the profile validator at that point.

@mmsmits mmsmits closed this as completed Aug 12, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants