'Next' button not working for > 25 patients
mcbride-p opened this issue · 9 comments
@ewill00 @ibmatc let me know your thoughts....
This looks to be a FHIR server (and not a client side) issue.
I was able to reproduce the issue with my cluster FHIR server deployment -> https://paul-dev.wh-health-patterns.dev.watson-health.ibm.com/fhir
THe issue is the /Patient/_search POST does not return either _getpagesoffset or _getpages parameter values and these values are used for ‘next’ button offset logic in client code. This is what is returned in the ‘next’ relation of the link element of the response for my cluster FHIR deployment;
Whereas client would be expecting this …..
ie. note the missing _getpages and _getpagesoffset parameters.
I’ve check this against other FHIR server examples eg. https://r3.smarthealthit.org & https://r4.smarthealthit.org/ (I was wondering was it a version issue hence why I checked r3 & r4) and, in all cases, the link element is returning these parameter values as expected, so its just on the cluster FHIR deployment that I’m seeing this issue. So I suspect its a config issue with our cluster deployment.
@lmsurpre Lee - could you take a quick look at this? if you agree that this is a problem, should we either move this issue to the FHIR server list of defects or create a new one?
The issue is the /Patient/_search POST does not return either _getpagesoffset or _getpages parameter values and these values are used for ‘next’ button offset logic in client code.
Those are not standard parameter names. The client should be following the next link in the search bundle to get to the next page of results. See https://www.hl7.org/fhir/http.html#paging for more info.
Its also worth mentioning that there is ongoing discussion about POST vs GET urls for the links...currently I think they assume the GET format. That discussion can be followed from https://jira.hl7.org/browse/FHIR-33220
Ok, thanks - so those parameters aren't standard but are common and the recommendation is to rework the client/UI code to use the standard (following next link in search bundle)
I wouldn't even say they are common. It seems that someone wrote the client to a specific implementation instead of the spec. And yes, the recommendation would be to rework that to use the next
link from the search response bundle.
@lmsurpre - Many thanks for the above. I'm new to FHIR and need to have a proper read of above links but client is currently using 'next' link from search bundle and in all cases other FHIR server instances I checked against (referenced above) the URL returned in 'next' link is ..
_getpages=4fce4a49-eb52-4f4a-84c9-aba770d3ee43&_getpagesoffset=25&_count=25&_pretty=true&_bundletype=searchset
and not
_count=25&_page=2
Apologies if I'm missing something here.
Per https://www.hl7.org/fhir/http.html#paging the client should treat the next link url more opaquely. It shouldn't assume one format or another but rather use the provided link to retrieve the next page.