Column naming
For projections the key
in the projection determines the name of the node, and thus of column in the
resulting table.
For FHIRpath field paths, however the name must be calculated:
The logic here is to use the most specific node name, optionally followed by an index
from Patient
select
id,
name.given[0],
name.family
will result in the columns:
id | given0 | family |
Multiple values
Due to the nature of FHIRPath and the underlying formats (XMl/JSON), If a row
has multiple nodes
with the same name, they will form an array together. So, the following query, will only have column, which contains an array with two values:
from Patient
select
id,
id: name.given
Rendering
A tool that renders a table for these kinds of values, has no obligation to render those values. You can leave the field empty or display a list values, or even a grid.