Skip to content

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

Open
@piotrszul

Description

@piotrszul

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfhirpathRelated to fhirpath reference implementation

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions