R5 Paging search: not finding link to next bundle

26 views
Skip to first unread message

Chris Hirs

unread,
Aug 28, 2023, 5:05:59 AM8/28/23
to HAPI FHIR
Hi,

I'm following the example given here on paging search, but my code is only returning the first 20 results, even tho the fhir server has ~400 organizations and the bundle has a next link attribut:

2023-08-28 10 43 25.png

Am I missing something obvious here?

Thank you in advance!

Chris Hirs

unread,
Aug 28, 2023, 5:39:14 AM8/28/23
to HAPI FHIR
I found a workaround replacing 
bundle.getLink(Bundle.LINK_NEXT) 
with 
bundle.getLink().stream().filter(l -> l.getRelationElement().getCode().equals(Bundle.LINK_NEXT)).findFirst().orElse(null)

Reply all
Reply to author
Forward
0 new messages