FHIRPath: Unknown Function
The expression calls a function the evaluator does not recognize. Either the name is misspelled or the function is not supported.
FHIRPath · Error
The error
Unknown functionWhy it happens
A typo (whre instead of where), wrong casing (FHIRPath functions are lowerCamelCase), or assuming a SQL or JavaScript function exists in FHIRPath.
How to fix it
Use a supported FHIRPath function with correct casing. Common ones include where(), select(), exists(), first(), count(), substring(), startsWith(), matches(), and iif(). Check the spelling against the FHIRPath spec.
Example
The snippet below triggers the error:
Patient.name.filter(use = 'official')The corrected version:
Patient.name.where(use = 'official')Frequently asked questions
How do I filter a collection in FHIRPath?
Use where(criteria), not filter(). For example Patient.telecom.where(system = 'phone'). To project values use select(). filter() is a JavaScript array method, not a FHIRPath function.