Skip to content

FH11 — FHIRPath outside the Shareable subset

Group: Portability · Severity: error / warning · Opt-in: lint --shareable

The ShareableViewDefinition profile requires runners to implement only a minimal FHIRPath subset, so a view that stays inside it runs unchanged on any conformant engine. FH11 walks every FHIRPath expression in the view (columns, forEach, forEachOrNull, repeat, where) and flags anything outside that subset. It is opt-in via lint --shareable and needs no FHIR package.

  • Functions: where, exists, empty, extension, ofType, first (plus the SQL-on-FHIR getResourceKey / getReferenceKey).
  • Operators: boolean and / or / not; math + - * /; comparisons = != > <=; the indexer [].
  • Literals: String, Integer, Decimal, Boolean.

join, lowBoundary, highBoundary are experimental — slated for the subset but not yet normative — and produce a warning. Long (L-suffixed) literals also warn. Everything else (other functions/operators, |, is/as, <, >=, in, contains, mod, date/time and quantity literals, …) is an error.

{
"resource": "Patient",
"select": [{ "column": [{ "name": "x", "path": "name.given.substring(0, 1)" }] }]
}
error [FH11] (x): `substring()` is not in the Shareable required FHIRPath subset

Rewrite the expression using only subset functions and operators. To exempt an engine-registered custom function so the strict pass does not hard-fail it, pass --allow-fn <name> (repeatable). Simply omit --shareable to skip the check entirely. See Linting.