private String getLabOrderNo(ChartResultVo chartResult) { if(chartResult == null || chartResult.getInvestigationData() == null || chartResult.getInvestigationData().getSpecimen() == null || chartResult.getInvestigationData().getSpecimen().size() == 0) return null; if(chartResult.getInvestigationData().getSpecimen().size() == 1 && chartResult.getInvestigationData().getSpecimen().get(0) != null) return chartResult.getInvestigationData().getSpecimen().get(0).getFillerOrdNum(); for(OrderSpecimenChartVo spec : chartResult.getInvestigationData().getSpecimen()) { if(chartResult.getSpecimenComments() != null && chartResult.getSpecimenComments().getID_OrderSpecimen().equals(spec.getID_OrderSpecimen())) { return spec.getFillerOrdNum(); } } return null; }