Location based access control system will require the default location parameter for every patient to restrict the patient information accessing by other users based on the default locations. So We need to assign the default locations to the patients while they are registering in the OpenMRS.
The Initial plan of this task is to assign a location to the patients, and let track them by using that given location. Location information will be assigned as a person attribute to the patients during the registration process (To configure the Patient Registration Dashboard with location selection fragment, Please follow this link).
In the Find Patient Dashboard, the patient's list will be filtered by the logged location. The logged in user can only see the patients who have the location attribute as that logged in location. LocationBasedAccess Control module used AOP techniques to achieve this task by tracking the getPatients() method from the personService.
Custom Patient Registration Form App Definition for Location Selection - https://wiki.openmrs.org/display/docs/Location+Based+Access+Control+-+Deployment+Steps