FH04 — Array element into a scalar column
Group: Selector (schema-driven) · Severity: warning · Needs: lint --package
A scalar column’s selector reaches an array-valued element — either by landing
on it (name) or by navigating through it (name.family, which is a collection
across all names) — without narrowing it to one item. A scalar column expects a
single value; an un-narrowed collection is flagged.
Example
Section titled “Example”name is an array on Patient; both of these trigger FH04 in a scalar column:
{ "resource": "Patient", "select": [{ "column": [ { "name": "n", "path": "name" }, { "name": "f", "path": "name.family" } ] }]}warning [FH04] (f): navigates into an array element without narrowing; theresult is a collection (use first()/where()/an index, or mark the column collection)Narrow the collection with first(), where(...), or an index
(name.first().family, name[0].family), or set "collection": true on the
column to keep the array.