Adding restrictions to the users to view the patient without location

Week 7 [Jun 26, 2018 — July 02, 2018]

While working on assigning the locations for the users, there was a problem with adding the location attributes for existing users who haven’t location attribute. So I need to provide a way to assign the locations for existing users.

No one can view the patients who haven’t location attribute since I have added the AOP advise to getPatients() base method. So I need to add some ways to provide a solution to assign the location attributes for existing users.

I have discussed some ideas with my mentor to address this issue. Some of those ideas,

  • Creating a new location called “Assign patient location attribute”. Show all the patients who haven’t location attribute to the user if the user points to this location
  • Create a special privilege called “Edit patient location attribute” in the system. If the user has this privilege, then show the patients who haven’t location attribute
  • If the user contains System Administrator role, then show the patients who haven’t location attribute.

After a long discussion, We have decided to go for System Administrator (considering KISS — Keep it simple, stupid Principle :-p ) option since he should manage the system to update the location attributes for existing users.

Along with this work, I’m working on editing facility for patient locations from the patient dashboard. We decided to add a general action called “Edit location” to the patient dashboard. It will redirect to edit the patient locations fragment.

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.