Pagination of people and places

Do the views showing people, places and reports paginate after a given number of records?

If not, are there known workarounds to prevent displaying a long list of people all at once, other than using the search functionality and replication_depth as defined in the app_settings?

Also is it possible to filter out reports, people and places based on the user who is currently logged in and created the record as recorded in the meta object of the record?

Hi @morlig

I’m not entirely sure which views you are referring to.

If you are referring to webapp contacts and reports lists, they are paginated at a fixed length of 50 records, and scrolling down will load next 50 records and so on.

The only way it is now possible to limit accessible data in webapp is to login as an offline user. Offline users are scoped to a particular facility and will only see places and reports that “belong” to that facility. I see you are already familiar with this concept, as you mentioned replication_depth, which only applies to offline users.

Thanks, good to know about the pagination. The rest I guess is about proper designing of the people & places hierarchy to prevent overloading an offline user’s device with data.

I was refering to a view like below for instance I was wondering if the “Cases” will be paginated.

Hi @morlig

Thanks for clarifying which views you were referring to.
I can confirm there is no pagination for contacts / cases on the contact detail page. This is an issue we are currently discussing here: Selecting a contact with many children is very slow · Issue #8627 · medic/cht-core · GitHub

Tagging @michael since he is involved in the UX aspects of this technical issue.

1 Like

Thank you @diana for the clarification. Based on this, I will try to improve my people places hierarchy and workflows to reduce the number of child contacts under a place, especially for offline users.

I also agree that pagination would be helpful in this situation, it would make the data more manageable.


@morlig I’d love to hear more about what your main concern is… is it:

  • Performance - This specific screen will be slow if there are 100s of “Cases” there
  • Scrolling - This specific screen is hard to use because it requires a ton of scrolling to get to the data I want to see (reports or tasks, for example)
  • Finding - It is difficult to find the “Case” i’m looking for because it’s in a giant list
  • CHT Data Limitations - The entire app will be slow if there is so much data accumulating over time

…or perhaps something else?

For performance, scrolling and data limitations we sorted these by reorganizing the hierarchy to limit how much data is available offline.

We ran into some headwinds with the search functionality although, given that some cases share exact same names, but it isn’t a showstopper.