FH07 — More than one iteration construct per select
Group: Structure · Severity: error · Run by: validate and lint
The SQL-on-FHIR v2 sql-expressions invariant allows at most one of
forEach, forEachOrNull or repeat on a single select. Combining them is
ambiguous and is rejected.
Example
Section titled “Example”This select uses both forEach and repeat — FH07:
{ "resource": "Patient", "select": [{ "forEach": "name", "repeat": ["link"], "column": [{ "name": "id", "path": "id" }] }]}error [FH07]: a select may use at most one of forEach, forEachOrNull or repeatKeep one iteration construct per select; nest a child select if you need a
second level of iteration.