pathling icon indicating copy to clipboard operation
pathling copied to clipboard

Support for Boolean evaluation of collections

Open piotrszul opened this issue 9 months ago • 0 comments

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]

piotrszul avatar Feb 24 '25 01:02 piotrszul