Assign Locations to the Users through the Location Based Access Control Module — OpenMRS

Week 10[ July 17, 2018 — July 23, 2018]

Assigning the Location to the patient almost done and it’s working as expected. So as the next milestone, I have started to work on assigning the location to the users during the registration process.

Users can be registered from the Manage Accounts page in the OpenMRS Administration page. So there should be a location selector to assign the locations during the registration. Since the location based access control is a separate module from others, I can’t make any direct changes in the Register New User dashboard. So we decided to add the custom fragment support to the Manage Accounts — User management dashboard (in the AdminUI module)which needs to allow the custom fragments to customize the user registration dashboard.

  • It should allow the custom fragments with Id as “createUser.manageAccountPersonFragments”, and it should be added to the person sections.
Added Location Selector as the custom fragment to Person Section
  • It should allow the custom fragments with fragment Id as “createUser.manageAccountUserFragments”, and it should be added to the user sections.
Added Location Selector as the custom fragment to User Section

Addition to this, the Manage Account dashboard should support the custom view fragments to view this information into the respected dashboard and it should allow editing the properties through the usual ways.

So I have added implementation in Manage Accounts to support the Add/Edit custom fragments and support to the custom view fragments.

Added Location View as the custom fragment to User Section

Here,

  • The person information from the custom fragments will be saved automatically if the type is person attribute. If the custom fragment contains some other different metadata type, then it should handle the save and update actions itself.
  • The user information from the custom fragments will be saved automatically if the type is user property. If the custom fragment contains some other different metadata type, then it should handle the save and update actions itself.

These are the tickets which contain the works related to this part,

See you in the next week..!

Like what you read? Give Kailayapathy Suthagar a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.