-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing "total" field for bundle pagination in CQL requests with Blaze 0.28 #2185
Comments
Hi David, your problem is about a FHIR Search query you do after you executed the CQL Query via On Blaze v0.28 the following FHIR Search query with a List resource containing only 1 patient works: curl -s 'http://localhost:8080/fhir/Patient?_list=DEZLRKBIRZDQJC73' | jq .total
1 Is that your scenario? Or do you use a different FHIR Search query? |
Oh, yes, you are right. I have tested it again. When I send a fhir search like /Patient, I get the "total" in the bundle. But when I use a CQL query and get the _list, then, I don't get the "total" in the bundle. |
Do you have the exact FHIR Search query which doesn't return a total value? |
Yes, it would be |
So is it only |
Do you have to use paging? E.g. are there more results as will fit on the first page? |
This is the FHIR search query I send to the HAPI FHIR client. I also provide the _revinclude parameters, which the HAPI FHIR client library appends to construct the final URL. Essentially, we're requesting Blaze to return a significant amount of related information for each patient. We are using pagination and can successfully read all the pages provided by Blaze. However, the issue arises because the "total" number of pages is missing in the response bundle. Without this, we cannot calculate or display the progress of the operation. |
As I said, it only happens with _list |
Unfortunately, Blaze will not output a total value if the search contains at least one search parameter and the results will not fit on the first page. The reason is that I had to calculate the whole search result before seeing able to output the page only to calculate the total value. As I don't like to spend that time, I simply skipped outputting the total value. If you really need it, you can append In FHIR there is the special search parameter _total. I could implement it. With that, you could force the calculation of total also on your normal query. If you think that |
In our case, I believe it would make more sense to include the _total search parameter. I’ll go ahead and create an issue for this. |
Description: In previous versions of Blaze, executing a CQL query that returned a large response (requiring pagination across multiple bundles) included a "total" field within each bundle. This field provided the total number of bundles, allowing us to calculate the estimated remaining time for the process interacting with Blaze.
However, in version 0.28, this "total" information is no longer included in the bundle response. This change significantly impacts our ability to gauge progress and manage resources effectively.
Blaze Version: 0.28 (previous versions included the "total" field as expected)
Query (FHIR-Search): /Patient
According to the FHIR specification, the "Bundle" resource should contain a "total" field indicating the total count of matching resources (see FHIR Bundle Documentation). Could you clarify whether this is an intentional change or an issue in the latest release?
The "total" field is essential for our processes, and we would greatly appreciate any guidance on restoring this functionality or alternative solutions.
The text was updated successfully, but these errors were encountered: