FHIR Chat · HAPI FHIR profile validation · implementers

Stream: implementers

Topic: HAPI FHIR profile validation


view this post on Zulip Chandan Datta (Feb 13 2020 at 04:43):

Hi implementation team,

Does anyone know if HAPI server can validate a profile XML that has errors?

We tried deploying a HAPI JDBC server and posted a StructureDefinition from the AU PD FHIR profile published by [HL7 AU](), and it gave a 201 as shown in the screenshot below.

We were expecting a validation error as replicated by Forge and the rule for the elemented-definition is here

pasted image
The StructureDefinition-au-pd-healthcareservice.xml we tested can be found here

FYI @James Agnew

view this post on Zulip Ward Weistra (Feb 13 2020 at 16:52):

I'm not too familiar with HAPI, but the Vonk FHIR server also generally accepts posted FHIR resources without validating them first, as long as they are syntactically correct. However you can configure it to validate every incoming resource too: http://docs.simplifier.net/vonk/features/prevalidation.html.
Also there's a #hapi stream which might give you a quicker response on HAPI questions.

view this post on Zulip Patrick Werner (Feb 13 2020 at 17:31):

@Chandan Datta you have to either:

  • POST to [base]/StructureDefinition/$validate
  • set: validation.requests.enabledto true in your hapi-fhir-jpaserver-starter/blob/master/src/main/resources/hapi.properties

view this post on Zulip Patrick Werner (Feb 13 2020 at 17:32):

by default hapi doesn't validate everything (which is a good default as validation is costly)

view this post on Zulip Chandan Datta (Feb 17 2020 at 05:32):

Thanks for the clarification @Patrick Werner . enabling worked - we actually had to change the code - is that the right way or is there an externalised env config that modified should be enough?
pasted image

Do typical FHIR servers in production usage disable validation? Is there a best practices/tuning guide for the prod usage for HAPI that the community has created because the FAQs on HAPI FHIR are probably for v2 messaging.

Further as @Ward Weistra mentioned about Vonk, is there any benchmarking test suite that can be run before production usage such as WindTunnel?

pasted image
pasted image
pasted image

view this post on Zulip Ward Weistra (Feb 17 2020 at 07:32):

@Chandan Datta I don't think Windtunnel is specific to Vonk, but rather should work for any FHIR server.
Is that correct @Vadim Peretokin ?

view this post on Zulip Vadim Peretokin (Feb 17 2020 at 09:01):

That is correct!

view this post on Zulip Patrick Werner (Feb 17 2020 at 17:21):

Chandan Datta said:

Thanks for the clarification Patrick Werner . enabling worked - we actually had to change the code - is that the right way or is there an externalised env config that modified should be enough?

Did you use the recommended jpaserver-starter? If so you only have to change the parameter here: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/hapi.properties no need to touch code.

view this post on Zulip Chandan Datta (Feb 26 2020 at 03:21):

Ward Weistra said:

Chandan Datta I don't think Windtunnel is specific to Vonk, but rather should work for any FHIR server.
Is that correct Vadim Peretokin ?

This is why we at Firely created a performance measurement framework to see how our Vonk measures up one release after another

@Ward Weistra and @Vadim Peretokin , thanks a lot!

  • do we have some docs on the goals of those perf tests in the python code and how new developers can add their own performance test?
  • In terms of comparing implementations, how is the wind tunnel design team thinking of comparing test results across different FHIR server implementations(other than the differences in the hardware)? For example, if the Spark and Vonk implementations are trying to abstract the data store from the devs using their APIs, what would be the numbers for various db implementations that need to be reported? Such as someone choosing between a CosmosDB or a SQL Server.

view this post on Zulip Vadim Peretokin (Feb 26 2020 at 10:05):

@Chandan Datta the goals are to simulate more or less realistic scenarios that would happen in real life :) as for adding your own tests, see standard locust documentation: https://docs.locust.io/en/stable

view this post on Zulip Vadim Peretokin (Feb 26 2020 at 10:06):

I'm not sure what do you mean with the second question. Ensure you're running the test on comparable hardware, run enough tests and then compare the data.


Last updated: Apr 12 2022 at 19:14 UTC