-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix handling of function without library for Equal #322
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success459 tests passing in 31 suites. Report generated by 🧪jest coverage report action from 1fc6393 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes make sense for now in order to successfully run CMS334. I think making a ticket to clean up the any return type and the propRef == null
statements is a good idea.
Looks like it just needs a rebase!
0de2ddb
to
1fc6393
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a partial fix. The actual issue that causes the crash is in the interpretFunctionRef
function. It could use an else
part to handle the situation when it is a reference to a function in the same library. It should be returning a GracefulError
like it does when the libraryName does exist and can't be determined what it does
Yeah- that was what I was trying to say about |
Summary
CMS334 https://github.com/cqframework/ecqm-content-qicore-2024/tree/main/bundles/measure/CesareanBirthFHIR has an
ELMFunctionRef
without a libraryName that gets hit byinterpretEqual
. This makesinterpretFunctionRef
return an undefined which makesisOfTypeGracefulError
choke.I would prefer to fix this by making
interpretFunctionRef
return definitive types, but it looks like everywhere else (and now ininterpretEqual
) we do a check for undefined via a lovely== null
check after it's called. So that's what we're doing here for now, but it would be nice to clean some of this up further in the future... should we add a ticket?This PR also makes
isOfTypeGracefulError
a bit more robust.New behavior
No longer breaks on CMS334.
Code changes
Testing guidance