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

Various Enhancements and Fixes #23

Merged
merged 7 commits into from
Nov 24, 2023
Merged

Various Enhancements and Fixes #23

merged 7 commits into from
Nov 24, 2023

Conversation

ndegwamartin
Copy link
Collaborator

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

Resolves #22

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for
    bug fixes
  • I have run mvn spotless:check to check my code follows the project's
    style guide
  • I have run mvn clean test to confirm all new and existing tests
    passed
    .
  • I ran mvn clean package right before creating this pull request.

- Bump up version to 1.0.2
- Upgrade FHIR Common Utils version to 1.0.0
- Optimize location fetch
- Fix null pointer for non Resource endpoint permission check
- Migrate practitioner details endpoint to /PractitionerDetail
- Fix InvalidRequestException handling causing interner server error
- Update/Fix Allowed Queries Configuration
- Clean up

LocationHierarchyTree locationHierarchyTree = new LocationHierarchyTree();
LocationHierarchy locationHierarchy = new LocationHierarchy();
if (StringUtils.isNotBlank(locationId) && location != null) {
if (location != null) {
logger.info("Building Location Hierarchy of Location Id : " + locationId);
locationHierarchyTree.buildTreeFromList(getLocationHierarchy(locationId, location));
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to test if this works correctly incase of locationId is null, as are removing check on locationId
The check was added to ensure null-safety.
@ndegwamartin

Copy link
Contributor

Choose a reason for hiding this comment

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

But, I re-visited this logic and I think it won't break the code @ndegwamartin

@@ -279,7 +280,7 @@ Pair<Composition, PractitionerDetails> fetchCompositionAndPractitionerDetails(
requestBundle.addEntry(
SyncAccessDecision.createBundleEntryComponent(
Bundle.HTTPVerb.GET,
"practitioner-details?keycloak-uuid=" + subject,
"PractitionerDetail?keycloak-uuid=" + subject,
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a doubt here, that PractitionerDetail won't be accessible via the generic fhir client, since the API does not exist on the FHIR server. Rather, it is exposed on the Gateway server. Let me test this on my local with some data. @ndegwamartin

Copy link
Collaborator Author

@ndegwamartin ndegwamartin Nov 23, 2023

Choose a reason for hiding this comment

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

@rehammuzzamil you are right. I didn't catch this during testing because:

a) We don't throw an exception if the practitioner details is absent (like we do for Composition)
b) We return a default blank Organization and/or CareTeam instead of an empty list here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rehammuzzamil this is now fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

I have tested it out on my local, and it looks good to me. Thanks @ndegwamartin for the fix.

- Refactor to optimize location hierarchy endpoint
- Refactor to optimize practitioner details endpoint via cache
- Clean up
@rehammuzzamil rehammuzzamil self-requested a review November 24, 2023 11:10
Copy link
Contributor

@rehammuzzamil rehammuzzamil left a comment

Choose a reason for hiding this comment

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

Approved

@ndegwamartin ndegwamartin merged commit d87244b into main Nov 24, 2023
1 check passed
@ndegwamartin ndegwamartin deleted the fix-gateway-plugin branch November 24, 2023 11:12
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.

Fixes and Enhancements to fix client support
2 participants