Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build LocationHierarchy Location hierarchy on sync strategy #68

Merged
merged 8 commits into from
Jul 16, 2024

Conversation

lincmba
Copy link
Contributor

@lincmba lincmba commented Jul 8, 2024

fixes #65

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for
    bug fixes
  • I have added documentation for any new feature(s) and configuration
    option(s) on the README.md
  • I have run mvn spotless:check to check my code follows the project's
    style guide
  • I have run mvn clean test jacoco:report to confirm the coverage report
    was generated at plugins/target/site/jacoco/index.html
  • I ran mvn clean package right before creating this pull request.

@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 17.28395% with 134 lines in your changes missing coverage. Please review.

Project coverage is 45.01%. Comparing base (d7eeb69) to head (712d495).
Report is 20 commits behind head on main.

Files Patch % Lines
...teway/plugins/LocationHierarchyEndpointHelper.java 24.46% 65 Missing and 6 partials ⚠️
.../org/smartregister/fhir/gateway/plugins/Utils.java 0.00% 40 Missing ⚠️
...ay/plugins/endpoint/LocationHierarchyEndpoint.java 0.00% 10 Missing ⚠️
.../fhir/gateway/plugins/PermissionAccessChecker.java 0.00% 8 Missing ⚠️
...g/smartregister/fhir/gateway/plugins/JwtUtils.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #68      +/-   ##
============================================
+ Coverage     43.81%   45.01%   +1.19%     
- Complexity      106      130      +24     
============================================
  Files            15       16       +1     
  Lines          1075     1213     +138     
  Branches        120      146      +26     
============================================
+ Hits            471      546      +75     
- Misses          545      600      +55     
- Partials         59       67       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -161,7 +161,7 @@ public Bundle handleNonIdentifierRequest(
List<String> selectedSyncLocations = extractSyncLocations(syncLocationsParam);
String practitionerId = verifiedJwt.getSubject();
List<String> userRoles = JwtUtils.getUserRolesFromJWT(verifiedJwt);
String syncStrategy = getSyncStrategy(verifiedJwt);
String syncStrategy = getSyncStrategyFromJwtToken(verifiedJwt);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit pick (maybe) - I think we should have the method pass in the application id as parameter since conceptually we usually map an application id to a sync id.

Then call it something like like getSyncStrategyByAppId(

@lincmba lincmba force-pushed the location_hierarchy_on_sync_strategy branch from 6562718 to 1da65ba Compare July 16, 2024 10:16
ndegwamartin
ndegwamartin previously approved these changes Jul 16, 2024
@lincmba lincmba merged commit 81c2191 into main Jul 16, 2024
3 checks passed
@lincmba lincmba deleted the location_hierarchy_on_sync_strategy branch July 16, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to build the LocationHierarchy based on the Sync Strategy
4 participants