private SpecimenNameVoCollection buildOrderSpecimenCollection(OrderResultHistoryVo orderResultHistoryVo) { if(orderResultHistoryVo == null || orderResultHistoryVo.getResultDetail() == null || orderResultHistoryVo.getResultDetail().getPathologyResultDetails() == null) return null; SpecimenNameVoCollection spec = new SpecimenNameVoCollection(); for(PathologyResultDetailVo pathResult : orderResultHistoryVo.getResultDetail().getPathologyResultDetails()) { if(pathResult == null) continue; spec.add(pathResult.getOrderSpecimen()); } return spec; }
private String getInvestigationDisplayStringForDFT(boolean showingHistory, IOrderSpecimen specimen, PathologyResultDetailVo resultDetails) { StringBuilder name = new StringBuilder(); // Investigation Name name.append(pathOrdInv.getIOrderResultDisplayInvName()); name.append(" - Specimen: ").append(specimen.getIOrderSpecimenSource()); if(specimen.getIOrderSpecimenCollectionDateTime() != null) { if(Boolean.TRUE.equals(specimen.getIOrderSpecimenCollectionTimeSupplied())) { name.append(" - Coll. Date: ").append(specimen.getIOrderSpecimenCollectionDateTime().toString()); } else { name.append(" - Coll. Date: ").append(specimen.getIOrderSpecimenCollectionDateTime().toString(false)); } } if(specimen.getIOrderSpecimenReceivedDateTime() != null) { if(Boolean.TRUE.equals(specimen.getIOrderSpecimenReceivedTimeSupplied())) { name.append(" - Rec. Date: ").append(specimen.getIOrderSpecimenReceivedDateTime().toString()); } else { name.append(" - Rec. Date: ").append(specimen.getIOrderSpecimenReceivedDateTime().toString(false)); } } name.append(" - Lab No: ").append(specimen.getIOrderSpecimenFillerOrdNum()); name.append("<br>"); if(pathOrdInv.getIOrderResultLabSpecimenType() != null) { name.append("Result Specimen Type: " + pathOrdInv.getIOrderResultLabSpecimenType()); } if (specimen.getIOrderSpecimenResultedDate() != null) { if (Boolean.TRUE.equals(specimen.getIOrderSpecimenResultedTimeSupplied())) { name.append(" - Result Date: " + specimen.getIOrderSpecimenResultedDate().toString()); } else { name.append(" - Result Date: " + specimen.getIOrderSpecimenResultedDate().toString(false)); } } if(pathOrdInv.getIOrderResultDisplayStatus() != null) { name.append(" - Result Status : " + ((resultDetails != null && resultDetails.getID_PathResultDetails() != null) ? RESULTED : BOOKED_IN)); } return name.toString(); }