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

Unfold choice type slices when no unfolded elements match #1373

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

jafeltra
Copy link
Collaborator

Fixes #1337

This PR fixes a bug where if the choice type was referenced by slice name (i.e. valueString) but there were other non-slice elements that could be unfolded, SUSHI would fail to ever unfold and find the choice type. This PR adds another place where choice type elements are unfolded so that all elements can be considered when finding a provided path.

I ran a regression on all repos from the last year and there were not changes and no significant differences in processing time. That said, if anyone doesn't think this is the right approach to resolving this issue, let me know!

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.

Looks good, thank you!

Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

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

The code looks good. I'm glad it didn't end up being too tricky to implement!

I tried it on my example project that originally produced the error. No more error and the output is as expected. Great!

@cmoesel cmoesel merged commit c651b1a into master Oct 16, 2023
14 checks passed
@cmoesel cmoesel deleted the cimpl-1162-unfold-more-choice-types branch October 16, 2023 15:24
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.

SUSHI fails to resolve IPS MedicationStatement.effectivePeriod path in an instance
3 participants