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

Functions count, empty, exits incorrect for empty collections. #2149

Open
piotrszul opened this issue Feb 20, 2025 · 0 comments · Fixed by #2208
Open

Functions count, empty, exits incorrect for empty collections. #2149

piotrszul opened this issue Feb 20, 2025 · 0 comments · Fixed by #2208
Labels
bug Something isn't working fhirpath Related to fhirpath reference implementation
Milestone

Comments

@piotrszul
Copy link
Collaborator

count(), empty() and exists() return {} for explicit empty collections while they should return 0, true and false respecttively.

(Existence exclusions)

Details

Expected: false but got: null ==> expected: <false> but was: <null>

  • Functions.nothing.exists() [** exists for undefined coll should return false]
  • Functions.nothing.attr.exists($this < 0) [** exists with criteria should work for not exists coll ]

Expected: true but got: null ==> expected: <true> but was: <null>

  • Functions.nothing.empty() [** empty nothing]

Details

Expected: 0 but got: null ==> expected: <0> but was: <null>

  • Functions.ups.count() [** 0 if nothing]
@piotrszul piotrszul added bug Something isn't working fhirpath Related to fhirpath reference implementation labels Feb 20, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Pathling Feb 24, 2025
@johngrimes johngrimes added this to the v8.0.0 milestone Feb 24, 2025
@johngrimes johngrimes moved this from Backlog to Planned in Pathling Feb 24, 2025
@piotrszul piotrszul moved this from Planned to In progress in Pathling Mar 5, 2025
@piotrszul piotrszul moved this from In progress to Done in Pathling Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fhirpath Related to fhirpath reference implementation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants