Closed mcmcphillips closed 1 year ago
Attached is the JSON. patientBundle.txt
@JSRankins, @mcmcphillips Thank you for bringing this to our attention. @elsaperelli and I traced this error back to an issue in cql-execution that caused calculation to fail when collapsing a null
interval.
From AHAOverall.cql Library:
when Event is MedicationRequest then
First( ( collapse (Event.dosageInstruction.timing.repeat.bounds DoseTime
return DoseTime.toInterval()) ) DrugPeriods
sort by start of $this ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
The MedicationRequests included in the Patient Bundle do not have values for dosageInstruction.timing.repeat.bounds[x]
, so DoseTime.toInterval()
was evaluating to null
. Cql-execution's interpretation of collapse
had a small logic issue that caused the argument of the collapse
function to be iterated over before checking if it was null hence the intervals is not iterable
message. We submitted the above PR to cql-execution, and were able to successfully run calculation with your bundles after these changes.
This has been fixed and published to npm in cql-execution
v3.0.0-beta.5
and fqm-execution
v1.1.0
.
Summary
When running FQM execution with the provided measure bundle and patient bundle, an error is thrown specifying an iterable. Elm for supporting libraries does not appear to have any issues.
` error occurred in FQM-Execution TypeError: The following error occurred in the cql-execution engine: intervals is not iterable
o`
Expected Behavior
FQM-Execution Calculate.calculate runs without error
Version or Commit
Inputs (e.g. Measure Bundle, Patient Bundle, CQL Library)
measure bundle ATM-v0.0.000-FHIR.txt patient bundle patientBundle.txt
Relevant Calculation Options (e.g. Measurement Period, meta.profile Validation)
cql-to-elm Version Used for Measure Logic Translation (if known)
Any Additional Info
@mgramigna