Stream: hapi
Topic: Validation - Reject resource if no meta.profile
Jose Costa Teixeira (Jun 11 2020 at 13:48):
Andreas said:
Hi, we are implementing validation on our FHIR-server with HAPI, and are using the RequestValidatingInterceptor with a ValidationSupportChain consisting of DefaultProfileValidationSupport, PrePopulatedValidationSupport, InMemoryTerminologyServerValidationSupport. We have loaded our own StructureDefinitions into the PrePopulatedValidationSupport and want to only validate against these. This works if the resource contains a profile-url in meta.profile. But if the client does not provide a meta.profile-url, they can get around validating against our provided StructureDefinitions.
Is it possible with HAPI (or the validator) to reject any resource that does not conform to our provided StructureDefinitions?
yes, I believe this is possible in hapi, not sure if we've done it in Belgium already - @Tom De Keyser @Axel Magdelijns ?
Jens Villadsen (Jun 11 2020 at 14:00):
That can be done in HAPI by extending the FhirInstanceValidator and overriding the validate
with subsequent calls to the super method
Tom De Keyser (Jun 17 2020 at 08:36):
We have experimented with doing this in the past, and we implemented a rule outside of HAPI that simply checked the incoming profile. I'm curious to try out the suggestion of @Jens Villadsen .
Jens Villadsen (Jun 17 2020 at 08:42):
it works like a charm ;)
Last updated: Apr 12 2022 at 19:14 UTC