Skip to content

Support for Boolean evaluation of collections #2166

@piotrszul

Description

@piotrszul

As per FHIRpath specification for boolean evaluation of collections including empty collections.

Simple exclusions

Details

java.lang.RuntimeException: Expected boolean result

  • Patient.name.exists(given) [null]

FHIR R4 Exclusions

Details

au.csiro.pathling.errors.InvalidUserInputError: Left operand to and operator must be Boolean

  • ({} and true).empty() [** testBooleanLogicAnd7]
  • ({} and false) = false [** testBooleanLogicAnd8]
  • ({} and {}).empty() [** testBooleanLogicAnd9]

au.csiro.pathling.errors.InvalidUserInputError: Left operand to implies operator must be Boolean

  • ({} implies true) = true [** testBooleanImplies7]
  • ({} implies false).empty() [** testBooleanImplies8]
  • ({} implies {}).empty() [** testBooleanImplies9]

au.csiro.pathling.errors.InvalidUserInputError: Left operand to or operator must be Boolean

  • ({} or true) = true [** testBooleanLogicOr7]
  • ({} or false).empty() [** testBooleanLogicOr8]
  • ({} or {}).empty() [** testBooleanLogicOr9]

au.csiro.pathling.errors.InvalidUserInputError: Left operand to xor operator must be Boolean

  • ({} xor true).empty() [** testBooleanLogicXOr7]
  • ({} xor false).empty() [** testBooleanLogicXOr8]
  • ({} xor {}).empty() [** testBooleanLogicXOr9]

au.csiro.pathling.errors.InvalidUserInputError: Right operand to and operator must be Boolean

  • (true and {}).empty() [** testBooleanLogicAnd3]
  • (false and {}) = false [** testBooleanLogicAnd6]

au.csiro.pathling.errors.InvalidUserInputError: Right operand to implies operator must be Boolean

  • (true implies {}).empty() [** testBooleanImplies3]
  • (false implies {}) = true [** testBooleanImplies6]

au.csiro.pathling.errors.InvalidUserInputError: Right operand to or operator must be Boolean

  • (true or {}) = true [** testBooleanLogicOr3]
  • (false or {}).empty() [** testBooleanLogicOr6]

au.csiro.pathling.errors.InvalidUserInputError: Right operand to xor operator must be Boolean

  • (true xor {}).empty() [** testBooleanLogicXOr3]
  • (false xor {}).empty() [** testBooleanLogicXOr6]

java.lang.IllegalArgumentException: argument type mismatch

  • (1).not() = false [** testIntegerBooleanNotFalse]

java.lang.RuntimeException: Error invoking method-defined function

  • iif({}, true, false) [** testCollectionBoolean2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    fhirpathRelated to fhirpath reference implementationnew featureNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions