Delay in data store into FHIR

5 views
Skip to first unread message

Muthoju Saketh

unread,
Jun 16, 2024, 10:32:51 AMJun 16
to HAPI FHIR
I am creating QuestionnaireResponse and Observation resources tagged with patient IDs in FHIR by sequentially calling APIs (POST /fhir/QuestionnaireResponse and POST /fhir/Observation). QuestionnaireResponse has got patientId tagged to it and Observation has got QuestionnaireResponse along with the patientId tagged to it. These two actions in two sequence API calls. As part of my application flow, I need to immediately fetch the latest Observation(that's stored recently) and show it to the user. However, retrieving the latest Observation for a patient using (GET /fhir/Observation?subject=Patient/<patient-id>&_sort=-date&_count=1 (i.e., sorting by the effectiveDateTime field) shows a significant delay and until atleast 20 secs, whenever I call this fetch latest Observation API, I am not getting the latest observation but the one before that. Why is the Observation data storage taking around 20 secs? Why is this happening, given that FHIR uses a PostgreSQL database? How can I fix this issue?
Reply all
Reply to author
Forward
0 new messages