Skip to content

Using Constraint Expressions in Firely SDK #1736

Answered by ewoutkramer
vivektk84 asked this question in Q&A
Discussion options

You must be logged in to vote

The fhirpath evaluator you would need to evalutate the constraints needs an ITypedElement, which requires more processing than just using ISourceNode, but can be used as input to parsing it to a POCO.

So, you'd call .ToTypedElement() on the source node, and then run the extension method .Select() (Hl7.Fhir.FhirPath, namespace Hl7.Fhir.FhirPath) on it, passing it the fhirpath of the constraint. Those methods have a small cache, so calling it multiple times with the same expression will get the compiled fhirpath statement from a cache to speed up processing.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@marcovisserFurore
Comment options

@vivektk84
Comment options

@ewoutkramer
Comment options

@vivektk84
Comment options

@ewoutkramer
Comment options

Answer selected by vivektk84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants