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

update location #116

Open
icrc-fdeniger opened this issue Jan 13, 2025 · 2 comments
Open

update location #116

icrc-fdeniger opened this issue Jan 13, 2025 · 2 comments
Assignees

Comments

@icrc-fdeniger
Copy link
Collaborator

Steps:

  • configure OpenMRS instance so that the user has access to location A and B
  • sync the android app with this instance/user. Location A and B are visible -> ok
  • change OpenMRS configuration so that the user has access to location A only
  • sync the android app : the user should see only location A.
  • Currently he can see A and B

This bug can be tricky to save specially for Patients use case.

  • at first the user can have access to patient for location A and B
  • but after the modification he should see only patient for location B

To be discussed

@parthfloyd
Copy link
Member

Thanks for raising this @icrc-fdeniger!

Right now, the app syncs location data (and other FHIR resources) using fhirEngine.

Can implement this approach:

  1. During every sync:
    • Fetch the locations assigned to the user from the server.
    • Update the app to reflect those locations (remove any locations the user is no longer assigned to).
  2. Display patients based on assigned locations:
    • The user sees only patients from their assigned locations.
    • Optionally, we could add a setting where the user sees patients only from their currently selected location (among their assigned locations).

Points to investigate:

  • What happens if:
    • A user creates a patient at Location A.
    • Before syncing, the user is unassigned from Location A.
  • Will the backend (OpenMRS) still allow that patient to be synced by the user?

cc: @icrc-jofrancisco

@icrc-fdeniger
Copy link
Collaborator Author

we should investigate this issue. Some info:

  • admin user can see all users from all locations. But maybe we should avoid this behavior on android ( otherwise an admin can download too many patients).
  • the fact that patients are filtered on location is activated only if the module datafilter is installed and a lot of OpenMRS deployments is not using. So if we want to keep a white label we should keep compatible with these deployments.

I would like to be able to use the property fhir_sync_urls to be more specific and I hope it will solve most of our requirements ( for instance only download patients attached to a location with the tag offline).

Maybe for the use case of this ticket we could add an option in the android app with like display only patients from assigned locations. Is it complicate this kind of option ? And maybe delete location/patient if no more allowed.

cc @icrc-jofrancisco

parthfloyd added a commit to parthfloyd/openmrs-android-fhir that referenced this issue Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants