Backport 1.9.4
Merge https://github.com/ags02/openmrs-module-patientaccesscontrol