projecttacoma / fqm-execution

fqm-execution is a library that allows users to calculate FHIR-based electronic Clinical Quality Measures (eCQMs) and retrieve the results in a variety of formats
https://projecttacoma.github.io/fqm-execution/
Apache License 2.0
18 stars 6 forks source link

Clause coverage highlighting for multiple groups #170

Closed elsaperelli closed 1 year ago

elsaperelli commented 1 year ago

Summary

Before, the coverage highlighting only happened for one measure group. Now, it calculates the coverage for all patients for each individual group.

New behavior

generateClauseCoverageHTML now returns a lookup object where the key is the groupId and the value is the clause coverage html for that group. There is an additional property on the CalculationOutput interface for groupClauseCoverageHTML.

Code changes

Testing guidance

  1. npm run check to ensure that unit tests pass and there are no prettier or lint errors/warnings.
  2. Using the files attached below, run the following command: npm run cli -- detailed -m <path-to-measure-bundle.json> -p <path-to-pt1.json> <path-to-pt2.json> -o --debug
  3. Look at the html files in the debug directory. There should be 4 files: two for each group that includes that group's clause coverage and two for each group that includes that group's measure highlighting.
  4. Let me know if you have any questions and more importantly if you have any suggestions for additional unit tests or testing methods.

coverage-test-case.zip

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟒 Statements
85.71% (-0.08% πŸ”»)
1938/2261
🟑 Branches
73.75% (-0.13% πŸ”»)
1711/2320
🟒 Functions
88.72% (-0.23% πŸ”»)
346/390
🟒 Lines
85.96% (-0.07% πŸ”»)
1868/2173
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------- | :------------------------------------------------------------- | :------------------------------------------------------------- | :------------------------------------------------------------- | :------------------------------------------------------------- | | 🟒 |
`...` / HTMLBuilder.ts
|
92.66% (-1.78% πŸ”»)
|
67.57% (-8.29% πŸ”»)
|
88.24% (-2.67% πŸ”»)
|
92.71% (-1.92% πŸ”»)
|

Test suite run success

349 tests passing in 28 suites.

Report generated by πŸ§ͺjest coverage report action from ccdb05a13c41a2518fcc053464371a63ed6aba61