Improve Handling of ElementDefinition.binding without valueSet #1313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'sbindVS
was called with a nullvalueSet
, it would throw an error. Similarly, when processing implied extensions, it was assumed that eithervalueSet
,valueSetUri
, orvalueSetReference
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