Vermonster/fhir-kit-client

Pagination not working?

doublethink13 opened this issue · 3 comments

Expected Behavior

Pagination being enabled

Actual Behavior

In Postman, if I do a request like: {{fhir}}/Observation?subject=61a80847-0f61-4aaa-91d3-6ae5c08bc3b7&code=8867-4&date=lt2022-03-23T17:15:29.345+00:00&date=gt2020-03-23T17:15:29.345+00:00

I get back an option that has an array with two objects in the link entry, one for self and one for next. However, if I do the same request using fhir-kit-client, the link entry array only has one object, a self relation.

I've tried adding two search parameters, _count and _getpagesoffset, but they don't solve the problem.

I've tried using the nextPage method, also without success

Let me know if I can provide any more info

Thanks!

Specifications

  • Version: 1.8.1
  • Platform: Angular 13.2

Hi @doublethink13

Could you include a code sample of how you're using the client? It might be useful in the future for people with similar issues.

This format should work to constrain your request (insert your own values):
await clientInstance.search({ resourceType: 'Observation', searchParams: { subject: '30', date: ['gt1990-03-23T17:15:29.345+00:00', 'lt2023-03-23T17:15:29.345+00:00'] } })

To see the url that FHIR Kit Client is composing, you can use the httpFor method to inspect the request object.

Let me know if that helps,

Vicki

Hey @vstrateman

Thanks for your input

Unfortunately I'm no longer working with fhir-kit-client nor do I have a way of doing so again in the same platform, because I switched jobs in the meantime 😅

This issue should be closed. nextPage works as expected. Do note that just because you set _count does not mean that the other side will respect it as I discovered or that it will work in the way you expect.