2

I am using the fetchAll function on an instance of an FHIR Client (specifically, I'm using the HAPI FHIR server). I am trying to collect all observations with a certain LOINC code.

From my understanding, a request is sent to the server telling it to create a bundle with all observations that match the LOINC code (this search seems to be handled server side). The results are then sent back, However, the server only sends back 20 results at a time. There are ~14,000 observations, so the time to receive the ~700 bundles from the server is ~2 minutes (I'm using chrome which is limited to I believe 6 connections to the server -- other browsers are similar).

I would like to do this kind of request faster if possible. Is there a way to do so? I think there is some way to get the bundles to contain 500 items; does anyone know how to do this in a search parameter?

Thanks!

ZachB
  • 13,051
  • 4
  • 61
  • 89

1 Answers1

1

Well, you can use _count to indicate how many rows you'd like back at a time, but the server always has the right to send you less than that because the server has to look out for its own performance. (However, it's non-conformant if it sends you more than you ask for.)

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • I know how to do this by typing out explicit GET requests in something like postman, but is there is way to do this with the fetchAll command? – Samson Mataraso Jun 26 '17 at 19:47