Skip to content

add dhis2 paging examples#797

Open
mtuchi wants to merge 1 commit into
mainfrom
dhis2-paging-examples
Open

add dhis2 paging examples#797
mtuchi wants to merge 1 commit into
mainfrom
dhis2-paging-examples

Conversation

@mtuchi

@mtuchi mtuchi commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Short Description

This pr add job code examples for dhis2 tracker pagination.
See loom video
https://www.loom.com/share/7823dafab2ee4a989f2dec00adc4f5db

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

@mtuchi mtuchi requested a review from josephjclark June 5, 2026 13:06
// Fetching all events with pagination
// Requires DHIS2 server v2.41+
tracker.export('events', { totalPages: true, pageSize: 1e4 });
fn(state => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to be picky but can we have a clean line break here on line 4? I misread the fn block

@@ -0,0 +1,22 @@
// Fetching all events with pagination

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why are there 2 export statements here?

One seems to pull all data in pages of 1000, the other then iterates over each page and pulls it again?

I'm not sure what the story is here but I think it needs explaining in comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants