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

Ordered CQL Expressions in Logic Highlighting HTML #238

Closed lmd59 closed 1 year ago

lmd59 commented 1 year ago

Which fqm-execution feature is this request related to? Logic highlighting and html generation

Describe the solution you'd like Re-order the CQL expressions into a more intuitive format. Currently, the CQL expressions are semi-arbitrarily ordered based on the ingestion of libraries as read from the measure bundle. Suggest explicitly ordering the CQL expressions, likely putting population definitions at the top. Function definitions could be at the bottom or in some other consistent logical order.

Additional context Example of current html:

Screen Shot 2023-05-17 at 10 29 44 AM

Population definitions are mixed in with other definitions, seemingly at random.

mgramigna commented 1 year ago

Just to provide another example, this is an example of what the order of expressions currently is (random):

Screen Shot 2023-05-18 at 10 44 18 AM

This feature would change it so that definitions used as measure populations are first, "helper definitions" are in the middle, and function definitions are at the bottom, like so:

Screen Shot 2023-05-18 at 10 45 30 AM

mgramigna commented 1 year ago

We have implemented this in #242. If there is concern on how this will affect users of fqm-execution, we will consider changing the re-ordering to be "opt in" rather than the default behavior