Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vonk-5143: FP validator gets an instance of ITerminologyService to pass to FhirEvaluationContext #188

Conversation

marcovisserFurore
Copy link
Member

@marcovisserFurore marcovisserFurore commented Sep 14, 2023

The FhirPathValidator pushes the ICodeValidationTerminologyService as a ITerminologyService to the FhirEvaluationContext in order to call a validation service for memberOf.

Also the TestDataSourceDiscovery is set to DuringExecution. This ensures that the test data source is refreshed with each execution. This is needed in the case of the ValidationManifestTests.

See also PR: FirelyTeam/fhir-test-cases#39

…is requirement applies to the unit test class named ValidationManifestTests.
return (predicate(input, new EvaluationContext(node.ResourceContext), vc), null);
var context = new FhirEvaluationContext(node.ResourceContext)
{
TerminologyService = new ValidateCodeServiceToTerminologyServiceAdapter(vc.ValidateCodeService)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make TerminologyService an ICodeValidationTerminologyService maybe? We do not need more at this point - but we might later of course. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be better, but that is a breaking change in the SDK. So that's why I came up with this solution. Or do you have a cunning plan to avoid the breaking change? @ewoutkramer

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. I know that if you assign a TermSErvice to one of its subinterfaces, it will work, but indeed, for code reading the property this is a breaking change. It is in practice a breaking change, at runtime, since we're throwing in all not implemented functions, but yes, it does not formally break ;-)

So we should reconsider this for the next major version....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then I will create a SDK issue for this and we leave this PR as it is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcovisserFurore marcovisserFurore merged commit ec32d7a into develop Sep 15, 2023
2 checks passed
@marcovisserFurore marcovisserFurore deleted the feature/VONK-5143-FhirPathValidator-should-get-an-instance-of-ITerminologyService-to-pass-to-FhirEvaluationContext branch September 15, 2023 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants