Skip to content

Commit

Permalink
fix on legalName get
Browse files Browse the repository at this point in the history
  • Loading branch information
cerbeor committed Nov 6, 2024
1 parent 9654435 commit b53ca0a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,17 +417,21 @@ public PatientName getLegalName() {
return patientNames.stream().filter(patientName -> "L".equals(patientName.getNameType())).findFirst().orElse(null);
}

public PatientName getLegalNameOrFirst() {
return patientNames.stream().filter(patientName -> "L".equals(patientName.getNameType())).findFirst().orElse(this.getPatientNameFirst());
}


public String getNameLast() {
return this.getPatientNameFirst().getNameLast();
return this.getLegalNameOrFirst().getNameLast();
}

public String getNameFirst() {
return this.getPatientNameFirst().getNameFirst();
return this.getLegalNameOrFirst().getNameFirst();
}

public String getNameMiddle() {
return this.getPatientNameFirst().getNameMiddle();
return this.getLegalNameOrFirst().getNameMiddle();
}

}

0 comments on commit b53ca0a

Please sign in to comment.