FHIR Chat · Differences with STU3 and R4 profile validation · hapi

Stream: hapi

Topic: Differences with STU3 and R4 profile validation


view this post on Zulip Juuso Oksanen (Oct 11 2019 at 13:55):

Hi.

I've been creating an R4-endpoint for our resource server and I noticed while testing profile validation that the R4 version (and R5 version it would seem) of the IWorkerContext.ValidationResult isOk-method has been changed.

In DSTU3 this method would check if the ValidationResults ConceptDefinitionComponent was not null.
In R4 this method checks if the IssueSeverity of ValidationResult is either null, Information or Warning.

This would give us different error responses in stu3 and r4 endpoints while validating ValueSets with codes from not present code systems (for example LOINC).

In DSTU3 a code system not being present would result in a ValidationResult with isOk returning false.
In R4 a code system not being present would result in a ValidationResult with isOk returning true.

Is this an intended change? And if it is, can you tell why?

I'm pretty new to HAPI so bear with me here.

view this post on Zulip Grahame Grieve (Oct 11 2019 at 16:36):

I believe I changed that. And I changed it because validation tests were failing. However... the only validation infrastructure I support is the R5 infrastructure, which will validate R2-R5. Have you looked at that?

view this post on Zulip Eeva Turkka (Oct 14 2019 at 07:47):

This is probably more of an Hapi question, we are currently looking at supporting both STU3 and R4, why we noticed this difference. It seems that depending on the FHIRContext we have (FhirContext.forDstu3() for example) it seems to pick the corresponding InstanceValidator. Should we use Hapi in different way to have only R5 validation?

view this post on Zulip Grahame Grieve (Oct 14 2019 at 08:24):

that's a question for @James Agnew.

view this post on Zulip Juuso Oksanen (Oct 14 2019 at 09:10):

This is probably more of an Hapi question, we are currently looking at supporting both STU3 and R4, why we noticed this difference. It seems that depending on the FHIRContext we have (FhirContext.forDstu3() for example) it seems to pick the corresponding InstanceValidator. Should we use Hapi in different way to have only R5 validation?

The R5-version of InstanceValidator is being used in both STU3 and R4 endpoints. This is because the InstanceValidator is wrapped by FhirInstanceValidator which we have registered as a validator module in the FhirValidator, correct?

view this post on Zulip Juuso Oksanen (Oct 14 2019 at 09:19):

Notable changes from STU3 to R4 is that:
-FhirValidator is given the R4 FhirContext instead of STU3 (FhirContext.newValidator())
-FhirInstanceValidator is R4-version instead of STU3 and is given the corresponding ValidationSupportChain


Last updated: Apr 12 2022 at 19:14 UTC