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

Allow more criteria language for SDE expression detection #209

Closed elsaperelli closed 1 year ago

elsaperelli commented 1 year ago

Summary

According to Conformance Requirement 3.7, "references to expressions SHALL use the text/cql-identifier media type defined in the CQL Specification. This PR ensures that the function we have to detect supplemental data element expressions allows for the criteria.language to be either text/cql (what we are keeping), text/cql.identifier (for backwards compatibility because this is what it used to be), or text/cql-identifier (what it should be). NOTE: We don't currently use the function being modified (it is commented out in ClauseResultsBuilder.ts), but we will likely use it in the future.

New behavior

isSupplementalDataElementStatement now checks if the criteria.language is any of the three above variations. Unit tests for this function were also added to ClauseResultsHelper.test.ts.

Code changes

Testing guidance

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements
85.26% (+0.21% 🔼)
2001/2347
🟡 Branches
73.98% (+0.19% 🔼)
1774/2398
🟢 Functions
87.38% (+0.25% 🔼)
353/404
🟢 Lines
85.56% (+0.22% 🔼)
1931/2257

Test suite run success

371 tests passing in 28 suites.

Report generated by 🧪jest coverage report action from 90116e338972cffdb2d1cbb5e5063f2a897072cc