Honestly this does not sound right to me. The way the Reference Application works is that a user simply selects a location when logging in, and there’s no authorization required to choose a login location. I would expect that users are assigned to one or more locations, and when the user logs in they’re allowed to see patients that belong to any of their locations. (But this user-location assignment would be at the API / data model level, not via the web session.)
Yes @darius , this is the idea behind my implementation
We will not remove the location selection(login) in the reference application until we reach a potential position on this project. After reaching a potential position, When a user logged in, System will automatically fetch the access location information.
Now the initial scenario will be,
If the patient registration dashboard of the system was customized with the location selection fragment(given through this module), then the user will assign the patient to a location! - NO PROBLEM AT THIS POINT
But if the patient registration dashboard of the system was not customized with the location selection fragment (some users, they might not change it for now), then the access location for the patient should be fetched from the current user session location - HERE IS THE PROBLEM (I need to fetch the session location information - See here )
So that, I have planned to store the current user location information into a global property from the appui module and decided to fetch that from my module.
Apart from that, there are no JAVA methods to get the current logged-in user session location information from the API Layer, So adding that information into a Global Property as follows will be a solution for those requirements as well!