Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CQL Fluent Functions Overload function name #1408

Closed
SeenaFa opened this issue Aug 27, 2024 · 0 comments · Fixed by #1410
Closed

CQL Fluent Functions Overload function name #1408

SeenaFa opened this issue Aug 27, 2024 · 0 comments · Fixed by #1410
Assignees

Comments

@SeenaFa
Copy link

SeenaFa commented Aug 27, 2024

When overloading a fluent function, using the same function name but different arguments, it seems that the order in which the functions appear in the CQL library matters.

Below is an example showing how you get different results when ordering the fluent functions:

`library IssueFluentFunctions

using FHIR version '4.0.1'

context Patient

define "EobFluentFunctionError": ([ExplanationOfBenefit]).ffoverload()

define fluent function ffoverload(eob List):
eob.item.serviced.value

define fluent function ffoverload(obs List):
obs.effective.value

////////////////////////////////////////////////////////////////////////////////////

define "EobFluentFunctionError2": ([ExplanationOfBenefit]).ffoverload2()

define fluent function ffoverload2(obs List):
obs.effective.value

define fluent function ffoverload2(eob List):
eob.item.serviced.value`

The results are as follows:

Patient=Patient(id=SamplePatient1)
EobFluentFunctionError=[]
EobFluentFunctionError2=[2023-03-31]

Not sure what the expected behavior is but the expected result is that the date should be returned for both.

IssueFluentFunctions.zip

@antvaset antvaset self-assigned this Aug 29, 2024
brynrhodes pushed a commit that referenced this issue Sep 16, 2024
…esent. Raise exception if resolution is ambiguous. (#1410)

* #1408: Resolve function refs using signatures if present

* Run spotless

* Fix tests

* Fix tests

* Fix tests

* Add tests

* Add tests

* Simplify jacocoTestReport task config (#1411)

* Trigger Codecov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants