Skip to content

FhirPath Expression without a PocoNode #3390

@darena-antonw

Description

@darena-antonw

Is your feature request related to a problem? Please describe.
given an expression like: @2020-01-01 - 365 days previously it was possible to:

var fpCompiler = new FhirPathCompiler(
        new SymbolTable()
            .AddStandardFP()
            .AddFhirExtensions()
    );
var exp = fpCompiler.Compile("@2020-01-01 - 365 days");
var res = exp(null!, new EvaluationContext()).FirstOrDefault();

but with newer versions, you get an exception that the node parameter is null. Not sure where exactly the change was made.

Describe the solution you'd like
I want to call the compiled expression with null

or

provider a different method or Compile overload that will return a different delegate that doesn't need a node.

Describe alternatives you've considered
supplying something like exp(new Patient().ToPocoNode(), new EvaluationContext()) works, but not ideal.

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions