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 c86f541 commit 55a336e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,7 @@ public String getId()
@Override
public String getExternalId()
{
try {
for (ImmutablePair<String, String> identifier : this
.<ImmutablePair<String, String>>getData("identifiers"))
{
if (identifier.getKey().equalsIgnoreCase("external_id")) {
return identifier.getValue();
}
}
} catch (Exception ex) {
return null;
}
return null;
return this.match.getExternalId();
}

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

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

@Override
public DocumentReference getDocument()
{
Expand Down

0 comments on commit 55a336e

Please sign in to comment.