Even if this isn't the correct place, I wanted to post this for anyone that has issues getting the resolve() function to work with FhirPath. (Note, I've only tested this with STU3 and R4)
By default, the FhirPathCompiler only uses the standard FhirPath functions by invoking the AddStandardFP extension on the SymbolTable. To use the resolve(), hasValue(), memberOf(), and htmlchecks functions, the AddFhirExtensions() extension method must be called against the symbol table and passed to the FhirPathCompiler.
What this means for this project is that 3 changes need to be made (note I only looked at the WPF project):
In the CustomFluentPathFunctions, the call _st = new SymbolTable().AddStandardFP(); needs to be changed to _st = new SymbolTable().AddStandardFP().AddFhirExtensions();
In MainWindow.ButtonGo_Click a ScopedNode needs to be passed into the CompiledExpression. The resolve() function can only be used against a ScopedNode. This means that after creating a ScopedNode instance to wrap the ITypedExpression, the node must be passed into the CompiledExpression.
prepopulatedValues = xps(inputNav, evalContext);
becomes
ScopedNode node = new ScopedNode(inputNav);
prepopulatedValues = xps(node, evalContext);
The FhirPathProcessor.ProcessPrepopulatedValues needs to be modified to hande the ScopedNode. Instead of using ToFhirValues, use the ToPoco extension off of the ScopedNode (ITypedElement).
Feel free to ask me any questions regarding FhirPath or its implementation.
It's not supported as there is no way to setup a source server to resolve the content from.
(Though I guess could at least resolve within a contained resource/bundle)
Even if this isn't the correct place, I wanted to post this for anyone that has issues getting the resolve() function to work with FhirPath. (Note, I've only tested this with STU3 and R4)
By default, the FhirPathCompiler only uses the standard FhirPath functions by invoking the AddStandardFP extension on the SymbolTable. To use the resolve(), hasValue(), memberOf(), and htmlchecks functions, the AddFhirExtensions() extension method must be called against the symbol table and passed to the FhirPathCompiler.
What this means for this project is that 3 changes need to be made (note I only looked at the WPF project):
Feel free to ask me any questions regarding FhirPath or its implementation.