Navigation
The tree navigation module contains the object representations of the tree-navigation category FHIRPath functions.
Children
Bases: FHIRPathFunction
Representation of the FHIRPath children() function.
Source code in fhircraft/fhir/path/engine/navigation.py
evaluate(collection, environment, create=False)
Returns a collection with all immediate child nodes of all items in the input collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
environment
|
dict
|
The environment context for the evaluation. |
required |
create
|
bool
|
Whether to create new elements during evaluation if necessary. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection. |
Source code in fhircraft/fhir/path/engine/navigation.py
Descendants
Bases: FHIRPathFunction
Representation of the FHIRPath descendants() function.
Source code in fhircraft/fhir/path/engine/navigation.py
evaluate(collection, environment, create=False)
Returns a collection with all descendant nodes of all items in the input collection. The result does not include the nodes in the input collection themselves.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collection
|
FHIRPathCollection
|
The input collection. |
required |
environment
|
dict
|
The environment context for the evaluation. |
required |
create
|
bool
|
Whether to create new elements during evaluation if necessary. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
FHIRPathCollection |
FHIRPathCollection
|
The output collection. |
Note
This function is a shorthand for repeat(children()).