Skip to content

Math operators incorrect when an argument is empty #2174

Open
@piotrszul

Description

@piotrszul

For math operators if any of the argument is empty the result should be empty.

operator fails when right argument is empty - Math 6 exclusions

Details

No value present

  • n1 * n4 [** Empty result multiplying empty collection (1)]
  • n1 * i [** Empty result when one of the operands is null]
  • n1 / i [** Empty result when one of the operands is null]
  • n1 + i [** Empty result when one of the operands is null]
  • n1 - i [** Empty result when one of the operands is null]
  • n1 mod i [** Empty result when one of the operands is null]

'-' operator incorrect when right argument is empty - Math 6 exclusions

Details

No value present

  • n1 - n4 [** Empty result when one of the operands is empty]

'+' should produce {} if any argument is empty - Math 6 exclusions

Details

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

  • s5 + n4 [** Empty result if one or both operands is empty (1b)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfhirpathRelated to fhirpath reference implementation

    Type

    Projects

    Status

    Planned

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions