. You'll find it in the details of the _count parameter. Here's how it's written for Observation:
The maximum number of results to return per page. Defaults to 50
. Capped at 100
.
Most of the caps are at 100, some smaller. Generally the cap is larger than the default so it's a good idea to send the _count parameter.
Paging is a huge deal in the wild. Even our friend Tim Peters is lightweight when it comes to real patient data. There's nothing in the sandbox that comes close to a real patient with a multiyear history and inpatient hospital stays. That said, Cerner has done a lot of work on the performance side and there are ways to tune your queries to get the data you need in a reasonable timeframe.
First things first - on the queries that allow you to filter on status - do that. There's usually no point in fetching entered-in-error or draft status items.
In the wild, your biggest paging risks are Observations and MedOrders. Observations is like 10x+ everything else. If you are gathering observations for social history, then using the category filter is your best bet from a performance perspective. For vitals and labs, it's faster to get them together and sort them out yourselves. If you are lucky enough to have a short list of LOINC codes you need, filtering by those is the absolute fastest.
On our Timeline product we are currently only fetching 3 years of lab data, the full patient record for everything else. Here's some of the record counts for a sample patient with one hospital stay in that time period.
Encounters (192) Meds (1116) Labs (1741) Vitals (3587) Procedures (11) Diagnoses (132) Diagnostic Reports (57)
Observations represent both labs and vitals in our counts above - so thats over 5000 records - being loaded in groups of 100 - it's a lot of pages. Since pages are loaded sequentially, only getting the link to page 2 after you get page 1, this represents 50+ pages. Even at 1 second each, that's almost a full minute of load time, for only 3 years of records. Often, observation queries are a bit longer than 1 second with data transfer time.
If you need your data faster than that, you'll need to use the date filtering query params to break your range into smaller chunks and multi-thread the paging. For us, we take the last 3 years and break them up into 36 separate months and ask for them all at the same time. The non-hospitalization periods will be relatively light and will generally not trigger paging. The months that had a hospitalization in them will trigger paging...sometimes 20-30 pages deep. Still, you have the rest of the data already so the user is not stuck waiting for something useful, especially if they don't need the data in an old hospitalization period.
- Mark