PatientRules.getOwnerReference() doesn't pick most recent active relationship

Description

PatientRules.getOwnerReference() picks the first owner relationship and then returns null if the relationship is inactive.This is incorrect. It should return the owner from the active relationship, or null of there is none.

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Fix versions

Affects versions

1.8

Priority

Minor