Setting owner of a patient produces a wrong owner id

Description

The problem is here
https://github.com/phenotips/phenotips/blob/master/components/patient-access-rules/api/src/main/java/org/phenotips/data/permissions/internal/DefaultPatientAccessHelper.java#L134

If an EntityReference (not a DocumentReference) is passed, the string will contain not only the id but also the EntityType

Environment

None

Assignee

Sergiu Dumitriu

Reporter

SergiuD

Labels

None

External issue ID

None

Fix versions

Priority

Minor
Configure