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

Add support for location lineage post processing #119

Merged
merged 14 commits into from
Feb 5, 2025

Conversation

lincmba
Copy link
Contributor

@lincmba lincmba commented Jan 29, 2025

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

Resolves [link to issue]

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.

@lincmba lincmba force-pushed the 110-create-location-ancestor-tags branch from cbb10e7 to 227b66e Compare January 29, 2025 16:24
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.13%. Comparing base (78290cf) to head (72a63a2).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...ister/fhir/gateway/plugins/SyncAccessDecision.java 80.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #119      +/-   ##
============================================
+ Coverage     62.96%   63.13%   +0.17%     
- Complexity      221      224       +3     
============================================
  Files            16       16              
  Lines          1477     1492      +15     
  Branches        168      173       +5     
============================================
+ Hits            930      942      +12     
- Misses          460      461       +1     
- Partials         87       89       +2     

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

Comment on lines 273 to 282
String locationId;
if (StringUtils.isNotBlank(resultContent)) {
IBaseResource parsedResource = this.fhirR4JsonParser.parseResource(resultContent);
if (parsedResource instanceof Location) {
return ((Location) parsedResource).getIdElement().getIdPart();
}
}

String[] pathParts = requestPath.split("/");
locationId = pathParts[pathParts.length - 1];
Copy link
Collaborator

Choose a reason for hiding this comment

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

If these two conditions are primarily for differentiating between a PUT and POST I'd recommend passing the request Method (PUT|POST) as a parameter and using an if else statement for more clarity

Copy link
Contributor Author

@lincmba lincmba Feb 5, 2025

Choose a reason for hiding this comment

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

They're not for differentiating the request method. They are there incase a request is made but the resource updated/created is not returned in the json or isn't a valid location resource. Done away with one condition though

@lincmba lincmba merged commit 5eac4bd into main Feb 5, 2025
3 checks passed
@lincmba lincmba deleted the 110-create-location-ancestor-tags branch February 5, 2025 12:26
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.

2 participants