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

[Location Hierarchy] Add Support for Recreating Ancestor Lineage Across All Locations #328

Open
6 tasks
dubdabasoduba opened this issue Jan 21, 2025 · 3 comments
Assignees
Labels
Enhancement New feature or request

Comments

@dubdabasoduba
Copy link
Member

Context

  • Enhance the LocationHierarchy endpoint to support two new query parameters:
    • recreate-lineage=true – Triggers the recalculation and updating of ancestor lineage tags for all Location resources in the hierarchy.
    • hierarchy-root-location=uuid – Specifies the UUID of the root location for the hierarchy to be updated.
  • If the hierarchy-root-location parameter is provided, the lineage recalculation process will start from the specified root location instead of automatically identifying the root.

Implementation

  • When the LocationHierarchy endpoint is called with recreate-lineage=true, the system should initiate a lineage recalculation process. The process should traverse the location hierarchy starting from the root location.
  • The root location must be explicitly specified using the hierarchy-root-location parameter.
    • his parameter is mandatory. If it is not provided, the endpoint should return an error response.
  • The lineage identification and addition should work as described here [Location Hierarchy] Enable storing ancestor tags on all locations. fhir-gateway-extension#110

Acceptance Criteria

  • The location hierarchy endpoint should have the ability to recreate the location ancestor tags.
  • The hierarchy-root-location is a mandatory parameter on the API if recreate-lineage=true is available.
@pld
Copy link
Member

pld commented Jan 21, 2025 via email

@dubdabasoduba
Copy link
Member Author

This should not be the gateway's responsibility. This seems reasonable in a tooling script

I will be moving this to the tooling repo.

@dubdabasoduba dubdabasoduba transferred this issue from onaio/fhir-gateway-extension Jan 22, 2025
@dubdabasoduba dubdabasoduba added the Enhancement New feature or request label Jan 22, 2025
@pld
Copy link
Member

pld commented Jan 22, 2025

As we discussed we need to share this between both tooling and the gateway so the majority of this code goes into a shared library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants