Skip to content

Commit

Permalink
Issue #770. The id of a Patient object should be accessible via an in…
Browse files Browse the repository at this point in the history
…tuitive API function.
  • Loading branch information
antonkatz committed Mar 7, 2014
1 parent 55a336e commit b216b59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Expand Up @@ -95,12 +95,7 @@ public AbstractPatientSimilarityView(Patient match, Patient reference, AccessTyp
@Override
public String getId()
{
DocumentReference document = this.getDocument();
if (document != null) {
return document.getName();
} else {
return null;
}
return this.match.getId();
}

@Override
Expand Down
Expand Up @@ -73,6 +73,12 @@ public RestrictedPatientSimilarityView(AbstractPatientSimilarityView openView)
this(openView.match, openView.reference, openView.access);
}

@Override
public String getId()
{
return this.access.isOpenAccess() ? this.match.getId() : null;
}

@Override
public String getExternalId()
{
Expand Down

0 comments on commit b216b59

Please sign in to comment.