cqframework / cqf-us

Common Assets for use in US-based CQFramework content implementation guides
Apache License 2.0
3 stars 2 forks source link

Issue with a observation in resulted fluent function #12

Open alexisc0le opened 7 months ago

alexisc0le commented 7 months ago

Describe the bug In USCoreCommons we tried to put all of the observations into a list of choices so that we only need one resulted fluent function. Then in USCoreElements we created definitions that called the observation.resulted() and returned that one observation rather than the whole list. I have tested majority of them and had no problems except for with “observation-bodyheight” (the definition using resulted is “All Body Height Measurements”). I have tried moving the placement of bodyweight in the function to be the first in the list and the last in the list and gotten a null response. The only way I can get the definition to work is by having a separate fluent function for just “observation-bodyheight”.

To Reproduce (I have outlined the issue on this branch- https://github.com/cqframework/cqf-us/tree/2024-Updates-Debugging)

  1. In input/cql/USCoreCommon- comment out the resulted fluent function for bodyheight (lines 411-415) add “observation-bodyheight” to the list of choice for the fluent function resulted (line 378)
  2. In input/cql/USCoreElements- comment out the first “All Body Height Measurements” definition (line 379-380) and uncomment the second “All Body Height Measurements” (lines 382-384 )
  3. In input/cql/MBODAInitialExpressions- execute CQL

Expected Behaviour The expectation is that we will get a value for the each test patients height. However it is currently responding null.