/** * WDEV-12345 * Retrieve completed OrderInvestigations for provided Cats Referral record */ public OrderInvestigationListVoCollection getInvestigation(CatsReferralRefVo referral) { if (referral == null || !referral.getID_CatsReferralIsNotNull()) return null; String query = "select investig from CatsReferral as cats left join cats.investigationOrders as orders left join orders.investigations as investig left join investig.resultDetails as resDet left join resDet.pathologyResultDetails as pathRes where cats.id = :ID and (resDet.clinicalResultDetails is not null or pathRes.id is not null)"; ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("ID"); paramValues.add(referral.getID_CatsReferral()); return OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(getDomainFactory().find(query, paramNames, paramValues)); }
public OcsOrderSummaryVo getOrderSummary(OcsOrderSessionRefVo voOcsOrderRef) //WDEV-16232 { if(voOcsOrderRef == null || voOcsOrderRef.getID_OcsOrderSession() == null)//WDEV-16232 throw new DomainRuntimeException("Order ref is null"); OcsOrderSession doOcsOrder = (OcsOrderSession) getDomainFactory().getDomainObject(voOcsOrderRef);//WDEV-16232 OcsOrderSummaryVo voOcsOrder = OcsOrderSummaryVoAssembler.create(doOcsOrder); //WDEV-12054 HashMap map = new HashMap(); List results = new ArrayList(doOcsOrder.getInvestigations()); //convert set to list ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class); map = impl.getListXoHistory(map, results); OrderInvestigationListVoCollection voCollInvs = OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(results); if(voCollInvs != null) { for(OrderInvestigationListVo voResult : voCollInvs) { if(map.containsKey(voResult.getID_OrderInvestigation())) { voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation())); } } } voOcsOrder.setInvestigations(voCollInvs); return voOcsOrder; }