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

DataRequirements flattened relatedArtifact list #215

Closed hossenlopp closed 1 year ago

hossenlopp commented 1 year ago

Summary

Adds a combined/flattened version of all relatedArtifact lists in a measure bundle to the measure data-requirements output.

New behavior

Combines all relatedArtifact objects in a measure bundle's Measure and Library resources into one list, makes the list unique and puts the resulting list on the relatedArtifact property of the the data-requirements output.

Code changes

src/helpers/DataRequirementHelpers.ts - New helper function getFlattenedRelatedArtifacts that compiles the flat list of relatedArtifacts. src/calculation/Calculator.ts - Calls new helper function to get the list assembled and adds it to the dataRequirements output.

Testing guidance

Run unit tests. Run data-requirements on a measure bundle and spot check that elements in the relatedArtifacts attributes on Measure and Library resources are ending up in the relatedArtifacts attribute in the resulting data-requirements output.

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟒 Statements
85.42% (+0.17% πŸ”Ό)
2022/2367
🟑 Branches
73.99% (+0.09% πŸ”Ό)
1801/2434
🟒 Functions
87.5% (+0.16% πŸ”Ό)
357/408
🟒 Lines
85.73% (+0.16% πŸ”Ό)
1952/2277
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------- | :------------------------------------------------------------ | :------------------------------------------------------------- | :---------------------------------------------------------- | :------------------------------------------------------------- | | 🟒 |
`...` / DataRequirementHelpers.ts
|
84.78% (+2.28% πŸ”Ό)
|
80.42% (-1.08% πŸ”»)
|
78.57% (+3.57% πŸ”Ό)
|
85.47% (+2.14% πŸ”Ό)
|

Test suite run success

379 tests passing in 29 suites.

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