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 the syncLocation request params to all GET requests when using the sync by Related Entity Location -> User Selected Location sync strategy #3067

Open
3 tasks
dubdabasoduba opened this issue Feb 14, 2024 · 1 comment
Labels
Remote Sync All issues related to syncing data from or to the FHIR server Sync by Related Entity Location

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Feb 14, 2024

Keyword Definition

  • Related Entity - What the data collected for (e.g. Family/Household, Family/Household member, Patient, Service Point or Product).
  • Related Entity Location - This term is used to refer to location(s) associated with the client.
    • This would mean the location where the family or family member lives for the case of the SID (Summit Institute for Development) applications
    • This would mean the service point of where data collected belongs to for the case of EUSM (End User Supply Monitoring)
  • Sync Locations - These are the locations used to filter the data to be synced to the application.

Context

  • Sync by Related Entity Location means getting all the resources that have a Related Entity Location ID.
  • The Sync Locations will be part of the request parameters. These will be found on the syncLocation param.
  • This ticket is to add the ability to create and add the syncLocation param to the GET request from the data stored in the secure shared prefs on the app.

Technical Description of enhancement

  • If the app sync strategy is REL, during login check if the user has the ROLE_VALIDATE_ASSIGNMENT keycloak ROLE. if the user does not have this role then add the syncLocation request param to the GET requests while fetching data.
    • We can store a true or false on the secure shared prefs for the above check.

Acceptance criteria

  • All GET requests from fhircore should have the syncLocation request param if the user has the ROLE_VALIDATE_ASSIGNMENT keycloak ROLE

Implementation plan (For Engineers)
The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed.
i.e. Describe how you intend to solve the problem

@dubdabasoduba dubdabasoduba added Remote Sync All issues related to syncing data from or to the FHIR server Sync by Related Entity Location labels Feb 14, 2024
@pld
Copy link
Member

pld commented Feb 14, 2024

Client Location seems misleading as the sync strategy, because if ClientLocation.userAssignedLocation == false then isn't your' sync strategy not the client location?

But instead, more generally, the strategy is by location? And, even if it isn't true, can we still send the syncLocation param, but have it be the logged in users assigned location, to match how it works now?

@dubdabasoduba dubdabasoduba changed the title Update fhircore to add syncLocation params to all GET requests when using the sync by Client Location sync strategy Update fhircore to add syncLocation params to all GET requests when using the sync by Related Entity Location sync strategy Feb 25, 2024
@dubdabasoduba dubdabasoduba changed the title Update fhircore to add syncLocation params to all GET requests when using the sync by Related Entity Location sync strategy Update fhircore to add syncLocation params to all GET requests when using the sync by Related Entity Location -> User Selected Location sync strategy Feb 26, 2024
@dubdabasoduba dubdabasoduba changed the title Update fhircore to add syncLocation params to all GET requests when using the sync by Related Entity Location -> User Selected Location sync strategy Add the syncLocation request params to all GET requests when using the sync by Related Entity Location -> User Selected Location sync strategy Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Remote Sync All issues related to syncing data from or to the FHIR server Sync by Related Entity Location
Projects
None yet
Development

No branches or pull requests

2 participants