private String searchTerm(String label, String term) {
return term == null || term.isEmpty() ? "" : " " + label + ": " + term;
}
private PersonResponse callFindPerson(PersonRequest personRequest) {
Person p = personRequest.getPerson();
String log = "Searching for"
+ searchTerm("guid", p.getPersonGuid())
+ searchTerm("fname", p.getFirstName())
+ searchTerm("mname", p.getMiddleName())
+ searchTerm("lname", p.getLastName())
+ searchTerm("clan", p.getClanName())
+ searchTerm("other", p.getOtherName())
+ searchTerm("mfname", p.getMothersFirstName())
+ searchTerm("mmname", p.getMothersMiddleName())
+ searchTerm("mlname", p.getMothersLastName())
+ searchTerm("ffname", p.getFathersFirstName())
+ searchTerm("fmname", p.getFathersMiddleName())
+ searchTerm("flname", p.getFathersLastName())
+ searchTerm("cfname", p.getCompoundHeadFirstName())
+ searchTerm("cmname", p.getCompoundHeadMiddleName())
+ searchTerm("clname", p.getCompoundHeadLastName())
+ searchTerm("sex", n(p.getSex()))
+ searchTerm("birth", n(p.getBirthdate()))
+ searchTerm("death", n(p.getDeathdate()))
+ searchTerm("marital", n(p.getMaritalStatus()))
+ searchTerm("village", p.getVillageName())
+ searchTerm("clname", p.getCompoundHeadLastName()
+ searchTerm("site", p.getSiteName()));
List<PersonIdentifier> piList = p.getPersonIdentifierList();
if (piList != null) {
for (PersonIdentifier pi : piList) {
log += " pi(" + pi.getIdentifierType().name() + "): " + pi.getIdentifier();
}
}