@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(labItem.getLabel()).append(", date ").append(getDate().toString(TimeTool.TIMESTAMP)); if (refMale != null) { sb.append(" refm ").append(refMale); } if (refFemale != null) { sb.append(" reff ").append(refFemale); } if (unit != null) { sb.append(" unit ").append(unit); } if (analyseTime != null) { sb.append(" aTime ").append(analyseTime.toString(TimeTool.TIMESTAMP)); } if (observationTime != null) { sb.append(" oTime ").append(observationTime.toString(TimeTool.TIMESTAMP)); } if (transmissionTime != null) { sb.append(" tTime ").append(transmissionTime.toString(TimeTool.TIMESTAMP)); } sb.append(" res ").append(getResult()); return sb.toString(); }
public void overwriteExisting(ILabResult labResult) { labResult.setComment(comment); labResult.setResult(result); // pathologic check takes place in labResult if it is numeric if (labItem.getTyp() == LabItemTyp.NUMERIC) { flags = labResult.getFlags(); } setFields(labResult); }
public String getLabel() { StringBuilder sb = new StringBuilder(); sb.append(labItem.getLabel()) .append(", ") .append(getDate().toString(TimeTool.DATE_GER)) .append(": ") .append(getResult()); return sb.toString(); }
public ILabResult persist() { // determine gender, set refVal String refVal; if (Gender.MALE == patient.getGender()) { refVal = refMale; } else { refVal = refFemale; } ILabResult labResult = labImportUtil.createLabResult(patient, date, labItem, result, comment, refVal, origin); // pathologic check takes place in labResult if it is numeric if (labItem.getTyp() == LabItemTyp.NUMERIC) { flags = labResult.getFlags(); } setFields(labResult); return labResult; }
private void setFields(ILabResult labResult) { if (refMale != null) { labResult.setRefMale(refMale); ILabItem item = labResult.getItem(); if (item != null) { String itemRefMale = item.getReferenceMale(); if (itemRefMale == null || itemRefMale.isEmpty()) { item.setReferenceMale(refMale); } } } if (refFemale != null) { labResult.setRefFemale(refFemale); ILabItem item = labResult.getItem(); if (item != null) { String itemRefFemale = item.getReferenceFemale(); if (itemRefFemale == null || itemRefFemale.isEmpty()) { item.setReferenceFemale(refFemale); } } } if (unit != null) { labResult.setUnit(unit); } if (analyseTime != null) { labResult.setAnalyseTime(analyseTime); } if (observationTime != null) { labResult.setObservationTime(observationTime); } if (transmissionTime != null) { labResult.setTransmissionTime(transmissionTime); } // set all flags at once, flags is a string in the database labResult.setFlags(flags); // if (setProperties != null) { // Set<String> keys = setProperties.keySet(); // for (String string : keys) { // labResult.set(string, setProperties.get(string)); // } // } }