Closed sarahmcdougall closed 1 year ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Statements | 85.01% | 1990/2341 |
🟡 | Branches | 73.68% | 1755/2382 |
🟢 | Functions | 87.1% | 351/403 |
🟢 | Lines | 85.3% | 1920/2251 |
364 tests passing in 28 suites.
Report generated by 🧪jest coverage report action from ed98ccfd84a28e818ce69d607e14b4e2ad4a546c
Summary
Adds more detailed error throwing in
Execution.ts
in the sense that it is more clear when the error came from the underlyingcql-execution
engine.New behavior
When the user encounters an issue from
cql-execution
, the error message and stack fromcql-execution
will be thrown (as was the case before) and the error message will explicitly state that the error came fromcql-execution
.Code changes
All changes occur in
Execution.ts
. If an error is thrown from theexecutor
, it will be caught and the error message will be amended to include a blurb about the error occurring incql-execution
. That original error is thrown (throwing a whole new error results in thefqm-execution
stack trace being included instead of thecql-execution
stack trace).Testing Guidance
No unit tests exist for
Execution.ts
, so testing should be done via the CLI.Test with patient/measure bundles that should result in a
cql-execution
issue and check that the resulting error message includes “The following error occurred in the cql-execution engine” and that the error stack points to where the issue occurred incql-execution
.Example test case: Test with the
HospitalHarmHyperglycemiainHospitalizedPatientsFHIR
measure and patient bundles in theecqm-content-r4-2021
repository. These bundles have issues with date formatting, and so you should get an error frominterval.ts
(“List of intervals contains mismatched types”).