Muthoju Saketh
unread,Jun 16, 2024, 10:32:51 AMJun 16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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?