FHIR Chat · fhir 4 validation · implementers

Stream: implementers

Topic: fhir 4 validation


view this post on Zulip AJ Chen (Oct 24 2020 at 16:51):

I try to use hapi.validation.validator.FhirInstanceValidator to validate fhir r4 resource. using these dependencies from maven:
hapi-fhir-base v5.1.0
hapi-fhir-structures-r4 v5.1.0
hapi-fhir-validation v5.1.0
hapi-fhir-validation-resources-r4 v5.1.0

but, this initialization
IValidatorModule module = new FhirInstanceValidator(ctx);
throws exceptions
Caused by: java.lang.IllegalStateException: Could not find the HAPI-FHIR structure JAR on the classpath for version R5.
looks like it tries to find R5 structure even though hapi-fhir-validation-resources-r4 library is used.

Any idea to fix this exception caused by mismatching? Thanks.

view this post on Zulip AJ Chen (Oct 24 2020 at 22:23):

update: I got the answer from HAPI google group. FHIR validation should use hapi-fhir-structures-r5 and hapi-fhir-validation-resources-r5 libraries in pom.xml. This means the fhir validation step in my data pipeline needs to be a separate process by itself. This way, the upstream data processing step can deal with any version of FHIR, or conversion of CDA or CCD to FHIR R4. Its pom.xml can have r4 structure or other old versions.


Last updated: Apr 12 2022 at 19:14 UTC