opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://opensrp.io
Apache License 2.0
56 stars 59 forks source link

Add pagination to list configs end point during config sync #3125

Closed Raynafs closed 6 months ago

Raynafs commented 8 months ago

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #3049

Engineer Checklist

Code Reviewer Checklist

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 30.1%. Comparing base (ac82739) to head (3721e07). Report is 26 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensrp/fhircore/pull/3125/graphs/tree.svg?width=650&height=150&src=pr&token=IJUTHZUGGH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp)](https://app.codecov.io/gh/opensrp/fhircore/pull/3125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) ```diff @@ Coverage Diff @@ ## main #3125 +/- ## ========================================= + Coverage 29.6% 30.1% +0.4% - Complexity 658 672 +14 ========================================= Files 239 239 Lines 11204 11215 +11 Branches 1948 1947 -1 ========================================= + Hits 3323 3382 +59 + Misses 7447 7392 -55 - Partials 434 441 +7 ``` | [Flag](https://app.codecov.io/gh/opensrp/fhircore/pull/3125/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | Coverage Δ | | |---|---|---| | [engine](https://app.codecov.io/gh/opensrp/fhircore/pull/3125/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `67.0% <85.7%> (+0.7%)` | :arrow_up: | | [geowidget](https://app.codecov.io/gh/opensrp/fhircore/pull/3125/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `47.2% <ø> (ø)` | | | [quest](https://app.codecov.io/gh/opensrp/fhircore/pull/3125/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `5.6% <ø> (+0.2%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/opensrp/fhircore/pull/3125?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | Coverage Δ | | |---|---|---| | [...core/engine/configuration/ConfigurationRegistry.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3125?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fconfiguration%2FConfigurationRegistry.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvY29uZmlndXJhdGlvbi9Db25maWd1cmF0aW9uUmVnaXN0cnkua3Q=) | `68.7% <85.7%> (+0.7%)` | :arrow_up: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/opensrp/fhircore/pull/3125/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp)
Raynafs commented 8 months ago

Logs showing List Resource being fetched after adding pagination. ![Uploading image.png…]() ![Uploading image.png…]()

Raynafs commented 8 months ago

Logs showing List Resource being fetched after adding pagination.

image image (2)

Raynafs commented 8 months ago

Because of the changes made I am retesting the sid app and also the unit tests in the code

Raynafs commented 7 months ago

Image of debug mode showing the fetched listResourceUrlPath image

Raynafs commented 7 months ago

Oh okay. Lemme add the functionality

Raynafs commented 7 months ago

image This specific list has a total of 38 items hence since we have put a count of 200. Page one will hold all the 38 items.

Raynafs commented 7 months ago

image Changed the count to 4

Raynafs commented 7 months ago

Screencast from 03-04-2024 12:46:53 ALASIRI.webm @ndegwamartin