-
Notifications
You must be signed in to change notification settings - Fork 2
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
…is requirement applies to the unit test class named ValidationManifestTests.
…Path van validate codes with valuesets.
return (predicate(input, new EvaluationContext(node.ResourceContext), vc), null); | ||
var context = new FhirEvaluationContext(node.ResourceContext) | ||
{ | ||
TerminologyService = new ValidateCodeServiceToTerminologyServiceAdapter(vc.ValidateCodeService) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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....
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See issue FirelyTeam/firely-net-sdk#2590
The
FhirPathValidator
pushes theICodeValidationTerminologyService
as aITerminologyService
to theFhirEvaluationContext
in order to call a validation service formemberOf
.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 theValidationManifestTests
.See also PR: FirelyTeam/fhir-test-cases#39