Background
We are building Ethiopia EMR, a national OpenMRS deployment for the Ethiopian Ministry of Health running across multiple federal hospitals. We are looking for community input on how to approach a requirement before we start building.
The Problem
Today every user sees every Login Location in the picker at /login/location regardless of who they are. In a large hospital this creates two problems: providers can accidentally select a location that has nothing to do with their work, and the picker becomes a long noisy list that is hard to navigate.
The Core Concept
In our hospital setup every provider belongs to a department — not a physical room, but a logical grouping of clinical locations. Our departments are:
Internal Medicine, Surgery, Gynecology & Obstetrics, Pediatrics & Child Health, Dermatology, Venereology, ENT, Psychiatry, Family Medicine
Each department contains multiple physical Login Locations beneath it — a triage room, consultation room, OPD, and so on. A Gynecology specialist should only ever see Gyni/Obs locations in the picker. A Pediatrician should only see Pediatrics locations. They are in the same hospital but their worlds in the system should not overlap at login.
Cross-department consultations are handled through a separate consultation workflow and are out of scope here.
What We Want
When a provider logs in, the Login Location picker should show only the locations that belong to their department, filtered by their role. A provider should never see locations from departments they do not belong to, regardless of how many locations exist in the hospital.
What We Found So Far
We brought this up in the #openmrs3-helpme Slack channel and got two very useful responses we want to continue here in a more permanent thread.
@nethmi pointed to the PATH DRC EMR site-based approach where groupings of locations are isolated per facility build. Our use case is different — we need that isolation to happen within a single facility at runtime based on who is logging in, not at build time across facilities.
@ibacher noted that the datafilter module is the only real lever currently available for something like this, but acknowledged there is no standard way today to associate users with specific login locations.
@mseaton shared that PIH is planning to build exactly this kind of user-to-location association in the coming weeks — not at the datafilter level, but as a lighter association between users and particular visit and login locations surfaced in the session location picker. He also raised the open design question of whether to store this as user properties or a new user-location mapping table.
What We Are Asking
We want to understand how PIH is planning to implement this and whether there is an opportunity to align on a shared backend API. Specifically:
-
How is the user-to-location association planned to be stored — user properties, a new mapping table, or something else?
-
Will this be a new REST endpoint or an extension of an existing one?
-
Will the model support parent-to-child location hierarchy — i.e. associating a user with a department-level parent location and implicitly granting access to all login locations beneath it?
We would rather build toward a community standard than ship something in parallel. Any input welcome.

