Controlling staff access to patient records