Boolean
For all boolean operators, the collections passed as operands are first evaluated as Booleans. The operators then use three-valued logic to propagate empty operands.
And
Bases: FHIRPath
A representation of the FHIRPath and
boolean logic operator.
Attributes:
Name | Type | Description |
---|---|---|
left |
FHIRPath | FHIRPathCollection
|
Left operand. |
right |
FHIRPath | FHIRPathCollection
|
Right operand. |
Source code in fhircraft/fhir/path/engine/boolean.py
evaluate(collection, create=False)
Returns True
if both operands evaluate to True
, False
if either operand evaluates to False
, and the empty collection ([]
) otherwise.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
Returns:
Name | Type | Description |
---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection |
Source code in fhircraft/fhir/path/engine/boolean.py
Implies
Bases: FHIRPath
A representation of the FHIRPath implies
boolean logic operator.
Attributes:
Name | Type | Description |
---|---|---|
left |
FHIRPath | FHIRPathCollection
|
Left operand. |
right |
FHIRPath | FHIRPathCollection
|
Right operand. |
Source code in fhircraft/fhir/path/engine/boolean.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
evaluate(collection, create=False)
If the left operand evaluates to True
, this operator returns the boolean evaluation of the right operand. If the
left operand evaluates to False
, this operator returns True
. Otherwise, this operator returns True
if the right
operand evaluates to True
, and the empty collection ([]
) otherwise.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
Returns:
Name | Type | Description |
---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection |
Source code in fhircraft/fhir/path/engine/boolean.py
Not
Bases: FHIRPathFunction
A representation of the FHIRPath not
boolean logic function.
Source code in fhircraft/fhir/path/engine/boolean.py
evaluate(collection, create=False)
Returns True
if the input collection evaluates to False
, and False
if it evaluates to True
. Otherwise, the result is empty ([]
):
Parameters:
Name | Type | Description | Default |
---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
Returns:
Name | Type | Description |
---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection |
Source code in fhircraft/fhir/path/engine/boolean.py
Or
Bases: FHIRPath
A representation of the FHIRPath or
boolean logic operator.
Attributes:
Name | Type | Description |
---|---|---|
left |
FHIRPath | FHIRPathCollection
|
Left operand. |
right |
FHIRPath | FHIRPathCollection
|
Right operand. |
Source code in fhircraft/fhir/path/engine/boolean.py
evaluate(collection, create=False)
Returns False
if both operands evaluate to False
, True
if either operand evaluates to True
, and empty ([]
) otherwise.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
Returns:
Name | Type | Description |
---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection |
Source code in fhircraft/fhir/path/engine/boolean.py
Xor
Bases: FHIRPath
A representation of the FHIRPath xor
boolean logic operator.
Attributes:
Name | Type | Description |
---|---|---|
left |
FHIRPath | FHIRPathCollection
|
Left operand. |
right |
FHIRPath | FHIRPathCollection
|
Right operand. |
Source code in fhircraft/fhir/path/engine/boolean.py
evaluate(collection, create=False)
Returns True
if exactly one of the operands evaluates to True
, False
if either both operands evaluate to True
or both operands evaluate to False
, and the empty collection ([]
) otherwise.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
Returns:
Name | Type | Description |
---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection |