FHIR Chat · which Validators should be used · hapi

Stream: hapi

Topic: which Validators should be used


view this post on Zulip Patrick Werner (Mar 22 2019 at 17:07):

Currently trying to implement a ValidationChain for custom profiles following this doc: http://hapifhir.io/doc_validation.html#_toc_supplying_your_own_structuredefinitions
After Testing a while i got really confused which classes are from which package (the doc doesn't include the imports statement). Which imports do i need for: FhirValidator, FhirInstanceValidator, IValidationSupport, ValidationSupportChain ? Do all use org.hl7.fhir.instance.hapi.validation, or org.hl7.fhir.dstu3.validation. Or is it mixed?

view this post on Zulip Patrick Werner (Mar 22 2019 at 17:24):

@James Agnew

view this post on Zulip James Agnew (Mar 22 2019 at 17:49):

Heh, this is confusing for sure.. :(

The answer though is fairly straightforward- You just want the version that corresponds to the version of FHIR you are using.

org.hl7.fhir.instance.hapi.validation is DSTU2, and everything after that has the actual version in the package name.

Cheers,
James

view this post on Zulip Patrick Werner (Mar 25 2019 at 10:40):

Thanks James!


Last updated: Apr 12 2022 at 19:14 UTC