Stream: implementers
Topic: FHIR R4 Delete Large ConceptMap
Surendra (Jun 30 2021 at 15:16):
Hi All, I am new to this portal and do not exactly know the question template so please bear with me.
Preface: We are using hapi fhir r4 5.1 version and the FHIR client update method to update a resource or create a resource (if the resource doesn't already exist).
Problem: We have a large ConcepMap containing thousands of mapping. When an existing ConceptMap is upserted, it takes around 25 minutes to perform the operation. More importantly and surprisingly, the delete operation in the upsert is taking 20min (~67% time).
Is there a way to optimize it?
We are using elastic search with FHIR.
Thanks.
Lloyd McKenzie (Jun 30 2021 at 15:51):
What FHIR server are you using? That certainly sounds like a database design/indexing issue. (If the problem was just transmission time, you could look at using PATCH for a pure update, but for upsert, that wouldn't work.)
Surendra (Jun 30 2021 at 15:54):
@Lloyd McKenzie We are using hapi-fhir-jpa-server. Database design/indexing is provided by hapi-fhir itself.
using IGenericClient to perform the operation like this
fhiClient.update().resource(<RESOURCE>).execute()
Surendra (Jun 30 2021 at 15:59):
Here is the code which takes this 66% of the time to delete the existing resource before creating a new
Lloyd McKenzie (Jun 30 2021 at 18:25):
You may be best raising this on the #hapi stream
James Agnew (Jun 30 2021 at 18:38):
This is definitely a known limitation that we'd like to address. Most of our perf work has been done to the lookup of codes/valuesets/concept mappings since that is more critical to be fast, but some of the write operations are quite unoptimized.
Last updated: Apr 12 2022 at 19:14 UTC