To set or update the visibility for all patient records, including the template used for future patients, open /bin/edit/Sandbox/UpdateVisibility
in a browser while logged in with an administrative account, paste the following snippet, and press Preview
.
WARNING: Pressing Preview
doesn't preview the changes, it will actually modify the permissions!
Things you can adjust:
- the target visibility, at line 2 replace
private
with the desired value (hidden
,private
,matchable
,public
,open
) - skip the patient template by replacing the query at line 3 with
'from doc.object(PhenoTips.PatientClass) as p where doc.name <> ''PatientTemplate'''
- only include records of a certain user by replacing the query at line 3 with
'from doc.object(PhenoTips.PatientClass) as p, doc.object(PhenoTips.OwnerClass) as o where o.owner = ''xwiki:XWiki.username'''
- only include records of a certain workgroup by replacing the query at line 3 with `'from doc.object(PhenoTips.PatientClass) as p, doc.object(Phen