public OrderInvestigationVo getOrder(OrderInvestigationRefVo orderRef) { if(orderRef == null) return null; return OrderInvestigationVoAssembler.create((OrderInvestigation)getDomainFactory().getDomainObject(orderRef)); }
/** * WDEV-13321 * Function used to reset the Allocated for review HCP */ public OrderInvestigationVo resetAllocatedReviewHCP(OrderInvestigationRefVo investigation) throws StaleObjectException { if (investigation == null || !investigation.getID_OrderInvestigationIsNotNull()) return null; DomainFactory factory = getDomainFactory(); OrderInvestigation domOrdInv = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, investigation.getID_OrderInvestigation()); if (domOrdInv == null) return null; if (domOrdInv.getAllocatedHCPforReview() == null) return OrderInvestigationVoAssembler.create(domOrdInv); HcpLiteVo hcpUser = (HcpLiteVo) getHcpLiteUser(); ims.core.resource.people.domain.objects.Hcp domHcpUser = HcpLiteVoAssembler.extractHcp(factory, hcpUser); if (domOrdInv.getAllocatedHCPforReview().equals(domHcpUser)) { domOrdInv.setAllocatedHCPforReview(null); domOrdInv.setAllocatedDateForReview(null); domOrdInv.setResultSortDate(domOrdInv.getRepDateTime());//http://jira/browse/WDEV-18025 domOrdInv.setForReview(null); // WDEV-18052 domOrdInv.setReviewRequestedBy(null); // WDEV-18052 } return OrderInvestigationVoAssembler.create(domOrdInv); }
public String getCentricityPacsAccessionNumber(OrderInvestigationRefVo voOrderInvRefVo) { if(voOrderInvRefVo == null || voOrderInvRefVo.getID_OrderInvestigation() == null) throw new DomainRuntimeException("Invalid OrderInvestigation id"); if(voOrderInvRefVo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" select o1_1 from OrderInvestigation as o1_1 where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " o1_1.id = :OrderInvId"); markers.add("OrderInvId"); values.add(voOrderInvRefVo.getID_OrderInvestigation()); andStr = " and "; List<?> list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { OrderInvestigationVoCollection voColl = OrderInvestigationVoAssembler.createOrderInvestigationVoCollectionFromOrderInvestigation(list); if(voColl != null && voColl.size() > 0) return voColl.get(0).getAccessionNumber(); } } return null; }