-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Bundle.total not returned on searchset with parameter _count=x #701
Comments
The Bundle.total is not included unless the server knows it. If you perform a search with You can force a (Note also: Please don't use GitHub issues to ask questions about HAPI FHIR. See Getting Help for more information on where to ask for help) |
Hi,
We are testing this fhir server on version 7.2.0 and have found that when a SEARCH interaction is sent including the query parameter '_count' then there is no Bundle.total value returned in the response.
Here is the request parameters without the _count
----------------------------REQUEST--------------------------- queryString= http:https://visuapps3:8080/SpiritFhirServer/fhir/Observation?patient=http:https://visuapps3:8081/SpiritPIXFhir/r4/Patient/Q0RSLjE3MTUyNzAzMjI0NDA4JjEuMy42LjEuNC4xLjIxMzY3LjEzLjIwLjIwMDAuMQ&category=laboratory&_revinclude=Provenance:target&_format=json method=GET HEADERS: Accept-Charset: utf-8, Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9, User-Agent: HAPI-FHIR/5.7.9 (FHIR Client; FHIR 4.0.1/R4; apache), Accept-Encoding: gzip, X-Forwarded-prefix: SpiritQEDMFhir/r4, PARAMETERS: patient=http:https://visuapps3:8081/SpiritPIXFhir/r4/Patient/Q0RSLjE3MTUyNzAzMjI0NDA4JjEuMy42LjEuNC4xLjIxMzY3LjEzLjIwLjIwMDAuMQ category=laboratory _revinclude=Provenance:target _format=json
This returns:
{ "resourceType": "Bundle", "id": "93d1774d-02b9-4049-a4bf-c672e633bb31", "meta": { "lastUpdated": "2024-06-19T08:50:37.982+01:00" }, "type": "searchset", "total": 16, "link": [ { "relation": "self", "url": "http:https://visuapps3:8080/SpiritQEDMFhir/r4/Observation?_format=json&_revinclude=Provenance%3Atarget&category=laboratory&patient=http%3A%2F%2Fvisuapps3%3A8081%2FSpiritPIXFhir%2Fr4%2FPatient%2FQ0RSLjE3MTUyNzAzMjI0NDA4JjEuMy42LjEuNC4xLjIxMzY3LjEzLjIwLjIwMDAuMQ" } ], "entry": [ { "fullUrl": "http:https://visuapps3:8080/SpiritQEDMFhir/r4/Observation/46376027-5f7d-45fa-9158-5ef8f2de59b9",
All working as expected...
Now with the addition of the _count parameter
----------------------------REQUEST--------------------------- queryString= http:https://visuapps3:8080/SpiritFhirServer/fhir/Observation?patient=http:https://visuapps3:8081/SpiritPIXFhir/r4/Patient/Q0RSLjE3MTUyNzAzMjI0NDA4JjEuMy42LjEuNC4xLjIxMzY3LjEzLjIwLjIwMDAuMQ&_count=10&category=laboratory&_revinclude=Provenance:target&_format=json method=GET HEADERS: Accept-Charset: utf-8, Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9, User-Agent: HAPI-FHIR/5.7.9 (FHIR Client; FHIR 4.0.1/R4; apache), Accept-Encoding: gzip, X-Forwarded-prefix: SpiritQEDMFhir/r4, PARAMETERS: patient=http:https://visuapps3:8081/SpiritPIXFhir/r4/Patient/Q0RSLjE3MTUyNzAzMjI0NDA4JjEuMy42LjEuNC4xLjIxMzY3LjEzLjIwLjIwMDAuMQ _count=10 category=laboratory _revinclude=Provenance:target _format=json
This returns:
`--------------------------RESPONSE--------------------------
status= 200
HEADERS:
date: Wed, 19 Jun 2024 10:33:34 GMT,
x-request-id: h7QvWZieFyfg7Ips,
last-modified: Wed, 19 Jun 2024 10:33:34 GMT,
transfer-encoding: chunked,
x-powered-by: HAPI FHIR 7.2.0 REST Server (FHIR Server; FHIR 4.0.1/R4),
content-type: application/fhir+json; charset=UTF-8,
connection: keep-alive,
{
"resourceType": "Bundle",
"id": "9becca21-9c11-44f4-a372-4c57ee222b99",
"meta": {
"lastUpdated": "2024-06-19T11:33:34.270+01:00"
},
"type": "searchset",
"link": [ {
"relation": "self",
"url": "http:https://visuapps3:8080/SpiritQEDMFhir/r4/Observation?_count=10&_format=json&_revinclude=Provenance%3Atarget&category=laboratory&patient=http%3A%2F%2Fvisuapps3%3A8081%2FSpiritPIXFhir%2Fr4%2FPatient%2FQ0RSLjE3MTUyNzAzMjI0NDA4JjEuMy42LjEuNC4xLjIxMzY3LjEzLjIwLjIwMDAuMQ"
}, {
"relation": "next",
"url": "http:https://visuapps3:8080/SpiritQEDMFhir/r4?_getpages=9becca21-9c11-44f4-a372-4c57ee222b99&_getpagesoffset=10&_count=10&_format=json&_pretty=true&_bundletype=searchset"
} ],
"entry": [ {
"fullUrl": "http:https://visuapps3:8080/SpiritQEDMFhir/r4/Observation/2d304508-39a8-4b3c-8294-9eab511cc313"`
From the FHIR specification it suggests that there should always be a Bundle.total on a '"type": "searchset"' - http:https://hl7.org/fhir/R4/bundle.html
Any help would be appreciated
The text was updated successfully, but these errors were encountered: