-
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
Additional alias highlighting #276
Conversation
a85aca5
to
d224d73
Compare
Coverage report
Test suite run success447 tests passing in 31 suites. Report generated by 🧪jest coverage report action from 928086f |
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.
Great work on this - tested via several different methods (highlighting inspection, integration tests, unit tests, etc.) and everything looks good. Just have one small suggested change
Something we could consider in the future is refactoring the test/unit/fixtures/elm/queries
directory since we have been adding a lot of files to it recently. Could put each test case in its own subdirectory (ex. a QICoreQuery
subdirectory for the CQL and ELM used for the test). This is something we can keep in mind for end-of-sprint work, not something that needs to be addressed here
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.
The changes look good, and good call with adding the check for length 1 on the array 👍
Summary
Fixes #275
This PR fixes the highlighting issue with the
ValidEncounter
alias in the above issue. This PR does not fix the clause coverage calculation issue and highlighting forreasonCode
, that is being done in this PR in cql-execution.New behavior
Added new handling to
findAllLocalIdsInStatement
to account for aliases that are nested within queries from CQL that was authored using QICore.Code changes
ClauseResultsHelpers.ts
- added branch tofindAllLocalIdsInStatement
to handle query expressions that have a source that is an array with a single value but that value does not have a localId. In this case (that seems to occur when the CQL is authored using QICore), the alias is within thissource[0].expression.scope
. The alias localId is then going to be one less than the localId of the query statement.ClauseResultsHelpers.test.ts
- added a unit test for this new handling that uses CQL query expression authored using QICore.QICoreQuery.cql
/QICoreQuery.json
- test fixtures for the above unit testTesting guidance
npm run check
,npm run test:integration
, run regression tests (all should pass)detailed
calculation on the above issue with a measurement period start of 2024-01-01 and a measurement period end of 2024-12-31 and the debug option off.cd debug/html
).ValidEncounter
should be highlighted (again,reasonCode
will not be highlighted)ValidEncounter
should be highlighted green (reasonCode
will be highlighted red)