Closed mgramigna closed 1 year ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 86.32% (+0.07% πΌ) |
2271/2631 |
π‘ | Branches | 75.5% (+0.11% πΌ) |
2099/2780 |
π’ | Functions | 89.43% (+0.02% πΌ) |
423/473 |
π’ | Lines | 86.64% (+0.07% πΌ) |
2191/2529 |
426 tests passing in 31 suites.
Report generated by π§ͺjest coverage report action from f974cc46863295f06eafc8394a394c0d2787b878
Summary
Fixes #254
Specifically, fixes the following cases:
These two cases are from the same root issue, where the ELM annotation is using a
localId
that never appears in the actual expression, but is 1 less than thelocalId
that actually does appear in the expression. We already have some handling for this in ClauseResultsHelper, but this branch of logic only handles if the.scope
attribute is present on the statement and is itself a reference to the original alias.In QI-Core authored measures, the way that alias references show up can be different:
Note the presence of
.source
which actually contains the scope. Importantly, for both of these examples, thelocalId
used in the annotation for this alias is actually8
:This PR adds the same "subtract by one logic" to the recursive function that grabs all the localIds and ensures that ELM of the above format maps the use of that off-by-one
localId
on to the original alias in the CQL when defined.New behavior
Fixes highlighting of aliases in the above cases:
master
This PR
master
This PR
Code changes
parseInt
Testing guidance
Attached is the measure bundles used to generate the above screenshots, with the patients. Instructions to run it and replicate are in
DESCRIPTION.md
. In all cases, look atdebug/html/clause-coverage-*.html
to view the highlighting.If you can think of any other alias highlighting cases that are broken on
master
that you believe aren't covered by this PR, we can work to create a test case for it. These are the only two I was able to find.coverage-aliases.tar.gz