Enable validation by default in HAPI server docker instance

1,035 views
Skip to first unread message

Vivek Namboothiri

unread,
Oct 6, 2021, 7:01:58 AM10/6/21
to HAPI FHIR
Hi,
I have downloaded the HAPI FHIR server instance from github and ran it using docker:



Once started, I have added a set of custom profiles(US-Core) to the HAPI server instance. I was able to upload the profiles successfully. After that, i tried a few data instances. However found that, the server isn't validating the profile. I tried a data instance without having Patient.gender , though the US-Core profile(http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient) mandates it. Am I missing any configuration here? Is there a documentation for the same? I assumed that the validations are enabled by default in the container configuration.

Regards,
Vivek

Jens Villadsen

unread,
Oct 7, 2021, 3:25:59 PM10/7/21
to HAPI FHIR

Shrikanth Chandramouliswaran

unread,
Sep 12, 2023, 7:53:58 AM9/12/23
to HAPI FHIR
Hi,

If we enable the "enable_repository_validating_interceptor" as true but still  the server isn't validating the profile. It would be great if any specific use cases for validating the resources in HAPI JPA starter server.

Thanks in advance.

Eric Torstenson

unread,
Oct 25, 2023, 6:39:30 PM10/25/23
to HAPI FHIR
I'm having the same problem. I've tried setting that property at the "fhir" level in the YAML file, as well as created an entry under implementation guide (though, I suspect that wasn't correct, since it didn't actually load the implementation guide automatically.). I am able to load my IG directly using REST and it will validate against the resources when I use the $validate operator, but I'd like to be able to have my dev environment set to validate upon load to catch any issues with conformance. Does anyone know of any example YAML files where these things are set up correctly? My IG is not in the registry, so it's just a package file published via github. 

Johanna Häusler

unread,
Jan 24, 2024, 3:38:25 AM1/24/24
to HAPI FHIR
Hy,
I had the same issue and the only way to enable profile validation was to enable default profile validation as well. It is this setting: hapi.fhir.validation.requests_enabled=true (hapi version 6.8.0)

Unfortunately it breaks my patients, because there is a bug in the default profile validation: https://github.com/hapifhir/hapi-fhir/issues/5053 

If you have a solution besides the described workaround, it would be awesome :)

Best,
Johanna

Reply all
Reply to author
Forward
0 new messages