PathologyRemote pathologyRemote = FacadeDB.getInstance().getPathologySyncBroker().getPathologyRemoteByPathology(pathologyPatient.getPathology());
if (pathologyRemote == null) {
return null;
}
PatientPathologyWs patientPathologyWs = new PatientPathologyWs();
patientPathologyWs.setPathologyId(pathologyRemote.getRemoteId());
patientPathologyWs.setAgeAtStart(pathologyPatient.getAgeAtStartAsInteger() > 0 ? pathologyPatient.getPatient().getAge() - pathologyPatient.getAgeAtStartAsInteger() : 0);
patientPathologyWs.setCurrently(pathologyPatient.getCurrently() != null ? pathologyPatient.getCurrently() : false);
patientPathologyWs.setInherited(pathologyPatient.getInherited() != null ? pathologyPatient.getInherited() : false);
return patientPathologyWs;
}