cqframework / clinical_quality_language

Clinical Quality Language (CQL) is an HL7 specification for the expression of clinical knowledge that can be used within both the Clinical Decision Support (CDS) and Clinical Quality Measurement (CQM) domains. This repository contains complementary tooling in support of that specification.
https://confluence.hl7.org/display/CDS/Clinical+Quality+Language
Apache License 2.0
267 stars 123 forks source link

DataRequirementProcessor does not account for overloaded CQL functions while gathering the DataRequirements #1366

Open adongare opened 5 months ago

adongare commented 5 months ago

DataRequirementProcessor provides a config option named collapseDataRequirements to remove duplicates. However, it appears that while removing the duplicates, it doesn't consider the overloaded functions. Here's the piece of code that does the filtering https://github.com/cqframework/clinical_quality_language/blob/5d9ccd6b0c0e7ffc0604c50473651f934ff916c7/Src/java/elm-fhir/src/main/java/org/cqframework/cql/elm/requirements/ElmRequirements.java#L247

This makes effectiveDataRequirements incomplete. Also, effectiveDataRequirements are used to generate the Human readable in liquid templates, it misses out a bunch of overloaded functions. Could someone please take a look at this or provide any suggestions?

cc: @JSRankins