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; }