Stream: dotnet
Topic: Has the FhirPath implementation changed?
Richard Kavanagh (Sep 12 2017 at 22:58):
I have just updated my Nuget package for a project I have been working on for a while. The current packages are :
Within the code I evaluate FhirPath expression (using code directly from https://github.com/brianpos/FhirPathTester.). The code no longer builds though I am not sure why. Anyone point me in the right direction.
FhirPathCompiler _compiler = new FhirPathCompiler(); CompiledExpression xps = _compiler.Compile("Bundle.repeat(children())"); var inputNav = new PocoNavigator(_reource); var prepopulatedValues = xps(inputNav, inputNav);
The error encountered is : Argument 2: cannot convert from 'Hl7.Fhir.ElementModel.PocoNavigator' to 'Hl7.FhirPath.EvaluationContext' on the last line of code.
thanks
Brian Postlethwaite (Sep 13 2017 at 00:10):
I'll have to update it to the newest versions
Brian Postlethwaite (Sep 13 2017 at 00:11):
Some of the namespaces slightly changed, and the compile parameters changed (to help fix a static)
Ewout Kramer (Sep 13 2017 at 07:53):
Yes, it has changed. Changing
var prepopulatedValues = xps(inputNav, inputNav);
into
var prepopulatedValues = xps(inputNav, new EvaluationContext(inputNav))
would fix it. I thought I had [Obsolete] on everything, but I'll check.
Brian Postlethwaite (Sep 14 2017 at 03:55):
I think it does.
Last updated: Apr 12 2022 at 19:14 UTC