@Override public String getName() { return this.access.isOpenAccess() && this.match != null ? this.match.getName() : null; }
int x = 0; if (present.contains("name")) { DataCell cell = new DataCell(disorder.getName(), x, y); cell.setMultiline(); bodySection.addCell(cell);
public DataSection disordersBody(Patient patient) { String sectionName = "disorders"; Set<String> present = this.enabledHeaderIdsBySection.get(sectionName); if (present == null || present.isEmpty()) { return null; } DataSection bodySection = new DataSection(); Set<? extends Disorder> disorders = patient.getDisorders(); Integer y = 0; for (Disorder disorder : disorders) { bodySection.addCell(new DataCell(disorder.getName(), 0, y)); bodySection.addCell(new DataCell(disorder.getId(), 1, y)); y++; } /* If there is no data, but there are headers present, create empty cells */ if (disorders.isEmpty()) { bodySection.addCell(new DataCell("", 0, y)); bodySection.addCell(new DataCell("", 1, y)); } return bodySection; }
Integer x = 0; if (present.contains("name")) { DataCell cell = new DataCell(disorder.getName(), x, y); cell.setMultiline(); bodySection.addCell(cell);
@Override public JSONObject toJSON() { if (this.match == null && this.reference == null || !this.access.isOpenAccess()) { return new JSONObject(true); } JSONObject result = new JSONObject(); if (this.match != null) { result.element("id", this.match.getId()); result.element("name", this.match.getName()); } if (this.reference != null) { result.element("queryId", this.reference.getId()); } double score = getScore(); if (!Double.isNaN(score)) { result.element("score", score); } return result; }
public DataSection clinicalDiagnosisBody(Patient patient) { String sectionName = "clinicalDiagnosis"; Set<String> present = this.enabledHeaderIdsBySection.get(sectionName); if (present == null || present.isEmpty()) { return null; } int y = 0; DataSection bodySection = new DataSection(); PatientData<Disorder> clinicalDisorders = patient.getData("clinical-diagnosis"); /* If there is no data, but there are headers present, create empty cells */ if (clinicalDisorders == null || clinicalDisorders.size() == 0) { bodySection.addCell(new DataCell("", 0, y)); bodySection.addCell(new DataCell("", 1, y)); return bodySection; } for (Disorder disorder : clinicalDisorders) { bodySection.addCell(new DataCell(disorder.getName(), 0, y)); bodySection.addCell(new DataCell(disorder.getId(), 1, y)); y++; } return bodySection; }