Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

OpenMRS has the privilege based access control implementations. Like that one, we implemented a Location based Access control system. It will manage the access to the services based on the locations. Some implementations want to register the users and patients (the persons also) in certain selected locations. Then access them based on the location that someone has logged in. That way, if someone is logged in a certain location, they should see only those encounters, observations, and patients registered in that location. This project was initiated into the Google Summer of Code 2018.

...

  1. Navigate to System Administration-->Manage Apps
  2. Click the square disable button beside "referenceapplication.registrationapp.registerPatient" to disable the integrated Registration App configuration.
  3. Add a new App Definition by clicking "Add App Definition".
  4. Give App ID(required) as "referenceapplication.registrationapp.myRegWithLoc"
  5. Then copy the following custom definition for Location Selection, and paste it to the Definition (required) fieldThis will be used for adding location selection fragment into the registration dashboard with some other required fragments.
  6. Save the new App configuration.

If you have any issues on Registration App Configuration, please read this detail documentation.

Custom Registration App Configuration with Location Selection App Definition

...


Location selection in the user login screen will be disabled through the Location based access control module since it can be fetched automatically through the location user property. The location based access control module will create a global property with name as "referenceapplication.locationUserPropertyName" and value as "locationUuid" while module starts (if a global property not exists in this name).

It will follow these steps while a user tries to login,

...

  1. Go to  System Administration-->Manage Apps, and Click the Edit button of the app definition(named as "referenceapplication.registrationapp.myRegWithLoc"). Then remove the "accesslocation-info" section from the app definition. Or you can just delete this App Definition, and then press the start button of the app definition which is named as "referenceapplication.registrationapp.registerPatient"
  2. Uninstall the module from the system.

Resources

Location Based Access Control GSoC project