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

Improve Handling of ElementDefinition.binding without valueSet #1313

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

cmoesel
Copy link
Member

@cmoesel cmoesel commented Jul 25, 2023

This PR improves handling of element definition bindings that don't have a specified value set. Due to assumptions in the code, if the ElementDefinition class's bindVS was called with a null valueSet, it would throw an error. Similarly, when processing implied extensions, it was assumed that either valueSet, valueSetUri, or valueSetReference would exist. Now we defensively check against null value sets and allow bindings to set just a strength (since FHIR has bindings like this).

You can test using the example in #1312 or by checking out just the first commit in this PR (e07cc4a) that includes just the tests without the fix. After verifying the bug, you can verify the solution by running the tests again with the solution commit (53bfe45).

Fixes #1312 and CIMPL-1146

@cmoesel cmoesel marked this pull request as ready for review July 25, 2023 20:41
Copy link
Collaborator

@mint-thompson mint-thompson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hooray for bindings without value sets! thank you!

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me! I also tested out the example in the issue on each commit, and they both worked as expected.

@cmoesel cmoesel merged commit 5a4976b into master Jul 26, 2023
14 checks passed
@cmoesel cmoesel deleted the implied-ext-binding-bug branch July 26, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected error when applying implied extension with a binding, but no value set
3 participants