updates to attach permissions to patients