As per the OpenEMR wiki -
It is also possible for a provider to be linked to only one facility to see only his/her patients in that facility.
Set Administration->Features->Restrict Users to Facilities and then set the facility in Administration->Users.
We want to restrict Patients and doctors for a facility. Is it possible to achieve with the existing code? Or is there is some bug and we have to make changes to achieve this feature?